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::Argument {
333        pub const fn const_default() -> Self {
334            Self {
335                kind: None,
336                input: None,
337                result: None,
338                subresult: None,
339            }
340        }
341        #[doc(hidden)]
342        pub fn default_instance() -> &'static Self {
343            static DEFAULT: super::Argument = super::Argument::const_default();
344            &DEFAULT
345        }
346        ///Sets `kind` with the provided value.
347        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
348            mut self,
349            field: T,
350        ) -> Self {
351            self.set_kind(field.into());
352            self
353        }
354        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
355        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
356            self.input.as_mut().map(|field| field as _)
357        }
358        ///Returns a mutable reference to `input`.
359        ///If the field is unset, it is first initialized with the default value.
360        pub fn input_mut(&mut self) -> &mut u32 {
361            self.input.get_or_insert_default()
362        }
363        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
364        pub fn input_opt(&self) -> Option<u32> {
365            self.input.as_ref().map(|field| *field)
366        }
367        ///Sets `input` with the provided value.
368        pub fn set_input(&mut self, field: u32) {
369            self.input = Some(field);
370        }
371        ///Sets `input` with the provided value.
372        pub fn with_input(mut self, field: u32) -> Self {
373            self.set_input(field);
374            self
375        }
376        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
377        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
378            self.result.as_mut().map(|field| field as _)
379        }
380        ///Returns a mutable reference to `result`.
381        ///If the field is unset, it is first initialized with the default value.
382        pub fn result_mut(&mut self) -> &mut u32 {
383            self.result.get_or_insert_default()
384        }
385        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
386        pub fn result_opt(&self) -> Option<u32> {
387            self.result.as_ref().map(|field| *field)
388        }
389        ///Sets `result` with the provided value.
390        pub fn set_result(&mut self, field: u32) {
391            self.result = Some(field);
392        }
393        ///Sets `result` with the provided value.
394        pub fn with_result(mut self, field: u32) -> Self {
395            self.set_result(field);
396            self
397        }
398        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
399        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
400            self.subresult.as_mut().map(|field| field as _)
401        }
402        ///Returns a mutable reference to `subresult`.
403        ///If the field is unset, it is first initialized with the default value.
404        pub fn subresult_mut(&mut self) -> &mut u32 {
405            self.subresult.get_or_insert_default()
406        }
407        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
408        pub fn subresult_opt(&self) -> Option<u32> {
409            self.subresult.as_ref().map(|field| *field)
410        }
411        ///Sets `subresult` with the provided value.
412        pub fn set_subresult(&mut self, field: u32) {
413            self.subresult = Some(field);
414        }
415        ///Sets `subresult` with the provided value.
416        pub fn with_subresult(mut self, field: u32) -> Self {
417            self.set_subresult(field);
418            self
419        }
420    }
421    impl super::AuthenticatorStateExpire {
422        pub const fn const_default() -> Self {
423            Self {
424                min_epoch: None,
425                authenticator_object_initial_shared_version: None,
426            }
427        }
428        #[doc(hidden)]
429        pub fn default_instance() -> &'static Self {
430            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
431            &DEFAULT
432        }
433        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
434        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
435            self.min_epoch.as_mut().map(|field| field as _)
436        }
437        ///Returns a mutable reference to `min_epoch`.
438        ///If the field is unset, it is first initialized with the default value.
439        pub fn min_epoch_mut(&mut self) -> &mut u64 {
440            self.min_epoch.get_or_insert_default()
441        }
442        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
443        pub fn min_epoch_opt(&self) -> Option<u64> {
444            self.min_epoch.as_ref().map(|field| *field)
445        }
446        ///Sets `min_epoch` with the provided value.
447        pub fn set_min_epoch(&mut self, field: u64) {
448            self.min_epoch = Some(field);
449        }
450        ///Sets `min_epoch` with the provided value.
451        pub fn with_min_epoch(mut self, field: u64) -> Self {
452            self.set_min_epoch(field);
453            self
454        }
455        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
456        pub fn authenticator_object_initial_shared_version_opt_mut(
457            &mut self,
458        ) -> Option<&mut u64> {
459            self.authenticator_object_initial_shared_version
460                .as_mut()
461                .map(|field| field as _)
462        }
463        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
464        ///If the field is unset, it is first initialized with the default value.
465        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
466            self.authenticator_object_initial_shared_version.get_or_insert_default()
467        }
468        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
469        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
470            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
471        }
472        ///Sets `authenticator_object_initial_shared_version` with the provided value.
473        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
474            self.authenticator_object_initial_shared_version = Some(field);
475        }
476        ///Sets `authenticator_object_initial_shared_version` with the provided value.
477        pub fn with_authenticator_object_initial_shared_version(
478            mut self,
479            field: u64,
480        ) -> Self {
481            self.set_authenticator_object_initial_shared_version(field);
482            self
483        }
484    }
485    impl super::AuthenticatorStateUpdate {
486        pub const fn const_default() -> Self {
487            Self {
488                epoch: None,
489                round: None,
490                new_active_jwks: Vec::new(),
491                authenticator_object_initial_shared_version: None,
492            }
493        }
494        #[doc(hidden)]
495        pub fn default_instance() -> &'static Self {
496            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
497            &DEFAULT
498        }
499        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
500        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
501            self.epoch.as_mut().map(|field| field as _)
502        }
503        ///Returns a mutable reference to `epoch`.
504        ///If the field is unset, it is first initialized with the default value.
505        pub fn epoch_mut(&mut self) -> &mut u64 {
506            self.epoch.get_or_insert_default()
507        }
508        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
509        pub fn epoch_opt(&self) -> Option<u64> {
510            self.epoch.as_ref().map(|field| *field)
511        }
512        ///Sets `epoch` with the provided value.
513        pub fn set_epoch(&mut self, field: u64) {
514            self.epoch = Some(field);
515        }
516        ///Sets `epoch` with the provided value.
517        pub fn with_epoch(mut self, field: u64) -> Self {
518            self.set_epoch(field);
519            self
520        }
521        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
522        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
523            self.round.as_mut().map(|field| field as _)
524        }
525        ///Returns a mutable reference to `round`.
526        ///If the field is unset, it is first initialized with the default value.
527        pub fn round_mut(&mut self) -> &mut u64 {
528            self.round.get_or_insert_default()
529        }
530        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
531        pub fn round_opt(&self) -> Option<u64> {
532            self.round.as_ref().map(|field| *field)
533        }
534        ///Sets `round` with the provided value.
535        pub fn set_round(&mut self, field: u64) {
536            self.round = Some(field);
537        }
538        ///Sets `round` with the provided value.
539        pub fn with_round(mut self, field: u64) -> Self {
540            self.set_round(field);
541            self
542        }
543        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
544        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
545            &self.new_active_jwks
546        }
547        ///Returns a mutable reference to `new_active_jwks`.
548        ///If the field is unset, it is first initialized with the default value.
549        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
550            &mut self.new_active_jwks
551        }
552        ///Sets `new_active_jwks` with the provided value.
553        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
554            self.new_active_jwks = field;
555        }
556        ///Sets `new_active_jwks` with the provided value.
557        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
558            self.set_new_active_jwks(field);
559            self
560        }
561        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
562        pub fn authenticator_object_initial_shared_version_opt_mut(
563            &mut self,
564        ) -> Option<&mut u64> {
565            self.authenticator_object_initial_shared_version
566                .as_mut()
567                .map(|field| field as _)
568        }
569        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
570        ///If the field is unset, it is first initialized with the default value.
571        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
572            self.authenticator_object_initial_shared_version.get_or_insert_default()
573        }
574        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
575        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
576            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
577        }
578        ///Sets `authenticator_object_initial_shared_version` with the provided value.
579        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
580            self.authenticator_object_initial_shared_version = Some(field);
581        }
582        ///Sets `authenticator_object_initial_shared_version` with the provided value.
583        pub fn with_authenticator_object_initial_shared_version(
584            mut self,
585            field: u64,
586        ) -> Self {
587            self.set_authenticator_object_initial_shared_version(field);
588            self
589        }
590    }
591    impl super::Balance {
592        pub const fn const_default() -> Self {
593            Self {
594                coin_type: None,
595                balance: None,
596                address_balance: None,
597                coin_balance: None,
598            }
599        }
600        #[doc(hidden)]
601        pub fn default_instance() -> &'static Self {
602            static DEFAULT: super::Balance = super::Balance::const_default();
603            &DEFAULT
604        }
605        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
606        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
607            self.coin_type.as_mut().map(|field| field as _)
608        }
609        ///Returns a mutable reference to `coin_type`.
610        ///If the field is unset, it is first initialized with the default value.
611        pub fn coin_type_mut(&mut self) -> &mut String {
612            self.coin_type.get_or_insert_default()
613        }
614        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
615        pub fn coin_type_opt(&self) -> Option<&str> {
616            self.coin_type.as_ref().map(|field| field as _)
617        }
618        ///Sets `coin_type` with the provided value.
619        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
620            self.coin_type = Some(field.into().into());
621        }
622        ///Sets `coin_type` with the provided value.
623        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
624            self.set_coin_type(field.into());
625            self
626        }
627        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
628        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
629            self.balance.as_mut().map(|field| field as _)
630        }
631        ///Returns a mutable reference to `balance`.
632        ///If the field is unset, it is first initialized with the default value.
633        pub fn balance_mut(&mut self) -> &mut u64 {
634            self.balance.get_or_insert_default()
635        }
636        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
637        pub fn balance_opt(&self) -> Option<u64> {
638            self.balance.as_ref().map(|field| *field)
639        }
640        ///Sets `balance` with the provided value.
641        pub fn set_balance(&mut self, field: u64) {
642            self.balance = Some(field);
643        }
644        ///Sets `balance` with the provided value.
645        pub fn with_balance(mut self, field: u64) -> Self {
646            self.set_balance(field);
647            self
648        }
649        ///If `address_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
650        pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
651            self.address_balance.as_mut().map(|field| field as _)
652        }
653        ///Returns a mutable reference to `address_balance`.
654        ///If the field is unset, it is first initialized with the default value.
655        pub fn address_balance_mut(&mut self) -> &mut u64 {
656            self.address_balance.get_or_insert_default()
657        }
658        ///If `address_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
659        pub fn address_balance_opt(&self) -> Option<u64> {
660            self.address_balance.as_ref().map(|field| *field)
661        }
662        ///Sets `address_balance` with the provided value.
663        pub fn set_address_balance(&mut self, field: u64) {
664            self.address_balance = Some(field);
665        }
666        ///Sets `address_balance` with the provided value.
667        pub fn with_address_balance(mut self, field: u64) -> Self {
668            self.set_address_balance(field);
669            self
670        }
671        ///If `coin_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
672        pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
673            self.coin_balance.as_mut().map(|field| field as _)
674        }
675        ///Returns a mutable reference to `coin_balance`.
676        ///If the field is unset, it is first initialized with the default value.
677        pub fn coin_balance_mut(&mut self) -> &mut u64 {
678            self.coin_balance.get_or_insert_default()
679        }
680        ///If `coin_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
681        pub fn coin_balance_opt(&self) -> Option<u64> {
682            self.coin_balance.as_ref().map(|field| *field)
683        }
684        ///Sets `coin_balance` with the provided value.
685        pub fn set_coin_balance(&mut self, field: u64) {
686            self.coin_balance = Some(field);
687        }
688        ///Sets `coin_balance` with the provided value.
689        pub fn with_coin_balance(mut self, field: u64) -> Self {
690            self.set_coin_balance(field);
691            self
692        }
693    }
694    impl super::BalanceChange {
695        pub const fn const_default() -> Self {
696            Self {
697                address: None,
698                coin_type: None,
699                amount: None,
700            }
701        }
702        #[doc(hidden)]
703        pub fn default_instance() -> &'static Self {
704            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
705            &DEFAULT
706        }
707        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
708        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
709            self.address.as_mut().map(|field| field as _)
710        }
711        ///Returns a mutable reference to `address`.
712        ///If the field is unset, it is first initialized with the default value.
713        pub fn address_mut(&mut self) -> &mut String {
714            self.address.get_or_insert_default()
715        }
716        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
717        pub fn address_opt(&self) -> Option<&str> {
718            self.address.as_ref().map(|field| field as _)
719        }
720        ///Sets `address` with the provided value.
721        pub fn set_address<T: Into<String>>(&mut self, field: T) {
722            self.address = Some(field.into().into());
723        }
724        ///Sets `address` with the provided value.
725        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
726            self.set_address(field.into());
727            self
728        }
729        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
730        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
731            self.coin_type.as_mut().map(|field| field as _)
732        }
733        ///Returns a mutable reference to `coin_type`.
734        ///If the field is unset, it is first initialized with the default value.
735        pub fn coin_type_mut(&mut self) -> &mut String {
736            self.coin_type.get_or_insert_default()
737        }
738        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
739        pub fn coin_type_opt(&self) -> Option<&str> {
740            self.coin_type.as_ref().map(|field| field as _)
741        }
742        ///Sets `coin_type` with the provided value.
743        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
744            self.coin_type = Some(field.into().into());
745        }
746        ///Sets `coin_type` with the provided value.
747        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
748            self.set_coin_type(field.into());
749            self
750        }
751        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
752        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
753            self.amount.as_mut().map(|field| field as _)
754        }
755        ///Returns a mutable reference to `amount`.
756        ///If the field is unset, it is first initialized with the default value.
757        pub fn amount_mut(&mut self) -> &mut String {
758            self.amount.get_or_insert_default()
759        }
760        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
761        pub fn amount_opt(&self) -> Option<&str> {
762            self.amount.as_ref().map(|field| field as _)
763        }
764        ///Sets `amount` with the provided value.
765        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
766            self.amount = Some(field.into().into());
767        }
768        ///Sets `amount` with the provided value.
769        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
770            self.set_amount(field.into());
771            self
772        }
773    }
774    impl super::BatchGetObjectsRequest {
775        pub const fn const_default() -> Self {
776            Self {
777                requests: Vec::new(),
778                read_mask: None,
779            }
780        }
781        #[doc(hidden)]
782        pub fn default_instance() -> &'static Self {
783            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
784            &DEFAULT
785        }
786        ///Returns the value of `requests`, or the default value if `requests` is unset.
787        pub fn requests(&self) -> &[super::GetObjectRequest] {
788            &self.requests
789        }
790        ///Returns a mutable reference to `requests`.
791        ///If the field is unset, it is first initialized with the default value.
792        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
793            &mut self.requests
794        }
795        ///Sets `requests` with the provided value.
796        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
797            self.requests = field;
798        }
799        ///Sets `requests` with the provided value.
800        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
801            self.set_requests(field);
802            self
803        }
804        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
805        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
806            self.read_mask.as_mut().map(|field| field as _)
807        }
808        ///Returns a mutable reference to `read_mask`.
809        ///If the field is unset, it is first initialized with the default value.
810        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
811            self.read_mask.get_or_insert_default()
812        }
813        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
814        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
815            self.read_mask.as_ref().map(|field| field as _)
816        }
817        ///Sets `read_mask` with the provided value.
818        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
819            self.read_mask = Some(field.into().into());
820        }
821        ///Sets `read_mask` with the provided value.
822        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
823            mut self,
824            field: T,
825        ) -> Self {
826            self.set_read_mask(field.into());
827            self
828        }
829    }
830    impl super::BatchGetObjectsResponse {
831        pub const fn const_default() -> Self {
832            Self { objects: Vec::new() }
833        }
834        #[doc(hidden)]
835        pub fn default_instance() -> &'static Self {
836            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
837            &DEFAULT
838        }
839        ///Returns the value of `objects`, or the default value if `objects` is unset.
840        pub fn objects(&self) -> &[super::GetObjectResult] {
841            &self.objects
842        }
843        ///Returns a mutable reference to `objects`.
844        ///If the field is unset, it is first initialized with the default value.
845        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
846            &mut self.objects
847        }
848        ///Sets `objects` with the provided value.
849        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
850            self.objects = field;
851        }
852        ///Sets `objects` with the provided value.
853        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
854            self.set_objects(field);
855            self
856        }
857    }
858    impl super::BatchGetTransactionsRequest {
859        pub const fn const_default() -> Self {
860            Self {
861                digests: Vec::new(),
862                read_mask: None,
863            }
864        }
865        #[doc(hidden)]
866        pub fn default_instance() -> &'static Self {
867            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
868            &DEFAULT
869        }
870        ///Returns the value of `digests`, or the default value if `digests` is unset.
871        pub fn digests(&self) -> &[String] {
872            &self.digests
873        }
874        ///Returns a mutable reference to `digests`.
875        ///If the field is unset, it is first initialized with the default value.
876        pub fn digests_mut(&mut self) -> &mut Vec<String> {
877            &mut self.digests
878        }
879        ///Sets `digests` with the provided value.
880        pub fn set_digests(&mut self, field: Vec<String>) {
881            self.digests = field;
882        }
883        ///Sets `digests` with the provided value.
884        pub fn with_digests(mut self, field: Vec<String>) -> Self {
885            self.set_digests(field);
886            self
887        }
888        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
889        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
890            self.read_mask.as_mut().map(|field| field as _)
891        }
892        ///Returns a mutable reference to `read_mask`.
893        ///If the field is unset, it is first initialized with the default value.
894        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
895            self.read_mask.get_or_insert_default()
896        }
897        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
898        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
899            self.read_mask.as_ref().map(|field| field as _)
900        }
901        ///Sets `read_mask` with the provided value.
902        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
903            self.read_mask = Some(field.into().into());
904        }
905        ///Sets `read_mask` with the provided value.
906        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
907            mut self,
908            field: T,
909        ) -> Self {
910            self.set_read_mask(field.into());
911            self
912        }
913    }
914    impl super::BatchGetTransactionsResponse {
915        pub const fn const_default() -> Self {
916            Self { transactions: Vec::new() }
917        }
918        #[doc(hidden)]
919        pub fn default_instance() -> &'static Self {
920            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
921            &DEFAULT
922        }
923        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
924        pub fn transactions(&self) -> &[super::GetTransactionResult] {
925            &self.transactions
926        }
927        ///Returns a mutable reference to `transactions`.
928        ///If the field is unset, it is first initialized with the default value.
929        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
930            &mut self.transactions
931        }
932        ///Sets `transactions` with the provided value.
933        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
934            self.transactions = field;
935        }
936        ///Sets `transactions` with the provided value.
937        pub fn with_transactions(
938            mut self,
939            field: Vec<super::GetTransactionResult>,
940        ) -> Self {
941            self.set_transactions(field);
942            self
943        }
944    }
945    impl super::Bcs {
946        pub const fn const_default() -> Self {
947            Self { name: None, value: None }
948        }
949        #[doc(hidden)]
950        pub fn default_instance() -> &'static Self {
951            static DEFAULT: super::Bcs = super::Bcs::const_default();
952            &DEFAULT
953        }
954        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
955        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
956            self.name.as_mut().map(|field| field as _)
957        }
958        ///Returns a mutable reference to `name`.
959        ///If the field is unset, it is first initialized with the default value.
960        pub fn name_mut(&mut self) -> &mut String {
961            self.name.get_or_insert_default()
962        }
963        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
964        pub fn name_opt(&self) -> Option<&str> {
965            self.name.as_ref().map(|field| field as _)
966        }
967        ///Sets `name` with the provided value.
968        pub fn set_name<T: Into<String>>(&mut self, field: T) {
969            self.name = Some(field.into().into());
970        }
971        ///Sets `name` with the provided value.
972        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
973            self.set_name(field.into());
974            self
975        }
976        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
977        pub fn value_opt(&self) -> Option<&[u8]> {
978            self.value.as_ref().map(|field| field as _)
979        }
980        ///Sets `value` with the provided value.
981        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
982            self.value = Some(field.into().into());
983        }
984        ///Sets `value` with the provided value.
985        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
986            self.set_value(field.into());
987            self
988        }
989    }
990    impl super::CanceledTransaction {
991        pub const fn const_default() -> Self {
992            Self {
993                digest: None,
994                version_assignments: Vec::new(),
995            }
996        }
997        #[doc(hidden)]
998        pub fn default_instance() -> &'static Self {
999            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
1000            &DEFAULT
1001        }
1002        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1003        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1004            self.digest.as_mut().map(|field| field as _)
1005        }
1006        ///Returns a mutable reference to `digest`.
1007        ///If the field is unset, it is first initialized with the default value.
1008        pub fn digest_mut(&mut self) -> &mut String {
1009            self.digest.get_or_insert_default()
1010        }
1011        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1012        pub fn digest_opt(&self) -> Option<&str> {
1013            self.digest.as_ref().map(|field| field as _)
1014        }
1015        ///Sets `digest` with the provided value.
1016        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1017            self.digest = Some(field.into().into());
1018        }
1019        ///Sets `digest` with the provided value.
1020        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1021            self.set_digest(field.into());
1022            self
1023        }
1024        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
1025        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
1026            &self.version_assignments
1027        }
1028        ///Returns a mutable reference to `version_assignments`.
1029        ///If the field is unset, it is first initialized with the default value.
1030        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
1031            &mut self.version_assignments
1032        }
1033        ///Sets `version_assignments` with the provided value.
1034        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
1035            self.version_assignments = field;
1036        }
1037        ///Sets `version_assignments` with the provided value.
1038        pub fn with_version_assignments(
1039            mut self,
1040            field: Vec<super::VersionAssignment>,
1041        ) -> Self {
1042            self.set_version_assignments(field);
1043            self
1044        }
1045    }
1046    impl super::ChangeEpoch {
1047        pub const fn const_default() -> Self {
1048            Self {
1049                epoch: None,
1050                protocol_version: None,
1051                storage_charge: None,
1052                computation_charge: None,
1053                storage_rebate: None,
1054                non_refundable_storage_fee: None,
1055                epoch_start_timestamp: None,
1056                system_packages: Vec::new(),
1057            }
1058        }
1059        #[doc(hidden)]
1060        pub fn default_instance() -> &'static Self {
1061            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
1062            &DEFAULT
1063        }
1064        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1065        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1066            self.epoch.as_mut().map(|field| field as _)
1067        }
1068        ///Returns a mutable reference to `epoch`.
1069        ///If the field is unset, it is first initialized with the default value.
1070        pub fn epoch_mut(&mut self) -> &mut u64 {
1071            self.epoch.get_or_insert_default()
1072        }
1073        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1074        pub fn epoch_opt(&self) -> Option<u64> {
1075            self.epoch.as_ref().map(|field| *field)
1076        }
1077        ///Sets `epoch` with the provided value.
1078        pub fn set_epoch(&mut self, field: u64) {
1079            self.epoch = Some(field);
1080        }
1081        ///Sets `epoch` with the provided value.
1082        pub fn with_epoch(mut self, field: u64) -> Self {
1083            self.set_epoch(field);
1084            self
1085        }
1086        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1087        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1088            self.protocol_version.as_mut().map(|field| field as _)
1089        }
1090        ///Returns a mutable reference to `protocol_version`.
1091        ///If the field is unset, it is first initialized with the default value.
1092        pub fn protocol_version_mut(&mut self) -> &mut u64 {
1093            self.protocol_version.get_or_insert_default()
1094        }
1095        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1096        pub fn protocol_version_opt(&self) -> Option<u64> {
1097            self.protocol_version.as_ref().map(|field| *field)
1098        }
1099        ///Sets `protocol_version` with the provided value.
1100        pub fn set_protocol_version(&mut self, field: u64) {
1101            self.protocol_version = Some(field);
1102        }
1103        ///Sets `protocol_version` with the provided value.
1104        pub fn with_protocol_version(mut self, field: u64) -> Self {
1105            self.set_protocol_version(field);
1106            self
1107        }
1108        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1109        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1110            self.storage_charge.as_mut().map(|field| field as _)
1111        }
1112        ///Returns a mutable reference to `storage_charge`.
1113        ///If the field is unset, it is first initialized with the default value.
1114        pub fn storage_charge_mut(&mut self) -> &mut u64 {
1115            self.storage_charge.get_or_insert_default()
1116        }
1117        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1118        pub fn storage_charge_opt(&self) -> Option<u64> {
1119            self.storage_charge.as_ref().map(|field| *field)
1120        }
1121        ///Sets `storage_charge` with the provided value.
1122        pub fn set_storage_charge(&mut self, field: u64) {
1123            self.storage_charge = Some(field);
1124        }
1125        ///Sets `storage_charge` with the provided value.
1126        pub fn with_storage_charge(mut self, field: u64) -> Self {
1127            self.set_storage_charge(field);
1128            self
1129        }
1130        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1131        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1132            self.computation_charge.as_mut().map(|field| field as _)
1133        }
1134        ///Returns a mutable reference to `computation_charge`.
1135        ///If the field is unset, it is first initialized with the default value.
1136        pub fn computation_charge_mut(&mut self) -> &mut u64 {
1137            self.computation_charge.get_or_insert_default()
1138        }
1139        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1140        pub fn computation_charge_opt(&self) -> Option<u64> {
1141            self.computation_charge.as_ref().map(|field| *field)
1142        }
1143        ///Sets `computation_charge` with the provided value.
1144        pub fn set_computation_charge(&mut self, field: u64) {
1145            self.computation_charge = Some(field);
1146        }
1147        ///Sets `computation_charge` with the provided value.
1148        pub fn with_computation_charge(mut self, field: u64) -> Self {
1149            self.set_computation_charge(field);
1150            self
1151        }
1152        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1153        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1154            self.storage_rebate.as_mut().map(|field| field as _)
1155        }
1156        ///Returns a mutable reference to `storage_rebate`.
1157        ///If the field is unset, it is first initialized with the default value.
1158        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1159            self.storage_rebate.get_or_insert_default()
1160        }
1161        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
1162        pub fn storage_rebate_opt(&self) -> Option<u64> {
1163            self.storage_rebate.as_ref().map(|field| *field)
1164        }
1165        ///Sets `storage_rebate` with the provided value.
1166        pub fn set_storage_rebate(&mut self, field: u64) {
1167            self.storage_rebate = Some(field);
1168        }
1169        ///Sets `storage_rebate` with the provided value.
1170        pub fn with_storage_rebate(mut self, field: u64) -> Self {
1171            self.set_storage_rebate(field);
1172            self
1173        }
1174        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1175        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1176            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1177        }
1178        ///Returns a mutable reference to `non_refundable_storage_fee`.
1179        ///If the field is unset, it is first initialized with the default value.
1180        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1181            self.non_refundable_storage_fee.get_or_insert_default()
1182        }
1183        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
1184        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1185            self.non_refundable_storage_fee.as_ref().map(|field| *field)
1186        }
1187        ///Sets `non_refundable_storage_fee` with the provided value.
1188        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1189            self.non_refundable_storage_fee = Some(field);
1190        }
1191        ///Sets `non_refundable_storage_fee` with the provided value.
1192        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1193            self.set_non_refundable_storage_fee(field);
1194            self
1195        }
1196        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1197        pub fn epoch_start_timestamp_opt_mut(
1198            &mut self,
1199        ) -> Option<&mut ::prost_types::Timestamp> {
1200            self.epoch_start_timestamp.as_mut().map(|field| field as _)
1201        }
1202        ///Returns a mutable reference to `epoch_start_timestamp`.
1203        ///If the field is unset, it is first initialized with the default value.
1204        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1205            self.epoch_start_timestamp.get_or_insert_default()
1206        }
1207        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1208        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1209            self.epoch_start_timestamp.as_ref().map(|field| field as _)
1210        }
1211        ///Sets `epoch_start_timestamp` with the provided value.
1212        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1213            &mut self,
1214            field: T,
1215        ) {
1216            self.epoch_start_timestamp = Some(field.into().into());
1217        }
1218        ///Sets `epoch_start_timestamp` with the provided value.
1219        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1220            mut self,
1221            field: T,
1222        ) -> Self {
1223            self.set_epoch_start_timestamp(field.into());
1224            self
1225        }
1226        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
1227        pub fn system_packages(&self) -> &[super::SystemPackage] {
1228            &self.system_packages
1229        }
1230        ///Returns a mutable reference to `system_packages`.
1231        ///If the field is unset, it is first initialized with the default value.
1232        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1233            &mut self.system_packages
1234        }
1235        ///Sets `system_packages` with the provided value.
1236        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1237            self.system_packages = field;
1238        }
1239        ///Sets `system_packages` with the provided value.
1240        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1241            self.set_system_packages(field);
1242            self
1243        }
1244    }
1245    impl super::ChangedObject {
1246        pub const fn const_default() -> Self {
1247            Self {
1248                object_id: None,
1249                input_state: None,
1250                input_version: None,
1251                input_digest: None,
1252                input_owner: None,
1253                output_state: None,
1254                output_version: None,
1255                output_digest: None,
1256                output_owner: None,
1257                accumulator_write: None,
1258                id_operation: None,
1259                object_type: None,
1260            }
1261        }
1262        #[doc(hidden)]
1263        pub fn default_instance() -> &'static Self {
1264            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1265            &DEFAULT
1266        }
1267        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1268        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1269            self.object_id.as_mut().map(|field| field as _)
1270        }
1271        ///Returns a mutable reference to `object_id`.
1272        ///If the field is unset, it is first initialized with the default value.
1273        pub fn object_id_mut(&mut self) -> &mut String {
1274            self.object_id.get_or_insert_default()
1275        }
1276        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1277        pub fn object_id_opt(&self) -> Option<&str> {
1278            self.object_id.as_ref().map(|field| field as _)
1279        }
1280        ///Sets `object_id` with the provided value.
1281        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1282            self.object_id = Some(field.into().into());
1283        }
1284        ///Sets `object_id` with the provided value.
1285        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1286            self.set_object_id(field.into());
1287            self
1288        }
1289        ///Sets `input_state` with the provided value.
1290        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1291            mut self,
1292            field: T,
1293        ) -> Self {
1294            self.set_input_state(field.into());
1295            self
1296        }
1297        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1298        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1299            self.input_version.as_mut().map(|field| field as _)
1300        }
1301        ///Returns a mutable reference to `input_version`.
1302        ///If the field is unset, it is first initialized with the default value.
1303        pub fn input_version_mut(&mut self) -> &mut u64 {
1304            self.input_version.get_or_insert_default()
1305        }
1306        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1307        pub fn input_version_opt(&self) -> Option<u64> {
1308            self.input_version.as_ref().map(|field| *field)
1309        }
1310        ///Sets `input_version` with the provided value.
1311        pub fn set_input_version(&mut self, field: u64) {
1312            self.input_version = Some(field);
1313        }
1314        ///Sets `input_version` with the provided value.
1315        pub fn with_input_version(mut self, field: u64) -> Self {
1316            self.set_input_version(field);
1317            self
1318        }
1319        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1320        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1321            self.input_digest.as_mut().map(|field| field as _)
1322        }
1323        ///Returns a mutable reference to `input_digest`.
1324        ///If the field is unset, it is first initialized with the default value.
1325        pub fn input_digest_mut(&mut self) -> &mut String {
1326            self.input_digest.get_or_insert_default()
1327        }
1328        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1329        pub fn input_digest_opt(&self) -> Option<&str> {
1330            self.input_digest.as_ref().map(|field| field as _)
1331        }
1332        ///Sets `input_digest` with the provided value.
1333        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1334            self.input_digest = Some(field.into().into());
1335        }
1336        ///Sets `input_digest` with the provided value.
1337        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1338            self.set_input_digest(field.into());
1339            self
1340        }
1341        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1342        pub fn input_owner(&self) -> &super::Owner {
1343            self.input_owner
1344                .as_ref()
1345                .map(|field| field as _)
1346                .unwrap_or_else(|| super::Owner::default_instance() as _)
1347        }
1348        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1349        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1350            self.input_owner.as_mut().map(|field| field as _)
1351        }
1352        ///Returns a mutable reference to `input_owner`.
1353        ///If the field is unset, it is first initialized with the default value.
1354        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1355            self.input_owner.get_or_insert_default()
1356        }
1357        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1358        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1359            self.input_owner.as_ref().map(|field| field as _)
1360        }
1361        ///Sets `input_owner` with the provided value.
1362        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1363            self.input_owner = Some(field.into().into());
1364        }
1365        ///Sets `input_owner` with the provided value.
1366        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1367            self.set_input_owner(field.into());
1368            self
1369        }
1370        ///Sets `output_state` with the provided value.
1371        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1372            mut self,
1373            field: T,
1374        ) -> Self {
1375            self.set_output_state(field.into());
1376            self
1377        }
1378        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1379        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1380            self.output_version.as_mut().map(|field| field as _)
1381        }
1382        ///Returns a mutable reference to `output_version`.
1383        ///If the field is unset, it is first initialized with the default value.
1384        pub fn output_version_mut(&mut self) -> &mut u64 {
1385            self.output_version.get_or_insert_default()
1386        }
1387        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1388        pub fn output_version_opt(&self) -> Option<u64> {
1389            self.output_version.as_ref().map(|field| *field)
1390        }
1391        ///Sets `output_version` with the provided value.
1392        pub fn set_output_version(&mut self, field: u64) {
1393            self.output_version = Some(field);
1394        }
1395        ///Sets `output_version` with the provided value.
1396        pub fn with_output_version(mut self, field: u64) -> Self {
1397            self.set_output_version(field);
1398            self
1399        }
1400        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1401        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1402            self.output_digest.as_mut().map(|field| field as _)
1403        }
1404        ///Returns a mutable reference to `output_digest`.
1405        ///If the field is unset, it is first initialized with the default value.
1406        pub fn output_digest_mut(&mut self) -> &mut String {
1407            self.output_digest.get_or_insert_default()
1408        }
1409        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1410        pub fn output_digest_opt(&self) -> Option<&str> {
1411            self.output_digest.as_ref().map(|field| field as _)
1412        }
1413        ///Sets `output_digest` with the provided value.
1414        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1415            self.output_digest = Some(field.into().into());
1416        }
1417        ///Sets `output_digest` with the provided value.
1418        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1419            self.set_output_digest(field.into());
1420            self
1421        }
1422        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1423        pub fn output_owner(&self) -> &super::Owner {
1424            self.output_owner
1425                .as_ref()
1426                .map(|field| field as _)
1427                .unwrap_or_else(|| super::Owner::default_instance() as _)
1428        }
1429        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1430        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1431            self.output_owner.as_mut().map(|field| field as _)
1432        }
1433        ///Returns a mutable reference to `output_owner`.
1434        ///If the field is unset, it is first initialized with the default value.
1435        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1436            self.output_owner.get_or_insert_default()
1437        }
1438        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1439        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1440            self.output_owner.as_ref().map(|field| field as _)
1441        }
1442        ///Sets `output_owner` with the provided value.
1443        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1444            self.output_owner = Some(field.into().into());
1445        }
1446        ///Sets `output_owner` with the provided value.
1447        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1448            self.set_output_owner(field.into());
1449            self
1450        }
1451        ///Returns the value of `accumulator_write`, or the default value if `accumulator_write` is unset.
1452        pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1453            self.accumulator_write
1454                .as_ref()
1455                .map(|field| field as _)
1456                .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1457        }
1458        ///If `accumulator_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1459        pub fn accumulator_write_opt_mut(
1460            &mut self,
1461        ) -> Option<&mut super::AccumulatorWrite> {
1462            self.accumulator_write.as_mut().map(|field| field as _)
1463        }
1464        ///Returns a mutable reference to `accumulator_write`.
1465        ///If the field is unset, it is first initialized with the default value.
1466        pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1467            self.accumulator_write.get_or_insert_default()
1468        }
1469        ///If `accumulator_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
1470        pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1471            self.accumulator_write.as_ref().map(|field| field as _)
1472        }
1473        ///Sets `accumulator_write` with the provided value.
1474        pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1475            &mut self,
1476            field: T,
1477        ) {
1478            self.accumulator_write = Some(field.into().into());
1479        }
1480        ///Sets `accumulator_write` with the provided value.
1481        pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1482            mut self,
1483            field: T,
1484        ) -> Self {
1485            self.set_accumulator_write(field.into());
1486            self
1487        }
1488        ///Sets `id_operation` with the provided value.
1489        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1490            mut self,
1491            field: T,
1492        ) -> Self {
1493            self.set_id_operation(field.into());
1494            self
1495        }
1496        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1497        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1498            self.object_type.as_mut().map(|field| field as _)
1499        }
1500        ///Returns a mutable reference to `object_type`.
1501        ///If the field is unset, it is first initialized with the default value.
1502        pub fn object_type_mut(&mut self) -> &mut String {
1503            self.object_type.get_or_insert_default()
1504        }
1505        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1506        pub fn object_type_opt(&self) -> Option<&str> {
1507            self.object_type.as_ref().map(|field| field as _)
1508        }
1509        ///Sets `object_type` with the provided value.
1510        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1511            self.object_type = Some(field.into().into());
1512        }
1513        ///Sets `object_type` with the provided value.
1514        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1515            self.set_object_type(field.into());
1516            self
1517        }
1518    }
1519    impl super::Checkpoint {
1520        pub const fn const_default() -> Self {
1521            Self {
1522                sequence_number: None,
1523                digest: None,
1524                summary: None,
1525                signature: None,
1526                contents: None,
1527                transactions: Vec::new(),
1528                objects: None,
1529            }
1530        }
1531        #[doc(hidden)]
1532        pub fn default_instance() -> &'static Self {
1533            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1534            &DEFAULT
1535        }
1536        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1537        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1538            self.sequence_number.as_mut().map(|field| field as _)
1539        }
1540        ///Returns a mutable reference to `sequence_number`.
1541        ///If the field is unset, it is first initialized with the default value.
1542        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1543            self.sequence_number.get_or_insert_default()
1544        }
1545        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1546        pub fn sequence_number_opt(&self) -> Option<u64> {
1547            self.sequence_number.as_ref().map(|field| *field)
1548        }
1549        ///Sets `sequence_number` with the provided value.
1550        pub fn set_sequence_number(&mut self, field: u64) {
1551            self.sequence_number = Some(field);
1552        }
1553        ///Sets `sequence_number` with the provided value.
1554        pub fn with_sequence_number(mut self, field: u64) -> Self {
1555            self.set_sequence_number(field);
1556            self
1557        }
1558        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1559        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1560            self.digest.as_mut().map(|field| field as _)
1561        }
1562        ///Returns a mutable reference to `digest`.
1563        ///If the field is unset, it is first initialized with the default value.
1564        pub fn digest_mut(&mut self) -> &mut String {
1565            self.digest.get_or_insert_default()
1566        }
1567        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1568        pub fn digest_opt(&self) -> Option<&str> {
1569            self.digest.as_ref().map(|field| field as _)
1570        }
1571        ///Sets `digest` with the provided value.
1572        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1573            self.digest = Some(field.into().into());
1574        }
1575        ///Sets `digest` with the provided value.
1576        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1577            self.set_digest(field.into());
1578            self
1579        }
1580        ///Returns the value of `summary`, or the default value if `summary` is unset.
1581        pub fn summary(&self) -> &super::CheckpointSummary {
1582            self.summary
1583                .as_ref()
1584                .map(|field| field as _)
1585                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1586        }
1587        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1588        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1589            self.summary.as_mut().map(|field| field as _)
1590        }
1591        ///Returns a mutable reference to `summary`.
1592        ///If the field is unset, it is first initialized with the default value.
1593        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1594            self.summary.get_or_insert_default()
1595        }
1596        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1597        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1598            self.summary.as_ref().map(|field| field as _)
1599        }
1600        ///Sets `summary` with the provided value.
1601        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1602            self.summary = Some(field.into().into());
1603        }
1604        ///Sets `summary` with the provided value.
1605        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1606            mut self,
1607            field: T,
1608        ) -> Self {
1609            self.set_summary(field.into());
1610            self
1611        }
1612        ///Returns the value of `signature`, or the default value if `signature` is unset.
1613        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1614            self.signature
1615                .as_ref()
1616                .map(|field| field as _)
1617                .unwrap_or_else(|| {
1618                    super::ValidatorAggregatedSignature::default_instance() as _
1619                })
1620        }
1621        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1622        pub fn signature_opt_mut(
1623            &mut self,
1624        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1625            self.signature.as_mut().map(|field| field as _)
1626        }
1627        ///Returns a mutable reference to `signature`.
1628        ///If the field is unset, it is first initialized with the default value.
1629        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1630            self.signature.get_or_insert_default()
1631        }
1632        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1633        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1634            self.signature.as_ref().map(|field| field as _)
1635        }
1636        ///Sets `signature` with the provided value.
1637        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1638            &mut self,
1639            field: T,
1640        ) {
1641            self.signature = Some(field.into().into());
1642        }
1643        ///Sets `signature` with the provided value.
1644        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1645            mut self,
1646            field: T,
1647        ) -> Self {
1648            self.set_signature(field.into());
1649            self
1650        }
1651        ///Returns the value of `contents`, or the default value if `contents` is unset.
1652        pub fn contents(&self) -> &super::CheckpointContents {
1653            self.contents
1654                .as_ref()
1655                .map(|field| field as _)
1656                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1657        }
1658        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1659        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1660            self.contents.as_mut().map(|field| field as _)
1661        }
1662        ///Returns a mutable reference to `contents`.
1663        ///If the field is unset, it is first initialized with the default value.
1664        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1665            self.contents.get_or_insert_default()
1666        }
1667        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1668        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1669            self.contents.as_ref().map(|field| field as _)
1670        }
1671        ///Sets `contents` with the provided value.
1672        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1673            self.contents = Some(field.into().into());
1674        }
1675        ///Sets `contents` with the provided value.
1676        pub fn with_contents<T: Into<super::CheckpointContents>>(
1677            mut self,
1678            field: T,
1679        ) -> Self {
1680            self.set_contents(field.into());
1681            self
1682        }
1683        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1684        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1685            &self.transactions
1686        }
1687        ///Returns a mutable reference to `transactions`.
1688        ///If the field is unset, it is first initialized with the default value.
1689        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1690            &mut self.transactions
1691        }
1692        ///Sets `transactions` with the provided value.
1693        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1694            self.transactions = field;
1695        }
1696        ///Sets `transactions` with the provided value.
1697        pub fn with_transactions(
1698            mut self,
1699            field: Vec<super::ExecutedTransaction>,
1700        ) -> Self {
1701            self.set_transactions(field);
1702            self
1703        }
1704        ///Returns the value of `objects`, or the default value if `objects` is unset.
1705        pub fn objects(&self) -> &super::ObjectSet {
1706            self.objects
1707                .as_ref()
1708                .map(|field| field as _)
1709                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1710        }
1711        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1712        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1713            self.objects.as_mut().map(|field| field as _)
1714        }
1715        ///Returns a mutable reference to `objects`.
1716        ///If the field is unset, it is first initialized with the default value.
1717        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1718            self.objects.get_or_insert_default()
1719        }
1720        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1721        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1722            self.objects.as_ref().map(|field| field as _)
1723        }
1724        ///Sets `objects` with the provided value.
1725        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1726            self.objects = Some(field.into().into());
1727        }
1728        ///Sets `objects` with the provided value.
1729        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1730            self.set_objects(field.into());
1731            self
1732        }
1733    }
1734    impl super::CheckpointCommitment {
1735        pub const fn const_default() -> Self {
1736            Self { kind: None, digest: None }
1737        }
1738        #[doc(hidden)]
1739        pub fn default_instance() -> &'static Self {
1740            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1741            &DEFAULT
1742        }
1743        ///Sets `kind` with the provided value.
1744        pub fn with_kind<
1745            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1746        >(mut self, field: T) -> Self {
1747            self.set_kind(field.into());
1748            self
1749        }
1750        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1751        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1752            self.digest.as_mut().map(|field| field as _)
1753        }
1754        ///Returns a mutable reference to `digest`.
1755        ///If the field is unset, it is first initialized with the default value.
1756        pub fn digest_mut(&mut self) -> &mut String {
1757            self.digest.get_or_insert_default()
1758        }
1759        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1760        pub fn digest_opt(&self) -> Option<&str> {
1761            self.digest.as_ref().map(|field| field as _)
1762        }
1763        ///Sets `digest` with the provided value.
1764        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1765            self.digest = Some(field.into().into());
1766        }
1767        ///Sets `digest` with the provided value.
1768        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1769            self.set_digest(field.into());
1770            self
1771        }
1772    }
1773    impl super::CheckpointContents {
1774        pub const fn const_default() -> Self {
1775            Self {
1776                bcs: None,
1777                digest: None,
1778                version: None,
1779                transactions: Vec::new(),
1780            }
1781        }
1782        #[doc(hidden)]
1783        pub fn default_instance() -> &'static Self {
1784            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1785            &DEFAULT
1786        }
1787        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1788        pub fn bcs(&self) -> &super::Bcs {
1789            self.bcs
1790                .as_ref()
1791                .map(|field| field as _)
1792                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1793        }
1794        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1795        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1796            self.bcs.as_mut().map(|field| field as _)
1797        }
1798        ///Returns a mutable reference to `bcs`.
1799        ///If the field is unset, it is first initialized with the default value.
1800        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1801            self.bcs.get_or_insert_default()
1802        }
1803        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1804        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1805            self.bcs.as_ref().map(|field| field as _)
1806        }
1807        ///Sets `bcs` with the provided value.
1808        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1809            self.bcs = Some(field.into().into());
1810        }
1811        ///Sets `bcs` with the provided value.
1812        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1813            self.set_bcs(field.into());
1814            self
1815        }
1816        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1817        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1818            self.digest.as_mut().map(|field| field as _)
1819        }
1820        ///Returns a mutable reference to `digest`.
1821        ///If the field is unset, it is first initialized with the default value.
1822        pub fn digest_mut(&mut self) -> &mut String {
1823            self.digest.get_or_insert_default()
1824        }
1825        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1826        pub fn digest_opt(&self) -> Option<&str> {
1827            self.digest.as_ref().map(|field| field as _)
1828        }
1829        ///Sets `digest` with the provided value.
1830        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1831            self.digest = Some(field.into().into());
1832        }
1833        ///Sets `digest` with the provided value.
1834        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1835            self.set_digest(field.into());
1836            self
1837        }
1838        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1839        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1840            self.version.as_mut().map(|field| field as _)
1841        }
1842        ///Returns a mutable reference to `version`.
1843        ///If the field is unset, it is first initialized with the default value.
1844        pub fn version_mut(&mut self) -> &mut i32 {
1845            self.version.get_or_insert_default()
1846        }
1847        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1848        pub fn version_opt(&self) -> Option<i32> {
1849            self.version.as_ref().map(|field| *field)
1850        }
1851        ///Sets `version` with the provided value.
1852        pub fn set_version(&mut self, field: i32) {
1853            self.version = Some(field);
1854        }
1855        ///Sets `version` with the provided value.
1856        pub fn with_version(mut self, field: i32) -> Self {
1857            self.set_version(field);
1858            self
1859        }
1860        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1861        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1862            &self.transactions
1863        }
1864        ///Returns a mutable reference to `transactions`.
1865        ///If the field is unset, it is first initialized with the default value.
1866        pub fn transactions_mut(
1867            &mut self,
1868        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1869            &mut self.transactions
1870        }
1871        ///Sets `transactions` with the provided value.
1872        pub fn set_transactions(
1873            &mut self,
1874            field: Vec<super::CheckpointedTransactionInfo>,
1875        ) {
1876            self.transactions = field;
1877        }
1878        ///Sets `transactions` with the provided value.
1879        pub fn with_transactions(
1880            mut self,
1881            field: Vec<super::CheckpointedTransactionInfo>,
1882        ) -> Self {
1883            self.set_transactions(field);
1884            self
1885        }
1886    }
1887    impl super::CheckpointSummary {
1888        pub const fn const_default() -> Self {
1889            Self {
1890                bcs: None,
1891                digest: None,
1892                epoch: None,
1893                sequence_number: None,
1894                total_network_transactions: None,
1895                content_digest: None,
1896                previous_digest: None,
1897                epoch_rolling_gas_cost_summary: None,
1898                timestamp: None,
1899                commitments: Vec::new(),
1900                end_of_epoch_data: None,
1901                version_specific_data: None,
1902            }
1903        }
1904        #[doc(hidden)]
1905        pub fn default_instance() -> &'static Self {
1906            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1907            &DEFAULT
1908        }
1909        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1910        pub fn bcs(&self) -> &super::Bcs {
1911            self.bcs
1912                .as_ref()
1913                .map(|field| field as _)
1914                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1915        }
1916        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1917        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1918            self.bcs.as_mut().map(|field| field as _)
1919        }
1920        ///Returns a mutable reference to `bcs`.
1921        ///If the field is unset, it is first initialized with the default value.
1922        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1923            self.bcs.get_or_insert_default()
1924        }
1925        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1926        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1927            self.bcs.as_ref().map(|field| field as _)
1928        }
1929        ///Sets `bcs` with the provided value.
1930        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1931            self.bcs = Some(field.into().into());
1932        }
1933        ///Sets `bcs` with the provided value.
1934        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1935            self.set_bcs(field.into());
1936            self
1937        }
1938        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1939        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1940            self.digest.as_mut().map(|field| field as _)
1941        }
1942        ///Returns a mutable reference to `digest`.
1943        ///If the field is unset, it is first initialized with the default value.
1944        pub fn digest_mut(&mut self) -> &mut String {
1945            self.digest.get_or_insert_default()
1946        }
1947        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1948        pub fn digest_opt(&self) -> Option<&str> {
1949            self.digest.as_ref().map(|field| field as _)
1950        }
1951        ///Sets `digest` with the provided value.
1952        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1953            self.digest = Some(field.into().into());
1954        }
1955        ///Sets `digest` with the provided value.
1956        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1957            self.set_digest(field.into());
1958            self
1959        }
1960        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1961        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1962            self.epoch.as_mut().map(|field| field as _)
1963        }
1964        ///Returns a mutable reference to `epoch`.
1965        ///If the field is unset, it is first initialized with the default value.
1966        pub fn epoch_mut(&mut self) -> &mut u64 {
1967            self.epoch.get_or_insert_default()
1968        }
1969        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1970        pub fn epoch_opt(&self) -> Option<u64> {
1971            self.epoch.as_ref().map(|field| *field)
1972        }
1973        ///Sets `epoch` with the provided value.
1974        pub fn set_epoch(&mut self, field: u64) {
1975            self.epoch = Some(field);
1976        }
1977        ///Sets `epoch` with the provided value.
1978        pub fn with_epoch(mut self, field: u64) -> Self {
1979            self.set_epoch(field);
1980            self
1981        }
1982        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1983        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1984            self.sequence_number.as_mut().map(|field| field as _)
1985        }
1986        ///Returns a mutable reference to `sequence_number`.
1987        ///If the field is unset, it is first initialized with the default value.
1988        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1989            self.sequence_number.get_or_insert_default()
1990        }
1991        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1992        pub fn sequence_number_opt(&self) -> Option<u64> {
1993            self.sequence_number.as_ref().map(|field| *field)
1994        }
1995        ///Sets `sequence_number` with the provided value.
1996        pub fn set_sequence_number(&mut self, field: u64) {
1997            self.sequence_number = Some(field);
1998        }
1999        ///Sets `sequence_number` with the provided value.
2000        pub fn with_sequence_number(mut self, field: u64) -> Self {
2001            self.set_sequence_number(field);
2002            self
2003        }
2004        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2005        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
2006            self.total_network_transactions.as_mut().map(|field| field as _)
2007        }
2008        ///Returns a mutable reference to `total_network_transactions`.
2009        ///If the field is unset, it is first initialized with the default value.
2010        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
2011            self.total_network_transactions.get_or_insert_default()
2012        }
2013        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
2014        pub fn total_network_transactions_opt(&self) -> Option<u64> {
2015            self.total_network_transactions.as_ref().map(|field| *field)
2016        }
2017        ///Sets `total_network_transactions` with the provided value.
2018        pub fn set_total_network_transactions(&mut self, field: u64) {
2019            self.total_network_transactions = Some(field);
2020        }
2021        ///Sets `total_network_transactions` with the provided value.
2022        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
2023            self.set_total_network_transactions(field);
2024            self
2025        }
2026        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2027        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
2028            self.content_digest.as_mut().map(|field| field as _)
2029        }
2030        ///Returns a mutable reference to `content_digest`.
2031        ///If the field is unset, it is first initialized with the default value.
2032        pub fn content_digest_mut(&mut self) -> &mut String {
2033            self.content_digest.get_or_insert_default()
2034        }
2035        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
2036        pub fn content_digest_opt(&self) -> Option<&str> {
2037            self.content_digest.as_ref().map(|field| field as _)
2038        }
2039        ///Sets `content_digest` with the provided value.
2040        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
2041            self.content_digest = Some(field.into().into());
2042        }
2043        ///Sets `content_digest` with the provided value.
2044        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
2045            self.set_content_digest(field.into());
2046            self
2047        }
2048        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2049        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
2050            self.previous_digest.as_mut().map(|field| field as _)
2051        }
2052        ///Returns a mutable reference to `previous_digest`.
2053        ///If the field is unset, it is first initialized with the default value.
2054        pub fn previous_digest_mut(&mut self) -> &mut String {
2055            self.previous_digest.get_or_insert_default()
2056        }
2057        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
2058        pub fn previous_digest_opt(&self) -> Option<&str> {
2059            self.previous_digest.as_ref().map(|field| field as _)
2060        }
2061        ///Sets `previous_digest` with the provided value.
2062        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
2063            self.previous_digest = Some(field.into().into());
2064        }
2065        ///Sets `previous_digest` with the provided value.
2066        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2067            self.set_previous_digest(field.into());
2068            self
2069        }
2070        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
2071        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2072            self.epoch_rolling_gas_cost_summary
2073                .as_ref()
2074                .map(|field| field as _)
2075                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2076        }
2077        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2078        pub fn epoch_rolling_gas_cost_summary_opt_mut(
2079            &mut self,
2080        ) -> Option<&mut super::GasCostSummary> {
2081            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2082        }
2083        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
2084        ///If the field is unset, it is first initialized with the default value.
2085        pub fn epoch_rolling_gas_cost_summary_mut(
2086            &mut self,
2087        ) -> &mut super::GasCostSummary {
2088            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2089        }
2090        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
2091        pub fn epoch_rolling_gas_cost_summary_opt(
2092            &self,
2093        ) -> Option<&super::GasCostSummary> {
2094            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2095        }
2096        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
2097        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2098            &mut self,
2099            field: T,
2100        ) {
2101            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2102        }
2103        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
2104        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2105            mut self,
2106            field: T,
2107        ) -> Self {
2108            self.set_epoch_rolling_gas_cost_summary(field.into());
2109            self
2110        }
2111        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2112        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2113            self.timestamp.as_mut().map(|field| field as _)
2114        }
2115        ///Returns a mutable reference to `timestamp`.
2116        ///If the field is unset, it is first initialized with the default value.
2117        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2118            self.timestamp.get_or_insert_default()
2119        }
2120        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
2121        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2122            self.timestamp.as_ref().map(|field| field as _)
2123        }
2124        ///Sets `timestamp` with the provided value.
2125        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2126            self.timestamp = Some(field.into().into());
2127        }
2128        ///Sets `timestamp` with the provided value.
2129        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2130            mut self,
2131            field: T,
2132        ) -> Self {
2133            self.set_timestamp(field.into());
2134            self
2135        }
2136        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
2137        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2138            &self.commitments
2139        }
2140        ///Returns a mutable reference to `commitments`.
2141        ///If the field is unset, it is first initialized with the default value.
2142        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2143            &mut self.commitments
2144        }
2145        ///Sets `commitments` with the provided value.
2146        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2147            self.commitments = field;
2148        }
2149        ///Sets `commitments` with the provided value.
2150        pub fn with_commitments(
2151            mut self,
2152            field: Vec<super::CheckpointCommitment>,
2153        ) -> Self {
2154            self.set_commitments(field);
2155            self
2156        }
2157        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
2158        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2159            self.end_of_epoch_data
2160                .as_ref()
2161                .map(|field| field as _)
2162                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2163        }
2164        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2165        pub fn end_of_epoch_data_opt_mut(
2166            &mut self,
2167        ) -> Option<&mut super::EndOfEpochData> {
2168            self.end_of_epoch_data.as_mut().map(|field| field as _)
2169        }
2170        ///Returns a mutable reference to `end_of_epoch_data`.
2171        ///If the field is unset, it is first initialized with the default value.
2172        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2173            self.end_of_epoch_data.get_or_insert_default()
2174        }
2175        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2176        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2177            self.end_of_epoch_data.as_ref().map(|field| field as _)
2178        }
2179        ///Sets `end_of_epoch_data` with the provided value.
2180        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2181            &mut self,
2182            field: T,
2183        ) {
2184            self.end_of_epoch_data = Some(field.into().into());
2185        }
2186        ///Sets `end_of_epoch_data` with the provided value.
2187        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2188            mut self,
2189            field: T,
2190        ) -> Self {
2191            self.set_end_of_epoch_data(field.into());
2192            self
2193        }
2194        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2195        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2196            self.version_specific_data.as_ref().map(|field| field as _)
2197        }
2198        ///Sets `version_specific_data` with the provided value.
2199        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2200            &mut self,
2201            field: T,
2202        ) {
2203            self.version_specific_data = Some(field.into().into());
2204        }
2205        ///Sets `version_specific_data` with the provided value.
2206        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2207            mut self,
2208            field: T,
2209        ) -> Self {
2210            self.set_version_specific_data(field.into());
2211            self
2212        }
2213    }
2214    impl super::CheckpointedTransactionInfo {
2215        pub const fn const_default() -> Self {
2216            Self {
2217                transaction: None,
2218                effects: None,
2219                signatures: Vec::new(),
2220                address_aliases_versions: Vec::new(),
2221            }
2222        }
2223        #[doc(hidden)]
2224        pub fn default_instance() -> &'static Self {
2225            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2226            &DEFAULT
2227        }
2228        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2229        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2230            self.transaction.as_mut().map(|field| field as _)
2231        }
2232        ///Returns a mutable reference to `transaction`.
2233        ///If the field is unset, it is first initialized with the default value.
2234        pub fn transaction_mut(&mut self) -> &mut String {
2235            self.transaction.get_or_insert_default()
2236        }
2237        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2238        pub fn transaction_opt(&self) -> Option<&str> {
2239            self.transaction.as_ref().map(|field| field as _)
2240        }
2241        ///Sets `transaction` with the provided value.
2242        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2243            self.transaction = Some(field.into().into());
2244        }
2245        ///Sets `transaction` with the provided value.
2246        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2247            self.set_transaction(field.into());
2248            self
2249        }
2250        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2251        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2252            self.effects.as_mut().map(|field| field as _)
2253        }
2254        ///Returns a mutable reference to `effects`.
2255        ///If the field is unset, it is first initialized with the default value.
2256        pub fn effects_mut(&mut self) -> &mut String {
2257            self.effects.get_or_insert_default()
2258        }
2259        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2260        pub fn effects_opt(&self) -> Option<&str> {
2261            self.effects.as_ref().map(|field| field as _)
2262        }
2263        ///Sets `effects` with the provided value.
2264        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2265            self.effects = Some(field.into().into());
2266        }
2267        ///Sets `effects` with the provided value.
2268        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2269            self.set_effects(field.into());
2270            self
2271        }
2272        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
2273        pub fn signatures(&self) -> &[super::UserSignature] {
2274            &self.signatures
2275        }
2276        ///Returns a mutable reference to `signatures`.
2277        ///If the field is unset, it is first initialized with the default value.
2278        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2279            &mut self.signatures
2280        }
2281        ///Sets `signatures` with the provided value.
2282        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2283            self.signatures = field;
2284        }
2285        ///Sets `signatures` with the provided value.
2286        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2287            self.set_signatures(field);
2288            self
2289        }
2290        ///Returns the value of `address_aliases_versions`, or the default value if `address_aliases_versions` is unset.
2291        pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2292            &self.address_aliases_versions
2293        }
2294        ///Returns a mutable reference to `address_aliases_versions`.
2295        ///If the field is unset, it is first initialized with the default value.
2296        pub fn address_aliases_versions_mut(
2297            &mut self,
2298        ) -> &mut Vec<super::AddressAliasesVersion> {
2299            &mut self.address_aliases_versions
2300        }
2301        ///Sets `address_aliases_versions` with the provided value.
2302        pub fn set_address_aliases_versions(
2303            &mut self,
2304            field: Vec<super::AddressAliasesVersion>,
2305        ) {
2306            self.address_aliases_versions = field;
2307        }
2308        ///Sets `address_aliases_versions` with the provided value.
2309        pub fn with_address_aliases_versions(
2310            mut self,
2311            field: Vec<super::AddressAliasesVersion>,
2312        ) -> Self {
2313            self.set_address_aliases_versions(field);
2314            self
2315        }
2316    }
2317    impl super::CircomG1 {
2318        pub const fn const_default() -> Self {
2319            Self {
2320                e0: None,
2321                e1: None,
2322                e2: None,
2323            }
2324        }
2325        #[doc(hidden)]
2326        pub fn default_instance() -> &'static Self {
2327            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2328            &DEFAULT
2329        }
2330        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2331        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2332            self.e0.as_mut().map(|field| field as _)
2333        }
2334        ///Returns a mutable reference to `e0`.
2335        ///If the field is unset, it is first initialized with the default value.
2336        pub fn e0_mut(&mut self) -> &mut String {
2337            self.e0.get_or_insert_default()
2338        }
2339        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2340        pub fn e0_opt(&self) -> Option<&str> {
2341            self.e0.as_ref().map(|field| field as _)
2342        }
2343        ///Sets `e0` with the provided value.
2344        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2345            self.e0 = Some(field.into().into());
2346        }
2347        ///Sets `e0` with the provided value.
2348        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2349            self.set_e0(field.into());
2350            self
2351        }
2352        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2353        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2354            self.e1.as_mut().map(|field| field as _)
2355        }
2356        ///Returns a mutable reference to `e1`.
2357        ///If the field is unset, it is first initialized with the default value.
2358        pub fn e1_mut(&mut self) -> &mut String {
2359            self.e1.get_or_insert_default()
2360        }
2361        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2362        pub fn e1_opt(&self) -> Option<&str> {
2363            self.e1.as_ref().map(|field| field as _)
2364        }
2365        ///Sets `e1` with the provided value.
2366        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2367            self.e1 = Some(field.into().into());
2368        }
2369        ///Sets `e1` with the provided value.
2370        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2371            self.set_e1(field.into());
2372            self
2373        }
2374        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2375        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2376            self.e2.as_mut().map(|field| field as _)
2377        }
2378        ///Returns a mutable reference to `e2`.
2379        ///If the field is unset, it is first initialized with the default value.
2380        pub fn e2_mut(&mut self) -> &mut String {
2381            self.e2.get_or_insert_default()
2382        }
2383        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2384        pub fn e2_opt(&self) -> Option<&str> {
2385            self.e2.as_ref().map(|field| field as _)
2386        }
2387        ///Sets `e2` with the provided value.
2388        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2389            self.e2 = Some(field.into().into());
2390        }
2391        ///Sets `e2` with the provided value.
2392        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2393            self.set_e2(field.into());
2394            self
2395        }
2396    }
2397    impl super::CircomG2 {
2398        pub const fn const_default() -> Self {
2399            Self {
2400                e00: None,
2401                e01: None,
2402                e10: None,
2403                e11: None,
2404                e20: None,
2405                e21: None,
2406            }
2407        }
2408        #[doc(hidden)]
2409        pub fn default_instance() -> &'static Self {
2410            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2411            &DEFAULT
2412        }
2413        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2414        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2415            self.e00.as_mut().map(|field| field as _)
2416        }
2417        ///Returns a mutable reference to `e00`.
2418        ///If the field is unset, it is first initialized with the default value.
2419        pub fn e00_mut(&mut self) -> &mut String {
2420            self.e00.get_or_insert_default()
2421        }
2422        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2423        pub fn e00_opt(&self) -> Option<&str> {
2424            self.e00.as_ref().map(|field| field as _)
2425        }
2426        ///Sets `e00` with the provided value.
2427        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2428            self.e00 = Some(field.into().into());
2429        }
2430        ///Sets `e00` with the provided value.
2431        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2432            self.set_e00(field.into());
2433            self
2434        }
2435        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2436        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2437            self.e01.as_mut().map(|field| field as _)
2438        }
2439        ///Returns a mutable reference to `e01`.
2440        ///If the field is unset, it is first initialized with the default value.
2441        pub fn e01_mut(&mut self) -> &mut String {
2442            self.e01.get_or_insert_default()
2443        }
2444        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2445        pub fn e01_opt(&self) -> Option<&str> {
2446            self.e01.as_ref().map(|field| field as _)
2447        }
2448        ///Sets `e01` with the provided value.
2449        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2450            self.e01 = Some(field.into().into());
2451        }
2452        ///Sets `e01` with the provided value.
2453        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2454            self.set_e01(field.into());
2455            self
2456        }
2457        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2458        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2459            self.e10.as_mut().map(|field| field as _)
2460        }
2461        ///Returns a mutable reference to `e10`.
2462        ///If the field is unset, it is first initialized with the default value.
2463        pub fn e10_mut(&mut self) -> &mut String {
2464            self.e10.get_or_insert_default()
2465        }
2466        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2467        pub fn e10_opt(&self) -> Option<&str> {
2468            self.e10.as_ref().map(|field| field as _)
2469        }
2470        ///Sets `e10` with the provided value.
2471        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2472            self.e10 = Some(field.into().into());
2473        }
2474        ///Sets `e10` with the provided value.
2475        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2476            self.set_e10(field.into());
2477            self
2478        }
2479        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2480        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2481            self.e11.as_mut().map(|field| field as _)
2482        }
2483        ///Returns a mutable reference to `e11`.
2484        ///If the field is unset, it is first initialized with the default value.
2485        pub fn e11_mut(&mut self) -> &mut String {
2486            self.e11.get_or_insert_default()
2487        }
2488        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2489        pub fn e11_opt(&self) -> Option<&str> {
2490            self.e11.as_ref().map(|field| field as _)
2491        }
2492        ///Sets `e11` with the provided value.
2493        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2494            self.e11 = Some(field.into().into());
2495        }
2496        ///Sets `e11` with the provided value.
2497        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2498            self.set_e11(field.into());
2499            self
2500        }
2501        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2502        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2503            self.e20.as_mut().map(|field| field as _)
2504        }
2505        ///Returns a mutable reference to `e20`.
2506        ///If the field is unset, it is first initialized with the default value.
2507        pub fn e20_mut(&mut self) -> &mut String {
2508            self.e20.get_or_insert_default()
2509        }
2510        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2511        pub fn e20_opt(&self) -> Option<&str> {
2512            self.e20.as_ref().map(|field| field as _)
2513        }
2514        ///Sets `e20` with the provided value.
2515        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2516            self.e20 = Some(field.into().into());
2517        }
2518        ///Sets `e20` with the provided value.
2519        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2520            self.set_e20(field.into());
2521            self
2522        }
2523        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2524        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2525            self.e21.as_mut().map(|field| field as _)
2526        }
2527        ///Returns a mutable reference to `e21`.
2528        ///If the field is unset, it is first initialized with the default value.
2529        pub fn e21_mut(&mut self) -> &mut String {
2530            self.e21.get_or_insert_default()
2531        }
2532        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2533        pub fn e21_opt(&self) -> Option<&str> {
2534            self.e21.as_ref().map(|field| field as _)
2535        }
2536        ///Sets `e21` with the provided value.
2537        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2538            self.e21 = Some(field.into().into());
2539        }
2540        ///Sets `e21` with the provided value.
2541        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2542            self.set_e21(field.into());
2543            self
2544        }
2545    }
2546    impl super::CleverError {
2547        pub const fn const_default() -> Self {
2548            Self {
2549                error_code: None,
2550                line_number: None,
2551                constant_name: None,
2552                constant_type: None,
2553                value: None,
2554            }
2555        }
2556        #[doc(hidden)]
2557        pub fn default_instance() -> &'static Self {
2558            static DEFAULT: super::CleverError = super::CleverError::const_default();
2559            &DEFAULT
2560        }
2561        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2562        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2563            self.error_code.as_mut().map(|field| field as _)
2564        }
2565        ///Returns a mutable reference to `error_code`.
2566        ///If the field is unset, it is first initialized with the default value.
2567        pub fn error_code_mut(&mut self) -> &mut u64 {
2568            self.error_code.get_or_insert_default()
2569        }
2570        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2571        pub fn error_code_opt(&self) -> Option<u64> {
2572            self.error_code.as_ref().map(|field| *field)
2573        }
2574        ///Sets `error_code` with the provided value.
2575        pub fn set_error_code(&mut self, field: u64) {
2576            self.error_code = Some(field);
2577        }
2578        ///Sets `error_code` with the provided value.
2579        pub fn with_error_code(mut self, field: u64) -> Self {
2580            self.set_error_code(field);
2581            self
2582        }
2583        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2584        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2585            self.line_number.as_mut().map(|field| field as _)
2586        }
2587        ///Returns a mutable reference to `line_number`.
2588        ///If the field is unset, it is first initialized with the default value.
2589        pub fn line_number_mut(&mut self) -> &mut u64 {
2590            self.line_number.get_or_insert_default()
2591        }
2592        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2593        pub fn line_number_opt(&self) -> Option<u64> {
2594            self.line_number.as_ref().map(|field| *field)
2595        }
2596        ///Sets `line_number` with the provided value.
2597        pub fn set_line_number(&mut self, field: u64) {
2598            self.line_number = Some(field);
2599        }
2600        ///Sets `line_number` with the provided value.
2601        pub fn with_line_number(mut self, field: u64) -> Self {
2602            self.set_line_number(field);
2603            self
2604        }
2605        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2606        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2607            self.constant_name.as_mut().map(|field| field as _)
2608        }
2609        ///Returns a mutable reference to `constant_name`.
2610        ///If the field is unset, it is first initialized with the default value.
2611        pub fn constant_name_mut(&mut self) -> &mut String {
2612            self.constant_name.get_or_insert_default()
2613        }
2614        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2615        pub fn constant_name_opt(&self) -> Option<&str> {
2616            self.constant_name.as_ref().map(|field| field as _)
2617        }
2618        ///Sets `constant_name` with the provided value.
2619        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2620            self.constant_name = Some(field.into().into());
2621        }
2622        ///Sets `constant_name` with the provided value.
2623        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2624            self.set_constant_name(field.into());
2625            self
2626        }
2627        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2628        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2629            self.constant_type.as_mut().map(|field| field as _)
2630        }
2631        ///Returns a mutable reference to `constant_type`.
2632        ///If the field is unset, it is first initialized with the default value.
2633        pub fn constant_type_mut(&mut self) -> &mut String {
2634            self.constant_type.get_or_insert_default()
2635        }
2636        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2637        pub fn constant_type_opt(&self) -> Option<&str> {
2638            self.constant_type.as_ref().map(|field| field as _)
2639        }
2640        ///Sets `constant_type` with the provided value.
2641        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2642            self.constant_type = Some(field.into().into());
2643        }
2644        ///Sets `constant_type` with the provided value.
2645        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2646            self.set_constant_type(field.into());
2647            self
2648        }
2649        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2650        pub fn rendered(&self) -> &str {
2651            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2652                field as _
2653            } else {
2654                ""
2655            }
2656        }
2657        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2658        pub fn rendered_opt(&self) -> Option<&str> {
2659            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2660                Some(field as _)
2661            } else {
2662                None
2663            }
2664        }
2665        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2666        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2667            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2668                Some(field as _)
2669            } else {
2670                None
2671            }
2672        }
2673        ///Returns a mutable reference to `rendered`.
2674        ///If the field is unset, it is first initialized with the default value.
2675        ///If any other oneof field in the same oneof is set, it will be cleared.
2676        pub fn rendered_mut(&mut self) -> &mut String {
2677            if self.rendered_opt_mut().is_none() {
2678                self.value = Some(
2679                    super::clever_error::Value::Rendered(String::default()),
2680                );
2681            }
2682            self.rendered_opt_mut().unwrap()
2683        }
2684        ///Sets `rendered` with the provided value.
2685        ///If any other oneof field in the same oneof is set, it will be cleared.
2686        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2687            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2688        }
2689        ///Sets `rendered` with the provided value.
2690        ///If any other oneof field in the same oneof is set, it will be cleared.
2691        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2692            self.set_rendered(field.into());
2693            self
2694        }
2695        ///Returns the value of `raw`, or the default value if `raw` is unset.
2696        pub fn raw(&self) -> &[u8] {
2697            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2698                field as _
2699            } else {
2700                &[]
2701            }
2702        }
2703        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2704        pub fn raw_opt(&self) -> Option<&[u8]> {
2705            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2706                Some(field as _)
2707            } else {
2708                None
2709            }
2710        }
2711        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2712        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2713            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2714                Some(field as _)
2715            } else {
2716                None
2717            }
2718        }
2719        ///Returns a mutable reference to `raw`.
2720        ///If the field is unset, it is first initialized with the default value.
2721        ///If any other oneof field in the same oneof is set, it will be cleared.
2722        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2723            if self.raw_opt_mut().is_none() {
2724                self.value = Some(
2725                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2726                );
2727            }
2728            self.raw_opt_mut().unwrap()
2729        }
2730        ///Sets `raw` with the provided value.
2731        ///If any other oneof field in the same oneof is set, it will be cleared.
2732        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2733            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2734        }
2735        ///Sets `raw` with the provided value.
2736        ///If any other oneof field in the same oneof is set, it will be cleared.
2737        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2738            self.set_raw(field.into());
2739            self
2740        }
2741    }
2742    impl super::CoinDenyListError {
2743        pub const fn const_default() -> Self {
2744            Self {
2745                address: None,
2746                coin_type: None,
2747            }
2748        }
2749        #[doc(hidden)]
2750        pub fn default_instance() -> &'static Self {
2751            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2752            &DEFAULT
2753        }
2754        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2755        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2756            self.address.as_mut().map(|field| field as _)
2757        }
2758        ///Returns a mutable reference to `address`.
2759        ///If the field is unset, it is first initialized with the default value.
2760        pub fn address_mut(&mut self) -> &mut String {
2761            self.address.get_or_insert_default()
2762        }
2763        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2764        pub fn address_opt(&self) -> Option<&str> {
2765            self.address.as_ref().map(|field| field as _)
2766        }
2767        ///Sets `address` with the provided value.
2768        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2769            self.address = Some(field.into().into());
2770        }
2771        ///Sets `address` with the provided value.
2772        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2773            self.set_address(field.into());
2774            self
2775        }
2776        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2777        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2778            self.coin_type.as_mut().map(|field| field as _)
2779        }
2780        ///Returns a mutable reference to `coin_type`.
2781        ///If the field is unset, it is first initialized with the default value.
2782        pub fn coin_type_mut(&mut self) -> &mut String {
2783            self.coin_type.get_or_insert_default()
2784        }
2785        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2786        pub fn coin_type_opt(&self) -> Option<&str> {
2787            self.coin_type.as_ref().map(|field| field as _)
2788        }
2789        ///Sets `coin_type` with the provided value.
2790        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2791            self.coin_type = Some(field.into().into());
2792        }
2793        ///Sets `coin_type` with the provided value.
2794        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2795            self.set_coin_type(field.into());
2796            self
2797        }
2798    }
2799    impl super::CoinMetadata {
2800        pub const fn const_default() -> Self {
2801            Self {
2802                id: None,
2803                decimals: None,
2804                name: None,
2805                symbol: None,
2806                description: None,
2807                icon_url: None,
2808                metadata_cap_id: None,
2809                metadata_cap_state: None,
2810            }
2811        }
2812        #[doc(hidden)]
2813        pub fn default_instance() -> &'static Self {
2814            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2815            &DEFAULT
2816        }
2817        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2818        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2819            self.id.as_mut().map(|field| field as _)
2820        }
2821        ///Returns a mutable reference to `id`.
2822        ///If the field is unset, it is first initialized with the default value.
2823        pub fn id_mut(&mut self) -> &mut String {
2824            self.id.get_or_insert_default()
2825        }
2826        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2827        pub fn id_opt(&self) -> Option<&str> {
2828            self.id.as_ref().map(|field| field as _)
2829        }
2830        ///Sets `id` with the provided value.
2831        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2832            self.id = Some(field.into().into());
2833        }
2834        ///Sets `id` with the provided value.
2835        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2836            self.set_id(field.into());
2837            self
2838        }
2839        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2840        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2841            self.decimals.as_mut().map(|field| field as _)
2842        }
2843        ///Returns a mutable reference to `decimals`.
2844        ///If the field is unset, it is first initialized with the default value.
2845        pub fn decimals_mut(&mut self) -> &mut u32 {
2846            self.decimals.get_or_insert_default()
2847        }
2848        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2849        pub fn decimals_opt(&self) -> Option<u32> {
2850            self.decimals.as_ref().map(|field| *field)
2851        }
2852        ///Sets `decimals` with the provided value.
2853        pub fn set_decimals(&mut self, field: u32) {
2854            self.decimals = Some(field);
2855        }
2856        ///Sets `decimals` with the provided value.
2857        pub fn with_decimals(mut self, field: u32) -> Self {
2858            self.set_decimals(field);
2859            self
2860        }
2861        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2862        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2863            self.name.as_mut().map(|field| field as _)
2864        }
2865        ///Returns a mutable reference to `name`.
2866        ///If the field is unset, it is first initialized with the default value.
2867        pub fn name_mut(&mut self) -> &mut String {
2868            self.name.get_or_insert_default()
2869        }
2870        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2871        pub fn name_opt(&self) -> Option<&str> {
2872            self.name.as_ref().map(|field| field as _)
2873        }
2874        ///Sets `name` with the provided value.
2875        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2876            self.name = Some(field.into().into());
2877        }
2878        ///Sets `name` with the provided value.
2879        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2880            self.set_name(field.into());
2881            self
2882        }
2883        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2884        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2885            self.symbol.as_mut().map(|field| field as _)
2886        }
2887        ///Returns a mutable reference to `symbol`.
2888        ///If the field is unset, it is first initialized with the default value.
2889        pub fn symbol_mut(&mut self) -> &mut String {
2890            self.symbol.get_or_insert_default()
2891        }
2892        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2893        pub fn symbol_opt(&self) -> Option<&str> {
2894            self.symbol.as_ref().map(|field| field as _)
2895        }
2896        ///Sets `symbol` with the provided value.
2897        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2898            self.symbol = Some(field.into().into());
2899        }
2900        ///Sets `symbol` with the provided value.
2901        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2902            self.set_symbol(field.into());
2903            self
2904        }
2905        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2906        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2907            self.description.as_mut().map(|field| field as _)
2908        }
2909        ///Returns a mutable reference to `description`.
2910        ///If the field is unset, it is first initialized with the default value.
2911        pub fn description_mut(&mut self) -> &mut String {
2912            self.description.get_or_insert_default()
2913        }
2914        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2915        pub fn description_opt(&self) -> Option<&str> {
2916            self.description.as_ref().map(|field| field as _)
2917        }
2918        ///Sets `description` with the provided value.
2919        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2920            self.description = Some(field.into().into());
2921        }
2922        ///Sets `description` with the provided value.
2923        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2924            self.set_description(field.into());
2925            self
2926        }
2927        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2928        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2929            self.icon_url.as_mut().map(|field| field as _)
2930        }
2931        ///Returns a mutable reference to `icon_url`.
2932        ///If the field is unset, it is first initialized with the default value.
2933        pub fn icon_url_mut(&mut self) -> &mut String {
2934            self.icon_url.get_or_insert_default()
2935        }
2936        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2937        pub fn icon_url_opt(&self) -> Option<&str> {
2938            self.icon_url.as_ref().map(|field| field as _)
2939        }
2940        ///Sets `icon_url` with the provided value.
2941        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2942            self.icon_url = Some(field.into().into());
2943        }
2944        ///Sets `icon_url` with the provided value.
2945        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2946            self.set_icon_url(field.into());
2947            self
2948        }
2949        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2950        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2951            self.metadata_cap_id.as_mut().map(|field| field as _)
2952        }
2953        ///Returns a mutable reference to `metadata_cap_id`.
2954        ///If the field is unset, it is first initialized with the default value.
2955        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2956            self.metadata_cap_id.get_or_insert_default()
2957        }
2958        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2959        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2960            self.metadata_cap_id.as_ref().map(|field| field as _)
2961        }
2962        ///Sets `metadata_cap_id` with the provided value.
2963        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2964            self.metadata_cap_id = Some(field.into().into());
2965        }
2966        ///Sets `metadata_cap_id` with the provided value.
2967        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2968            self.set_metadata_cap_id(field.into());
2969            self
2970        }
2971        ///Sets `metadata_cap_state` with the provided value.
2972        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2973            mut self,
2974            field: T,
2975        ) -> Self {
2976            self.set_metadata_cap_state(field.into());
2977            self
2978        }
2979    }
2980    impl super::CoinTreasury {
2981        pub const fn const_default() -> Self {
2982            Self {
2983                id: None,
2984                total_supply: None,
2985                supply_state: None,
2986            }
2987        }
2988        #[doc(hidden)]
2989        pub fn default_instance() -> &'static Self {
2990            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2991            &DEFAULT
2992        }
2993        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2994        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2995            self.id.as_mut().map(|field| field as _)
2996        }
2997        ///Returns a mutable reference to `id`.
2998        ///If the field is unset, it is first initialized with the default value.
2999        pub fn id_mut(&mut self) -> &mut String {
3000            self.id.get_or_insert_default()
3001        }
3002        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3003        pub fn id_opt(&self) -> Option<&str> {
3004            self.id.as_ref().map(|field| field as _)
3005        }
3006        ///Sets `id` with the provided value.
3007        pub fn set_id<T: Into<String>>(&mut self, field: T) {
3008            self.id = Some(field.into().into());
3009        }
3010        ///Sets `id` with the provided value.
3011        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
3012            self.set_id(field.into());
3013            self
3014        }
3015        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3016        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
3017            self.total_supply.as_mut().map(|field| field as _)
3018        }
3019        ///Returns a mutable reference to `total_supply`.
3020        ///If the field is unset, it is first initialized with the default value.
3021        pub fn total_supply_mut(&mut self) -> &mut u64 {
3022            self.total_supply.get_or_insert_default()
3023        }
3024        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
3025        pub fn total_supply_opt(&self) -> Option<u64> {
3026            self.total_supply.as_ref().map(|field| *field)
3027        }
3028        ///Sets `total_supply` with the provided value.
3029        pub fn set_total_supply(&mut self, field: u64) {
3030            self.total_supply = Some(field);
3031        }
3032        ///Sets `total_supply` with the provided value.
3033        pub fn with_total_supply(mut self, field: u64) -> Self {
3034            self.set_total_supply(field);
3035            self
3036        }
3037        ///Sets `supply_state` with the provided value.
3038        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
3039            mut self,
3040            field: T,
3041        ) -> Self {
3042            self.set_supply_state(field.into());
3043            self
3044        }
3045    }
3046    impl super::Command {
3047        pub const fn const_default() -> Self {
3048            Self { command: None }
3049        }
3050        #[doc(hidden)]
3051        pub fn default_instance() -> &'static Self {
3052            static DEFAULT: super::Command = super::Command::const_default();
3053            &DEFAULT
3054        }
3055        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
3056        pub fn move_call(&self) -> &super::MoveCall {
3057            if let Some(super::command::Command::MoveCall(field)) = &self.command {
3058                field as _
3059            } else {
3060                super::MoveCall::default_instance() as _
3061            }
3062        }
3063        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
3064        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3065            if let Some(super::command::Command::MoveCall(field)) = &self.command {
3066                Some(field as _)
3067            } else {
3068                None
3069            }
3070        }
3071        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3072        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3073            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3074                Some(field as _)
3075            } else {
3076                None
3077            }
3078        }
3079        ///Returns a mutable reference to `move_call`.
3080        ///If the field is unset, it is first initialized with the default value.
3081        ///If any other oneof field in the same oneof is set, it will be cleared.
3082        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3083            if self.move_call_opt_mut().is_none() {
3084                self.command = Some(
3085                    super::command::Command::MoveCall(super::MoveCall::default()),
3086                );
3087            }
3088            self.move_call_opt_mut().unwrap()
3089        }
3090        ///Sets `move_call` with the provided value.
3091        ///If any other oneof field in the same oneof is set, it will be cleared.
3092        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3093            self.command = Some(super::command::Command::MoveCall(field.into().into()));
3094        }
3095        ///Sets `move_call` with the provided value.
3096        ///If any other oneof field in the same oneof is set, it will be cleared.
3097        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3098            self.set_move_call(field.into());
3099            self
3100        }
3101        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
3102        pub fn transfer_objects(&self) -> &super::TransferObjects {
3103            if let Some(super::command::Command::TransferObjects(field)) = &self.command
3104            {
3105                field as _
3106            } else {
3107                super::TransferObjects::default_instance() as _
3108            }
3109        }
3110        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
3111        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3112            if let Some(super::command::Command::TransferObjects(field)) = &self.command
3113            {
3114                Some(field as _)
3115            } else {
3116                None
3117            }
3118        }
3119        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3120        pub fn transfer_objects_opt_mut(
3121            &mut self,
3122        ) -> Option<&mut super::TransferObjects> {
3123            if let Some(super::command::Command::TransferObjects(field)) = &mut self
3124                .command
3125            {
3126                Some(field as _)
3127            } else {
3128                None
3129            }
3130        }
3131        ///Returns a mutable reference to `transfer_objects`.
3132        ///If the field is unset, it is first initialized with the default value.
3133        ///If any other oneof field in the same oneof is set, it will be cleared.
3134        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3135            if self.transfer_objects_opt_mut().is_none() {
3136                self.command = Some(
3137                    super::command::Command::TransferObjects(
3138                        super::TransferObjects::default(),
3139                    ),
3140                );
3141            }
3142            self.transfer_objects_opt_mut().unwrap()
3143        }
3144        ///Sets `transfer_objects` with the provided value.
3145        ///If any other oneof field in the same oneof is set, it will be cleared.
3146        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3147            &mut self,
3148            field: T,
3149        ) {
3150            self.command = Some(
3151                super::command::Command::TransferObjects(field.into().into()),
3152            );
3153        }
3154        ///Sets `transfer_objects` with the provided value.
3155        ///If any other oneof field in the same oneof is set, it will be cleared.
3156        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3157            mut self,
3158            field: T,
3159        ) -> Self {
3160            self.set_transfer_objects(field.into());
3161            self
3162        }
3163        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
3164        pub fn split_coins(&self) -> &super::SplitCoins {
3165            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3166                field as _
3167            } else {
3168                super::SplitCoins::default_instance() as _
3169            }
3170        }
3171        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3172        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3173            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3174                Some(field as _)
3175            } else {
3176                None
3177            }
3178        }
3179        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3180        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3181            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3182                Some(field as _)
3183            } else {
3184                None
3185            }
3186        }
3187        ///Returns a mutable reference to `split_coins`.
3188        ///If the field is unset, it is first initialized with the default value.
3189        ///If any other oneof field in the same oneof is set, it will be cleared.
3190        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3191            if self.split_coins_opt_mut().is_none() {
3192                self.command = Some(
3193                    super::command::Command::SplitCoins(super::SplitCoins::default()),
3194                );
3195            }
3196            self.split_coins_opt_mut().unwrap()
3197        }
3198        ///Sets `split_coins` with the provided value.
3199        ///If any other oneof field in the same oneof is set, it will be cleared.
3200        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3201            self.command = Some(
3202                super::command::Command::SplitCoins(field.into().into()),
3203            );
3204        }
3205        ///Sets `split_coins` with the provided value.
3206        ///If any other oneof field in the same oneof is set, it will be cleared.
3207        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3208            self.set_split_coins(field.into());
3209            self
3210        }
3211        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
3212        pub fn merge_coins(&self) -> &super::MergeCoins {
3213            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3214                field as _
3215            } else {
3216                super::MergeCoins::default_instance() as _
3217            }
3218        }
3219        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3220        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3221            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3222                Some(field as _)
3223            } else {
3224                None
3225            }
3226        }
3227        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3228        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3229            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3230                Some(field as _)
3231            } else {
3232                None
3233            }
3234        }
3235        ///Returns a mutable reference to `merge_coins`.
3236        ///If the field is unset, it is first initialized with the default value.
3237        ///If any other oneof field in the same oneof is set, it will be cleared.
3238        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3239            if self.merge_coins_opt_mut().is_none() {
3240                self.command = Some(
3241                    super::command::Command::MergeCoins(super::MergeCoins::default()),
3242                );
3243            }
3244            self.merge_coins_opt_mut().unwrap()
3245        }
3246        ///Sets `merge_coins` with the provided value.
3247        ///If any other oneof field in the same oneof is set, it will be cleared.
3248        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3249            self.command = Some(
3250                super::command::Command::MergeCoins(field.into().into()),
3251            );
3252        }
3253        ///Sets `merge_coins` with the provided value.
3254        ///If any other oneof field in the same oneof is set, it will be cleared.
3255        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3256            self.set_merge_coins(field.into());
3257            self
3258        }
3259        ///Returns the value of `publish`, or the default value if `publish` is unset.
3260        pub fn publish(&self) -> &super::Publish {
3261            if let Some(super::command::Command::Publish(field)) = &self.command {
3262                field as _
3263            } else {
3264                super::Publish::default_instance() as _
3265            }
3266        }
3267        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
3268        pub fn publish_opt(&self) -> Option<&super::Publish> {
3269            if let Some(super::command::Command::Publish(field)) = &self.command {
3270                Some(field as _)
3271            } else {
3272                None
3273            }
3274        }
3275        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3276        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3277            if let Some(super::command::Command::Publish(field)) = &mut self.command {
3278                Some(field as _)
3279            } else {
3280                None
3281            }
3282        }
3283        ///Returns a mutable reference to `publish`.
3284        ///If the field is unset, it is first initialized with the default value.
3285        ///If any other oneof field in the same oneof is set, it will be cleared.
3286        pub fn publish_mut(&mut self) -> &mut super::Publish {
3287            if self.publish_opt_mut().is_none() {
3288                self.command = Some(
3289                    super::command::Command::Publish(super::Publish::default()),
3290                );
3291            }
3292            self.publish_opt_mut().unwrap()
3293        }
3294        ///Sets `publish` with the provided value.
3295        ///If any other oneof field in the same oneof is set, it will be cleared.
3296        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3297            self.command = Some(super::command::Command::Publish(field.into().into()));
3298        }
3299        ///Sets `publish` with the provided value.
3300        ///If any other oneof field in the same oneof is set, it will be cleared.
3301        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3302            self.set_publish(field.into());
3303            self
3304        }
3305        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
3306        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3307            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3308                field as _
3309            } else {
3310                super::MakeMoveVector::default_instance() as _
3311            }
3312        }
3313        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
3314        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3315            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3316                Some(field as _)
3317            } else {
3318                None
3319            }
3320        }
3321        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3322        pub fn make_move_vector_opt_mut(
3323            &mut self,
3324        ) -> Option<&mut super::MakeMoveVector> {
3325            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3326                .command
3327            {
3328                Some(field as _)
3329            } else {
3330                None
3331            }
3332        }
3333        ///Returns a mutable reference to `make_move_vector`.
3334        ///If the field is unset, it is first initialized with the default value.
3335        ///If any other oneof field in the same oneof is set, it will be cleared.
3336        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3337            if self.make_move_vector_opt_mut().is_none() {
3338                self.command = Some(
3339                    super::command::Command::MakeMoveVector(
3340                        super::MakeMoveVector::default(),
3341                    ),
3342                );
3343            }
3344            self.make_move_vector_opt_mut().unwrap()
3345        }
3346        ///Sets `make_move_vector` with the provided value.
3347        ///If any other oneof field in the same oneof is set, it will be cleared.
3348        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3349            &mut self,
3350            field: T,
3351        ) {
3352            self.command = Some(
3353                super::command::Command::MakeMoveVector(field.into().into()),
3354            );
3355        }
3356        ///Sets `make_move_vector` with the provided value.
3357        ///If any other oneof field in the same oneof is set, it will be cleared.
3358        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3359            mut self,
3360            field: T,
3361        ) -> Self {
3362            self.set_make_move_vector(field.into());
3363            self
3364        }
3365        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3366        pub fn upgrade(&self) -> &super::Upgrade {
3367            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3368                field as _
3369            } else {
3370                super::Upgrade::default_instance() as _
3371            }
3372        }
3373        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3374        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3375            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3376                Some(field as _)
3377            } else {
3378                None
3379            }
3380        }
3381        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3382        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3383            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3384                Some(field as _)
3385            } else {
3386                None
3387            }
3388        }
3389        ///Returns a mutable reference to `upgrade`.
3390        ///If the field is unset, it is first initialized with the default value.
3391        ///If any other oneof field in the same oneof is set, it will be cleared.
3392        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3393            if self.upgrade_opt_mut().is_none() {
3394                self.command = Some(
3395                    super::command::Command::Upgrade(super::Upgrade::default()),
3396                );
3397            }
3398            self.upgrade_opt_mut().unwrap()
3399        }
3400        ///Sets `upgrade` with the provided value.
3401        ///If any other oneof field in the same oneof is set, it will be cleared.
3402        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3403            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3404        }
3405        ///Sets `upgrade` with the provided value.
3406        ///If any other oneof field in the same oneof is set, it will be cleared.
3407        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3408            self.set_upgrade(field.into());
3409            self
3410        }
3411    }
3412    impl super::CommandArgumentError {
3413        pub const fn const_default() -> Self {
3414            Self {
3415                argument: None,
3416                kind: None,
3417                index_error: None,
3418            }
3419        }
3420        #[doc(hidden)]
3421        pub fn default_instance() -> &'static Self {
3422            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3423            &DEFAULT
3424        }
3425        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3426        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3427            self.argument.as_mut().map(|field| field as _)
3428        }
3429        ///Returns a mutable reference to `argument`.
3430        ///If the field is unset, it is first initialized with the default value.
3431        pub fn argument_mut(&mut self) -> &mut u32 {
3432            self.argument.get_or_insert_default()
3433        }
3434        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3435        pub fn argument_opt(&self) -> Option<u32> {
3436            self.argument.as_ref().map(|field| *field)
3437        }
3438        ///Sets `argument` with the provided value.
3439        pub fn set_argument(&mut self, field: u32) {
3440            self.argument = Some(field);
3441        }
3442        ///Sets `argument` with the provided value.
3443        pub fn with_argument(mut self, field: u32) -> Self {
3444            self.set_argument(field);
3445            self
3446        }
3447        ///Sets `kind` with the provided value.
3448        pub fn with_kind<
3449            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3450        >(mut self, field: T) -> Self {
3451            self.set_kind(field.into());
3452            self
3453        }
3454        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3455        pub fn index_error(&self) -> &super::IndexError {
3456            self.index_error
3457                .as_ref()
3458                .map(|field| field as _)
3459                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3460        }
3461        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3462        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3463            self.index_error.as_mut().map(|field| field as _)
3464        }
3465        ///Returns a mutable reference to `index_error`.
3466        ///If the field is unset, it is first initialized with the default value.
3467        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3468            self.index_error.get_or_insert_default()
3469        }
3470        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3471        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3472            self.index_error.as_ref().map(|field| field as _)
3473        }
3474        ///Sets `index_error` with the provided value.
3475        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3476            self.index_error = Some(field.into().into());
3477        }
3478        ///Sets `index_error` with the provided value.
3479        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3480            self.set_index_error(field.into());
3481            self
3482        }
3483    }
3484    impl super::CommandOutput {
3485        pub const fn const_default() -> Self {
3486            Self {
3487                argument: None,
3488                value: None,
3489                json: None,
3490            }
3491        }
3492        #[doc(hidden)]
3493        pub fn default_instance() -> &'static Self {
3494            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3495            &DEFAULT
3496        }
3497        ///Returns the value of `argument`, or the default value if `argument` is unset.
3498        pub fn argument(&self) -> &super::Argument {
3499            self.argument
3500                .as_ref()
3501                .map(|field| field as _)
3502                .unwrap_or_else(|| super::Argument::default_instance() as _)
3503        }
3504        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3505        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3506            self.argument.as_mut().map(|field| field as _)
3507        }
3508        ///Returns a mutable reference to `argument`.
3509        ///If the field is unset, it is first initialized with the default value.
3510        pub fn argument_mut(&mut self) -> &mut super::Argument {
3511            self.argument.get_or_insert_default()
3512        }
3513        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3514        pub fn argument_opt(&self) -> Option<&super::Argument> {
3515            self.argument.as_ref().map(|field| field as _)
3516        }
3517        ///Sets `argument` with the provided value.
3518        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3519            self.argument = Some(field.into().into());
3520        }
3521        ///Sets `argument` with the provided value.
3522        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3523            self.set_argument(field.into());
3524            self
3525        }
3526        ///Returns the value of `value`, or the default value if `value` is unset.
3527        pub fn value(&self) -> &super::Bcs {
3528            self.value
3529                .as_ref()
3530                .map(|field| field as _)
3531                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3532        }
3533        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3534        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3535            self.value.as_mut().map(|field| field as _)
3536        }
3537        ///Returns a mutable reference to `value`.
3538        ///If the field is unset, it is first initialized with the default value.
3539        pub fn value_mut(&mut self) -> &mut super::Bcs {
3540            self.value.get_or_insert_default()
3541        }
3542        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3543        pub fn value_opt(&self) -> Option<&super::Bcs> {
3544            self.value.as_ref().map(|field| field as _)
3545        }
3546        ///Sets `value` with the provided value.
3547        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3548            self.value = Some(field.into().into());
3549        }
3550        ///Sets `value` with the provided value.
3551        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3552            self.set_value(field.into());
3553            self
3554        }
3555        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3556        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3557            self.json.as_mut().map(|field| field as _)
3558        }
3559        ///Returns a mutable reference to `json`.
3560        ///If the field is unset, it is first initialized with the default value.
3561        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3562            self.json.get_or_insert_default()
3563        }
3564        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3565        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3566            self.json.as_ref().map(|field| field as _)
3567        }
3568        ///Sets `json` with the provided value.
3569        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3570            self.json = Some(field.into().into());
3571        }
3572        ///Sets `json` with the provided value.
3573        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3574            self.set_json(field.into());
3575            self
3576        }
3577    }
3578    impl super::CommandResult {
3579        pub const fn const_default() -> Self {
3580            Self {
3581                return_values: Vec::new(),
3582                mutated_by_ref: Vec::new(),
3583            }
3584        }
3585        #[doc(hidden)]
3586        pub fn default_instance() -> &'static Self {
3587            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3588            &DEFAULT
3589        }
3590        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3591        pub fn return_values(&self) -> &[super::CommandOutput] {
3592            &self.return_values
3593        }
3594        ///Returns a mutable reference to `return_values`.
3595        ///If the field is unset, it is first initialized with the default value.
3596        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3597            &mut self.return_values
3598        }
3599        ///Sets `return_values` with the provided value.
3600        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3601            self.return_values = field;
3602        }
3603        ///Sets `return_values` with the provided value.
3604        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3605            self.set_return_values(field);
3606            self
3607        }
3608        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3609        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3610            &self.mutated_by_ref
3611        }
3612        ///Returns a mutable reference to `mutated_by_ref`.
3613        ///If the field is unset, it is first initialized with the default value.
3614        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3615            &mut self.mutated_by_ref
3616        }
3617        ///Sets `mutated_by_ref` with the provided value.
3618        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3619            self.mutated_by_ref = field;
3620        }
3621        ///Sets `mutated_by_ref` with the provided value.
3622        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3623            self.set_mutated_by_ref(field);
3624            self
3625        }
3626    }
3627    impl super::CongestedObjects {
3628        pub const fn const_default() -> Self {
3629            Self { objects: Vec::new() }
3630        }
3631        #[doc(hidden)]
3632        pub fn default_instance() -> &'static Self {
3633            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3634            &DEFAULT
3635        }
3636        ///Returns the value of `objects`, or the default value if `objects` is unset.
3637        pub fn objects(&self) -> &[String] {
3638            &self.objects
3639        }
3640        ///Returns a mutable reference to `objects`.
3641        ///If the field is unset, it is first initialized with the default value.
3642        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3643            &mut self.objects
3644        }
3645        ///Sets `objects` with the provided value.
3646        pub fn set_objects(&mut self, field: Vec<String>) {
3647            self.objects = field;
3648        }
3649        ///Sets `objects` with the provided value.
3650        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3651            self.set_objects(field);
3652            self
3653        }
3654    }
3655    impl super::ConsensusCommitPrologue {
3656        pub const fn const_default() -> Self {
3657            Self {
3658                epoch: None,
3659                round: None,
3660                commit_timestamp: None,
3661                consensus_commit_digest: None,
3662                sub_dag_index: None,
3663                consensus_determined_version_assignments: None,
3664                additional_state_digest: None,
3665            }
3666        }
3667        #[doc(hidden)]
3668        pub fn default_instance() -> &'static Self {
3669            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3670            &DEFAULT
3671        }
3672        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3673        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3674            self.epoch.as_mut().map(|field| field as _)
3675        }
3676        ///Returns a mutable reference to `epoch`.
3677        ///If the field is unset, it is first initialized with the default value.
3678        pub fn epoch_mut(&mut self) -> &mut u64 {
3679            self.epoch.get_or_insert_default()
3680        }
3681        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3682        pub fn epoch_opt(&self) -> Option<u64> {
3683            self.epoch.as_ref().map(|field| *field)
3684        }
3685        ///Sets `epoch` with the provided value.
3686        pub fn set_epoch(&mut self, field: u64) {
3687            self.epoch = Some(field);
3688        }
3689        ///Sets `epoch` with the provided value.
3690        pub fn with_epoch(mut self, field: u64) -> Self {
3691            self.set_epoch(field);
3692            self
3693        }
3694        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3695        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3696            self.round.as_mut().map(|field| field as _)
3697        }
3698        ///Returns a mutable reference to `round`.
3699        ///If the field is unset, it is first initialized with the default value.
3700        pub fn round_mut(&mut self) -> &mut u64 {
3701            self.round.get_or_insert_default()
3702        }
3703        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3704        pub fn round_opt(&self) -> Option<u64> {
3705            self.round.as_ref().map(|field| *field)
3706        }
3707        ///Sets `round` with the provided value.
3708        pub fn set_round(&mut self, field: u64) {
3709            self.round = Some(field);
3710        }
3711        ///Sets `round` with the provided value.
3712        pub fn with_round(mut self, field: u64) -> Self {
3713            self.set_round(field);
3714            self
3715        }
3716        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3717        pub fn commit_timestamp_opt_mut(
3718            &mut self,
3719        ) -> Option<&mut ::prost_types::Timestamp> {
3720            self.commit_timestamp.as_mut().map(|field| field as _)
3721        }
3722        ///Returns a mutable reference to `commit_timestamp`.
3723        ///If the field is unset, it is first initialized with the default value.
3724        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3725            self.commit_timestamp.get_or_insert_default()
3726        }
3727        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3728        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3729            self.commit_timestamp.as_ref().map(|field| field as _)
3730        }
3731        ///Sets `commit_timestamp` with the provided value.
3732        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3733            &mut self,
3734            field: T,
3735        ) {
3736            self.commit_timestamp = Some(field.into().into());
3737        }
3738        ///Sets `commit_timestamp` with the provided value.
3739        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3740            mut self,
3741            field: T,
3742        ) -> Self {
3743            self.set_commit_timestamp(field.into());
3744            self
3745        }
3746        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3747        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3748            self.consensus_commit_digest.as_mut().map(|field| field as _)
3749        }
3750        ///Returns a mutable reference to `consensus_commit_digest`.
3751        ///If the field is unset, it is first initialized with the default value.
3752        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3753            self.consensus_commit_digest.get_or_insert_default()
3754        }
3755        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3756        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3757            self.consensus_commit_digest.as_ref().map(|field| field as _)
3758        }
3759        ///Sets `consensus_commit_digest` with the provided value.
3760        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3761            self.consensus_commit_digest = Some(field.into().into());
3762        }
3763        ///Sets `consensus_commit_digest` with the provided value.
3764        pub fn with_consensus_commit_digest<T: Into<String>>(
3765            mut self,
3766            field: T,
3767        ) -> Self {
3768            self.set_consensus_commit_digest(field.into());
3769            self
3770        }
3771        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3772        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3773            self.sub_dag_index.as_mut().map(|field| field as _)
3774        }
3775        ///Returns a mutable reference to `sub_dag_index`.
3776        ///If the field is unset, it is first initialized with the default value.
3777        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3778            self.sub_dag_index.get_or_insert_default()
3779        }
3780        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3781        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3782            self.sub_dag_index.as_ref().map(|field| *field)
3783        }
3784        ///Sets `sub_dag_index` with the provided value.
3785        pub fn set_sub_dag_index(&mut self, field: u64) {
3786            self.sub_dag_index = Some(field);
3787        }
3788        ///Sets `sub_dag_index` with the provided value.
3789        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3790            self.set_sub_dag_index(field);
3791            self
3792        }
3793        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3794        pub fn consensus_determined_version_assignments(
3795            &self,
3796        ) -> &super::ConsensusDeterminedVersionAssignments {
3797            self.consensus_determined_version_assignments
3798                .as_ref()
3799                .map(|field| field as _)
3800                .unwrap_or_else(|| {
3801                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3802                })
3803        }
3804        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3805        pub fn consensus_determined_version_assignments_opt_mut(
3806            &mut self,
3807        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3808            self.consensus_determined_version_assignments
3809                .as_mut()
3810                .map(|field| field as _)
3811        }
3812        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3813        ///If the field is unset, it is first initialized with the default value.
3814        pub fn consensus_determined_version_assignments_mut(
3815            &mut self,
3816        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3817            self.consensus_determined_version_assignments.get_or_insert_default()
3818        }
3819        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3820        pub fn consensus_determined_version_assignments_opt(
3821            &self,
3822        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3823            self.consensus_determined_version_assignments
3824                .as_ref()
3825                .map(|field| field as _)
3826        }
3827        ///Sets `consensus_determined_version_assignments` with the provided value.
3828        pub fn set_consensus_determined_version_assignments<
3829            T: Into<super::ConsensusDeterminedVersionAssignments>,
3830        >(&mut self, field: T) {
3831            self.consensus_determined_version_assignments = Some(field.into().into());
3832        }
3833        ///Sets `consensus_determined_version_assignments` with the provided value.
3834        pub fn with_consensus_determined_version_assignments<
3835            T: Into<super::ConsensusDeterminedVersionAssignments>,
3836        >(mut self, field: T) -> Self {
3837            self.set_consensus_determined_version_assignments(field.into());
3838            self
3839        }
3840        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3841        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3842            self.additional_state_digest.as_mut().map(|field| field as _)
3843        }
3844        ///Returns a mutable reference to `additional_state_digest`.
3845        ///If the field is unset, it is first initialized with the default value.
3846        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3847            self.additional_state_digest.get_or_insert_default()
3848        }
3849        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3850        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3851            self.additional_state_digest.as_ref().map(|field| field as _)
3852        }
3853        ///Sets `additional_state_digest` with the provided value.
3854        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3855            self.additional_state_digest = Some(field.into().into());
3856        }
3857        ///Sets `additional_state_digest` with the provided value.
3858        pub fn with_additional_state_digest<T: Into<String>>(
3859            mut self,
3860            field: T,
3861        ) -> Self {
3862            self.set_additional_state_digest(field.into());
3863            self
3864        }
3865    }
3866    impl super::ConsensusDeterminedVersionAssignments {
3867        pub const fn const_default() -> Self {
3868            Self {
3869                version: None,
3870                canceled_transactions: Vec::new(),
3871            }
3872        }
3873        #[doc(hidden)]
3874        pub fn default_instance() -> &'static Self {
3875            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3876            &DEFAULT
3877        }
3878        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3879        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3880            self.version.as_mut().map(|field| field as _)
3881        }
3882        ///Returns a mutable reference to `version`.
3883        ///If the field is unset, it is first initialized with the default value.
3884        pub fn version_mut(&mut self) -> &mut i32 {
3885            self.version.get_or_insert_default()
3886        }
3887        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3888        pub fn version_opt(&self) -> Option<i32> {
3889            self.version.as_ref().map(|field| *field)
3890        }
3891        ///Sets `version` with the provided value.
3892        pub fn set_version(&mut self, field: i32) {
3893            self.version = Some(field);
3894        }
3895        ///Sets `version` with the provided value.
3896        pub fn with_version(mut self, field: i32) -> Self {
3897            self.set_version(field);
3898            self
3899        }
3900        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3901        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3902            &self.canceled_transactions
3903        }
3904        ///Returns a mutable reference to `canceled_transactions`.
3905        ///If the field is unset, it is first initialized with the default value.
3906        pub fn canceled_transactions_mut(
3907            &mut self,
3908        ) -> &mut Vec<super::CanceledTransaction> {
3909            &mut self.canceled_transactions
3910        }
3911        ///Sets `canceled_transactions` with the provided value.
3912        pub fn set_canceled_transactions(
3913            &mut self,
3914            field: Vec<super::CanceledTransaction>,
3915        ) {
3916            self.canceled_transactions = field;
3917        }
3918        ///Sets `canceled_transactions` with the provided value.
3919        pub fn with_canceled_transactions(
3920            mut self,
3921            field: Vec<super::CanceledTransaction>,
3922        ) -> Self {
3923            self.set_canceled_transactions(field);
3924            self
3925        }
3926    }
3927    impl super::DatatypeDescriptor {
3928        pub const fn const_default() -> Self {
3929            Self {
3930                type_name: None,
3931                defining_id: None,
3932                module: None,
3933                name: None,
3934                abilities: Vec::new(),
3935                type_parameters: Vec::new(),
3936                kind: None,
3937                fields: Vec::new(),
3938                variants: Vec::new(),
3939            }
3940        }
3941        #[doc(hidden)]
3942        pub fn default_instance() -> &'static Self {
3943            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3944            &DEFAULT
3945        }
3946        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3947        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3948            self.type_name.as_mut().map(|field| field as _)
3949        }
3950        ///Returns a mutable reference to `type_name`.
3951        ///If the field is unset, it is first initialized with the default value.
3952        pub fn type_name_mut(&mut self) -> &mut String {
3953            self.type_name.get_or_insert_default()
3954        }
3955        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3956        pub fn type_name_opt(&self) -> Option<&str> {
3957            self.type_name.as_ref().map(|field| field as _)
3958        }
3959        ///Sets `type_name` with the provided value.
3960        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3961            self.type_name = Some(field.into().into());
3962        }
3963        ///Sets `type_name` with the provided value.
3964        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3965            self.set_type_name(field.into());
3966            self
3967        }
3968        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3969        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3970            self.defining_id.as_mut().map(|field| field as _)
3971        }
3972        ///Returns a mutable reference to `defining_id`.
3973        ///If the field is unset, it is first initialized with the default value.
3974        pub fn defining_id_mut(&mut self) -> &mut String {
3975            self.defining_id.get_or_insert_default()
3976        }
3977        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3978        pub fn defining_id_opt(&self) -> Option<&str> {
3979            self.defining_id.as_ref().map(|field| field as _)
3980        }
3981        ///Sets `defining_id` with the provided value.
3982        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3983            self.defining_id = Some(field.into().into());
3984        }
3985        ///Sets `defining_id` with the provided value.
3986        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3987            self.set_defining_id(field.into());
3988            self
3989        }
3990        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3991        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3992            self.module.as_mut().map(|field| field as _)
3993        }
3994        ///Returns a mutable reference to `module`.
3995        ///If the field is unset, it is first initialized with the default value.
3996        pub fn module_mut(&mut self) -> &mut String {
3997            self.module.get_or_insert_default()
3998        }
3999        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4000        pub fn module_opt(&self) -> Option<&str> {
4001            self.module.as_ref().map(|field| field as _)
4002        }
4003        ///Sets `module` with the provided value.
4004        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4005            self.module = Some(field.into().into());
4006        }
4007        ///Sets `module` with the provided value.
4008        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4009            self.set_module(field.into());
4010            self
4011        }
4012        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4013        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
4014            self.name.as_mut().map(|field| field as _)
4015        }
4016        ///Returns a mutable reference to `name`.
4017        ///If the field is unset, it is first initialized with the default value.
4018        pub fn name_mut(&mut self) -> &mut String {
4019            self.name.get_or_insert_default()
4020        }
4021        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4022        pub fn name_opt(&self) -> Option<&str> {
4023            self.name.as_ref().map(|field| field as _)
4024        }
4025        ///Sets `name` with the provided value.
4026        pub fn set_name<T: Into<String>>(&mut self, field: T) {
4027            self.name = Some(field.into().into());
4028        }
4029        ///Sets `name` with the provided value.
4030        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
4031            self.set_name(field.into());
4032            self
4033        }
4034        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
4035        pub fn type_parameters(&self) -> &[super::TypeParameter] {
4036            &self.type_parameters
4037        }
4038        ///Returns a mutable reference to `type_parameters`.
4039        ///If the field is unset, it is first initialized with the default value.
4040        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
4041            &mut self.type_parameters
4042        }
4043        ///Sets `type_parameters` with the provided value.
4044        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
4045            self.type_parameters = field;
4046        }
4047        ///Sets `type_parameters` with the provided value.
4048        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
4049            self.set_type_parameters(field);
4050            self
4051        }
4052        ///Sets `kind` with the provided value.
4053        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
4054            mut self,
4055            field: T,
4056        ) -> Self {
4057            self.set_kind(field.into());
4058            self
4059        }
4060        ///Returns the value of `fields`, or the default value if `fields` is unset.
4061        pub fn fields(&self) -> &[super::FieldDescriptor] {
4062            &self.fields
4063        }
4064        ///Returns a mutable reference to `fields`.
4065        ///If the field is unset, it is first initialized with the default value.
4066        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4067            &mut self.fields
4068        }
4069        ///Sets `fields` with the provided value.
4070        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4071            self.fields = field;
4072        }
4073        ///Sets `fields` with the provided value.
4074        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4075            self.set_fields(field);
4076            self
4077        }
4078        ///Returns the value of `variants`, or the default value if `variants` is unset.
4079        pub fn variants(&self) -> &[super::VariantDescriptor] {
4080            &self.variants
4081        }
4082        ///Returns a mutable reference to `variants`.
4083        ///If the field is unset, it is first initialized with the default value.
4084        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4085            &mut self.variants
4086        }
4087        ///Sets `variants` with the provided value.
4088        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4089            self.variants = field;
4090        }
4091        ///Sets `variants` with the provided value.
4092        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4093            self.set_variants(field);
4094            self
4095        }
4096    }
4097    impl super::Display {
4098        pub const fn const_default() -> Self {
4099            Self { output: None, errors: None }
4100        }
4101        #[doc(hidden)]
4102        pub fn default_instance() -> &'static Self {
4103            static DEFAULT: super::Display = super::Display::const_default();
4104            &DEFAULT
4105        }
4106        ///If `output` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4107        pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4108            self.output.as_mut().map(|field| field as _)
4109        }
4110        ///Returns a mutable reference to `output`.
4111        ///If the field is unset, it is first initialized with the default value.
4112        pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4113            self.output.get_or_insert_default()
4114        }
4115        ///If `output` is set, returns [`Some`] with the value; otherwise returns [`None`].
4116        pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4117            self.output.as_ref().map(|field| field as _)
4118        }
4119        ///Sets `output` with the provided value.
4120        pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4121            self.output = Some(field.into().into());
4122        }
4123        ///Sets `output` with the provided value.
4124        pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4125            self.set_output(field.into());
4126            self
4127        }
4128        ///If `errors` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4129        pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4130            self.errors.as_mut().map(|field| field as _)
4131        }
4132        ///Returns a mutable reference to `errors`.
4133        ///If the field is unset, it is first initialized with the default value.
4134        pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4135            self.errors.get_or_insert_default()
4136        }
4137        ///If `errors` is set, returns [`Some`] with the value; otherwise returns [`None`].
4138        pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4139            self.errors.as_ref().map(|field| field as _)
4140        }
4141        ///Sets `errors` with the provided value.
4142        pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4143            self.errors = Some(field.into().into());
4144        }
4145        ///Sets `errors` with the provided value.
4146        pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4147            self.set_errors(field.into());
4148            self
4149        }
4150    }
4151    impl super::DynamicField {
4152        pub const fn const_default() -> Self {
4153            Self {
4154                kind: None,
4155                parent: None,
4156                field_id: None,
4157                field_object: None,
4158                name: None,
4159                value: None,
4160                value_type: None,
4161                child_id: None,
4162                child_object: None,
4163            }
4164        }
4165        #[doc(hidden)]
4166        pub fn default_instance() -> &'static Self {
4167            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4168            &DEFAULT
4169        }
4170        ///Sets `kind` with the provided value.
4171        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4172            mut self,
4173            field: T,
4174        ) -> Self {
4175            self.set_kind(field.into());
4176            self
4177        }
4178        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4179        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4180            self.parent.as_mut().map(|field| field as _)
4181        }
4182        ///Returns a mutable reference to `parent`.
4183        ///If the field is unset, it is first initialized with the default value.
4184        pub fn parent_mut(&mut self) -> &mut String {
4185            self.parent.get_or_insert_default()
4186        }
4187        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
4188        pub fn parent_opt(&self) -> Option<&str> {
4189            self.parent.as_ref().map(|field| field as _)
4190        }
4191        ///Sets `parent` with the provided value.
4192        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4193            self.parent = Some(field.into().into());
4194        }
4195        ///Sets `parent` with the provided value.
4196        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4197            self.set_parent(field.into());
4198            self
4199        }
4200        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4201        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4202            self.field_id.as_mut().map(|field| field as _)
4203        }
4204        ///Returns a mutable reference to `field_id`.
4205        ///If the field is unset, it is first initialized with the default value.
4206        pub fn field_id_mut(&mut self) -> &mut String {
4207            self.field_id.get_or_insert_default()
4208        }
4209        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4210        pub fn field_id_opt(&self) -> Option<&str> {
4211            self.field_id.as_ref().map(|field| field as _)
4212        }
4213        ///Sets `field_id` with the provided value.
4214        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4215            self.field_id = Some(field.into().into());
4216        }
4217        ///Sets `field_id` with the provided value.
4218        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4219            self.set_field_id(field.into());
4220            self
4221        }
4222        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4223        pub fn field_object(&self) -> &super::Object {
4224            self.field_object
4225                .as_ref()
4226                .map(|field| field as _)
4227                .unwrap_or_else(|| super::Object::default_instance() as _)
4228        }
4229        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4230        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4231            self.field_object.as_mut().map(|field| field as _)
4232        }
4233        ///Returns a mutable reference to `field_object`.
4234        ///If the field is unset, it is first initialized with the default value.
4235        pub fn field_object_mut(&mut self) -> &mut super::Object {
4236            self.field_object.get_or_insert_default()
4237        }
4238        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4239        pub fn field_object_opt(&self) -> Option<&super::Object> {
4240            self.field_object.as_ref().map(|field| field as _)
4241        }
4242        ///Sets `field_object` with the provided value.
4243        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4244            self.field_object = Some(field.into().into());
4245        }
4246        ///Sets `field_object` with the provided value.
4247        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4248            self.set_field_object(field.into());
4249            self
4250        }
4251        ///Returns the value of `name`, or the default value if `name` is unset.
4252        pub fn name(&self) -> &super::Bcs {
4253            self.name
4254                .as_ref()
4255                .map(|field| field as _)
4256                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4257        }
4258        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4259        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4260            self.name.as_mut().map(|field| field as _)
4261        }
4262        ///Returns a mutable reference to `name`.
4263        ///If the field is unset, it is first initialized with the default value.
4264        pub fn name_mut(&mut self) -> &mut super::Bcs {
4265            self.name.get_or_insert_default()
4266        }
4267        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4268        pub fn name_opt(&self) -> Option<&super::Bcs> {
4269            self.name.as_ref().map(|field| field as _)
4270        }
4271        ///Sets `name` with the provided value.
4272        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4273            self.name = Some(field.into().into());
4274        }
4275        ///Sets `name` with the provided value.
4276        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4277            self.set_name(field.into());
4278            self
4279        }
4280        ///Returns the value of `value`, or the default value if `value` is unset.
4281        pub fn value(&self) -> &super::Bcs {
4282            self.value
4283                .as_ref()
4284                .map(|field| field as _)
4285                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4286        }
4287        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4288        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4289            self.value.as_mut().map(|field| field as _)
4290        }
4291        ///Returns a mutable reference to `value`.
4292        ///If the field is unset, it is first initialized with the default value.
4293        pub fn value_mut(&mut self) -> &mut super::Bcs {
4294            self.value.get_or_insert_default()
4295        }
4296        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4297        pub fn value_opt(&self) -> Option<&super::Bcs> {
4298            self.value.as_ref().map(|field| field as _)
4299        }
4300        ///Sets `value` with the provided value.
4301        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4302            self.value = Some(field.into().into());
4303        }
4304        ///Sets `value` with the provided value.
4305        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4306            self.set_value(field.into());
4307            self
4308        }
4309        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4310        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4311            self.value_type.as_mut().map(|field| field as _)
4312        }
4313        ///Returns a mutable reference to `value_type`.
4314        ///If the field is unset, it is first initialized with the default value.
4315        pub fn value_type_mut(&mut self) -> &mut String {
4316            self.value_type.get_or_insert_default()
4317        }
4318        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4319        pub fn value_type_opt(&self) -> Option<&str> {
4320            self.value_type.as_ref().map(|field| field as _)
4321        }
4322        ///Sets `value_type` with the provided value.
4323        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4324            self.value_type = Some(field.into().into());
4325        }
4326        ///Sets `value_type` with the provided value.
4327        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4328            self.set_value_type(field.into());
4329            self
4330        }
4331        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4332        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4333            self.child_id.as_mut().map(|field| field as _)
4334        }
4335        ///Returns a mutable reference to `child_id`.
4336        ///If the field is unset, it is first initialized with the default value.
4337        pub fn child_id_mut(&mut self) -> &mut String {
4338            self.child_id.get_or_insert_default()
4339        }
4340        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4341        pub fn child_id_opt(&self) -> Option<&str> {
4342            self.child_id.as_ref().map(|field| field as _)
4343        }
4344        ///Sets `child_id` with the provided value.
4345        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4346            self.child_id = Some(field.into().into());
4347        }
4348        ///Sets `child_id` with the provided value.
4349        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4350            self.set_child_id(field.into());
4351            self
4352        }
4353        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4354        pub fn child_object(&self) -> &super::Object {
4355            self.child_object
4356                .as_ref()
4357                .map(|field| field as _)
4358                .unwrap_or_else(|| super::Object::default_instance() as _)
4359        }
4360        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4361        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4362            self.child_object.as_mut().map(|field| field as _)
4363        }
4364        ///Returns a mutable reference to `child_object`.
4365        ///If the field is unset, it is first initialized with the default value.
4366        pub fn child_object_mut(&mut self) -> &mut super::Object {
4367            self.child_object.get_or_insert_default()
4368        }
4369        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4370        pub fn child_object_opt(&self) -> Option<&super::Object> {
4371            self.child_object.as_ref().map(|field| field as _)
4372        }
4373        ///Sets `child_object` with the provided value.
4374        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4375            self.child_object = Some(field.into().into());
4376        }
4377        ///Sets `child_object` with the provided value.
4378        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4379            self.set_child_object(field.into());
4380            self
4381        }
4382    }
4383    impl super::EmitModuleFilter {
4384        pub const fn const_default() -> Self {
4385            Self { module: None }
4386        }
4387        #[doc(hidden)]
4388        pub fn default_instance() -> &'static Self {
4389            static DEFAULT: super::EmitModuleFilter = super::EmitModuleFilter::const_default();
4390            &DEFAULT
4391        }
4392        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4393        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4394            self.module.as_mut().map(|field| field as _)
4395        }
4396        ///Returns a mutable reference to `module`.
4397        ///If the field is unset, it is first initialized with the default value.
4398        pub fn module_mut(&mut self) -> &mut String {
4399            self.module.get_or_insert_default()
4400        }
4401        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4402        pub fn module_opt(&self) -> Option<&str> {
4403            self.module.as_ref().map(|field| field as _)
4404        }
4405        ///Sets `module` with the provided value.
4406        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4407            self.module = Some(field.into().into());
4408        }
4409        ///Sets `module` with the provided value.
4410        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4411            self.set_module(field.into());
4412            self
4413        }
4414    }
4415    impl super::EndOfEpochData {
4416        pub const fn const_default() -> Self {
4417            Self {
4418                next_epoch_committee: Vec::new(),
4419                next_epoch_protocol_version: None,
4420                epoch_commitments: Vec::new(),
4421            }
4422        }
4423        #[doc(hidden)]
4424        pub fn default_instance() -> &'static Self {
4425            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4426            &DEFAULT
4427        }
4428        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4429        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4430            &self.next_epoch_committee
4431        }
4432        ///Returns a mutable reference to `next_epoch_committee`.
4433        ///If the field is unset, it is first initialized with the default value.
4434        pub fn next_epoch_committee_mut(
4435            &mut self,
4436        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4437            &mut self.next_epoch_committee
4438        }
4439        ///Sets `next_epoch_committee` with the provided value.
4440        pub fn set_next_epoch_committee(
4441            &mut self,
4442            field: Vec<super::ValidatorCommitteeMember>,
4443        ) {
4444            self.next_epoch_committee = field;
4445        }
4446        ///Sets `next_epoch_committee` with the provided value.
4447        pub fn with_next_epoch_committee(
4448            mut self,
4449            field: Vec<super::ValidatorCommitteeMember>,
4450        ) -> Self {
4451            self.set_next_epoch_committee(field);
4452            self
4453        }
4454        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4455        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4456            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4457        }
4458        ///Returns a mutable reference to `next_epoch_protocol_version`.
4459        ///If the field is unset, it is first initialized with the default value.
4460        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4461            self.next_epoch_protocol_version.get_or_insert_default()
4462        }
4463        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4464        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4465            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4466        }
4467        ///Sets `next_epoch_protocol_version` with the provided value.
4468        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4469            self.next_epoch_protocol_version = Some(field);
4470        }
4471        ///Sets `next_epoch_protocol_version` with the provided value.
4472        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4473            self.set_next_epoch_protocol_version(field);
4474            self
4475        }
4476        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4477        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4478            &self.epoch_commitments
4479        }
4480        ///Returns a mutable reference to `epoch_commitments`.
4481        ///If the field is unset, it is first initialized with the default value.
4482        pub fn epoch_commitments_mut(
4483            &mut self,
4484        ) -> &mut Vec<super::CheckpointCommitment> {
4485            &mut self.epoch_commitments
4486        }
4487        ///Sets `epoch_commitments` with the provided value.
4488        pub fn set_epoch_commitments(
4489            &mut self,
4490            field: Vec<super::CheckpointCommitment>,
4491        ) {
4492            self.epoch_commitments = field;
4493        }
4494        ///Sets `epoch_commitments` with the provided value.
4495        pub fn with_epoch_commitments(
4496            mut self,
4497            field: Vec<super::CheckpointCommitment>,
4498        ) -> Self {
4499            self.set_epoch_commitments(field);
4500            self
4501        }
4502    }
4503    impl super::EndOfEpochTransaction {
4504        pub const fn const_default() -> Self {
4505            Self { transactions: Vec::new() }
4506        }
4507        #[doc(hidden)]
4508        pub fn default_instance() -> &'static Self {
4509            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4510            &DEFAULT
4511        }
4512        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4513        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4514            &self.transactions
4515        }
4516        ///Returns a mutable reference to `transactions`.
4517        ///If the field is unset, it is first initialized with the default value.
4518        pub fn transactions_mut(
4519            &mut self,
4520        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4521            &mut self.transactions
4522        }
4523        ///Sets `transactions` with the provided value.
4524        pub fn set_transactions(
4525            &mut self,
4526            field: Vec<super::EndOfEpochTransactionKind>,
4527        ) {
4528            self.transactions = field;
4529        }
4530        ///Sets `transactions` with the provided value.
4531        pub fn with_transactions(
4532            mut self,
4533            field: Vec<super::EndOfEpochTransactionKind>,
4534        ) -> Self {
4535            self.set_transactions(field);
4536            self
4537        }
4538    }
4539    impl super::EndOfEpochTransactionKind {
4540        pub const fn const_default() -> Self {
4541            Self { kind: None, data: None }
4542        }
4543        #[doc(hidden)]
4544        pub fn default_instance() -> &'static Self {
4545            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4546            &DEFAULT
4547        }
4548        ///Sets `kind` with the provided value.
4549        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4550            mut self,
4551            field: T,
4552        ) -> Self {
4553            self.set_kind(field.into());
4554            self
4555        }
4556        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4557        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4558            if let Some(
4559                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4560            ) = &self.data
4561            {
4562                field as _
4563            } else {
4564                super::ChangeEpoch::default_instance() as _
4565            }
4566        }
4567        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4568        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4569            if let Some(
4570                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4571            ) = &self.data
4572            {
4573                Some(field as _)
4574            } else {
4575                None
4576            }
4577        }
4578        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4579        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4580            if let Some(
4581                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4582            ) = &mut self.data
4583            {
4584                Some(field as _)
4585            } else {
4586                None
4587            }
4588        }
4589        ///Returns a mutable reference to `change_epoch`.
4590        ///If the field is unset, it is first initialized with the default value.
4591        ///If any other oneof field in the same oneof is set, it will be cleared.
4592        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4593            if self.change_epoch_opt_mut().is_none() {
4594                self.data = Some(
4595                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4596                        super::ChangeEpoch::default(),
4597                    ),
4598                );
4599            }
4600            self.change_epoch_opt_mut().unwrap()
4601        }
4602        ///Sets `change_epoch` with the provided value.
4603        ///If any other oneof field in the same oneof is set, it will be cleared.
4604        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4605            self.data = Some(
4606                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4607                    field.into().into(),
4608                ),
4609            );
4610        }
4611        ///Sets `change_epoch` with the provided value.
4612        ///If any other oneof field in the same oneof is set, it will be cleared.
4613        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4614            mut self,
4615            field: T,
4616        ) -> Self {
4617            self.set_change_epoch(field.into());
4618            self
4619        }
4620        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4621        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4622            if let Some(
4623                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4624                    field,
4625                ),
4626            ) = &self.data
4627            {
4628                field as _
4629            } else {
4630                super::AuthenticatorStateExpire::default_instance() as _
4631            }
4632        }
4633        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4634        pub fn authenticator_state_expire_opt(
4635            &self,
4636        ) -> Option<&super::AuthenticatorStateExpire> {
4637            if let Some(
4638                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4639                    field,
4640                ),
4641            ) = &self.data
4642            {
4643                Some(field as _)
4644            } else {
4645                None
4646            }
4647        }
4648        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4649        pub fn authenticator_state_expire_opt_mut(
4650            &mut self,
4651        ) -> Option<&mut super::AuthenticatorStateExpire> {
4652            if let Some(
4653                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4654                    field,
4655                ),
4656            ) = &mut self.data
4657            {
4658                Some(field as _)
4659            } else {
4660                None
4661            }
4662        }
4663        ///Returns a mutable reference to `authenticator_state_expire`.
4664        ///If the field is unset, it is first initialized with the default value.
4665        ///If any other oneof field in the same oneof is set, it will be cleared.
4666        pub fn authenticator_state_expire_mut(
4667            &mut self,
4668        ) -> &mut super::AuthenticatorStateExpire {
4669            if self.authenticator_state_expire_opt_mut().is_none() {
4670                self.data = Some(
4671                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4672                        super::AuthenticatorStateExpire::default(),
4673                    ),
4674                );
4675            }
4676            self.authenticator_state_expire_opt_mut().unwrap()
4677        }
4678        ///Sets `authenticator_state_expire` with the provided value.
4679        ///If any other oneof field in the same oneof is set, it will be cleared.
4680        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4681            &mut self,
4682            field: T,
4683        ) {
4684            self.data = Some(
4685                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4686                    field.into().into(),
4687                ),
4688            );
4689        }
4690        ///Sets `authenticator_state_expire` with the provided value.
4691        ///If any other oneof field in the same oneof is set, it will be cleared.
4692        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4693            mut self,
4694            field: T,
4695        ) -> Self {
4696            self.set_authenticator_state_expire(field.into());
4697            self
4698        }
4699        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4700        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4701            if let Some(
4702                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4703                    field,
4704                ),
4705            ) = &self.data
4706            {
4707                field as _
4708            } else {
4709                super::ExecutionTimeObservations::default_instance() as _
4710            }
4711        }
4712        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4713        pub fn execution_time_observations_opt(
4714            &self,
4715        ) -> Option<&super::ExecutionTimeObservations> {
4716            if let Some(
4717                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4718                    field,
4719                ),
4720            ) = &self.data
4721            {
4722                Some(field as _)
4723            } else {
4724                None
4725            }
4726        }
4727        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4728        pub fn execution_time_observations_opt_mut(
4729            &mut self,
4730        ) -> Option<&mut super::ExecutionTimeObservations> {
4731            if let Some(
4732                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4733                    field,
4734                ),
4735            ) = &mut self.data
4736            {
4737                Some(field as _)
4738            } else {
4739                None
4740            }
4741        }
4742        ///Returns a mutable reference to `execution_time_observations`.
4743        ///If the field is unset, it is first initialized with the default value.
4744        ///If any other oneof field in the same oneof is set, it will be cleared.
4745        pub fn execution_time_observations_mut(
4746            &mut self,
4747        ) -> &mut super::ExecutionTimeObservations {
4748            if self.execution_time_observations_opt_mut().is_none() {
4749                self.data = Some(
4750                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4751                        super::ExecutionTimeObservations::default(),
4752                    ),
4753                );
4754            }
4755            self.execution_time_observations_opt_mut().unwrap()
4756        }
4757        ///Sets `execution_time_observations` with the provided value.
4758        ///If any other oneof field in the same oneof is set, it will be cleared.
4759        pub fn set_execution_time_observations<
4760            T: Into<super::ExecutionTimeObservations>,
4761        >(&mut self, field: T) {
4762            self.data = Some(
4763                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4764                    field.into().into(),
4765                ),
4766            );
4767        }
4768        ///Sets `execution_time_observations` with the provided value.
4769        ///If any other oneof field in the same oneof is set, it will be cleared.
4770        pub fn with_execution_time_observations<
4771            T: Into<super::ExecutionTimeObservations>,
4772        >(mut self, field: T) -> Self {
4773            self.set_execution_time_observations(field.into());
4774            self
4775        }
4776        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4777        pub fn bridge_chain_id(&self) -> &str {
4778            if let Some(
4779                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4780            ) = &self.data
4781            {
4782                field as _
4783            } else {
4784                ""
4785            }
4786        }
4787        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4788        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4789            if let Some(
4790                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4791            ) = &self.data
4792            {
4793                Some(field as _)
4794            } else {
4795                None
4796            }
4797        }
4798        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4799        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4800            if let Some(
4801                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4802            ) = &mut self.data
4803            {
4804                Some(field as _)
4805            } else {
4806                None
4807            }
4808        }
4809        ///Returns a mutable reference to `bridge_chain_id`.
4810        ///If the field is unset, it is first initialized with the default value.
4811        ///If any other oneof field in the same oneof is set, it will be cleared.
4812        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4813            if self.bridge_chain_id_opt_mut().is_none() {
4814                self.data = Some(
4815                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4816                        String::default(),
4817                    ),
4818                );
4819            }
4820            self.bridge_chain_id_opt_mut().unwrap()
4821        }
4822        ///Sets `bridge_chain_id` with the provided value.
4823        ///If any other oneof field in the same oneof is set, it will be cleared.
4824        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4825            self.data = Some(
4826                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4827                    field.into().into(),
4828                ),
4829            );
4830        }
4831        ///Sets `bridge_chain_id` with the provided value.
4832        ///If any other oneof field in the same oneof is set, it will be cleared.
4833        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4834            self.set_bridge_chain_id(field.into());
4835            self
4836        }
4837        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4838        pub fn bridge_object_version(&self) -> u64 {
4839            if let Some(
4840                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4841            ) = &self.data
4842            {
4843                *field
4844            } else {
4845                0u64
4846            }
4847        }
4848        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4849        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4850            if let Some(
4851                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4852            ) = &self.data
4853            {
4854                Some(*field)
4855            } else {
4856                None
4857            }
4858        }
4859        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4860        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4861            if let Some(
4862                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4863            ) = &mut self.data
4864            {
4865                Some(field as _)
4866            } else {
4867                None
4868            }
4869        }
4870        ///Returns a mutable reference to `bridge_object_version`.
4871        ///If the field is unset, it is first initialized with the default value.
4872        ///If any other oneof field in the same oneof is set, it will be cleared.
4873        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4874            if self.bridge_object_version_opt_mut().is_none() {
4875                self.data = Some(
4876                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4877                        u64::default(),
4878                    ),
4879                );
4880            }
4881            self.bridge_object_version_opt_mut().unwrap()
4882        }
4883        ///Sets `bridge_object_version` with the provided value.
4884        ///If any other oneof field in the same oneof is set, it will be cleared.
4885        pub fn set_bridge_object_version(&mut self, field: u64) {
4886            self.data = Some(
4887                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4888            );
4889        }
4890        ///Sets `bridge_object_version` with the provided value.
4891        ///If any other oneof field in the same oneof is set, it will be cleared.
4892        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4893            self.set_bridge_object_version(field);
4894            self
4895        }
4896        ///Returns the value of `storage_cost`, or the default value if `storage_cost` is unset.
4897        pub fn storage_cost(&self) -> u64 {
4898            if let Some(
4899                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4900            ) = &self.data
4901            {
4902                *field
4903            } else {
4904                0u64
4905            }
4906        }
4907        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
4908        pub fn storage_cost_opt(&self) -> Option<u64> {
4909            if let Some(
4910                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4911            ) = &self.data
4912            {
4913                Some(*field)
4914            } else {
4915                None
4916            }
4917        }
4918        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4919        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4920            if let Some(
4921                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4922            ) = &mut self.data
4923            {
4924                Some(field as _)
4925            } else {
4926                None
4927            }
4928        }
4929        ///Returns a mutable reference to `storage_cost`.
4930        ///If the field is unset, it is first initialized with the default value.
4931        ///If any other oneof field in the same oneof is set, it will be cleared.
4932        pub fn storage_cost_mut(&mut self) -> &mut u64 {
4933            if self.storage_cost_opt_mut().is_none() {
4934                self.data = Some(
4935                    super::end_of_epoch_transaction_kind::Data::StorageCost(
4936                        u64::default(),
4937                    ),
4938                );
4939            }
4940            self.storage_cost_opt_mut().unwrap()
4941        }
4942        ///Sets `storage_cost` with the provided value.
4943        ///If any other oneof field in the same oneof is set, it will be cleared.
4944        pub fn set_storage_cost(&mut self, field: u64) {
4945            self.data = Some(
4946                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4947            );
4948        }
4949        ///Sets `storage_cost` with the provided value.
4950        ///If any other oneof field in the same oneof is set, it will be cleared.
4951        pub fn with_storage_cost(mut self, field: u64) -> Self {
4952            self.set_storage_cost(field);
4953            self
4954        }
4955    }
4956    impl super::Epoch {
4957        pub const fn const_default() -> Self {
4958            Self {
4959                epoch: None,
4960                committee: None,
4961                system_state: None,
4962                first_checkpoint: None,
4963                last_checkpoint: None,
4964                start: None,
4965                end: None,
4966                reference_gas_price: None,
4967                protocol_config: None,
4968            }
4969        }
4970        #[doc(hidden)]
4971        pub fn default_instance() -> &'static Self {
4972            static DEFAULT: super::Epoch = super::Epoch::const_default();
4973            &DEFAULT
4974        }
4975        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4976        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4977            self.epoch.as_mut().map(|field| field as _)
4978        }
4979        ///Returns a mutable reference to `epoch`.
4980        ///If the field is unset, it is first initialized with the default value.
4981        pub fn epoch_mut(&mut self) -> &mut u64 {
4982            self.epoch.get_or_insert_default()
4983        }
4984        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4985        pub fn epoch_opt(&self) -> Option<u64> {
4986            self.epoch.as_ref().map(|field| *field)
4987        }
4988        ///Sets `epoch` with the provided value.
4989        pub fn set_epoch(&mut self, field: u64) {
4990            self.epoch = Some(field);
4991        }
4992        ///Sets `epoch` with the provided value.
4993        pub fn with_epoch(mut self, field: u64) -> Self {
4994            self.set_epoch(field);
4995            self
4996        }
4997        ///Returns the value of `committee`, or the default value if `committee` is unset.
4998        pub fn committee(&self) -> &super::ValidatorCommittee {
4999            self.committee
5000                .as_ref()
5001                .map(|field| field as _)
5002                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5003        }
5004        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5005        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5006            self.committee.as_mut().map(|field| field as _)
5007        }
5008        ///Returns a mutable reference to `committee`.
5009        ///If the field is unset, it is first initialized with the default value.
5010        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5011            self.committee.get_or_insert_default()
5012        }
5013        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
5014        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5015            self.committee.as_ref().map(|field| field as _)
5016        }
5017        ///Sets `committee` with the provided value.
5018        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5019            self.committee = Some(field.into().into());
5020        }
5021        ///Sets `committee` with the provided value.
5022        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5023            mut self,
5024            field: T,
5025        ) -> Self {
5026            self.set_committee(field.into());
5027            self
5028        }
5029        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
5030        pub fn system_state(&self) -> &super::SystemState {
5031            self.system_state
5032                .as_ref()
5033                .map(|field| field as _)
5034                .unwrap_or_else(|| super::SystemState::default_instance() as _)
5035        }
5036        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5037        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5038            self.system_state.as_mut().map(|field| field as _)
5039        }
5040        ///Returns a mutable reference to `system_state`.
5041        ///If the field is unset, it is first initialized with the default value.
5042        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5043            self.system_state.get_or_insert_default()
5044        }
5045        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
5046        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5047            self.system_state.as_ref().map(|field| field as _)
5048        }
5049        ///Sets `system_state` with the provided value.
5050        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5051            self.system_state = Some(field.into().into());
5052        }
5053        ///Sets `system_state` with the provided value.
5054        pub fn with_system_state<T: Into<super::SystemState>>(
5055            mut self,
5056            field: T,
5057        ) -> Self {
5058            self.set_system_state(field.into());
5059            self
5060        }
5061        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5062        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5063            self.first_checkpoint.as_mut().map(|field| field as _)
5064        }
5065        ///Returns a mutable reference to `first_checkpoint`.
5066        ///If the field is unset, it is first initialized with the default value.
5067        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5068            self.first_checkpoint.get_or_insert_default()
5069        }
5070        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5071        pub fn first_checkpoint_opt(&self) -> Option<u64> {
5072            self.first_checkpoint.as_ref().map(|field| *field)
5073        }
5074        ///Sets `first_checkpoint` with the provided value.
5075        pub fn set_first_checkpoint(&mut self, field: u64) {
5076            self.first_checkpoint = Some(field);
5077        }
5078        ///Sets `first_checkpoint` with the provided value.
5079        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5080            self.set_first_checkpoint(field);
5081            self
5082        }
5083        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5084        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5085            self.last_checkpoint.as_mut().map(|field| field as _)
5086        }
5087        ///Returns a mutable reference to `last_checkpoint`.
5088        ///If the field is unset, it is first initialized with the default value.
5089        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5090            self.last_checkpoint.get_or_insert_default()
5091        }
5092        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5093        pub fn last_checkpoint_opt(&self) -> Option<u64> {
5094            self.last_checkpoint.as_ref().map(|field| *field)
5095        }
5096        ///Sets `last_checkpoint` with the provided value.
5097        pub fn set_last_checkpoint(&mut self, field: u64) {
5098            self.last_checkpoint = Some(field);
5099        }
5100        ///Sets `last_checkpoint` with the provided value.
5101        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5102            self.set_last_checkpoint(field);
5103            self
5104        }
5105        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5106        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5107            self.start.as_mut().map(|field| field as _)
5108        }
5109        ///Returns a mutable reference to `start`.
5110        ///If the field is unset, it is first initialized with the default value.
5111        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5112            self.start.get_or_insert_default()
5113        }
5114        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
5115        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5116            self.start.as_ref().map(|field| field as _)
5117        }
5118        ///Sets `start` with the provided value.
5119        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5120            self.start = Some(field.into().into());
5121        }
5122        ///Sets `start` with the provided value.
5123        pub fn with_start<T: Into<::prost_types::Timestamp>>(
5124            mut self,
5125            field: T,
5126        ) -> Self {
5127            self.set_start(field.into());
5128            self
5129        }
5130        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5131        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5132            self.end.as_mut().map(|field| field as _)
5133        }
5134        ///Returns a mutable reference to `end`.
5135        ///If the field is unset, it is first initialized with the default value.
5136        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5137            self.end.get_or_insert_default()
5138        }
5139        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
5140        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5141            self.end.as_ref().map(|field| field as _)
5142        }
5143        ///Sets `end` with the provided value.
5144        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5145            self.end = Some(field.into().into());
5146        }
5147        ///Sets `end` with the provided value.
5148        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5149            self.set_end(field.into());
5150            self
5151        }
5152        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5153        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5154            self.reference_gas_price.as_mut().map(|field| field as _)
5155        }
5156        ///Returns a mutable reference to `reference_gas_price`.
5157        ///If the field is unset, it is first initialized with the default value.
5158        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5159            self.reference_gas_price.get_or_insert_default()
5160        }
5161        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
5162        pub fn reference_gas_price_opt(&self) -> Option<u64> {
5163            self.reference_gas_price.as_ref().map(|field| *field)
5164        }
5165        ///Sets `reference_gas_price` with the provided value.
5166        pub fn set_reference_gas_price(&mut self, field: u64) {
5167            self.reference_gas_price = Some(field);
5168        }
5169        ///Sets `reference_gas_price` with the provided value.
5170        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5171            self.set_reference_gas_price(field);
5172            self
5173        }
5174        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
5175        pub fn protocol_config(&self) -> &super::ProtocolConfig {
5176            self.protocol_config
5177                .as_ref()
5178                .map(|field| field as _)
5179                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5180        }
5181        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5182        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5183            self.protocol_config.as_mut().map(|field| field as _)
5184        }
5185        ///Returns a mutable reference to `protocol_config`.
5186        ///If the field is unset, it is first initialized with the default value.
5187        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5188            self.protocol_config.get_or_insert_default()
5189        }
5190        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
5191        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5192            self.protocol_config.as_ref().map(|field| field as _)
5193        }
5194        ///Sets `protocol_config` with the provided value.
5195        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5196            self.protocol_config = Some(field.into().into());
5197        }
5198        ///Sets `protocol_config` with the provided value.
5199        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5200            mut self,
5201            field: T,
5202        ) -> Self {
5203            self.set_protocol_config(field.into());
5204            self
5205        }
5206    }
5207    impl super::Event {
5208        pub const fn const_default() -> Self {
5209            Self {
5210                package_id: None,
5211                module: None,
5212                sender: None,
5213                event_type: None,
5214                contents: None,
5215                json: None,
5216                checkpoint: None,
5217                transaction_digest: None,
5218                transaction_index: None,
5219                event_index: None,
5220            }
5221        }
5222        #[doc(hidden)]
5223        pub fn default_instance() -> &'static Self {
5224            static DEFAULT: super::Event = super::Event::const_default();
5225            &DEFAULT
5226        }
5227        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5228        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5229            self.package_id.as_mut().map(|field| field as _)
5230        }
5231        ///Returns a mutable reference to `package_id`.
5232        ///If the field is unset, it is first initialized with the default value.
5233        pub fn package_id_mut(&mut self) -> &mut String {
5234            self.package_id.get_or_insert_default()
5235        }
5236        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5237        pub fn package_id_opt(&self) -> Option<&str> {
5238            self.package_id.as_ref().map(|field| field as _)
5239        }
5240        ///Sets `package_id` with the provided value.
5241        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5242            self.package_id = Some(field.into().into());
5243        }
5244        ///Sets `package_id` with the provided value.
5245        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5246            self.set_package_id(field.into());
5247            self
5248        }
5249        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5250        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5251            self.module.as_mut().map(|field| field as _)
5252        }
5253        ///Returns a mutable reference to `module`.
5254        ///If the field is unset, it is first initialized with the default value.
5255        pub fn module_mut(&mut self) -> &mut String {
5256            self.module.get_or_insert_default()
5257        }
5258        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5259        pub fn module_opt(&self) -> Option<&str> {
5260            self.module.as_ref().map(|field| field as _)
5261        }
5262        ///Sets `module` with the provided value.
5263        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5264            self.module = Some(field.into().into());
5265        }
5266        ///Sets `module` with the provided value.
5267        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5268            self.set_module(field.into());
5269            self
5270        }
5271        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5272        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5273            self.sender.as_mut().map(|field| field as _)
5274        }
5275        ///Returns a mutable reference to `sender`.
5276        ///If the field is unset, it is first initialized with the default value.
5277        pub fn sender_mut(&mut self) -> &mut String {
5278            self.sender.get_or_insert_default()
5279        }
5280        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5281        pub fn sender_opt(&self) -> Option<&str> {
5282            self.sender.as_ref().map(|field| field as _)
5283        }
5284        ///Sets `sender` with the provided value.
5285        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5286            self.sender = Some(field.into().into());
5287        }
5288        ///Sets `sender` with the provided value.
5289        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5290            self.set_sender(field.into());
5291            self
5292        }
5293        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5294        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5295            self.event_type.as_mut().map(|field| field as _)
5296        }
5297        ///Returns a mutable reference to `event_type`.
5298        ///If the field is unset, it is first initialized with the default value.
5299        pub fn event_type_mut(&mut self) -> &mut String {
5300            self.event_type.get_or_insert_default()
5301        }
5302        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5303        pub fn event_type_opt(&self) -> Option<&str> {
5304            self.event_type.as_ref().map(|field| field as _)
5305        }
5306        ///Sets `event_type` with the provided value.
5307        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5308            self.event_type = Some(field.into().into());
5309        }
5310        ///Sets `event_type` with the provided value.
5311        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5312            self.set_event_type(field.into());
5313            self
5314        }
5315        ///Returns the value of `contents`, or the default value if `contents` is unset.
5316        pub fn contents(&self) -> &super::Bcs {
5317            self.contents
5318                .as_ref()
5319                .map(|field| field as _)
5320                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5321        }
5322        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5323        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5324            self.contents.as_mut().map(|field| field as _)
5325        }
5326        ///Returns a mutable reference to `contents`.
5327        ///If the field is unset, it is first initialized with the default value.
5328        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5329            self.contents.get_or_insert_default()
5330        }
5331        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5332        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5333            self.contents.as_ref().map(|field| field as _)
5334        }
5335        ///Sets `contents` with the provided value.
5336        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5337            self.contents = Some(field.into().into());
5338        }
5339        ///Sets `contents` with the provided value.
5340        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5341            self.set_contents(field.into());
5342            self
5343        }
5344        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5345        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5346            self.json.as_mut().map(|field| field as _)
5347        }
5348        ///Returns a mutable reference to `json`.
5349        ///If the field is unset, it is first initialized with the default value.
5350        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5351            self.json.get_or_insert_default()
5352        }
5353        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5354        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5355            self.json.as_ref().map(|field| field as _)
5356        }
5357        ///Sets `json` with the provided value.
5358        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5359            self.json = Some(field.into().into());
5360        }
5361        ///Sets `json` with the provided value.
5362        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5363            self.set_json(field.into());
5364            self
5365        }
5366        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5367        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5368            self.checkpoint.as_mut().map(|field| field as _)
5369        }
5370        ///Returns a mutable reference to `checkpoint`.
5371        ///If the field is unset, it is first initialized with the default value.
5372        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5373            self.checkpoint.get_or_insert_default()
5374        }
5375        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5376        pub fn checkpoint_opt(&self) -> Option<u64> {
5377            self.checkpoint.as_ref().map(|field| *field)
5378        }
5379        ///Sets `checkpoint` with the provided value.
5380        pub fn set_checkpoint(&mut self, field: u64) {
5381            self.checkpoint = Some(field);
5382        }
5383        ///Sets `checkpoint` with the provided value.
5384        pub fn with_checkpoint(mut self, field: u64) -> Self {
5385            self.set_checkpoint(field);
5386            self
5387        }
5388        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5389        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5390            self.transaction_digest.as_mut().map(|field| field as _)
5391        }
5392        ///Returns a mutable reference to `transaction_digest`.
5393        ///If the field is unset, it is first initialized with the default value.
5394        pub fn transaction_digest_mut(&mut self) -> &mut String {
5395            self.transaction_digest.get_or_insert_default()
5396        }
5397        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5398        pub fn transaction_digest_opt(&self) -> Option<&str> {
5399            self.transaction_digest.as_ref().map(|field| field as _)
5400        }
5401        ///Sets `transaction_digest` with the provided value.
5402        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5403            self.transaction_digest = Some(field.into().into());
5404        }
5405        ///Sets `transaction_digest` with the provided value.
5406        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5407            self.set_transaction_digest(field.into());
5408            self
5409        }
5410        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5411        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5412            self.transaction_index.as_mut().map(|field| field as _)
5413        }
5414        ///Returns a mutable reference to `transaction_index`.
5415        ///If the field is unset, it is first initialized with the default value.
5416        pub fn transaction_index_mut(&mut self) -> &mut u64 {
5417            self.transaction_index.get_or_insert_default()
5418        }
5419        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5420        pub fn transaction_index_opt(&self) -> Option<u64> {
5421            self.transaction_index.as_ref().map(|field| *field)
5422        }
5423        ///Sets `transaction_index` with the provided value.
5424        pub fn set_transaction_index(&mut self, field: u64) {
5425            self.transaction_index = Some(field);
5426        }
5427        ///Sets `transaction_index` with the provided value.
5428        pub fn with_transaction_index(mut self, field: u64) -> Self {
5429            self.set_transaction_index(field);
5430            self
5431        }
5432        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5433        pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5434            self.event_index.as_mut().map(|field| field as _)
5435        }
5436        ///Returns a mutable reference to `event_index`.
5437        ///If the field is unset, it is first initialized with the default value.
5438        pub fn event_index_mut(&mut self) -> &mut u32 {
5439            self.event_index.get_or_insert_default()
5440        }
5441        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5442        pub fn event_index_opt(&self) -> Option<u32> {
5443            self.event_index.as_ref().map(|field| *field)
5444        }
5445        ///Sets `event_index` with the provided value.
5446        pub fn set_event_index(&mut self, field: u32) {
5447            self.event_index = Some(field);
5448        }
5449        ///Sets `event_index` with the provided value.
5450        pub fn with_event_index(mut self, field: u32) -> Self {
5451            self.set_event_index(field);
5452            self
5453        }
5454    }
5455    impl super::EventDigestEntry {
5456        pub const fn const_default() -> Self {
5457            Self {
5458                event_index: None,
5459                digest: None,
5460            }
5461        }
5462        #[doc(hidden)]
5463        pub fn default_instance() -> &'static Self {
5464            static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5465            &DEFAULT
5466        }
5467        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5468        pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5469            self.event_index.as_mut().map(|field| field as _)
5470        }
5471        ///Returns a mutable reference to `event_index`.
5472        ///If the field is unset, it is first initialized with the default value.
5473        pub fn event_index_mut(&mut self) -> &mut u64 {
5474            self.event_index.get_or_insert_default()
5475        }
5476        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5477        pub fn event_index_opt(&self) -> Option<u64> {
5478            self.event_index.as_ref().map(|field| *field)
5479        }
5480        ///Sets `event_index` with the provided value.
5481        pub fn set_event_index(&mut self, field: u64) {
5482            self.event_index = Some(field);
5483        }
5484        ///Sets `event_index` with the provided value.
5485        pub fn with_event_index(mut self, field: u64) -> Self {
5486            self.set_event_index(field);
5487            self
5488        }
5489        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5490        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5491            self.digest.as_mut().map(|field| field as _)
5492        }
5493        ///Returns a mutable reference to `digest`.
5494        ///If the field is unset, it is first initialized with the default value.
5495        pub fn digest_mut(&mut self) -> &mut String {
5496            self.digest.get_or_insert_default()
5497        }
5498        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5499        pub fn digest_opt(&self) -> Option<&str> {
5500            self.digest.as_ref().map(|field| field as _)
5501        }
5502        ///Sets `digest` with the provided value.
5503        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5504            self.digest = Some(field.into().into());
5505        }
5506        ///Sets `digest` with the provided value.
5507        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5508            self.set_digest(field.into());
5509            self
5510        }
5511    }
5512    impl super::EventFilter {
5513        pub const fn const_default() -> Self {
5514            Self { terms: Vec::new() }
5515        }
5516        #[doc(hidden)]
5517        pub fn default_instance() -> &'static Self {
5518            static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5519            &DEFAULT
5520        }
5521        ///Returns the value of `terms`, or the default value if `terms` is unset.
5522        pub fn terms(&self) -> &[super::EventTerm] {
5523            &self.terms
5524        }
5525        ///Returns a mutable reference to `terms`.
5526        ///If the field is unset, it is first initialized with the default value.
5527        pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5528            &mut self.terms
5529        }
5530        ///Sets `terms` with the provided value.
5531        pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5532            self.terms = field;
5533        }
5534        ///Sets `terms` with the provided value.
5535        pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5536            self.set_terms(field);
5537            self
5538        }
5539    }
5540    impl super::EventLiteral {
5541        pub const fn const_default() -> Self {
5542            Self {
5543                negated: false,
5544                predicate: None,
5545            }
5546        }
5547        #[doc(hidden)]
5548        pub fn default_instance() -> &'static Self {
5549            static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5550            &DEFAULT
5551        }
5552        ///Returns a mutable reference to `negated`.
5553        ///If the field is unset, it is first initialized with the default value.
5554        pub fn negated_mut(&mut self) -> &mut bool {
5555            &mut self.negated
5556        }
5557        ///Sets `negated` with the provided value.
5558        pub fn set_negated(&mut self, field: bool) {
5559            self.negated = field;
5560        }
5561        ///Sets `negated` with the provided value.
5562        pub fn with_negated(mut self, field: bool) -> Self {
5563            self.set_negated(field);
5564            self
5565        }
5566        ///Returns the value of `sender`, or the default value if `sender` is unset.
5567        pub fn sender(&self) -> &super::SenderFilter {
5568            if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5569            {
5570                field as _
5571            } else {
5572                super::SenderFilter::default_instance() as _
5573            }
5574        }
5575        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5576        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5577            if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5578            {
5579                Some(field as _)
5580            } else {
5581                None
5582            }
5583        }
5584        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5585        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5586            if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5587                .predicate
5588            {
5589                Some(field as _)
5590            } else {
5591                None
5592            }
5593        }
5594        ///Returns a mutable reference to `sender`.
5595        ///If the field is unset, it is first initialized with the default value.
5596        ///If any other oneof field in the same oneof is set, it will be cleared.
5597        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5598            if self.sender_opt_mut().is_none() {
5599                self.predicate = Some(
5600                    super::event_literal::Predicate::Sender(
5601                        super::SenderFilter::default(),
5602                    ),
5603                );
5604            }
5605            self.sender_opt_mut().unwrap()
5606        }
5607        ///Sets `sender` with the provided value.
5608        ///If any other oneof field in the same oneof is set, it will be cleared.
5609        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5610            self.predicate = Some(
5611                super::event_literal::Predicate::Sender(field.into().into()),
5612            );
5613        }
5614        ///Sets `sender` with the provided value.
5615        ///If any other oneof field in the same oneof is set, it will be cleared.
5616        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5617            self.set_sender(field.into());
5618            self
5619        }
5620        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
5621        pub fn emit_module(&self) -> &super::EmitModuleFilter {
5622            if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5623                .predicate
5624            {
5625                field as _
5626            } else {
5627                super::EmitModuleFilter::default_instance() as _
5628            }
5629        }
5630        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5631        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5632            if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5633                .predicate
5634            {
5635                Some(field as _)
5636            } else {
5637                None
5638            }
5639        }
5640        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5641        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5642            if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5643                .predicate
5644            {
5645                Some(field as _)
5646            } else {
5647                None
5648            }
5649        }
5650        ///Returns a mutable reference to `emit_module`.
5651        ///If the field is unset, it is first initialized with the default value.
5652        ///If any other oneof field in the same oneof is set, it will be cleared.
5653        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5654            if self.emit_module_opt_mut().is_none() {
5655                self.predicate = Some(
5656                    super::event_literal::Predicate::EmitModule(
5657                        super::EmitModuleFilter::default(),
5658                    ),
5659                );
5660            }
5661            self.emit_module_opt_mut().unwrap()
5662        }
5663        ///Sets `emit_module` with the provided value.
5664        ///If any other oneof field in the same oneof is set, it will be cleared.
5665        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5666            self.predicate = Some(
5667                super::event_literal::Predicate::EmitModule(field.into().into()),
5668            );
5669        }
5670        ///Sets `emit_module` with the provided value.
5671        ///If any other oneof field in the same oneof is set, it will be cleared.
5672        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5673            mut self,
5674            field: T,
5675        ) -> Self {
5676            self.set_emit_module(field.into());
5677            self
5678        }
5679        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
5680        pub fn event_type(&self) -> &super::EventTypeFilter {
5681            if let Some(super::event_literal::Predicate::EventType(field)) = &self
5682                .predicate
5683            {
5684                field as _
5685            } else {
5686                super::EventTypeFilter::default_instance() as _
5687            }
5688        }
5689        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5690        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5691            if let Some(super::event_literal::Predicate::EventType(field)) = &self
5692                .predicate
5693            {
5694                Some(field as _)
5695            } else {
5696                None
5697            }
5698        }
5699        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5700        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5701            if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5702                .predicate
5703            {
5704                Some(field as _)
5705            } else {
5706                None
5707            }
5708        }
5709        ///Returns a mutable reference to `event_type`.
5710        ///If the field is unset, it is first initialized with the default value.
5711        ///If any other oneof field in the same oneof is set, it will be cleared.
5712        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5713            if self.event_type_opt_mut().is_none() {
5714                self.predicate = Some(
5715                    super::event_literal::Predicate::EventType(
5716                        super::EventTypeFilter::default(),
5717                    ),
5718                );
5719            }
5720            self.event_type_opt_mut().unwrap()
5721        }
5722        ///Sets `event_type` with the provided value.
5723        ///If any other oneof field in the same oneof is set, it will be cleared.
5724        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5725            self.predicate = Some(
5726                super::event_literal::Predicate::EventType(field.into().into()),
5727            );
5728        }
5729        ///Sets `event_type` with the provided value.
5730        ///If any other oneof field in the same oneof is set, it will be cleared.
5731        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5732            mut self,
5733            field: T,
5734        ) -> Self {
5735            self.set_event_type(field.into());
5736            self
5737        }
5738        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
5739        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5740            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5741                .predicate
5742            {
5743                field as _
5744            } else {
5745                super::EventStreamHeadFilter::default_instance() as _
5746            }
5747        }
5748        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
5749        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5750            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5751                .predicate
5752            {
5753                Some(field as _)
5754            } else {
5755                None
5756            }
5757        }
5758        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5759        pub fn event_stream_head_opt_mut(
5760            &mut self,
5761        ) -> Option<&mut super::EventStreamHeadFilter> {
5762            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5763                .predicate
5764            {
5765                Some(field as _)
5766            } else {
5767                None
5768            }
5769        }
5770        ///Returns a mutable reference to `event_stream_head`.
5771        ///If the field is unset, it is first initialized with the default value.
5772        ///If any other oneof field in the same oneof is set, it will be cleared.
5773        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5774            if self.event_stream_head_opt_mut().is_none() {
5775                self.predicate = Some(
5776                    super::event_literal::Predicate::EventStreamHead(
5777                        super::EventStreamHeadFilter::default(),
5778                    ),
5779                );
5780            }
5781            self.event_stream_head_opt_mut().unwrap()
5782        }
5783        ///Sets `event_stream_head` with the provided value.
5784        ///If any other oneof field in the same oneof is set, it will be cleared.
5785        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5786            &mut self,
5787            field: T,
5788        ) {
5789            self.predicate = Some(
5790                super::event_literal::Predicate::EventStreamHead(field.into().into()),
5791            );
5792        }
5793        ///Sets `event_stream_head` with the provided value.
5794        ///If any other oneof field in the same oneof is set, it will be cleared.
5795        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5796            mut self,
5797            field: T,
5798        ) -> Self {
5799            self.set_event_stream_head(field.into());
5800            self
5801        }
5802    }
5803    impl super::EventStreamHeadFilter {
5804        pub const fn const_default() -> Self {
5805            Self { stream_id: None }
5806        }
5807        #[doc(hidden)]
5808        pub fn default_instance() -> &'static Self {
5809            static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5810            &DEFAULT
5811        }
5812        ///If `stream_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5813        pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
5814            self.stream_id.as_mut().map(|field| field as _)
5815        }
5816        ///Returns a mutable reference to `stream_id`.
5817        ///If the field is unset, it is first initialized with the default value.
5818        pub fn stream_id_mut(&mut self) -> &mut String {
5819            self.stream_id.get_or_insert_default()
5820        }
5821        ///If `stream_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5822        pub fn stream_id_opt(&self) -> Option<&str> {
5823            self.stream_id.as_ref().map(|field| field as _)
5824        }
5825        ///Sets `stream_id` with the provided value.
5826        pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
5827            self.stream_id = Some(field.into().into());
5828        }
5829        ///Sets `stream_id` with the provided value.
5830        pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
5831            self.set_stream_id(field.into());
5832            self
5833        }
5834    }
5835    impl super::EventTerm {
5836        pub const fn const_default() -> Self {
5837            Self { literals: Vec::new() }
5838        }
5839        #[doc(hidden)]
5840        pub fn default_instance() -> &'static Self {
5841            static DEFAULT: super::EventTerm = super::EventTerm::const_default();
5842            &DEFAULT
5843        }
5844        ///Returns the value of `literals`, or the default value if `literals` is unset.
5845        pub fn literals(&self) -> &[super::EventLiteral] {
5846            &self.literals
5847        }
5848        ///Returns a mutable reference to `literals`.
5849        ///If the field is unset, it is first initialized with the default value.
5850        pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
5851            &mut self.literals
5852        }
5853        ///Sets `literals` with the provided value.
5854        pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
5855            self.literals = field;
5856        }
5857        ///Sets `literals` with the provided value.
5858        pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
5859            self.set_literals(field);
5860            self
5861        }
5862    }
5863    impl super::EventTypeFilter {
5864        pub const fn const_default() -> Self {
5865            Self { event_type: None }
5866        }
5867        #[doc(hidden)]
5868        pub fn default_instance() -> &'static Self {
5869            static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
5870            &DEFAULT
5871        }
5872        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5873        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5874            self.event_type.as_mut().map(|field| field as _)
5875        }
5876        ///Returns a mutable reference to `event_type`.
5877        ///If the field is unset, it is first initialized with the default value.
5878        pub fn event_type_mut(&mut self) -> &mut String {
5879            self.event_type.get_or_insert_default()
5880        }
5881        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5882        pub fn event_type_opt(&self) -> Option<&str> {
5883            self.event_type.as_ref().map(|field| field as _)
5884        }
5885        ///Sets `event_type` with the provided value.
5886        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5887            self.event_type = Some(field.into().into());
5888        }
5889        ///Sets `event_type` with the provided value.
5890        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5891            self.set_event_type(field.into());
5892            self
5893        }
5894    }
5895    impl super::ExecuteTransactionRequest {
5896        pub const fn const_default() -> Self {
5897            Self {
5898                transaction: None,
5899                signatures: Vec::new(),
5900                read_mask: None,
5901            }
5902        }
5903        #[doc(hidden)]
5904        pub fn default_instance() -> &'static Self {
5905            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5906            &DEFAULT
5907        }
5908        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5909        pub fn transaction(&self) -> &super::Transaction {
5910            self.transaction
5911                .as_ref()
5912                .map(|field| field as _)
5913                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5914        }
5915        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5916        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5917            self.transaction.as_mut().map(|field| field as _)
5918        }
5919        ///Returns a mutable reference to `transaction`.
5920        ///If the field is unset, it is first initialized with the default value.
5921        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5922            self.transaction.get_or_insert_default()
5923        }
5924        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5925        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5926            self.transaction.as_ref().map(|field| field as _)
5927        }
5928        ///Sets `transaction` with the provided value.
5929        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5930            self.transaction = Some(field.into().into());
5931        }
5932        ///Sets `transaction` with the provided value.
5933        pub fn with_transaction<T: Into<super::Transaction>>(
5934            mut self,
5935            field: T,
5936        ) -> Self {
5937            self.set_transaction(field.into());
5938            self
5939        }
5940        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5941        pub fn signatures(&self) -> &[super::UserSignature] {
5942            &self.signatures
5943        }
5944        ///Returns a mutable reference to `signatures`.
5945        ///If the field is unset, it is first initialized with the default value.
5946        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5947            &mut self.signatures
5948        }
5949        ///Sets `signatures` with the provided value.
5950        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5951            self.signatures = field;
5952        }
5953        ///Sets `signatures` with the provided value.
5954        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5955            self.set_signatures(field);
5956            self
5957        }
5958        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5959        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5960            self.read_mask.as_mut().map(|field| field as _)
5961        }
5962        ///Returns a mutable reference to `read_mask`.
5963        ///If the field is unset, it is first initialized with the default value.
5964        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5965            self.read_mask.get_or_insert_default()
5966        }
5967        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
5968        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5969            self.read_mask.as_ref().map(|field| field as _)
5970        }
5971        ///Sets `read_mask` with the provided value.
5972        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5973            self.read_mask = Some(field.into().into());
5974        }
5975        ///Sets `read_mask` with the provided value.
5976        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5977            mut self,
5978            field: T,
5979        ) -> Self {
5980            self.set_read_mask(field.into());
5981            self
5982        }
5983    }
5984    impl super::ExecuteTransactionResponse {
5985        pub const fn const_default() -> Self {
5986            Self { transaction: None }
5987        }
5988        #[doc(hidden)]
5989        pub fn default_instance() -> &'static Self {
5990            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5991            &DEFAULT
5992        }
5993        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5994        pub fn transaction(&self) -> &super::ExecutedTransaction {
5995            self.transaction
5996                .as_ref()
5997                .map(|field| field as _)
5998                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5999        }
6000        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6001        pub fn transaction_opt_mut(
6002            &mut self,
6003        ) -> Option<&mut super::ExecutedTransaction> {
6004            self.transaction.as_mut().map(|field| field as _)
6005        }
6006        ///Returns a mutable reference to `transaction`.
6007        ///If the field is unset, it is first initialized with the default value.
6008        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6009            self.transaction.get_or_insert_default()
6010        }
6011        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6012        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6013            self.transaction.as_ref().map(|field| field as _)
6014        }
6015        ///Sets `transaction` with the provided value.
6016        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6017            &mut self,
6018            field: T,
6019        ) {
6020            self.transaction = Some(field.into().into());
6021        }
6022        ///Sets `transaction` with the provided value.
6023        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6024            mut self,
6025            field: T,
6026        ) -> Self {
6027            self.set_transaction(field.into());
6028            self
6029        }
6030    }
6031    impl super::ExecutedTransaction {
6032        pub const fn const_default() -> Self {
6033            Self {
6034                digest: None,
6035                transaction: None,
6036                signatures: Vec::new(),
6037                effects: None,
6038                events: None,
6039                checkpoint: None,
6040                timestamp: None,
6041                balance_changes: Vec::new(),
6042                objects: None,
6043                transaction_index: None,
6044            }
6045        }
6046        #[doc(hidden)]
6047        pub fn default_instance() -> &'static Self {
6048            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6049            &DEFAULT
6050        }
6051        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6052        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6053            self.digest.as_mut().map(|field| field as _)
6054        }
6055        ///Returns a mutable reference to `digest`.
6056        ///If the field is unset, it is first initialized with the default value.
6057        pub fn digest_mut(&mut self) -> &mut String {
6058            self.digest.get_or_insert_default()
6059        }
6060        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6061        pub fn digest_opt(&self) -> Option<&str> {
6062            self.digest.as_ref().map(|field| field as _)
6063        }
6064        ///Sets `digest` with the provided value.
6065        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6066            self.digest = Some(field.into().into());
6067        }
6068        ///Sets `digest` with the provided value.
6069        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6070            self.set_digest(field.into());
6071            self
6072        }
6073        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
6074        pub fn transaction(&self) -> &super::Transaction {
6075            self.transaction
6076                .as_ref()
6077                .map(|field| field as _)
6078                .unwrap_or_else(|| super::Transaction::default_instance() as _)
6079        }
6080        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6081        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6082            self.transaction.as_mut().map(|field| field as _)
6083        }
6084        ///Returns a mutable reference to `transaction`.
6085        ///If the field is unset, it is first initialized with the default value.
6086        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6087            self.transaction.get_or_insert_default()
6088        }
6089        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6090        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6091            self.transaction.as_ref().map(|field| field as _)
6092        }
6093        ///Sets `transaction` with the provided value.
6094        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6095            self.transaction = Some(field.into().into());
6096        }
6097        ///Sets `transaction` with the provided value.
6098        pub fn with_transaction<T: Into<super::Transaction>>(
6099            mut self,
6100            field: T,
6101        ) -> Self {
6102            self.set_transaction(field.into());
6103            self
6104        }
6105        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
6106        pub fn signatures(&self) -> &[super::UserSignature] {
6107            &self.signatures
6108        }
6109        ///Returns a mutable reference to `signatures`.
6110        ///If the field is unset, it is first initialized with the default value.
6111        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6112            &mut self.signatures
6113        }
6114        ///Sets `signatures` with the provided value.
6115        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6116            self.signatures = field;
6117        }
6118        ///Sets `signatures` with the provided value.
6119        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6120            self.set_signatures(field);
6121            self
6122        }
6123        ///Returns the value of `effects`, or the default value if `effects` is unset.
6124        pub fn effects(&self) -> &super::TransactionEffects {
6125            self.effects
6126                .as_ref()
6127                .map(|field| field as _)
6128                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6129        }
6130        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6131        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6132            self.effects.as_mut().map(|field| field as _)
6133        }
6134        ///Returns a mutable reference to `effects`.
6135        ///If the field is unset, it is first initialized with the default value.
6136        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6137            self.effects.get_or_insert_default()
6138        }
6139        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6140        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6141            self.effects.as_ref().map(|field| field as _)
6142        }
6143        ///Sets `effects` with the provided value.
6144        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6145            self.effects = Some(field.into().into());
6146        }
6147        ///Sets `effects` with the provided value.
6148        pub fn with_effects<T: Into<super::TransactionEffects>>(
6149            mut self,
6150            field: T,
6151        ) -> Self {
6152            self.set_effects(field.into());
6153            self
6154        }
6155        ///Returns the value of `events`, or the default value if `events` is unset.
6156        pub fn events(&self) -> &super::TransactionEvents {
6157            self.events
6158                .as_ref()
6159                .map(|field| field as _)
6160                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6161        }
6162        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6163        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6164            self.events.as_mut().map(|field| field as _)
6165        }
6166        ///Returns a mutable reference to `events`.
6167        ///If the field is unset, it is first initialized with the default value.
6168        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6169            self.events.get_or_insert_default()
6170        }
6171        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
6172        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6173            self.events.as_ref().map(|field| field as _)
6174        }
6175        ///Sets `events` with the provided value.
6176        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6177            self.events = Some(field.into().into());
6178        }
6179        ///Sets `events` with the provided value.
6180        pub fn with_events<T: Into<super::TransactionEvents>>(
6181            mut self,
6182            field: T,
6183        ) -> Self {
6184            self.set_events(field.into());
6185            self
6186        }
6187        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6188        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6189            self.checkpoint.as_mut().map(|field| field as _)
6190        }
6191        ///Returns a mutable reference to `checkpoint`.
6192        ///If the field is unset, it is first initialized with the default value.
6193        pub fn checkpoint_mut(&mut self) -> &mut u64 {
6194            self.checkpoint.get_or_insert_default()
6195        }
6196        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
6197        pub fn checkpoint_opt(&self) -> Option<u64> {
6198            self.checkpoint.as_ref().map(|field| *field)
6199        }
6200        ///Sets `checkpoint` with the provided value.
6201        pub fn set_checkpoint(&mut self, field: u64) {
6202            self.checkpoint = Some(field);
6203        }
6204        ///Sets `checkpoint` with the provided value.
6205        pub fn with_checkpoint(mut self, field: u64) -> Self {
6206            self.set_checkpoint(field);
6207            self
6208        }
6209        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6210        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6211            self.timestamp.as_mut().map(|field| field as _)
6212        }
6213        ///Returns a mutable reference to `timestamp`.
6214        ///If the field is unset, it is first initialized with the default value.
6215        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6216            self.timestamp.get_or_insert_default()
6217        }
6218        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
6219        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6220            self.timestamp.as_ref().map(|field| field as _)
6221        }
6222        ///Sets `timestamp` with the provided value.
6223        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6224            self.timestamp = Some(field.into().into());
6225        }
6226        ///Sets `timestamp` with the provided value.
6227        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6228            mut self,
6229            field: T,
6230        ) -> Self {
6231            self.set_timestamp(field.into());
6232            self
6233        }
6234        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
6235        pub fn balance_changes(&self) -> &[super::BalanceChange] {
6236            &self.balance_changes
6237        }
6238        ///Returns a mutable reference to `balance_changes`.
6239        ///If the field is unset, it is first initialized with the default value.
6240        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6241            &mut self.balance_changes
6242        }
6243        ///Sets `balance_changes` with the provided value.
6244        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6245            self.balance_changes = field;
6246        }
6247        ///Sets `balance_changes` with the provided value.
6248        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6249            self.set_balance_changes(field);
6250            self
6251        }
6252        ///Returns the value of `objects`, or the default value if `objects` is unset.
6253        pub fn objects(&self) -> &super::ObjectSet {
6254            self.objects
6255                .as_ref()
6256                .map(|field| field as _)
6257                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6258        }
6259        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6260        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6261            self.objects.as_mut().map(|field| field as _)
6262        }
6263        ///Returns a mutable reference to `objects`.
6264        ///If the field is unset, it is first initialized with the default value.
6265        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6266            self.objects.get_or_insert_default()
6267        }
6268        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6269        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6270            self.objects.as_ref().map(|field| field as _)
6271        }
6272        ///Sets `objects` with the provided value.
6273        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6274            self.objects = Some(field.into().into());
6275        }
6276        ///Sets `objects` with the provided value.
6277        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6278            self.set_objects(field.into());
6279            self
6280        }
6281        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6282        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6283            self.transaction_index.as_mut().map(|field| field as _)
6284        }
6285        ///Returns a mutable reference to `transaction_index`.
6286        ///If the field is unset, it is first initialized with the default value.
6287        pub fn transaction_index_mut(&mut self) -> &mut u64 {
6288            self.transaction_index.get_or_insert_default()
6289        }
6290        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
6291        pub fn transaction_index_opt(&self) -> Option<u64> {
6292            self.transaction_index.as_ref().map(|field| *field)
6293        }
6294        ///Sets `transaction_index` with the provided value.
6295        pub fn set_transaction_index(&mut self, field: u64) {
6296            self.transaction_index = Some(field);
6297        }
6298        ///Sets `transaction_index` with the provided value.
6299        pub fn with_transaction_index(mut self, field: u64) -> Self {
6300            self.set_transaction_index(field);
6301            self
6302        }
6303    }
6304    impl super::ExecutionError {
6305        pub const fn const_default() -> Self {
6306            Self {
6307                description: None,
6308                command: None,
6309                kind: None,
6310                error_details: None,
6311            }
6312        }
6313        #[doc(hidden)]
6314        pub fn default_instance() -> &'static Self {
6315            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6316            &DEFAULT
6317        }
6318        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6319        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6320            self.description.as_mut().map(|field| field as _)
6321        }
6322        ///Returns a mutable reference to `description`.
6323        ///If the field is unset, it is first initialized with the default value.
6324        pub fn description_mut(&mut self) -> &mut String {
6325            self.description.get_or_insert_default()
6326        }
6327        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
6328        pub fn description_opt(&self) -> Option<&str> {
6329            self.description.as_ref().map(|field| field as _)
6330        }
6331        ///Sets `description` with the provided value.
6332        pub fn set_description<T: Into<String>>(&mut self, field: T) {
6333            self.description = Some(field.into().into());
6334        }
6335        ///Sets `description` with the provided value.
6336        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6337            self.set_description(field.into());
6338            self
6339        }
6340        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6341        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6342            self.command.as_mut().map(|field| field as _)
6343        }
6344        ///Returns a mutable reference to `command`.
6345        ///If the field is unset, it is first initialized with the default value.
6346        pub fn command_mut(&mut self) -> &mut u64 {
6347            self.command.get_or_insert_default()
6348        }
6349        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
6350        pub fn command_opt(&self) -> Option<u64> {
6351            self.command.as_ref().map(|field| *field)
6352        }
6353        ///Sets `command` with the provided value.
6354        pub fn set_command(&mut self, field: u64) {
6355            self.command = Some(field);
6356        }
6357        ///Sets `command` with the provided value.
6358        pub fn with_command(mut self, field: u64) -> Self {
6359            self.set_command(field);
6360            self
6361        }
6362        ///Sets `kind` with the provided value.
6363        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6364            mut self,
6365            field: T,
6366        ) -> Self {
6367            self.set_kind(field.into());
6368            self
6369        }
6370        ///Returns the value of `abort`, or the default value if `abort` is unset.
6371        pub fn abort(&self) -> &super::MoveAbort {
6372            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6373                .error_details
6374            {
6375                field as _
6376            } else {
6377                super::MoveAbort::default_instance() as _
6378            }
6379        }
6380        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
6381        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6382            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6383                .error_details
6384            {
6385                Some(field as _)
6386            } else {
6387                None
6388            }
6389        }
6390        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6391        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6392            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6393                .error_details
6394            {
6395                Some(field as _)
6396            } else {
6397                None
6398            }
6399        }
6400        ///Returns a mutable reference to `abort`.
6401        ///If the field is unset, it is first initialized with the default value.
6402        ///If any other oneof field in the same oneof is set, it will be cleared.
6403        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6404            if self.abort_opt_mut().is_none() {
6405                self.error_details = Some(
6406                    super::execution_error::ErrorDetails::Abort(
6407                        super::MoveAbort::default(),
6408                    ),
6409                );
6410            }
6411            self.abort_opt_mut().unwrap()
6412        }
6413        ///Sets `abort` with the provided value.
6414        ///If any other oneof field in the same oneof is set, it will be cleared.
6415        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6416            self.error_details = Some(
6417                super::execution_error::ErrorDetails::Abort(field.into().into()),
6418            );
6419        }
6420        ///Sets `abort` with the provided value.
6421        ///If any other oneof field in the same oneof is set, it will be cleared.
6422        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6423            self.set_abort(field.into());
6424            self
6425        }
6426        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
6427        pub fn size_error(&self) -> &super::SizeError {
6428            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6429                .error_details
6430            {
6431                field as _
6432            } else {
6433                super::SizeError::default_instance() as _
6434            }
6435        }
6436        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6437        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6438            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6439                .error_details
6440            {
6441                Some(field as _)
6442            } else {
6443                None
6444            }
6445        }
6446        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6447        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6448            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6449                .error_details
6450            {
6451                Some(field as _)
6452            } else {
6453                None
6454            }
6455        }
6456        ///Returns a mutable reference to `size_error`.
6457        ///If the field is unset, it is first initialized with the default value.
6458        ///If any other oneof field in the same oneof is set, it will be cleared.
6459        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
6460            if self.size_error_opt_mut().is_none() {
6461                self.error_details = Some(
6462                    super::execution_error::ErrorDetails::SizeError(
6463                        super::SizeError::default(),
6464                    ),
6465                );
6466            }
6467            self.size_error_opt_mut().unwrap()
6468        }
6469        ///Sets `size_error` with the provided value.
6470        ///If any other oneof field in the same oneof is set, it will be cleared.
6471        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6472            self.error_details = Some(
6473                super::execution_error::ErrorDetails::SizeError(field.into().into()),
6474            );
6475        }
6476        ///Sets `size_error` with the provided value.
6477        ///If any other oneof field in the same oneof is set, it will be cleared.
6478        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6479            self.set_size_error(field.into());
6480            self
6481        }
6482        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
6483        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6484            if let Some(
6485                super::execution_error::ErrorDetails::CommandArgumentError(field),
6486            ) = &self.error_details
6487            {
6488                field as _
6489            } else {
6490                super::CommandArgumentError::default_instance() as _
6491            }
6492        }
6493        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6494        pub fn command_argument_error_opt(
6495            &self,
6496        ) -> Option<&super::CommandArgumentError> {
6497            if let Some(
6498                super::execution_error::ErrorDetails::CommandArgumentError(field),
6499            ) = &self.error_details
6500            {
6501                Some(field as _)
6502            } else {
6503                None
6504            }
6505        }
6506        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6507        pub fn command_argument_error_opt_mut(
6508            &mut self,
6509        ) -> Option<&mut super::CommandArgumentError> {
6510            if let Some(
6511                super::execution_error::ErrorDetails::CommandArgumentError(field),
6512            ) = &mut self.error_details
6513            {
6514                Some(field as _)
6515            } else {
6516                None
6517            }
6518        }
6519        ///Returns a mutable reference to `command_argument_error`.
6520        ///If the field is unset, it is first initialized with the default value.
6521        ///If any other oneof field in the same oneof is set, it will be cleared.
6522        pub fn command_argument_error_mut(
6523            &mut self,
6524        ) -> &mut super::CommandArgumentError {
6525            if self.command_argument_error_opt_mut().is_none() {
6526                self.error_details = Some(
6527                    super::execution_error::ErrorDetails::CommandArgumentError(
6528                        super::CommandArgumentError::default(),
6529                    ),
6530                );
6531            }
6532            self.command_argument_error_opt_mut().unwrap()
6533        }
6534        ///Sets `command_argument_error` with the provided value.
6535        ///If any other oneof field in the same oneof is set, it will be cleared.
6536        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6537            &mut self,
6538            field: T,
6539        ) {
6540            self.error_details = Some(
6541                super::execution_error::ErrorDetails::CommandArgumentError(
6542                    field.into().into(),
6543                ),
6544            );
6545        }
6546        ///Sets `command_argument_error` with the provided value.
6547        ///If any other oneof field in the same oneof is set, it will be cleared.
6548        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6549            mut self,
6550            field: T,
6551        ) -> Self {
6552            self.set_command_argument_error(field.into());
6553            self
6554        }
6555        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
6556        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6557            if let Some(
6558                super::execution_error::ErrorDetails::TypeArgumentError(field),
6559            ) = &self.error_details
6560            {
6561                field as _
6562            } else {
6563                super::TypeArgumentError::default_instance() as _
6564            }
6565        }
6566        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6567        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6568            if let Some(
6569                super::execution_error::ErrorDetails::TypeArgumentError(field),
6570            ) = &self.error_details
6571            {
6572                Some(field as _)
6573            } else {
6574                None
6575            }
6576        }
6577        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6578        pub fn type_argument_error_opt_mut(
6579            &mut self,
6580        ) -> Option<&mut super::TypeArgumentError> {
6581            if let Some(
6582                super::execution_error::ErrorDetails::TypeArgumentError(field),
6583            ) = &mut self.error_details
6584            {
6585                Some(field as _)
6586            } else {
6587                None
6588            }
6589        }
6590        ///Returns a mutable reference to `type_argument_error`.
6591        ///If the field is unset, it is first initialized with the default value.
6592        ///If any other oneof field in the same oneof is set, it will be cleared.
6593        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6594            if self.type_argument_error_opt_mut().is_none() {
6595                self.error_details = Some(
6596                    super::execution_error::ErrorDetails::TypeArgumentError(
6597                        super::TypeArgumentError::default(),
6598                    ),
6599                );
6600            }
6601            self.type_argument_error_opt_mut().unwrap()
6602        }
6603        ///Sets `type_argument_error` with the provided value.
6604        ///If any other oneof field in the same oneof is set, it will be cleared.
6605        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6606            &mut self,
6607            field: T,
6608        ) {
6609            self.error_details = Some(
6610                super::execution_error::ErrorDetails::TypeArgumentError(
6611                    field.into().into(),
6612                ),
6613            );
6614        }
6615        ///Sets `type_argument_error` with the provided value.
6616        ///If any other oneof field in the same oneof is set, it will be cleared.
6617        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6618            mut self,
6619            field: T,
6620        ) -> Self {
6621            self.set_type_argument_error(field.into());
6622            self
6623        }
6624        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
6625        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6626            if let Some(
6627                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6628            ) = &self.error_details
6629            {
6630                field as _
6631            } else {
6632                super::PackageUpgradeError::default_instance() as _
6633            }
6634        }
6635        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6636        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6637            if let Some(
6638                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6639            ) = &self.error_details
6640            {
6641                Some(field as _)
6642            } else {
6643                None
6644            }
6645        }
6646        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6647        pub fn package_upgrade_error_opt_mut(
6648            &mut self,
6649        ) -> Option<&mut super::PackageUpgradeError> {
6650            if let Some(
6651                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6652            ) = &mut self.error_details
6653            {
6654                Some(field as _)
6655            } else {
6656                None
6657            }
6658        }
6659        ///Returns a mutable reference to `package_upgrade_error`.
6660        ///If the field is unset, it is first initialized with the default value.
6661        ///If any other oneof field in the same oneof is set, it will be cleared.
6662        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6663            if self.package_upgrade_error_opt_mut().is_none() {
6664                self.error_details = Some(
6665                    super::execution_error::ErrorDetails::PackageUpgradeError(
6666                        super::PackageUpgradeError::default(),
6667                    ),
6668                );
6669            }
6670            self.package_upgrade_error_opt_mut().unwrap()
6671        }
6672        ///Sets `package_upgrade_error` with the provided value.
6673        ///If any other oneof field in the same oneof is set, it will be cleared.
6674        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6675            &mut self,
6676            field: T,
6677        ) {
6678            self.error_details = Some(
6679                super::execution_error::ErrorDetails::PackageUpgradeError(
6680                    field.into().into(),
6681                ),
6682            );
6683        }
6684        ///Sets `package_upgrade_error` with the provided value.
6685        ///If any other oneof field in the same oneof is set, it will be cleared.
6686        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6687            mut self,
6688            field: T,
6689        ) -> Self {
6690            self.set_package_upgrade_error(field.into());
6691            self
6692        }
6693        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
6694        pub fn index_error(&self) -> &super::IndexError {
6695            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6696                .error_details
6697            {
6698                field as _
6699            } else {
6700                super::IndexError::default_instance() as _
6701            }
6702        }
6703        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6704        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6705            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6706                .error_details
6707            {
6708                Some(field as _)
6709            } else {
6710                None
6711            }
6712        }
6713        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6714        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6715            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6716                .error_details
6717            {
6718                Some(field as _)
6719            } else {
6720                None
6721            }
6722        }
6723        ///Returns a mutable reference to `index_error`.
6724        ///If the field is unset, it is first initialized with the default value.
6725        ///If any other oneof field in the same oneof is set, it will be cleared.
6726        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6727            if self.index_error_opt_mut().is_none() {
6728                self.error_details = Some(
6729                    super::execution_error::ErrorDetails::IndexError(
6730                        super::IndexError::default(),
6731                    ),
6732                );
6733            }
6734            self.index_error_opt_mut().unwrap()
6735        }
6736        ///Sets `index_error` with the provided value.
6737        ///If any other oneof field in the same oneof is set, it will be cleared.
6738        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6739            self.error_details = Some(
6740                super::execution_error::ErrorDetails::IndexError(field.into().into()),
6741            );
6742        }
6743        ///Sets `index_error` with the provided value.
6744        ///If any other oneof field in the same oneof is set, it will be cleared.
6745        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6746            self.set_index_error(field.into());
6747            self
6748        }
6749        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
6750        pub fn object_id(&self) -> &str {
6751            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6752                .error_details
6753            {
6754                field as _
6755            } else {
6756                ""
6757            }
6758        }
6759        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6760        pub fn object_id_opt(&self) -> Option<&str> {
6761            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6762                .error_details
6763            {
6764                Some(field as _)
6765            } else {
6766                None
6767            }
6768        }
6769        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6770        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6771            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6772                .error_details
6773            {
6774                Some(field as _)
6775            } else {
6776                None
6777            }
6778        }
6779        ///Returns a mutable reference to `object_id`.
6780        ///If the field is unset, it is first initialized with the default value.
6781        ///If any other oneof field in the same oneof is set, it will be cleared.
6782        pub fn object_id_mut(&mut self) -> &mut String {
6783            if self.object_id_opt_mut().is_none() {
6784                self.error_details = Some(
6785                    super::execution_error::ErrorDetails::ObjectId(String::default()),
6786                );
6787            }
6788            self.object_id_opt_mut().unwrap()
6789        }
6790        ///Sets `object_id` with the provided value.
6791        ///If any other oneof field in the same oneof is set, it will be cleared.
6792        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6793            self.error_details = Some(
6794                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6795            );
6796        }
6797        ///Sets `object_id` with the provided value.
6798        ///If any other oneof field in the same oneof is set, it will be cleared.
6799        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6800            self.set_object_id(field.into());
6801            self
6802        }
6803        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
6804        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6805            if let Some(
6806                super::execution_error::ErrorDetails::CoinDenyListError(field),
6807            ) = &self.error_details
6808            {
6809                field as _
6810            } else {
6811                super::CoinDenyListError::default_instance() as _
6812            }
6813        }
6814        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6815        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6816            if let Some(
6817                super::execution_error::ErrorDetails::CoinDenyListError(field),
6818            ) = &self.error_details
6819            {
6820                Some(field as _)
6821            } else {
6822                None
6823            }
6824        }
6825        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6826        pub fn coin_deny_list_error_opt_mut(
6827            &mut self,
6828        ) -> Option<&mut super::CoinDenyListError> {
6829            if let Some(
6830                super::execution_error::ErrorDetails::CoinDenyListError(field),
6831            ) = &mut self.error_details
6832            {
6833                Some(field as _)
6834            } else {
6835                None
6836            }
6837        }
6838        ///Returns a mutable reference to `coin_deny_list_error`.
6839        ///If the field is unset, it is first initialized with the default value.
6840        ///If any other oneof field in the same oneof is set, it will be cleared.
6841        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6842            if self.coin_deny_list_error_opt_mut().is_none() {
6843                self.error_details = Some(
6844                    super::execution_error::ErrorDetails::CoinDenyListError(
6845                        super::CoinDenyListError::default(),
6846                    ),
6847                );
6848            }
6849            self.coin_deny_list_error_opt_mut().unwrap()
6850        }
6851        ///Sets `coin_deny_list_error` with the provided value.
6852        ///If any other oneof field in the same oneof is set, it will be cleared.
6853        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6854            &mut self,
6855            field: T,
6856        ) {
6857            self.error_details = Some(
6858                super::execution_error::ErrorDetails::CoinDenyListError(
6859                    field.into().into(),
6860                ),
6861            );
6862        }
6863        ///Sets `coin_deny_list_error` with the provided value.
6864        ///If any other oneof field in the same oneof is set, it will be cleared.
6865        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6866            mut self,
6867            field: T,
6868        ) -> Self {
6869            self.set_coin_deny_list_error(field.into());
6870            self
6871        }
6872        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6873        pub fn congested_objects(&self) -> &super::CongestedObjects {
6874            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6875                .error_details
6876            {
6877                field as _
6878            } else {
6879                super::CongestedObjects::default_instance() as _
6880            }
6881        }
6882        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6883        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6884            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6885                .error_details
6886            {
6887                Some(field as _)
6888            } else {
6889                None
6890            }
6891        }
6892        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6893        pub fn congested_objects_opt_mut(
6894            &mut self,
6895        ) -> Option<&mut super::CongestedObjects> {
6896            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6897                .error_details
6898            {
6899                Some(field as _)
6900            } else {
6901                None
6902            }
6903        }
6904        ///Returns a mutable reference to `congested_objects`.
6905        ///If the field is unset, it is first initialized with the default value.
6906        ///If any other oneof field in the same oneof is set, it will be cleared.
6907        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6908            if self.congested_objects_opt_mut().is_none() {
6909                self.error_details = Some(
6910                    super::execution_error::ErrorDetails::CongestedObjects(
6911                        super::CongestedObjects::default(),
6912                    ),
6913                );
6914            }
6915            self.congested_objects_opt_mut().unwrap()
6916        }
6917        ///Sets `congested_objects` with the provided value.
6918        ///If any other oneof field in the same oneof is set, it will be cleared.
6919        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6920            &mut self,
6921            field: T,
6922        ) {
6923            self.error_details = Some(
6924                super::execution_error::ErrorDetails::CongestedObjects(
6925                    field.into().into(),
6926                ),
6927            );
6928        }
6929        ///Sets `congested_objects` with the provided value.
6930        ///If any other oneof field in the same oneof is set, it will be cleared.
6931        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6932            mut self,
6933            field: T,
6934        ) -> Self {
6935            self.set_congested_objects(field.into());
6936            self
6937        }
6938    }
6939    impl super::ExecutionStatus {
6940        pub const fn const_default() -> Self {
6941            Self { success: None, error: None }
6942        }
6943        #[doc(hidden)]
6944        pub fn default_instance() -> &'static Self {
6945            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6946            &DEFAULT
6947        }
6948        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6949        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6950            self.success.as_mut().map(|field| field as _)
6951        }
6952        ///Returns a mutable reference to `success`.
6953        ///If the field is unset, it is first initialized with the default value.
6954        pub fn success_mut(&mut self) -> &mut bool {
6955            self.success.get_or_insert_default()
6956        }
6957        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
6958        pub fn success_opt(&self) -> Option<bool> {
6959            self.success.as_ref().map(|field| *field)
6960        }
6961        ///Sets `success` with the provided value.
6962        pub fn set_success(&mut self, field: bool) {
6963            self.success = Some(field);
6964        }
6965        ///Sets `success` with the provided value.
6966        pub fn with_success(mut self, field: bool) -> Self {
6967            self.set_success(field);
6968            self
6969        }
6970        ///Returns the value of `error`, or the default value if `error` is unset.
6971        pub fn error(&self) -> &super::ExecutionError {
6972            self.error
6973                .as_ref()
6974                .map(|field| field as _)
6975                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6976        }
6977        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6978        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6979            self.error.as_mut().map(|field| field as _)
6980        }
6981        ///Returns a mutable reference to `error`.
6982        ///If the field is unset, it is first initialized with the default value.
6983        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6984            self.error.get_or_insert_default()
6985        }
6986        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6987        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6988            self.error.as_ref().map(|field| field as _)
6989        }
6990        ///Sets `error` with the provided value.
6991        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6992            self.error = Some(field.into().into());
6993        }
6994        ///Sets `error` with the provided value.
6995        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6996            self.set_error(field.into());
6997            self
6998        }
6999    }
7000    impl super::ExecutionTimeObservation {
7001        pub const fn const_default() -> Self {
7002            Self {
7003                kind: None,
7004                move_entry_point: None,
7005                validator_observations: Vec::new(),
7006            }
7007        }
7008        #[doc(hidden)]
7009        pub fn default_instance() -> &'static Self {
7010            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7011            &DEFAULT
7012        }
7013        ///Sets `kind` with the provided value.
7014        pub fn with_kind<
7015            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7016        >(mut self, field: T) -> Self {
7017            self.set_kind(field.into());
7018            self
7019        }
7020        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
7021        pub fn move_entry_point(&self) -> &super::MoveCall {
7022            self.move_entry_point
7023                .as_ref()
7024                .map(|field| field as _)
7025                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7026        }
7027        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7028        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7029            self.move_entry_point.as_mut().map(|field| field as _)
7030        }
7031        ///Returns a mutable reference to `move_entry_point`.
7032        ///If the field is unset, it is first initialized with the default value.
7033        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7034            self.move_entry_point.get_or_insert_default()
7035        }
7036        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
7037        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7038            self.move_entry_point.as_ref().map(|field| field as _)
7039        }
7040        ///Sets `move_entry_point` with the provided value.
7041        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7042            self.move_entry_point = Some(field.into().into());
7043        }
7044        ///Sets `move_entry_point` with the provided value.
7045        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7046            mut self,
7047            field: T,
7048        ) -> Self {
7049            self.set_move_entry_point(field.into());
7050            self
7051        }
7052        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
7053        pub fn validator_observations(
7054            &self,
7055        ) -> &[super::ValidatorExecutionTimeObservation] {
7056            &self.validator_observations
7057        }
7058        ///Returns a mutable reference to `validator_observations`.
7059        ///If the field is unset, it is first initialized with the default value.
7060        pub fn validator_observations_mut(
7061            &mut self,
7062        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7063            &mut self.validator_observations
7064        }
7065        ///Sets `validator_observations` with the provided value.
7066        pub fn set_validator_observations(
7067            &mut self,
7068            field: Vec<super::ValidatorExecutionTimeObservation>,
7069        ) {
7070            self.validator_observations = field;
7071        }
7072        ///Sets `validator_observations` with the provided value.
7073        pub fn with_validator_observations(
7074            mut self,
7075            field: Vec<super::ValidatorExecutionTimeObservation>,
7076        ) -> Self {
7077            self.set_validator_observations(field);
7078            self
7079        }
7080    }
7081    impl super::ExecutionTimeObservations {
7082        pub const fn const_default() -> Self {
7083            Self {
7084                version: None,
7085                observations: Vec::new(),
7086            }
7087        }
7088        #[doc(hidden)]
7089        pub fn default_instance() -> &'static Self {
7090            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7091            &DEFAULT
7092        }
7093        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7094        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7095            self.version.as_mut().map(|field| field as _)
7096        }
7097        ///Returns a mutable reference to `version`.
7098        ///If the field is unset, it is first initialized with the default value.
7099        pub fn version_mut(&mut self) -> &mut i32 {
7100            self.version.get_or_insert_default()
7101        }
7102        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7103        pub fn version_opt(&self) -> Option<i32> {
7104            self.version.as_ref().map(|field| *field)
7105        }
7106        ///Sets `version` with the provided value.
7107        pub fn set_version(&mut self, field: i32) {
7108            self.version = Some(field);
7109        }
7110        ///Sets `version` with the provided value.
7111        pub fn with_version(mut self, field: i32) -> Self {
7112            self.set_version(field);
7113            self
7114        }
7115        ///Returns the value of `observations`, or the default value if `observations` is unset.
7116        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7117            &self.observations
7118        }
7119        ///Returns a mutable reference to `observations`.
7120        ///If the field is unset, it is first initialized with the default value.
7121        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7122            &mut self.observations
7123        }
7124        ///Sets `observations` with the provided value.
7125        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7126            self.observations = field;
7127        }
7128        ///Sets `observations` with the provided value.
7129        pub fn with_observations(
7130            mut self,
7131            field: Vec<super::ExecutionTimeObservation>,
7132        ) -> Self {
7133            self.set_observations(field);
7134            self
7135        }
7136    }
7137    impl super::FieldDescriptor {
7138        pub const fn const_default() -> Self {
7139            Self {
7140                name: None,
7141                position: None,
7142                r#type: None,
7143            }
7144        }
7145        #[doc(hidden)]
7146        pub fn default_instance() -> &'static Self {
7147            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7148            &DEFAULT
7149        }
7150        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7151        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7152            self.name.as_mut().map(|field| field as _)
7153        }
7154        ///Returns a mutable reference to `name`.
7155        ///If the field is unset, it is first initialized with the default value.
7156        pub fn name_mut(&mut self) -> &mut String {
7157            self.name.get_or_insert_default()
7158        }
7159        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7160        pub fn name_opt(&self) -> Option<&str> {
7161            self.name.as_ref().map(|field| field as _)
7162        }
7163        ///Sets `name` with the provided value.
7164        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7165            self.name = Some(field.into().into());
7166        }
7167        ///Sets `name` with the provided value.
7168        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7169            self.set_name(field.into());
7170            self
7171        }
7172        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7173        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7174            self.position.as_mut().map(|field| field as _)
7175        }
7176        ///Returns a mutable reference to `position`.
7177        ///If the field is unset, it is first initialized with the default value.
7178        pub fn position_mut(&mut self) -> &mut u32 {
7179            self.position.get_or_insert_default()
7180        }
7181        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
7182        pub fn position_opt(&self) -> Option<u32> {
7183            self.position.as_ref().map(|field| *field)
7184        }
7185        ///Sets `position` with the provided value.
7186        pub fn set_position(&mut self, field: u32) {
7187            self.position = Some(field);
7188        }
7189        ///Sets `position` with the provided value.
7190        pub fn with_position(mut self, field: u32) -> Self {
7191            self.set_position(field);
7192            self
7193        }
7194        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
7195        pub fn r#type(&self) -> &super::OpenSignatureBody {
7196            self.r#type
7197                .as_ref()
7198                .map(|field| field as _)
7199                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7200        }
7201        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7202        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7203            self.r#type.as_mut().map(|field| field as _)
7204        }
7205        ///Returns a mutable reference to `r#type`.
7206        ///If the field is unset, it is first initialized with the default value.
7207        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7208            self.r#type.get_or_insert_default()
7209        }
7210        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7211        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7212            self.r#type.as_ref().map(|field| field as _)
7213        }
7214        ///Sets `r#type` with the provided value.
7215        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7216            self.r#type = Some(field.into().into());
7217        }
7218        ///Sets `r#type` with the provided value.
7219        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7220            self.set_type(field.into());
7221            self
7222        }
7223    }
7224    impl super::FunctionDescriptor {
7225        pub const fn const_default() -> Self {
7226            Self {
7227                name: None,
7228                visibility: None,
7229                is_entry: None,
7230                type_parameters: Vec::new(),
7231                parameters: Vec::new(),
7232                returns: Vec::new(),
7233            }
7234        }
7235        #[doc(hidden)]
7236        pub fn default_instance() -> &'static Self {
7237            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7238            &DEFAULT
7239        }
7240        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7241        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7242            self.name.as_mut().map(|field| field as _)
7243        }
7244        ///Returns a mutable reference to `name`.
7245        ///If the field is unset, it is first initialized with the default value.
7246        pub fn name_mut(&mut self) -> &mut String {
7247            self.name.get_or_insert_default()
7248        }
7249        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7250        pub fn name_opt(&self) -> Option<&str> {
7251            self.name.as_ref().map(|field| field as _)
7252        }
7253        ///Sets `name` with the provided value.
7254        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7255            self.name = Some(field.into().into());
7256        }
7257        ///Sets `name` with the provided value.
7258        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7259            self.set_name(field.into());
7260            self
7261        }
7262        ///Sets `visibility` with the provided value.
7263        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7264            mut self,
7265            field: T,
7266        ) -> Self {
7267            self.set_visibility(field.into());
7268            self
7269        }
7270        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7271        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7272            self.is_entry.as_mut().map(|field| field as _)
7273        }
7274        ///Returns a mutable reference to `is_entry`.
7275        ///If the field is unset, it is first initialized with the default value.
7276        pub fn is_entry_mut(&mut self) -> &mut bool {
7277            self.is_entry.get_or_insert_default()
7278        }
7279        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
7280        pub fn is_entry_opt(&self) -> Option<bool> {
7281            self.is_entry.as_ref().map(|field| *field)
7282        }
7283        ///Sets `is_entry` with the provided value.
7284        pub fn set_is_entry(&mut self, field: bool) {
7285            self.is_entry = Some(field);
7286        }
7287        ///Sets `is_entry` with the provided value.
7288        pub fn with_is_entry(mut self, field: bool) -> Self {
7289            self.set_is_entry(field);
7290            self
7291        }
7292        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
7293        pub fn type_parameters(&self) -> &[super::TypeParameter] {
7294            &self.type_parameters
7295        }
7296        ///Returns a mutable reference to `type_parameters`.
7297        ///If the field is unset, it is first initialized with the default value.
7298        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7299            &mut self.type_parameters
7300        }
7301        ///Sets `type_parameters` with the provided value.
7302        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7303            self.type_parameters = field;
7304        }
7305        ///Sets `type_parameters` with the provided value.
7306        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7307            self.set_type_parameters(field);
7308            self
7309        }
7310        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
7311        pub fn parameters(&self) -> &[super::OpenSignature] {
7312            &self.parameters
7313        }
7314        ///Returns a mutable reference to `parameters`.
7315        ///If the field is unset, it is first initialized with the default value.
7316        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7317            &mut self.parameters
7318        }
7319        ///Sets `parameters` with the provided value.
7320        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7321            self.parameters = field;
7322        }
7323        ///Sets `parameters` with the provided value.
7324        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7325            self.set_parameters(field);
7326            self
7327        }
7328        ///Returns the value of `returns`, or the default value if `returns` is unset.
7329        pub fn returns(&self) -> &[super::OpenSignature] {
7330            &self.returns
7331        }
7332        ///Returns a mutable reference to `returns`.
7333        ///If the field is unset, it is first initialized with the default value.
7334        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7335            &mut self.returns
7336        }
7337        ///Sets `returns` with the provided value.
7338        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7339            self.returns = field;
7340        }
7341        ///Sets `returns` with the provided value.
7342        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7343            self.set_returns(field);
7344            self
7345        }
7346    }
7347    impl super::FundsWithdrawal {
7348        pub const fn const_default() -> Self {
7349            Self {
7350                amount: None,
7351                coin_type: None,
7352                source: None,
7353                funder: None,
7354                allowance: None,
7355            }
7356        }
7357        #[doc(hidden)]
7358        pub fn default_instance() -> &'static Self {
7359            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7360            &DEFAULT
7361        }
7362        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7363        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7364            self.amount.as_mut().map(|field| field as _)
7365        }
7366        ///Returns a mutable reference to `amount`.
7367        ///If the field is unset, it is first initialized with the default value.
7368        pub fn amount_mut(&mut self) -> &mut u64 {
7369            self.amount.get_or_insert_default()
7370        }
7371        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
7372        pub fn amount_opt(&self) -> Option<u64> {
7373            self.amount.as_ref().map(|field| *field)
7374        }
7375        ///Sets `amount` with the provided value.
7376        pub fn set_amount(&mut self, field: u64) {
7377            self.amount = Some(field);
7378        }
7379        ///Sets `amount` with the provided value.
7380        pub fn with_amount(mut self, field: u64) -> Self {
7381            self.set_amount(field);
7382            self
7383        }
7384        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7385        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7386            self.coin_type.as_mut().map(|field| field as _)
7387        }
7388        ///Returns a mutable reference to `coin_type`.
7389        ///If the field is unset, it is first initialized with the default value.
7390        pub fn coin_type_mut(&mut self) -> &mut String {
7391            self.coin_type.get_or_insert_default()
7392        }
7393        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7394        pub fn coin_type_opt(&self) -> Option<&str> {
7395            self.coin_type.as_ref().map(|field| field as _)
7396        }
7397        ///Sets `coin_type` with the provided value.
7398        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7399            self.coin_type = Some(field.into().into());
7400        }
7401        ///Sets `coin_type` with the provided value.
7402        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7403            self.set_coin_type(field.into());
7404            self
7405        }
7406        ///Sets `source` with the provided value.
7407        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7408            mut self,
7409            field: T,
7410        ) -> Self {
7411            self.set_source(field.into());
7412            self
7413        }
7414        ///If `funder` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7415        pub fn funder_opt_mut(&mut self) -> Option<&mut String> {
7416            self.funder.as_mut().map(|field| field as _)
7417        }
7418        ///Returns a mutable reference to `funder`.
7419        ///If the field is unset, it is first initialized with the default value.
7420        pub fn funder_mut(&mut self) -> &mut String {
7421            self.funder.get_or_insert_default()
7422        }
7423        ///If `funder` is set, returns [`Some`] with the value; otherwise returns [`None`].
7424        pub fn funder_opt(&self) -> Option<&str> {
7425            self.funder.as_ref().map(|field| field as _)
7426        }
7427        ///Sets `funder` with the provided value.
7428        pub fn set_funder<T: Into<String>>(&mut self, field: T) {
7429            self.funder = Some(field.into().into());
7430        }
7431        ///Sets `funder` with the provided value.
7432        pub fn with_funder<T: Into<String>>(mut self, field: T) -> Self {
7433            self.set_funder(field.into());
7434            self
7435        }
7436        ///If `allowance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7437        pub fn allowance_opt_mut(&mut self) -> Option<&mut String> {
7438            self.allowance.as_mut().map(|field| field as _)
7439        }
7440        ///Returns a mutable reference to `allowance`.
7441        ///If the field is unset, it is first initialized with the default value.
7442        pub fn allowance_mut(&mut self) -> &mut String {
7443            self.allowance.get_or_insert_default()
7444        }
7445        ///If `allowance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7446        pub fn allowance_opt(&self) -> Option<&str> {
7447            self.allowance.as_ref().map(|field| field as _)
7448        }
7449        ///Sets `allowance` with the provided value.
7450        pub fn set_allowance<T: Into<String>>(&mut self, field: T) {
7451            self.allowance = Some(field.into().into());
7452        }
7453        ///Sets `allowance` with the provided value.
7454        pub fn with_allowance<T: Into<String>>(mut self, field: T) -> Self {
7455            self.set_allowance(field.into());
7456            self
7457        }
7458    }
7459    impl super::GasCostSummary {
7460        pub const fn const_default() -> Self {
7461            Self {
7462                computation_cost: None,
7463                storage_cost: None,
7464                storage_rebate: None,
7465                non_refundable_storage_fee: None,
7466            }
7467        }
7468        #[doc(hidden)]
7469        pub fn default_instance() -> &'static Self {
7470            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7471            &DEFAULT
7472        }
7473        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7474        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7475            self.computation_cost.as_mut().map(|field| field as _)
7476        }
7477        ///Returns a mutable reference to `computation_cost`.
7478        ///If the field is unset, it is first initialized with the default value.
7479        pub fn computation_cost_mut(&mut self) -> &mut u64 {
7480            self.computation_cost.get_or_insert_default()
7481        }
7482        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7483        pub fn computation_cost_opt(&self) -> Option<u64> {
7484            self.computation_cost.as_ref().map(|field| *field)
7485        }
7486        ///Sets `computation_cost` with the provided value.
7487        pub fn set_computation_cost(&mut self, field: u64) {
7488            self.computation_cost = Some(field);
7489        }
7490        ///Sets `computation_cost` with the provided value.
7491        pub fn with_computation_cost(mut self, field: u64) -> Self {
7492            self.set_computation_cost(field);
7493            self
7494        }
7495        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7496        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7497            self.storage_cost.as_mut().map(|field| field as _)
7498        }
7499        ///Returns a mutable reference to `storage_cost`.
7500        ///If the field is unset, it is first initialized with the default value.
7501        pub fn storage_cost_mut(&mut self) -> &mut u64 {
7502            self.storage_cost.get_or_insert_default()
7503        }
7504        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7505        pub fn storage_cost_opt(&self) -> Option<u64> {
7506            self.storage_cost.as_ref().map(|field| *field)
7507        }
7508        ///Sets `storage_cost` with the provided value.
7509        pub fn set_storage_cost(&mut self, field: u64) {
7510            self.storage_cost = Some(field);
7511        }
7512        ///Sets `storage_cost` with the provided value.
7513        pub fn with_storage_cost(mut self, field: u64) -> Self {
7514            self.set_storage_cost(field);
7515            self
7516        }
7517        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7518        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7519            self.storage_rebate.as_mut().map(|field| field as _)
7520        }
7521        ///Returns a mutable reference to `storage_rebate`.
7522        ///If the field is unset, it is first initialized with the default value.
7523        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7524            self.storage_rebate.get_or_insert_default()
7525        }
7526        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
7527        pub fn storage_rebate_opt(&self) -> Option<u64> {
7528            self.storage_rebate.as_ref().map(|field| *field)
7529        }
7530        ///Sets `storage_rebate` with the provided value.
7531        pub fn set_storage_rebate(&mut self, field: u64) {
7532            self.storage_rebate = Some(field);
7533        }
7534        ///Sets `storage_rebate` with the provided value.
7535        pub fn with_storage_rebate(mut self, field: u64) -> Self {
7536            self.set_storage_rebate(field);
7537            self
7538        }
7539        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7540        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7541            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7542        }
7543        ///Returns a mutable reference to `non_refundable_storage_fee`.
7544        ///If the field is unset, it is first initialized with the default value.
7545        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7546            self.non_refundable_storage_fee.get_or_insert_default()
7547        }
7548        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
7549        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7550            self.non_refundable_storage_fee.as_ref().map(|field| *field)
7551        }
7552        ///Sets `non_refundable_storage_fee` with the provided value.
7553        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7554            self.non_refundable_storage_fee = Some(field);
7555        }
7556        ///Sets `non_refundable_storage_fee` with the provided value.
7557        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7558            self.set_non_refundable_storage_fee(field);
7559            self
7560        }
7561    }
7562    impl super::GasPayment {
7563        pub const fn const_default() -> Self {
7564            Self {
7565                objects: Vec::new(),
7566                owner: None,
7567                price: None,
7568                budget: None,
7569            }
7570        }
7571        #[doc(hidden)]
7572        pub fn default_instance() -> &'static Self {
7573            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7574            &DEFAULT
7575        }
7576        ///Returns the value of `objects`, or the default value if `objects` is unset.
7577        pub fn objects(&self) -> &[super::ObjectReference] {
7578            &self.objects
7579        }
7580        ///Returns a mutable reference to `objects`.
7581        ///If the field is unset, it is first initialized with the default value.
7582        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7583            &mut self.objects
7584        }
7585        ///Sets `objects` with the provided value.
7586        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7587            self.objects = field;
7588        }
7589        ///Sets `objects` with the provided value.
7590        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7591            self.set_objects(field);
7592            self
7593        }
7594        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7595        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7596            self.owner.as_mut().map(|field| field as _)
7597        }
7598        ///Returns a mutable reference to `owner`.
7599        ///If the field is unset, it is first initialized with the default value.
7600        pub fn owner_mut(&mut self) -> &mut String {
7601            self.owner.get_or_insert_default()
7602        }
7603        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7604        pub fn owner_opt(&self) -> Option<&str> {
7605            self.owner.as_ref().map(|field| field as _)
7606        }
7607        ///Sets `owner` with the provided value.
7608        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7609            self.owner = Some(field.into().into());
7610        }
7611        ///Sets `owner` with the provided value.
7612        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7613            self.set_owner(field.into());
7614            self
7615        }
7616        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7617        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7618            self.price.as_mut().map(|field| field as _)
7619        }
7620        ///Returns a mutable reference to `price`.
7621        ///If the field is unset, it is first initialized with the default value.
7622        pub fn price_mut(&mut self) -> &mut u64 {
7623            self.price.get_or_insert_default()
7624        }
7625        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
7626        pub fn price_opt(&self) -> Option<u64> {
7627            self.price.as_ref().map(|field| *field)
7628        }
7629        ///Sets `price` with the provided value.
7630        pub fn set_price(&mut self, field: u64) {
7631            self.price = Some(field);
7632        }
7633        ///Sets `price` with the provided value.
7634        pub fn with_price(mut self, field: u64) -> Self {
7635            self.set_price(field);
7636            self
7637        }
7638        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7639        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7640            self.budget.as_mut().map(|field| field as _)
7641        }
7642        ///Returns a mutable reference to `budget`.
7643        ///If the field is unset, it is first initialized with the default value.
7644        pub fn budget_mut(&mut self) -> &mut u64 {
7645            self.budget.get_or_insert_default()
7646        }
7647        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
7648        pub fn budget_opt(&self) -> Option<u64> {
7649            self.budget.as_ref().map(|field| *field)
7650        }
7651        ///Sets `budget` with the provided value.
7652        pub fn set_budget(&mut self, field: u64) {
7653            self.budget = Some(field);
7654        }
7655        ///Sets `budget` with the provided value.
7656        pub fn with_budget(mut self, field: u64) -> Self {
7657            self.set_budget(field);
7658            self
7659        }
7660    }
7661    impl super::GenesisTransaction {
7662        pub const fn const_default() -> Self {
7663            Self { objects: Vec::new() }
7664        }
7665        #[doc(hidden)]
7666        pub fn default_instance() -> &'static Self {
7667            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7668            &DEFAULT
7669        }
7670        ///Returns the value of `objects`, or the default value if `objects` is unset.
7671        pub fn objects(&self) -> &[super::Object] {
7672            &self.objects
7673        }
7674        ///Returns a mutable reference to `objects`.
7675        ///If the field is unset, it is first initialized with the default value.
7676        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7677            &mut self.objects
7678        }
7679        ///Sets `objects` with the provided value.
7680        pub fn set_objects(&mut self, field: Vec<super::Object>) {
7681            self.objects = field;
7682        }
7683        ///Sets `objects` with the provided value.
7684        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7685            self.set_objects(field);
7686            self
7687        }
7688    }
7689    impl super::GetBalanceRequest {
7690        pub const fn const_default() -> Self {
7691            Self {
7692                owner: None,
7693                coin_type: None,
7694            }
7695        }
7696        #[doc(hidden)]
7697        pub fn default_instance() -> &'static Self {
7698            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7699            &DEFAULT
7700        }
7701        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7702        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7703            self.owner.as_mut().map(|field| field as _)
7704        }
7705        ///Returns a mutable reference to `owner`.
7706        ///If the field is unset, it is first initialized with the default value.
7707        pub fn owner_mut(&mut self) -> &mut String {
7708            self.owner.get_or_insert_default()
7709        }
7710        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7711        pub fn owner_opt(&self) -> Option<&str> {
7712            self.owner.as_ref().map(|field| field as _)
7713        }
7714        ///Sets `owner` with the provided value.
7715        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7716            self.owner = Some(field.into().into());
7717        }
7718        ///Sets `owner` with the provided value.
7719        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7720            self.set_owner(field.into());
7721            self
7722        }
7723        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7724        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7725            self.coin_type.as_mut().map(|field| field as _)
7726        }
7727        ///Returns a mutable reference to `coin_type`.
7728        ///If the field is unset, it is first initialized with the default value.
7729        pub fn coin_type_mut(&mut self) -> &mut String {
7730            self.coin_type.get_or_insert_default()
7731        }
7732        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7733        pub fn coin_type_opt(&self) -> Option<&str> {
7734            self.coin_type.as_ref().map(|field| field as _)
7735        }
7736        ///Sets `coin_type` with the provided value.
7737        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7738            self.coin_type = Some(field.into().into());
7739        }
7740        ///Sets `coin_type` with the provided value.
7741        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7742            self.set_coin_type(field.into());
7743            self
7744        }
7745    }
7746    impl super::GetBalanceResponse {
7747        pub const fn const_default() -> Self {
7748            Self { balance: None }
7749        }
7750        #[doc(hidden)]
7751        pub fn default_instance() -> &'static Self {
7752            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7753            &DEFAULT
7754        }
7755        ///Returns the value of `balance`, or the default value if `balance` is unset.
7756        pub fn balance(&self) -> &super::Balance {
7757            self.balance
7758                .as_ref()
7759                .map(|field| field as _)
7760                .unwrap_or_else(|| super::Balance::default_instance() as _)
7761        }
7762        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7763        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7764            self.balance.as_mut().map(|field| field as _)
7765        }
7766        ///Returns a mutable reference to `balance`.
7767        ///If the field is unset, it is first initialized with the default value.
7768        pub fn balance_mut(&mut self) -> &mut super::Balance {
7769            self.balance.get_or_insert_default()
7770        }
7771        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7772        pub fn balance_opt(&self) -> Option<&super::Balance> {
7773            self.balance.as_ref().map(|field| field as _)
7774        }
7775        ///Sets `balance` with the provided value.
7776        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7777            self.balance = Some(field.into().into());
7778        }
7779        ///Sets `balance` with the provided value.
7780        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7781            self.set_balance(field.into());
7782            self
7783        }
7784    }
7785    impl super::GetCheckpointRequest {
7786        pub const fn const_default() -> Self {
7787            Self {
7788                read_mask: None,
7789                checkpoint_id: None,
7790            }
7791        }
7792        #[doc(hidden)]
7793        pub fn default_instance() -> &'static Self {
7794            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7795            &DEFAULT
7796        }
7797        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7798        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7799            self.read_mask.as_mut().map(|field| field as _)
7800        }
7801        ///Returns a mutable reference to `read_mask`.
7802        ///If the field is unset, it is first initialized with the default value.
7803        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7804            self.read_mask.get_or_insert_default()
7805        }
7806        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7807        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7808            self.read_mask.as_ref().map(|field| field as _)
7809        }
7810        ///Sets `read_mask` with the provided value.
7811        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7812            self.read_mask = Some(field.into().into());
7813        }
7814        ///Sets `read_mask` with the provided value.
7815        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7816            mut self,
7817            field: T,
7818        ) -> Self {
7819            self.set_read_mask(field.into());
7820            self
7821        }
7822        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
7823        pub fn sequence_number(&self) -> u64 {
7824            if let Some(
7825                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7826            ) = &self.checkpoint_id
7827            {
7828                *field
7829            } else {
7830                0u64
7831            }
7832        }
7833        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
7834        pub fn sequence_number_opt(&self) -> Option<u64> {
7835            if let Some(
7836                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7837            ) = &self.checkpoint_id
7838            {
7839                Some(*field)
7840            } else {
7841                None
7842            }
7843        }
7844        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7845        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7846            if let Some(
7847                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7848            ) = &mut self.checkpoint_id
7849            {
7850                Some(field as _)
7851            } else {
7852                None
7853            }
7854        }
7855        ///Returns a mutable reference to `sequence_number`.
7856        ///If the field is unset, it is first initialized with the default value.
7857        ///If any other oneof field in the same oneof is set, it will be cleared.
7858        pub fn sequence_number_mut(&mut self) -> &mut u64 {
7859            if self.sequence_number_opt_mut().is_none() {
7860                self.checkpoint_id = Some(
7861                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7862                        u64::default(),
7863                    ),
7864                );
7865            }
7866            self.sequence_number_opt_mut().unwrap()
7867        }
7868        ///Sets `sequence_number` with the provided value.
7869        ///If any other oneof field in the same oneof is set, it will be cleared.
7870        pub fn set_sequence_number(&mut self, field: u64) {
7871            self.checkpoint_id = Some(
7872                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7873            );
7874        }
7875        ///Sets `sequence_number` with the provided value.
7876        ///If any other oneof field in the same oneof is set, it will be cleared.
7877        pub fn with_sequence_number(mut self, field: u64) -> Self {
7878            self.set_sequence_number(field);
7879            self
7880        }
7881        ///Returns the value of `digest`, or the default value if `digest` is unset.
7882        pub fn digest(&self) -> &str {
7883            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7884                .checkpoint_id
7885            {
7886                field as _
7887            } else {
7888                ""
7889            }
7890        }
7891        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7892        pub fn digest_opt(&self) -> Option<&str> {
7893            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7894                .checkpoint_id
7895            {
7896                Some(field as _)
7897            } else {
7898                None
7899            }
7900        }
7901        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7902        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7903            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7904                .checkpoint_id
7905            {
7906                Some(field as _)
7907            } else {
7908                None
7909            }
7910        }
7911        ///Returns a mutable reference to `digest`.
7912        ///If the field is unset, it is first initialized with the default value.
7913        ///If any other oneof field in the same oneof is set, it will be cleared.
7914        pub fn digest_mut(&mut self) -> &mut String {
7915            if self.digest_opt_mut().is_none() {
7916                self.checkpoint_id = Some(
7917                    super::get_checkpoint_request::CheckpointId::Digest(
7918                        String::default(),
7919                    ),
7920                );
7921            }
7922            self.digest_opt_mut().unwrap()
7923        }
7924        ///Sets `digest` with the provided value.
7925        ///If any other oneof field in the same oneof is set, it will be cleared.
7926        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7927            self.checkpoint_id = Some(
7928                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7929            );
7930        }
7931        ///Sets `digest` with the provided value.
7932        ///If any other oneof field in the same oneof is set, it will be cleared.
7933        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7934            self.set_digest(field.into());
7935            self
7936        }
7937    }
7938    impl super::GetCheckpointResponse {
7939        pub const fn const_default() -> Self {
7940            Self { checkpoint: None }
7941        }
7942        #[doc(hidden)]
7943        pub fn default_instance() -> &'static Self {
7944            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7945            &DEFAULT
7946        }
7947        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7948        pub fn checkpoint(&self) -> &super::Checkpoint {
7949            self.checkpoint
7950                .as_ref()
7951                .map(|field| field as _)
7952                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7953        }
7954        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7955        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7956            self.checkpoint.as_mut().map(|field| field as _)
7957        }
7958        ///Returns a mutable reference to `checkpoint`.
7959        ///If the field is unset, it is first initialized with the default value.
7960        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7961            self.checkpoint.get_or_insert_default()
7962        }
7963        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7964        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7965            self.checkpoint.as_ref().map(|field| field as _)
7966        }
7967        ///Sets `checkpoint` with the provided value.
7968        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7969            self.checkpoint = Some(field.into().into());
7970        }
7971        ///Sets `checkpoint` with the provided value.
7972        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7973            self.set_checkpoint(field.into());
7974            self
7975        }
7976    }
7977    impl super::GetCoinInfoRequest {
7978        pub const fn const_default() -> Self {
7979            Self { coin_type: None }
7980        }
7981        #[doc(hidden)]
7982        pub fn default_instance() -> &'static Self {
7983            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7984            &DEFAULT
7985        }
7986        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7987        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7988            self.coin_type.as_mut().map(|field| field as _)
7989        }
7990        ///Returns a mutable reference to `coin_type`.
7991        ///If the field is unset, it is first initialized with the default value.
7992        pub fn coin_type_mut(&mut self) -> &mut String {
7993            self.coin_type.get_or_insert_default()
7994        }
7995        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7996        pub fn coin_type_opt(&self) -> Option<&str> {
7997            self.coin_type.as_ref().map(|field| field as _)
7998        }
7999        ///Sets `coin_type` with the provided value.
8000        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8001            self.coin_type = Some(field.into().into());
8002        }
8003        ///Sets `coin_type` with the provided value.
8004        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8005            self.set_coin_type(field.into());
8006            self
8007        }
8008    }
8009    impl super::GetCoinInfoResponse {
8010        pub const fn const_default() -> Self {
8011            Self {
8012                coin_type: None,
8013                metadata: None,
8014                treasury: None,
8015                regulated_metadata: None,
8016            }
8017        }
8018        #[doc(hidden)]
8019        pub fn default_instance() -> &'static Self {
8020            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
8021            &DEFAULT
8022        }
8023        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8024        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8025            self.coin_type.as_mut().map(|field| field as _)
8026        }
8027        ///Returns a mutable reference to `coin_type`.
8028        ///If the field is unset, it is first initialized with the default value.
8029        pub fn coin_type_mut(&mut self) -> &mut String {
8030            self.coin_type.get_or_insert_default()
8031        }
8032        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8033        pub fn coin_type_opt(&self) -> Option<&str> {
8034            self.coin_type.as_ref().map(|field| field as _)
8035        }
8036        ///Sets `coin_type` with the provided value.
8037        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8038            self.coin_type = Some(field.into().into());
8039        }
8040        ///Sets `coin_type` with the provided value.
8041        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8042            self.set_coin_type(field.into());
8043            self
8044        }
8045        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
8046        pub fn metadata(&self) -> &super::CoinMetadata {
8047            self.metadata
8048                .as_ref()
8049                .map(|field| field as _)
8050                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8051        }
8052        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8053        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8054            self.metadata.as_mut().map(|field| field as _)
8055        }
8056        ///Returns a mutable reference to `metadata`.
8057        ///If the field is unset, it is first initialized with the default value.
8058        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8059            self.metadata.get_or_insert_default()
8060        }
8061        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8062        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8063            self.metadata.as_ref().map(|field| field as _)
8064        }
8065        ///Sets `metadata` with the provided value.
8066        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8067            self.metadata = Some(field.into().into());
8068        }
8069        ///Sets `metadata` with the provided value.
8070        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8071            self.set_metadata(field.into());
8072            self
8073        }
8074        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
8075        pub fn treasury(&self) -> &super::CoinTreasury {
8076            self.treasury
8077                .as_ref()
8078                .map(|field| field as _)
8079                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8080        }
8081        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8082        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8083            self.treasury.as_mut().map(|field| field as _)
8084        }
8085        ///Returns a mutable reference to `treasury`.
8086        ///If the field is unset, it is first initialized with the default value.
8087        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8088            self.treasury.get_or_insert_default()
8089        }
8090        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
8091        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8092            self.treasury.as_ref().map(|field| field as _)
8093        }
8094        ///Sets `treasury` with the provided value.
8095        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8096            self.treasury = Some(field.into().into());
8097        }
8098        ///Sets `treasury` with the provided value.
8099        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8100            self.set_treasury(field.into());
8101            self
8102        }
8103        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
8104        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8105            self.regulated_metadata
8106                .as_ref()
8107                .map(|field| field as _)
8108                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8109        }
8110        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8111        pub fn regulated_metadata_opt_mut(
8112            &mut self,
8113        ) -> Option<&mut super::RegulatedCoinMetadata> {
8114            self.regulated_metadata.as_mut().map(|field| field as _)
8115        }
8116        ///Returns a mutable reference to `regulated_metadata`.
8117        ///If the field is unset, it is first initialized with the default value.
8118        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8119            self.regulated_metadata.get_or_insert_default()
8120        }
8121        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8122        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8123            self.regulated_metadata.as_ref().map(|field| field as _)
8124        }
8125        ///Sets `regulated_metadata` with the provided value.
8126        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8127            &mut self,
8128            field: T,
8129        ) {
8130            self.regulated_metadata = Some(field.into().into());
8131        }
8132        ///Sets `regulated_metadata` with the provided value.
8133        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8134            mut self,
8135            field: T,
8136        ) -> Self {
8137            self.set_regulated_metadata(field.into());
8138            self
8139        }
8140    }
8141    impl super::GetDatatypeRequest {
8142        pub const fn const_default() -> Self {
8143            Self {
8144                package_id: None,
8145                module_name: None,
8146                name: None,
8147            }
8148        }
8149        #[doc(hidden)]
8150        pub fn default_instance() -> &'static Self {
8151            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8152            &DEFAULT
8153        }
8154        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8155        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8156            self.package_id.as_mut().map(|field| field as _)
8157        }
8158        ///Returns a mutable reference to `package_id`.
8159        ///If the field is unset, it is first initialized with the default value.
8160        pub fn package_id_mut(&mut self) -> &mut String {
8161            self.package_id.get_or_insert_default()
8162        }
8163        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8164        pub fn package_id_opt(&self) -> Option<&str> {
8165            self.package_id.as_ref().map(|field| field as _)
8166        }
8167        ///Sets `package_id` with the provided value.
8168        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8169            self.package_id = Some(field.into().into());
8170        }
8171        ///Sets `package_id` with the provided value.
8172        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8173            self.set_package_id(field.into());
8174            self
8175        }
8176        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8177        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8178            self.module_name.as_mut().map(|field| field as _)
8179        }
8180        ///Returns a mutable reference to `module_name`.
8181        ///If the field is unset, it is first initialized with the default value.
8182        pub fn module_name_mut(&mut self) -> &mut String {
8183            self.module_name.get_or_insert_default()
8184        }
8185        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8186        pub fn module_name_opt(&self) -> Option<&str> {
8187            self.module_name.as_ref().map(|field| field as _)
8188        }
8189        ///Sets `module_name` with the provided value.
8190        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8191            self.module_name = Some(field.into().into());
8192        }
8193        ///Sets `module_name` with the provided value.
8194        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8195            self.set_module_name(field.into());
8196            self
8197        }
8198        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8199        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8200            self.name.as_mut().map(|field| field as _)
8201        }
8202        ///Returns a mutable reference to `name`.
8203        ///If the field is unset, it is first initialized with the default value.
8204        pub fn name_mut(&mut self) -> &mut String {
8205            self.name.get_or_insert_default()
8206        }
8207        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8208        pub fn name_opt(&self) -> Option<&str> {
8209            self.name.as_ref().map(|field| field as _)
8210        }
8211        ///Sets `name` with the provided value.
8212        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8213            self.name = Some(field.into().into());
8214        }
8215        ///Sets `name` with the provided value.
8216        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8217            self.set_name(field.into());
8218            self
8219        }
8220    }
8221    impl super::GetDatatypeResponse {
8222        pub const fn const_default() -> Self {
8223            Self { datatype: None }
8224        }
8225        #[doc(hidden)]
8226        pub fn default_instance() -> &'static Self {
8227            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8228            &DEFAULT
8229        }
8230        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
8231        pub fn datatype(&self) -> &super::DatatypeDescriptor {
8232            self.datatype
8233                .as_ref()
8234                .map(|field| field as _)
8235                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8236        }
8237        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8238        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8239            self.datatype.as_mut().map(|field| field as _)
8240        }
8241        ///Returns a mutable reference to `datatype`.
8242        ///If the field is unset, it is first initialized with the default value.
8243        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8244            self.datatype.get_or_insert_default()
8245        }
8246        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
8247        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8248            self.datatype.as_ref().map(|field| field as _)
8249        }
8250        ///Sets `datatype` with the provided value.
8251        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8252            self.datatype = Some(field.into().into());
8253        }
8254        ///Sets `datatype` with the provided value.
8255        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8256            mut self,
8257            field: T,
8258        ) -> Self {
8259            self.set_datatype(field.into());
8260            self
8261        }
8262    }
8263    impl super::GetEpochRequest {
8264        pub const fn const_default() -> Self {
8265            Self {
8266                epoch: None,
8267                read_mask: None,
8268            }
8269        }
8270        #[doc(hidden)]
8271        pub fn default_instance() -> &'static Self {
8272            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8273            &DEFAULT
8274        }
8275        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8276        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8277            self.epoch.as_mut().map(|field| field as _)
8278        }
8279        ///Returns a mutable reference to `epoch`.
8280        ///If the field is unset, it is first initialized with the default value.
8281        pub fn epoch_mut(&mut self) -> &mut u64 {
8282            self.epoch.get_or_insert_default()
8283        }
8284        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8285        pub fn epoch_opt(&self) -> Option<u64> {
8286            self.epoch.as_ref().map(|field| *field)
8287        }
8288        ///Sets `epoch` with the provided value.
8289        pub fn set_epoch(&mut self, field: u64) {
8290            self.epoch = Some(field);
8291        }
8292        ///Sets `epoch` with the provided value.
8293        pub fn with_epoch(mut self, field: u64) -> Self {
8294            self.set_epoch(field);
8295            self
8296        }
8297        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8298        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8299            self.read_mask.as_mut().map(|field| field as _)
8300        }
8301        ///Returns a mutable reference to `read_mask`.
8302        ///If the field is unset, it is first initialized with the default value.
8303        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8304            self.read_mask.get_or_insert_default()
8305        }
8306        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8307        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8308            self.read_mask.as_ref().map(|field| field as _)
8309        }
8310        ///Sets `read_mask` with the provided value.
8311        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8312            self.read_mask = Some(field.into().into());
8313        }
8314        ///Sets `read_mask` with the provided value.
8315        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8316            mut self,
8317            field: T,
8318        ) -> Self {
8319            self.set_read_mask(field.into());
8320            self
8321        }
8322    }
8323    impl super::GetEpochResponse {
8324        pub const fn const_default() -> Self {
8325            Self { epoch: None }
8326        }
8327        #[doc(hidden)]
8328        pub fn default_instance() -> &'static Self {
8329            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8330            &DEFAULT
8331        }
8332        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
8333        pub fn epoch(&self) -> &super::Epoch {
8334            self.epoch
8335                .as_ref()
8336                .map(|field| field as _)
8337                .unwrap_or_else(|| super::Epoch::default_instance() as _)
8338        }
8339        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8340        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8341            self.epoch.as_mut().map(|field| field as _)
8342        }
8343        ///Returns a mutable reference to `epoch`.
8344        ///If the field is unset, it is first initialized with the default value.
8345        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8346            self.epoch.get_or_insert_default()
8347        }
8348        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8349        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8350            self.epoch.as_ref().map(|field| field as _)
8351        }
8352        ///Sets `epoch` with the provided value.
8353        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8354            self.epoch = Some(field.into().into());
8355        }
8356        ///Sets `epoch` with the provided value.
8357        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8358            self.set_epoch(field.into());
8359            self
8360        }
8361    }
8362    impl super::GetFunctionRequest {
8363        pub const fn const_default() -> Self {
8364            Self {
8365                package_id: None,
8366                module_name: None,
8367                name: None,
8368            }
8369        }
8370        #[doc(hidden)]
8371        pub fn default_instance() -> &'static Self {
8372            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8373            &DEFAULT
8374        }
8375        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8376        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8377            self.package_id.as_mut().map(|field| field as _)
8378        }
8379        ///Returns a mutable reference to `package_id`.
8380        ///If the field is unset, it is first initialized with the default value.
8381        pub fn package_id_mut(&mut self) -> &mut String {
8382            self.package_id.get_or_insert_default()
8383        }
8384        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8385        pub fn package_id_opt(&self) -> Option<&str> {
8386            self.package_id.as_ref().map(|field| field as _)
8387        }
8388        ///Sets `package_id` with the provided value.
8389        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8390            self.package_id = Some(field.into().into());
8391        }
8392        ///Sets `package_id` with the provided value.
8393        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8394            self.set_package_id(field.into());
8395            self
8396        }
8397        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8398        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8399            self.module_name.as_mut().map(|field| field as _)
8400        }
8401        ///Returns a mutable reference to `module_name`.
8402        ///If the field is unset, it is first initialized with the default value.
8403        pub fn module_name_mut(&mut self) -> &mut String {
8404            self.module_name.get_or_insert_default()
8405        }
8406        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8407        pub fn module_name_opt(&self) -> Option<&str> {
8408            self.module_name.as_ref().map(|field| field as _)
8409        }
8410        ///Sets `module_name` with the provided value.
8411        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8412            self.module_name = Some(field.into().into());
8413        }
8414        ///Sets `module_name` with the provided value.
8415        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8416            self.set_module_name(field.into());
8417            self
8418        }
8419        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8420        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8421            self.name.as_mut().map(|field| field as _)
8422        }
8423        ///Returns a mutable reference to `name`.
8424        ///If the field is unset, it is first initialized with the default value.
8425        pub fn name_mut(&mut self) -> &mut String {
8426            self.name.get_or_insert_default()
8427        }
8428        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8429        pub fn name_opt(&self) -> Option<&str> {
8430            self.name.as_ref().map(|field| field as _)
8431        }
8432        ///Sets `name` with the provided value.
8433        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8434            self.name = Some(field.into().into());
8435        }
8436        ///Sets `name` with the provided value.
8437        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8438            self.set_name(field.into());
8439            self
8440        }
8441    }
8442    impl super::GetFunctionResponse {
8443        pub const fn const_default() -> Self {
8444            Self { function: None }
8445        }
8446        #[doc(hidden)]
8447        pub fn default_instance() -> &'static Self {
8448            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8449            &DEFAULT
8450        }
8451        ///Returns the value of `function`, or the default value if `function` is unset.
8452        pub fn function(&self) -> &super::FunctionDescriptor {
8453            self.function
8454                .as_ref()
8455                .map(|field| field as _)
8456                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8457        }
8458        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8459        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8460            self.function.as_mut().map(|field| field as _)
8461        }
8462        ///Returns a mutable reference to `function`.
8463        ///If the field is unset, it is first initialized with the default value.
8464        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8465            self.function.get_or_insert_default()
8466        }
8467        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
8468        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8469            self.function.as_ref().map(|field| field as _)
8470        }
8471        ///Sets `function` with the provided value.
8472        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8473            self.function = Some(field.into().into());
8474        }
8475        ///Sets `function` with the provided value.
8476        pub fn with_function<T: Into<super::FunctionDescriptor>>(
8477            mut self,
8478            field: T,
8479        ) -> Self {
8480            self.set_function(field.into());
8481            self
8482        }
8483    }
8484    impl super::GetObjectRequest {
8485        pub const fn const_default() -> Self {
8486            Self {
8487                object_id: None,
8488                version: None,
8489                read_mask: None,
8490            }
8491        }
8492        #[doc(hidden)]
8493        pub fn default_instance() -> &'static Self {
8494            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8495            &DEFAULT
8496        }
8497        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8498        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8499            self.object_id.as_mut().map(|field| field as _)
8500        }
8501        ///Returns a mutable reference to `object_id`.
8502        ///If the field is unset, it is first initialized with the default value.
8503        pub fn object_id_mut(&mut self) -> &mut String {
8504            self.object_id.get_or_insert_default()
8505        }
8506        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8507        pub fn object_id_opt(&self) -> Option<&str> {
8508            self.object_id.as_ref().map(|field| field as _)
8509        }
8510        ///Sets `object_id` with the provided value.
8511        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8512            self.object_id = Some(field.into().into());
8513        }
8514        ///Sets `object_id` with the provided value.
8515        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8516            self.set_object_id(field.into());
8517            self
8518        }
8519        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8520        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8521            self.version.as_mut().map(|field| field as _)
8522        }
8523        ///Returns a mutable reference to `version`.
8524        ///If the field is unset, it is first initialized with the default value.
8525        pub fn version_mut(&mut self) -> &mut u64 {
8526            self.version.get_or_insert_default()
8527        }
8528        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8529        pub fn version_opt(&self) -> Option<u64> {
8530            self.version.as_ref().map(|field| *field)
8531        }
8532        ///Sets `version` with the provided value.
8533        pub fn set_version(&mut self, field: u64) {
8534            self.version = Some(field);
8535        }
8536        ///Sets `version` with the provided value.
8537        pub fn with_version(mut self, field: u64) -> Self {
8538            self.set_version(field);
8539            self
8540        }
8541        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8542        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8543            self.read_mask.as_mut().map(|field| field as _)
8544        }
8545        ///Returns a mutable reference to `read_mask`.
8546        ///If the field is unset, it is first initialized with the default value.
8547        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8548            self.read_mask.get_or_insert_default()
8549        }
8550        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8551        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8552            self.read_mask.as_ref().map(|field| field as _)
8553        }
8554        ///Sets `read_mask` with the provided value.
8555        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8556            self.read_mask = Some(field.into().into());
8557        }
8558        ///Sets `read_mask` with the provided value.
8559        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8560            mut self,
8561            field: T,
8562        ) -> Self {
8563            self.set_read_mask(field.into());
8564            self
8565        }
8566    }
8567    impl super::GetObjectResponse {
8568        pub const fn const_default() -> Self {
8569            Self { object: None }
8570        }
8571        #[doc(hidden)]
8572        pub fn default_instance() -> &'static Self {
8573            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8574            &DEFAULT
8575        }
8576        ///Returns the value of `object`, or the default value if `object` is unset.
8577        pub fn object(&self) -> &super::Object {
8578            self.object
8579                .as_ref()
8580                .map(|field| field as _)
8581                .unwrap_or_else(|| super::Object::default_instance() as _)
8582        }
8583        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8584        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8585            self.object.as_mut().map(|field| field as _)
8586        }
8587        ///Returns a mutable reference to `object`.
8588        ///If the field is unset, it is first initialized with the default value.
8589        pub fn object_mut(&mut self) -> &mut super::Object {
8590            self.object.get_or_insert_default()
8591        }
8592        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8593        pub fn object_opt(&self) -> Option<&super::Object> {
8594            self.object.as_ref().map(|field| field as _)
8595        }
8596        ///Sets `object` with the provided value.
8597        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8598            self.object = Some(field.into().into());
8599        }
8600        ///Sets `object` with the provided value.
8601        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8602            self.set_object(field.into());
8603            self
8604        }
8605    }
8606    impl super::GetObjectResult {
8607        pub const fn const_default() -> Self {
8608            Self { result: None }
8609        }
8610        #[doc(hidden)]
8611        pub fn default_instance() -> &'static Self {
8612            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8613            &DEFAULT
8614        }
8615        ///Returns the value of `object`, or the default value if `object` is unset.
8616        pub fn object(&self) -> &super::Object {
8617            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8618                field as _
8619            } else {
8620                super::Object::default_instance() as _
8621            }
8622        }
8623        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8624        pub fn object_opt(&self) -> Option<&super::Object> {
8625            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8626                Some(field as _)
8627            } else {
8628                None
8629            }
8630        }
8631        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8632        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8633            if let Some(super::get_object_result::Result::Object(field)) = &mut self
8634                .result
8635            {
8636                Some(field as _)
8637            } else {
8638                None
8639            }
8640        }
8641        ///Returns a mutable reference to `object`.
8642        ///If the field is unset, it is first initialized with the default value.
8643        ///If any other oneof field in the same oneof is set, it will be cleared.
8644        pub fn object_mut(&mut self) -> &mut super::Object {
8645            if self.object_opt_mut().is_none() {
8646                self.result = Some(
8647                    super::get_object_result::Result::Object(super::Object::default()),
8648                );
8649            }
8650            self.object_opt_mut().unwrap()
8651        }
8652        ///Sets `object` with the provided value.
8653        ///If any other oneof field in the same oneof is set, it will be cleared.
8654        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8655            self.result = Some(
8656                super::get_object_result::Result::Object(field.into().into()),
8657            );
8658        }
8659        ///Sets `object` with the provided value.
8660        ///If any other oneof field in the same oneof is set, it will be cleared.
8661        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8662            self.set_object(field.into());
8663            self
8664        }
8665        ///Returns the value of `error`, or the default value if `error` is unset.
8666        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8667            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8668                field as _
8669            } else {
8670                super::super::super::super::google::rpc::Status::default_instance() as _
8671            }
8672        }
8673        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8674        pub fn error_opt(
8675            &self,
8676        ) -> Option<&super::super::super::super::google::rpc::Status> {
8677            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8678                Some(field as _)
8679            } else {
8680                None
8681            }
8682        }
8683        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8684        pub fn error_opt_mut(
8685            &mut self,
8686        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8687            if let Some(super::get_object_result::Result::Error(field)) = &mut self
8688                .result
8689            {
8690                Some(field as _)
8691            } else {
8692                None
8693            }
8694        }
8695        ///Returns a mutable reference to `error`.
8696        ///If the field is unset, it is first initialized with the default value.
8697        ///If any other oneof field in the same oneof is set, it will be cleared.
8698        pub fn error_mut(
8699            &mut self,
8700        ) -> &mut super::super::super::super::google::rpc::Status {
8701            if self.error_opt_mut().is_none() {
8702                self.result = Some(
8703                    super::get_object_result::Result::Error(
8704                        super::super::super::super::google::rpc::Status::default(),
8705                    ),
8706                );
8707            }
8708            self.error_opt_mut().unwrap()
8709        }
8710        ///Sets `error` with the provided value.
8711        ///If any other oneof field in the same oneof is set, it will be cleared.
8712        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8713            &mut self,
8714            field: T,
8715        ) {
8716            self.result = Some(
8717                super::get_object_result::Result::Error(field.into().into()),
8718            );
8719        }
8720        ///Sets `error` with the provided value.
8721        ///If any other oneof field in the same oneof is set, it will be cleared.
8722        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8723            mut self,
8724            field: T,
8725        ) -> Self {
8726            self.set_error(field.into());
8727            self
8728        }
8729    }
8730    impl super::GetPackageRequest {
8731        pub const fn const_default() -> Self {
8732            Self { package_id: None }
8733        }
8734        #[doc(hidden)]
8735        pub fn default_instance() -> &'static Self {
8736            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8737            &DEFAULT
8738        }
8739        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8740        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8741            self.package_id.as_mut().map(|field| field as _)
8742        }
8743        ///Returns a mutable reference to `package_id`.
8744        ///If the field is unset, it is first initialized with the default value.
8745        pub fn package_id_mut(&mut self) -> &mut String {
8746            self.package_id.get_or_insert_default()
8747        }
8748        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8749        pub fn package_id_opt(&self) -> Option<&str> {
8750            self.package_id.as_ref().map(|field| field as _)
8751        }
8752        ///Sets `package_id` with the provided value.
8753        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8754            self.package_id = Some(field.into().into());
8755        }
8756        ///Sets `package_id` with the provided value.
8757        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8758            self.set_package_id(field.into());
8759            self
8760        }
8761    }
8762    impl super::GetPackageResponse {
8763        pub const fn const_default() -> Self {
8764            Self { package: None }
8765        }
8766        #[doc(hidden)]
8767        pub fn default_instance() -> &'static Self {
8768            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8769            &DEFAULT
8770        }
8771        ///Returns the value of `package`, or the default value if `package` is unset.
8772        pub fn package(&self) -> &super::Package {
8773            self.package
8774                .as_ref()
8775                .map(|field| field as _)
8776                .unwrap_or_else(|| super::Package::default_instance() as _)
8777        }
8778        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8779        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8780            self.package.as_mut().map(|field| field as _)
8781        }
8782        ///Returns a mutable reference to `package`.
8783        ///If the field is unset, it is first initialized with the default value.
8784        pub fn package_mut(&mut self) -> &mut super::Package {
8785            self.package.get_or_insert_default()
8786        }
8787        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
8788        pub fn package_opt(&self) -> Option<&super::Package> {
8789            self.package.as_ref().map(|field| field as _)
8790        }
8791        ///Sets `package` with the provided value.
8792        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8793            self.package = Some(field.into().into());
8794        }
8795        ///Sets `package` with the provided value.
8796        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8797            self.set_package(field.into());
8798            self
8799        }
8800    }
8801    impl super::GetServiceInfoRequest {
8802        pub const fn const_default() -> Self {
8803            Self {}
8804        }
8805        #[doc(hidden)]
8806        pub fn default_instance() -> &'static Self {
8807            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8808            &DEFAULT
8809        }
8810    }
8811    impl super::GetServiceInfoResponse {
8812        pub const fn const_default() -> Self {
8813            Self {
8814                chain_id: None,
8815                chain: None,
8816                epoch: None,
8817                checkpoint_height: None,
8818                timestamp: None,
8819                lowest_available_checkpoint: None,
8820                lowest_available_checkpoint_objects: None,
8821                server: None,
8822            }
8823        }
8824        #[doc(hidden)]
8825        pub fn default_instance() -> &'static Self {
8826            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8827            &DEFAULT
8828        }
8829        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8830        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8831            self.chain_id.as_mut().map(|field| field as _)
8832        }
8833        ///Returns a mutable reference to `chain_id`.
8834        ///If the field is unset, it is first initialized with the default value.
8835        pub fn chain_id_mut(&mut self) -> &mut String {
8836            self.chain_id.get_or_insert_default()
8837        }
8838        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8839        pub fn chain_id_opt(&self) -> Option<&str> {
8840            self.chain_id.as_ref().map(|field| field as _)
8841        }
8842        ///Sets `chain_id` with the provided value.
8843        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8844            self.chain_id = Some(field.into().into());
8845        }
8846        ///Sets `chain_id` with the provided value.
8847        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8848            self.set_chain_id(field.into());
8849            self
8850        }
8851        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8852        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8853            self.chain.as_mut().map(|field| field as _)
8854        }
8855        ///Returns a mutable reference to `chain`.
8856        ///If the field is unset, it is first initialized with the default value.
8857        pub fn chain_mut(&mut self) -> &mut String {
8858            self.chain.get_or_insert_default()
8859        }
8860        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8861        pub fn chain_opt(&self) -> Option<&str> {
8862            self.chain.as_ref().map(|field| field as _)
8863        }
8864        ///Sets `chain` with the provided value.
8865        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8866            self.chain = Some(field.into().into());
8867        }
8868        ///Sets `chain` with the provided value.
8869        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8870            self.set_chain(field.into());
8871            self
8872        }
8873        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8874        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8875            self.epoch.as_mut().map(|field| field as _)
8876        }
8877        ///Returns a mutable reference to `epoch`.
8878        ///If the field is unset, it is first initialized with the default value.
8879        pub fn epoch_mut(&mut self) -> &mut u64 {
8880            self.epoch.get_or_insert_default()
8881        }
8882        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8883        pub fn epoch_opt(&self) -> Option<u64> {
8884            self.epoch.as_ref().map(|field| *field)
8885        }
8886        ///Sets `epoch` with the provided value.
8887        pub fn set_epoch(&mut self, field: u64) {
8888            self.epoch = Some(field);
8889        }
8890        ///Sets `epoch` with the provided value.
8891        pub fn with_epoch(mut self, field: u64) -> Self {
8892            self.set_epoch(field);
8893            self
8894        }
8895        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8896        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8897            self.checkpoint_height.as_mut().map(|field| field as _)
8898        }
8899        ///Returns a mutable reference to `checkpoint_height`.
8900        ///If the field is unset, it is first initialized with the default value.
8901        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8902            self.checkpoint_height.get_or_insert_default()
8903        }
8904        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8905        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8906            self.checkpoint_height.as_ref().map(|field| *field)
8907        }
8908        ///Sets `checkpoint_height` with the provided value.
8909        pub fn set_checkpoint_height(&mut self, field: u64) {
8910            self.checkpoint_height = Some(field);
8911        }
8912        ///Sets `checkpoint_height` with the provided value.
8913        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8914            self.set_checkpoint_height(field);
8915            self
8916        }
8917        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8918        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8919            self.timestamp.as_mut().map(|field| field as _)
8920        }
8921        ///Returns a mutable reference to `timestamp`.
8922        ///If the field is unset, it is first initialized with the default value.
8923        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8924            self.timestamp.get_or_insert_default()
8925        }
8926        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8927        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8928            self.timestamp.as_ref().map(|field| field as _)
8929        }
8930        ///Sets `timestamp` with the provided value.
8931        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8932            self.timestamp = Some(field.into().into());
8933        }
8934        ///Sets `timestamp` with the provided value.
8935        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8936            mut self,
8937            field: T,
8938        ) -> Self {
8939            self.set_timestamp(field.into());
8940            self
8941        }
8942        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8943        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8944            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8945        }
8946        ///Returns a mutable reference to `lowest_available_checkpoint`.
8947        ///If the field is unset, it is first initialized with the default value.
8948        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8949            self.lowest_available_checkpoint.get_or_insert_default()
8950        }
8951        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8952        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8953            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8954        }
8955        ///Sets `lowest_available_checkpoint` with the provided value.
8956        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8957            self.lowest_available_checkpoint = Some(field);
8958        }
8959        ///Sets `lowest_available_checkpoint` with the provided value.
8960        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8961            self.set_lowest_available_checkpoint(field);
8962            self
8963        }
8964        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8965        pub fn lowest_available_checkpoint_objects_opt_mut(
8966            &mut self,
8967        ) -> Option<&mut u64> {
8968            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8969        }
8970        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8971        ///If the field is unset, it is first initialized with the default value.
8972        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8973            self.lowest_available_checkpoint_objects.get_or_insert_default()
8974        }
8975        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8976        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8977            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8978        }
8979        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8980        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8981            self.lowest_available_checkpoint_objects = Some(field);
8982        }
8983        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8984        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8985            self.set_lowest_available_checkpoint_objects(field);
8986            self
8987        }
8988        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8989        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8990            self.server.as_mut().map(|field| field as _)
8991        }
8992        ///Returns a mutable reference to `server`.
8993        ///If the field is unset, it is first initialized with the default value.
8994        pub fn server_mut(&mut self) -> &mut String {
8995            self.server.get_or_insert_default()
8996        }
8997        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8998        pub fn server_opt(&self) -> Option<&str> {
8999            self.server.as_ref().map(|field| field as _)
9000        }
9001        ///Sets `server` with the provided value.
9002        pub fn set_server<T: Into<String>>(&mut self, field: T) {
9003            self.server = Some(field.into().into());
9004        }
9005        ///Sets `server` with the provided value.
9006        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9007            self.set_server(field.into());
9008            self
9009        }
9010    }
9011    impl super::GetTransactionRequest {
9012        pub const fn const_default() -> Self {
9013            Self {
9014                digest: None,
9015                read_mask: None,
9016            }
9017        }
9018        #[doc(hidden)]
9019        pub fn default_instance() -> &'static Self {
9020            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9021            &DEFAULT
9022        }
9023        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9024        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9025            self.digest.as_mut().map(|field| field as _)
9026        }
9027        ///Returns a mutable reference to `digest`.
9028        ///If the field is unset, it is first initialized with the default value.
9029        pub fn digest_mut(&mut self) -> &mut String {
9030            self.digest.get_or_insert_default()
9031        }
9032        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9033        pub fn digest_opt(&self) -> Option<&str> {
9034            self.digest.as_ref().map(|field| field as _)
9035        }
9036        ///Sets `digest` with the provided value.
9037        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9038            self.digest = Some(field.into().into());
9039        }
9040        ///Sets `digest` with the provided value.
9041        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9042            self.set_digest(field.into());
9043            self
9044        }
9045        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9046        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9047            self.read_mask.as_mut().map(|field| field as _)
9048        }
9049        ///Returns a mutable reference to `read_mask`.
9050        ///If the field is unset, it is first initialized with the default value.
9051        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9052            self.read_mask.get_or_insert_default()
9053        }
9054        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9055        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9056            self.read_mask.as_ref().map(|field| field as _)
9057        }
9058        ///Sets `read_mask` with the provided value.
9059        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9060            self.read_mask = Some(field.into().into());
9061        }
9062        ///Sets `read_mask` with the provided value.
9063        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9064            mut self,
9065            field: T,
9066        ) -> Self {
9067            self.set_read_mask(field.into());
9068            self
9069        }
9070    }
9071    impl super::GetTransactionResponse {
9072        pub const fn const_default() -> Self {
9073            Self { transaction: None }
9074        }
9075        #[doc(hidden)]
9076        pub fn default_instance() -> &'static Self {
9077            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9078            &DEFAULT
9079        }
9080        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9081        pub fn transaction(&self) -> &super::ExecutedTransaction {
9082            self.transaction
9083                .as_ref()
9084                .map(|field| field as _)
9085                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9086        }
9087        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9088        pub fn transaction_opt_mut(
9089            &mut self,
9090        ) -> Option<&mut super::ExecutedTransaction> {
9091            self.transaction.as_mut().map(|field| field as _)
9092        }
9093        ///Returns a mutable reference to `transaction`.
9094        ///If the field is unset, it is first initialized with the default value.
9095        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9096            self.transaction.get_or_insert_default()
9097        }
9098        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9099        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9100            self.transaction.as_ref().map(|field| field as _)
9101        }
9102        ///Sets `transaction` with the provided value.
9103        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9104            &mut self,
9105            field: T,
9106        ) {
9107            self.transaction = Some(field.into().into());
9108        }
9109        ///Sets `transaction` with the provided value.
9110        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9111            mut self,
9112            field: T,
9113        ) -> Self {
9114            self.set_transaction(field.into());
9115            self
9116        }
9117    }
9118    impl super::GetTransactionResult {
9119        pub const fn const_default() -> Self {
9120            Self { result: None }
9121        }
9122        #[doc(hidden)]
9123        pub fn default_instance() -> &'static Self {
9124            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9125            &DEFAULT
9126        }
9127        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9128        pub fn transaction(&self) -> &super::ExecutedTransaction {
9129            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9130                .result
9131            {
9132                field as _
9133            } else {
9134                super::ExecutedTransaction::default_instance() as _
9135            }
9136        }
9137        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9138        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9139            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9140                .result
9141            {
9142                Some(field as _)
9143            } else {
9144                None
9145            }
9146        }
9147        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9148        pub fn transaction_opt_mut(
9149            &mut self,
9150        ) -> Option<&mut super::ExecutedTransaction> {
9151            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9152                .result
9153            {
9154                Some(field as _)
9155            } else {
9156                None
9157            }
9158        }
9159        ///Returns a mutable reference to `transaction`.
9160        ///If the field is unset, it is first initialized with the default value.
9161        ///If any other oneof field in the same oneof is set, it will be cleared.
9162        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9163            if self.transaction_opt_mut().is_none() {
9164                self.result = Some(
9165                    super::get_transaction_result::Result::Transaction(
9166                        super::ExecutedTransaction::default(),
9167                    ),
9168                );
9169            }
9170            self.transaction_opt_mut().unwrap()
9171        }
9172        ///Sets `transaction` with the provided value.
9173        ///If any other oneof field in the same oneof is set, it will be cleared.
9174        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9175            &mut self,
9176            field: T,
9177        ) {
9178            self.result = Some(
9179                super::get_transaction_result::Result::Transaction(field.into().into()),
9180            );
9181        }
9182        ///Sets `transaction` with the provided value.
9183        ///If any other oneof field in the same oneof is set, it will be cleared.
9184        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9185            mut self,
9186            field: T,
9187        ) -> Self {
9188            self.set_transaction(field.into());
9189            self
9190        }
9191        ///Returns the value of `error`, or the default value if `error` is unset.
9192        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9193            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9194                .result
9195            {
9196                field as _
9197            } else {
9198                super::super::super::super::google::rpc::Status::default_instance() as _
9199            }
9200        }
9201        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9202        pub fn error_opt(
9203            &self,
9204        ) -> Option<&super::super::super::super::google::rpc::Status> {
9205            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9206                .result
9207            {
9208                Some(field as _)
9209            } else {
9210                None
9211            }
9212        }
9213        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9214        pub fn error_opt_mut(
9215            &mut self,
9216        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9217            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9218                .result
9219            {
9220                Some(field as _)
9221            } else {
9222                None
9223            }
9224        }
9225        ///Returns a mutable reference to `error`.
9226        ///If the field is unset, it is first initialized with the default value.
9227        ///If any other oneof field in the same oneof is set, it will be cleared.
9228        pub fn error_mut(
9229            &mut self,
9230        ) -> &mut super::super::super::super::google::rpc::Status {
9231            if self.error_opt_mut().is_none() {
9232                self.result = Some(
9233                    super::get_transaction_result::Result::Error(
9234                        super::super::super::super::google::rpc::Status::default(),
9235                    ),
9236                );
9237            }
9238            self.error_opt_mut().unwrap()
9239        }
9240        ///Sets `error` with the provided value.
9241        ///If any other oneof field in the same oneof is set, it will be cleared.
9242        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9243            &mut self,
9244            field: T,
9245        ) {
9246            self.result = Some(
9247                super::get_transaction_result::Result::Error(field.into().into()),
9248            );
9249        }
9250        ///Sets `error` with the provided value.
9251        ///If any other oneof field in the same oneof is set, it will be cleared.
9252        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9253            mut self,
9254            field: T,
9255        ) -> Self {
9256            self.set_error(field.into());
9257            self
9258        }
9259    }
9260    impl super::IndexError {
9261        pub const fn const_default() -> Self {
9262            Self {
9263                index: None,
9264                subresult: None,
9265            }
9266        }
9267        #[doc(hidden)]
9268        pub fn default_instance() -> &'static Self {
9269            static DEFAULT: super::IndexError = super::IndexError::const_default();
9270            &DEFAULT
9271        }
9272        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9273        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9274            self.index.as_mut().map(|field| field as _)
9275        }
9276        ///Returns a mutable reference to `index`.
9277        ///If the field is unset, it is first initialized with the default value.
9278        pub fn index_mut(&mut self) -> &mut u32 {
9279            self.index.get_or_insert_default()
9280        }
9281        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
9282        pub fn index_opt(&self) -> Option<u32> {
9283            self.index.as_ref().map(|field| *field)
9284        }
9285        ///Sets `index` with the provided value.
9286        pub fn set_index(&mut self, field: u32) {
9287            self.index = Some(field);
9288        }
9289        ///Sets `index` with the provided value.
9290        pub fn with_index(mut self, field: u32) -> Self {
9291            self.set_index(field);
9292            self
9293        }
9294        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9295        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9296            self.subresult.as_mut().map(|field| field as _)
9297        }
9298        ///Returns a mutable reference to `subresult`.
9299        ///If the field is unset, it is first initialized with the default value.
9300        pub fn subresult_mut(&mut self) -> &mut u32 {
9301            self.subresult.get_or_insert_default()
9302        }
9303        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
9304        pub fn subresult_opt(&self) -> Option<u32> {
9305            self.subresult.as_ref().map(|field| *field)
9306        }
9307        ///Sets `subresult` with the provided value.
9308        pub fn set_subresult(&mut self, field: u32) {
9309            self.subresult = Some(field);
9310        }
9311        ///Sets `subresult` with the provided value.
9312        pub fn with_subresult(mut self, field: u32) -> Self {
9313            self.set_subresult(field);
9314            self
9315        }
9316    }
9317    impl super::Input {
9318        pub const fn const_default() -> Self {
9319            Self {
9320                kind: None,
9321                pure: None,
9322                object_id: None,
9323                version: None,
9324                digest: None,
9325                mutable: None,
9326                mutability: None,
9327                funds_withdrawal: None,
9328                literal: None,
9329            }
9330        }
9331        #[doc(hidden)]
9332        pub fn default_instance() -> &'static Self {
9333            static DEFAULT: super::Input = super::Input::const_default();
9334            &DEFAULT
9335        }
9336        ///Sets `kind` with the provided value.
9337        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9338            self.set_kind(field.into());
9339            self
9340        }
9341        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
9342        pub fn pure_opt(&self) -> Option<&[u8]> {
9343            self.pure.as_ref().map(|field| field as _)
9344        }
9345        ///Sets `pure` with the provided value.
9346        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9347            self.pure = Some(field.into().into());
9348        }
9349        ///Sets `pure` with the provided value.
9350        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9351            self.set_pure(field.into());
9352            self
9353        }
9354        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9355        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9356            self.object_id.as_mut().map(|field| field as _)
9357        }
9358        ///Returns a mutable reference to `object_id`.
9359        ///If the field is unset, it is first initialized with the default value.
9360        pub fn object_id_mut(&mut self) -> &mut String {
9361            self.object_id.get_or_insert_default()
9362        }
9363        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9364        pub fn object_id_opt(&self) -> Option<&str> {
9365            self.object_id.as_ref().map(|field| field as _)
9366        }
9367        ///Sets `object_id` with the provided value.
9368        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9369            self.object_id = Some(field.into().into());
9370        }
9371        ///Sets `object_id` with the provided value.
9372        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9373            self.set_object_id(field.into());
9374            self
9375        }
9376        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9377        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9378            self.version.as_mut().map(|field| field as _)
9379        }
9380        ///Returns a mutable reference to `version`.
9381        ///If the field is unset, it is first initialized with the default value.
9382        pub fn version_mut(&mut self) -> &mut u64 {
9383            self.version.get_or_insert_default()
9384        }
9385        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9386        pub fn version_opt(&self) -> Option<u64> {
9387            self.version.as_ref().map(|field| *field)
9388        }
9389        ///Sets `version` with the provided value.
9390        pub fn set_version(&mut self, field: u64) {
9391            self.version = Some(field);
9392        }
9393        ///Sets `version` with the provided value.
9394        pub fn with_version(mut self, field: u64) -> Self {
9395            self.set_version(field);
9396            self
9397        }
9398        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9399        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9400            self.digest.as_mut().map(|field| field as _)
9401        }
9402        ///Returns a mutable reference to `digest`.
9403        ///If the field is unset, it is first initialized with the default value.
9404        pub fn digest_mut(&mut self) -> &mut String {
9405            self.digest.get_or_insert_default()
9406        }
9407        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9408        pub fn digest_opt(&self) -> Option<&str> {
9409            self.digest.as_ref().map(|field| field as _)
9410        }
9411        ///Sets `digest` with the provided value.
9412        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9413            self.digest = Some(field.into().into());
9414        }
9415        ///Sets `digest` with the provided value.
9416        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9417            self.set_digest(field.into());
9418            self
9419        }
9420        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9421        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9422            self.mutable.as_mut().map(|field| field as _)
9423        }
9424        ///Returns a mutable reference to `mutable`.
9425        ///If the field is unset, it is first initialized with the default value.
9426        pub fn mutable_mut(&mut self) -> &mut bool {
9427            self.mutable.get_or_insert_default()
9428        }
9429        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
9430        pub fn mutable_opt(&self) -> Option<bool> {
9431            self.mutable.as_ref().map(|field| *field)
9432        }
9433        ///Sets `mutable` with the provided value.
9434        pub fn set_mutable(&mut self, field: bool) {
9435            self.mutable = Some(field);
9436        }
9437        ///Sets `mutable` with the provided value.
9438        pub fn with_mutable(mut self, field: bool) -> Self {
9439            self.set_mutable(field);
9440            self
9441        }
9442        ///Sets `mutability` with the provided value.
9443        pub fn with_mutability<T: Into<super::input::Mutability>>(
9444            mut self,
9445            field: T,
9446        ) -> Self {
9447            self.set_mutability(field.into());
9448            self
9449        }
9450        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
9451        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9452            self.funds_withdrawal
9453                .as_ref()
9454                .map(|field| field as _)
9455                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9456        }
9457        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9458        pub fn funds_withdrawal_opt_mut(
9459            &mut self,
9460        ) -> Option<&mut super::FundsWithdrawal> {
9461            self.funds_withdrawal.as_mut().map(|field| field as _)
9462        }
9463        ///Returns a mutable reference to `funds_withdrawal`.
9464        ///If the field is unset, it is first initialized with the default value.
9465        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9466            self.funds_withdrawal.get_or_insert_default()
9467        }
9468        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9469        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9470            self.funds_withdrawal.as_ref().map(|field| field as _)
9471        }
9472        ///Sets `funds_withdrawal` with the provided value.
9473        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9474            &mut self,
9475            field: T,
9476        ) {
9477            self.funds_withdrawal = Some(field.into().into());
9478        }
9479        ///Sets `funds_withdrawal` with the provided value.
9480        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9481            mut self,
9482            field: T,
9483        ) -> Self {
9484            self.set_funds_withdrawal(field.into());
9485            self
9486        }
9487        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9488        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9489            self.literal.as_mut().map(|field| field as _)
9490        }
9491        ///Returns a mutable reference to `literal`.
9492        ///If the field is unset, it is first initialized with the default value.
9493        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9494            self.literal.get_or_insert_default()
9495        }
9496        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9497        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9498            self.literal.as_ref().map(|field| field as _)
9499        }
9500        ///Sets `literal` with the provided value.
9501        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9502            self.literal = Some(field.into().into());
9503        }
9504        ///Sets `literal` with the provided value.
9505        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9506            self.set_literal(field.into());
9507            self
9508        }
9509    }
9510    impl super::Jwk {
9511        pub const fn const_default() -> Self {
9512            Self {
9513                kty: None,
9514                e: None,
9515                n: None,
9516                alg: None,
9517            }
9518        }
9519        #[doc(hidden)]
9520        pub fn default_instance() -> &'static Self {
9521            static DEFAULT: super::Jwk = super::Jwk::const_default();
9522            &DEFAULT
9523        }
9524        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9525        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9526            self.kty.as_mut().map(|field| field as _)
9527        }
9528        ///Returns a mutable reference to `kty`.
9529        ///If the field is unset, it is first initialized with the default value.
9530        pub fn kty_mut(&mut self) -> &mut String {
9531            self.kty.get_or_insert_default()
9532        }
9533        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
9534        pub fn kty_opt(&self) -> Option<&str> {
9535            self.kty.as_ref().map(|field| field as _)
9536        }
9537        ///Sets `kty` with the provided value.
9538        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9539            self.kty = Some(field.into().into());
9540        }
9541        ///Sets `kty` with the provided value.
9542        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9543            self.set_kty(field.into());
9544            self
9545        }
9546        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9547        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9548            self.e.as_mut().map(|field| field as _)
9549        }
9550        ///Returns a mutable reference to `e`.
9551        ///If the field is unset, it is first initialized with the default value.
9552        pub fn e_mut(&mut self) -> &mut String {
9553            self.e.get_or_insert_default()
9554        }
9555        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
9556        pub fn e_opt(&self) -> Option<&str> {
9557            self.e.as_ref().map(|field| field as _)
9558        }
9559        ///Sets `e` with the provided value.
9560        pub fn set_e<T: Into<String>>(&mut self, field: T) {
9561            self.e = Some(field.into().into());
9562        }
9563        ///Sets `e` with the provided value.
9564        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9565            self.set_e(field.into());
9566            self
9567        }
9568        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9569        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9570            self.n.as_mut().map(|field| field as _)
9571        }
9572        ///Returns a mutable reference to `n`.
9573        ///If the field is unset, it is first initialized with the default value.
9574        pub fn n_mut(&mut self) -> &mut String {
9575            self.n.get_or_insert_default()
9576        }
9577        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
9578        pub fn n_opt(&self) -> Option<&str> {
9579            self.n.as_ref().map(|field| field as _)
9580        }
9581        ///Sets `n` with the provided value.
9582        pub fn set_n<T: Into<String>>(&mut self, field: T) {
9583            self.n = Some(field.into().into());
9584        }
9585        ///Sets `n` with the provided value.
9586        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9587            self.set_n(field.into());
9588            self
9589        }
9590        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9591        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9592            self.alg.as_mut().map(|field| field as _)
9593        }
9594        ///Returns a mutable reference to `alg`.
9595        ///If the field is unset, it is first initialized with the default value.
9596        pub fn alg_mut(&mut self) -> &mut String {
9597            self.alg.get_or_insert_default()
9598        }
9599        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
9600        pub fn alg_opt(&self) -> Option<&str> {
9601            self.alg.as_ref().map(|field| field as _)
9602        }
9603        ///Sets `alg` with the provided value.
9604        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9605            self.alg = Some(field.into().into());
9606        }
9607        ///Sets `alg` with the provided value.
9608        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9609            self.set_alg(field.into());
9610            self
9611        }
9612    }
9613    impl super::JwkId {
9614        pub const fn const_default() -> Self {
9615            Self { iss: None, kid: None }
9616        }
9617        #[doc(hidden)]
9618        pub fn default_instance() -> &'static Self {
9619            static DEFAULT: super::JwkId = super::JwkId::const_default();
9620            &DEFAULT
9621        }
9622        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9623        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9624            self.iss.as_mut().map(|field| field as _)
9625        }
9626        ///Returns a mutable reference to `iss`.
9627        ///If the field is unset, it is first initialized with the default value.
9628        pub fn iss_mut(&mut self) -> &mut String {
9629            self.iss.get_or_insert_default()
9630        }
9631        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
9632        pub fn iss_opt(&self) -> Option<&str> {
9633            self.iss.as_ref().map(|field| field as _)
9634        }
9635        ///Sets `iss` with the provided value.
9636        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9637            self.iss = Some(field.into().into());
9638        }
9639        ///Sets `iss` with the provided value.
9640        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9641            self.set_iss(field.into());
9642            self
9643        }
9644        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9645        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9646            self.kid.as_mut().map(|field| field as _)
9647        }
9648        ///Returns a mutable reference to `kid`.
9649        ///If the field is unset, it is first initialized with the default value.
9650        pub fn kid_mut(&mut self) -> &mut String {
9651            self.kid.get_or_insert_default()
9652        }
9653        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
9654        pub fn kid_opt(&self) -> Option<&str> {
9655            self.kid.as_ref().map(|field| field as _)
9656        }
9657        ///Sets `kid` with the provided value.
9658        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9659            self.kid = Some(field.into().into());
9660        }
9661        ///Sets `kid` with the provided value.
9662        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9663            self.set_kid(field.into());
9664            self
9665        }
9666    }
9667    impl super::Linkage {
9668        pub const fn const_default() -> Self {
9669            Self {
9670                original_id: None,
9671                upgraded_id: None,
9672                upgraded_version: None,
9673            }
9674        }
9675        #[doc(hidden)]
9676        pub fn default_instance() -> &'static Self {
9677            static DEFAULT: super::Linkage = super::Linkage::const_default();
9678            &DEFAULT
9679        }
9680        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9681        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9682            self.original_id.as_mut().map(|field| field as _)
9683        }
9684        ///Returns a mutable reference to `original_id`.
9685        ///If the field is unset, it is first initialized with the default value.
9686        pub fn original_id_mut(&mut self) -> &mut String {
9687            self.original_id.get_or_insert_default()
9688        }
9689        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9690        pub fn original_id_opt(&self) -> Option<&str> {
9691            self.original_id.as_ref().map(|field| field as _)
9692        }
9693        ///Sets `original_id` with the provided value.
9694        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9695            self.original_id = Some(field.into().into());
9696        }
9697        ///Sets `original_id` with the provided value.
9698        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9699            self.set_original_id(field.into());
9700            self
9701        }
9702        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9703        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9704            self.upgraded_id.as_mut().map(|field| field as _)
9705        }
9706        ///Returns a mutable reference to `upgraded_id`.
9707        ///If the field is unset, it is first initialized with the default value.
9708        pub fn upgraded_id_mut(&mut self) -> &mut String {
9709            self.upgraded_id.get_or_insert_default()
9710        }
9711        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9712        pub fn upgraded_id_opt(&self) -> Option<&str> {
9713            self.upgraded_id.as_ref().map(|field| field as _)
9714        }
9715        ///Sets `upgraded_id` with the provided value.
9716        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9717            self.upgraded_id = Some(field.into().into());
9718        }
9719        ///Sets `upgraded_id` with the provided value.
9720        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9721            self.set_upgraded_id(field.into());
9722            self
9723        }
9724        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9725        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9726            self.upgraded_version.as_mut().map(|field| field as _)
9727        }
9728        ///Returns a mutable reference to `upgraded_version`.
9729        ///If the field is unset, it is first initialized with the default value.
9730        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9731            self.upgraded_version.get_or_insert_default()
9732        }
9733        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9734        pub fn upgraded_version_opt(&self) -> Option<u64> {
9735            self.upgraded_version.as_ref().map(|field| *field)
9736        }
9737        ///Sets `upgraded_version` with the provided value.
9738        pub fn set_upgraded_version(&mut self, field: u64) {
9739            self.upgraded_version = Some(field);
9740        }
9741        ///Sets `upgraded_version` with the provided value.
9742        pub fn with_upgraded_version(mut self, field: u64) -> Self {
9743            self.set_upgraded_version(field);
9744            self
9745        }
9746    }
9747    impl super::ListBalancesRequest {
9748        pub const fn const_default() -> Self {
9749            Self {
9750                owner: None,
9751                page_size: None,
9752                page_token: None,
9753            }
9754        }
9755        #[doc(hidden)]
9756        pub fn default_instance() -> &'static Self {
9757            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9758            &DEFAULT
9759        }
9760        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9761        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9762            self.owner.as_mut().map(|field| field as _)
9763        }
9764        ///Returns a mutable reference to `owner`.
9765        ///If the field is unset, it is first initialized with the default value.
9766        pub fn owner_mut(&mut self) -> &mut String {
9767            self.owner.get_or_insert_default()
9768        }
9769        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9770        pub fn owner_opt(&self) -> Option<&str> {
9771            self.owner.as_ref().map(|field| field as _)
9772        }
9773        ///Sets `owner` with the provided value.
9774        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9775            self.owner = Some(field.into().into());
9776        }
9777        ///Sets `owner` with the provided value.
9778        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9779            self.set_owner(field.into());
9780            self
9781        }
9782        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9783        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9784            self.page_size.as_mut().map(|field| field as _)
9785        }
9786        ///Returns a mutable reference to `page_size`.
9787        ///If the field is unset, it is first initialized with the default value.
9788        pub fn page_size_mut(&mut self) -> &mut u32 {
9789            self.page_size.get_or_insert_default()
9790        }
9791        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9792        pub fn page_size_opt(&self) -> Option<u32> {
9793            self.page_size.as_ref().map(|field| *field)
9794        }
9795        ///Sets `page_size` with the provided value.
9796        pub fn set_page_size(&mut self, field: u32) {
9797            self.page_size = Some(field);
9798        }
9799        ///Sets `page_size` with the provided value.
9800        pub fn with_page_size(mut self, field: u32) -> Self {
9801            self.set_page_size(field);
9802            self
9803        }
9804        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9805        pub fn page_token_opt(&self) -> Option<&[u8]> {
9806            self.page_token.as_ref().map(|field| field as _)
9807        }
9808        ///Sets `page_token` with the provided value.
9809        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9810            self.page_token = Some(field.into().into());
9811        }
9812        ///Sets `page_token` with the provided value.
9813        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9814            mut self,
9815            field: T,
9816        ) -> Self {
9817            self.set_page_token(field.into());
9818            self
9819        }
9820    }
9821    impl super::ListBalancesResponse {
9822        pub const fn const_default() -> Self {
9823            Self {
9824                balances: Vec::new(),
9825                next_page_token: None,
9826            }
9827        }
9828        #[doc(hidden)]
9829        pub fn default_instance() -> &'static Self {
9830            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9831            &DEFAULT
9832        }
9833        ///Returns the value of `balances`, or the default value if `balances` is unset.
9834        pub fn balances(&self) -> &[super::Balance] {
9835            &self.balances
9836        }
9837        ///Returns a mutable reference to `balances`.
9838        ///If the field is unset, it is first initialized with the default value.
9839        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9840            &mut self.balances
9841        }
9842        ///Sets `balances` with the provided value.
9843        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9844            self.balances = field;
9845        }
9846        ///Sets `balances` with the provided value.
9847        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9848            self.set_balances(field);
9849            self
9850        }
9851        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9852        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9853            self.next_page_token.as_ref().map(|field| field as _)
9854        }
9855        ///Sets `next_page_token` with the provided value.
9856        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9857            self.next_page_token = Some(field.into().into());
9858        }
9859        ///Sets `next_page_token` with the provided value.
9860        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9861            mut self,
9862            field: T,
9863        ) -> Self {
9864            self.set_next_page_token(field.into());
9865            self
9866        }
9867    }
9868    impl super::ListCheckpointsRequest {
9869        pub const fn const_default() -> Self {
9870            Self {
9871                read_mask: None,
9872                start_checkpoint: None,
9873                end_checkpoint: None,
9874                filter: None,
9875                options: None,
9876            }
9877        }
9878        #[doc(hidden)]
9879        pub fn default_instance() -> &'static Self {
9880            static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
9881            &DEFAULT
9882        }
9883        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9884        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9885            self.read_mask.as_mut().map(|field| field as _)
9886        }
9887        ///Returns a mutable reference to `read_mask`.
9888        ///If the field is unset, it is first initialized with the default value.
9889        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9890            self.read_mask.get_or_insert_default()
9891        }
9892        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9893        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9894            self.read_mask.as_ref().map(|field| field as _)
9895        }
9896        ///Sets `read_mask` with the provided value.
9897        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9898            self.read_mask = Some(field.into().into());
9899        }
9900        ///Sets `read_mask` with the provided value.
9901        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9902            mut self,
9903            field: T,
9904        ) -> Self {
9905            self.set_read_mask(field.into());
9906            self
9907        }
9908        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9909        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9910            self.start_checkpoint.as_mut().map(|field| field as _)
9911        }
9912        ///Returns a mutable reference to `start_checkpoint`.
9913        ///If the field is unset, it is first initialized with the default value.
9914        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
9915            self.start_checkpoint.get_or_insert_default()
9916        }
9917        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9918        pub fn start_checkpoint_opt(&self) -> Option<u64> {
9919            self.start_checkpoint.as_ref().map(|field| *field)
9920        }
9921        ///Sets `start_checkpoint` with the provided value.
9922        pub fn set_start_checkpoint(&mut self, field: u64) {
9923            self.start_checkpoint = Some(field);
9924        }
9925        ///Sets `start_checkpoint` with the provided value.
9926        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
9927            self.set_start_checkpoint(field);
9928            self
9929        }
9930        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9931        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9932            self.end_checkpoint.as_mut().map(|field| field as _)
9933        }
9934        ///Returns a mutable reference to `end_checkpoint`.
9935        ///If the field is unset, it is first initialized with the default value.
9936        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
9937            self.end_checkpoint.get_or_insert_default()
9938        }
9939        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9940        pub fn end_checkpoint_opt(&self) -> Option<u64> {
9941            self.end_checkpoint.as_ref().map(|field| *field)
9942        }
9943        ///Sets `end_checkpoint` with the provided value.
9944        pub fn set_end_checkpoint(&mut self, field: u64) {
9945            self.end_checkpoint = Some(field);
9946        }
9947        ///Sets `end_checkpoint` with the provided value.
9948        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
9949            self.set_end_checkpoint(field);
9950            self
9951        }
9952        ///Returns the value of `filter`, or the default value if `filter` is unset.
9953        pub fn filter(&self) -> &super::TransactionFilter {
9954            self.filter
9955                .as_ref()
9956                .map(|field| field as _)
9957                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
9958        }
9959        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9960        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
9961            self.filter.as_mut().map(|field| field as _)
9962        }
9963        ///Returns a mutable reference to `filter`.
9964        ///If the field is unset, it is first initialized with the default value.
9965        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
9966            self.filter.get_or_insert_default()
9967        }
9968        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
9969        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
9970            self.filter.as_ref().map(|field| field as _)
9971        }
9972        ///Sets `filter` with the provided value.
9973        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
9974            self.filter = Some(field.into().into());
9975        }
9976        ///Sets `filter` with the provided value.
9977        pub fn with_filter<T: Into<super::TransactionFilter>>(
9978            mut self,
9979            field: T,
9980        ) -> Self {
9981            self.set_filter(field.into());
9982            self
9983        }
9984        ///Returns the value of `options`, or the default value if `options` is unset.
9985        pub fn options(&self) -> &super::QueryOptions {
9986            self.options
9987                .as_ref()
9988                .map(|field| field as _)
9989                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
9990        }
9991        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9992        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
9993            self.options.as_mut().map(|field| field as _)
9994        }
9995        ///Returns a mutable reference to `options`.
9996        ///If the field is unset, it is first initialized with the default value.
9997        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
9998            self.options.get_or_insert_default()
9999        }
10000        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10001        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10002            self.options.as_ref().map(|field| field as _)
10003        }
10004        ///Sets `options` with the provided value.
10005        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10006            self.options = Some(field.into().into());
10007        }
10008        ///Sets `options` with the provided value.
10009        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10010            self.set_options(field.into());
10011            self
10012        }
10013    }
10014    impl super::ListCheckpointsResponse {
10015        pub const fn const_default() -> Self {
10016            Self {
10017                checkpoint: None,
10018                watermark: None,
10019                end: None,
10020            }
10021        }
10022        #[doc(hidden)]
10023        pub fn default_instance() -> &'static Self {
10024            static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10025            &DEFAULT
10026        }
10027        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
10028        pub fn checkpoint(&self) -> &super::Checkpoint {
10029            self.checkpoint
10030                .as_ref()
10031                .map(|field| field as _)
10032                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10033        }
10034        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10035        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10036            self.checkpoint.as_mut().map(|field| field as _)
10037        }
10038        ///Returns a mutable reference to `checkpoint`.
10039        ///If the field is unset, it is first initialized with the default value.
10040        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10041            self.checkpoint.get_or_insert_default()
10042        }
10043        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10044        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10045            self.checkpoint.as_ref().map(|field| field as _)
10046        }
10047        ///Sets `checkpoint` with the provided value.
10048        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10049            self.checkpoint = Some(field.into().into());
10050        }
10051        ///Sets `checkpoint` with the provided value.
10052        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10053            self.set_checkpoint(field.into());
10054            self
10055        }
10056        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10057        pub fn watermark(&self) -> &super::Watermark {
10058            self.watermark
10059                .as_ref()
10060                .map(|field| field as _)
10061                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10062        }
10063        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10064        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10065            self.watermark.as_mut().map(|field| field as _)
10066        }
10067        ///Returns a mutable reference to `watermark`.
10068        ///If the field is unset, it is first initialized with the default value.
10069        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10070            self.watermark.get_or_insert_default()
10071        }
10072        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10073        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10074            self.watermark.as_ref().map(|field| field as _)
10075        }
10076        ///Sets `watermark` with the provided value.
10077        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10078            self.watermark = Some(field.into().into());
10079        }
10080        ///Sets `watermark` with the provided value.
10081        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10082            self.set_watermark(field.into());
10083            self
10084        }
10085        ///Returns the value of `end`, or the default value if `end` is unset.
10086        pub fn end(&self) -> &super::QueryEnd {
10087            self.end
10088                .as_ref()
10089                .map(|field| field as _)
10090                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10091        }
10092        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10093        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10094            self.end.as_mut().map(|field| field as _)
10095        }
10096        ///Returns a mutable reference to `end`.
10097        ///If the field is unset, it is first initialized with the default value.
10098        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10099            self.end.get_or_insert_default()
10100        }
10101        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10102        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10103            self.end.as_ref().map(|field| field as _)
10104        }
10105        ///Sets `end` with the provided value.
10106        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10107            self.end = Some(field.into().into());
10108        }
10109        ///Sets `end` with the provided value.
10110        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10111            self.set_end(field.into());
10112            self
10113        }
10114    }
10115    impl super::ListDynamicFieldsRequest {
10116        pub const fn const_default() -> Self {
10117            Self {
10118                parent: None,
10119                page_size: None,
10120                page_token: None,
10121                read_mask: None,
10122            }
10123        }
10124        #[doc(hidden)]
10125        pub fn default_instance() -> &'static Self {
10126            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10127            &DEFAULT
10128        }
10129        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10130        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10131            self.parent.as_mut().map(|field| field as _)
10132        }
10133        ///Returns a mutable reference to `parent`.
10134        ///If the field is unset, it is first initialized with the default value.
10135        pub fn parent_mut(&mut self) -> &mut String {
10136            self.parent.get_or_insert_default()
10137        }
10138        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
10139        pub fn parent_opt(&self) -> Option<&str> {
10140            self.parent.as_ref().map(|field| field as _)
10141        }
10142        ///Sets `parent` with the provided value.
10143        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10144            self.parent = Some(field.into().into());
10145        }
10146        ///Sets `parent` with the provided value.
10147        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10148            self.set_parent(field.into());
10149            self
10150        }
10151        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10152        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10153            self.page_size.as_mut().map(|field| field as _)
10154        }
10155        ///Returns a mutable reference to `page_size`.
10156        ///If the field is unset, it is first initialized with the default value.
10157        pub fn page_size_mut(&mut self) -> &mut u32 {
10158            self.page_size.get_or_insert_default()
10159        }
10160        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10161        pub fn page_size_opt(&self) -> Option<u32> {
10162            self.page_size.as_ref().map(|field| *field)
10163        }
10164        ///Sets `page_size` with the provided value.
10165        pub fn set_page_size(&mut self, field: u32) {
10166            self.page_size = Some(field);
10167        }
10168        ///Sets `page_size` with the provided value.
10169        pub fn with_page_size(mut self, field: u32) -> Self {
10170            self.set_page_size(field);
10171            self
10172        }
10173        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10174        pub fn page_token_opt(&self) -> Option<&[u8]> {
10175            self.page_token.as_ref().map(|field| field as _)
10176        }
10177        ///Sets `page_token` with the provided value.
10178        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10179            self.page_token = Some(field.into().into());
10180        }
10181        ///Sets `page_token` with the provided value.
10182        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10183            mut self,
10184            field: T,
10185        ) -> Self {
10186            self.set_page_token(field.into());
10187            self
10188        }
10189        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10190        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10191            self.read_mask.as_mut().map(|field| field as _)
10192        }
10193        ///Returns a mutable reference to `read_mask`.
10194        ///If the field is unset, it is first initialized with the default value.
10195        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10196            self.read_mask.get_or_insert_default()
10197        }
10198        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10199        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10200            self.read_mask.as_ref().map(|field| field as _)
10201        }
10202        ///Sets `read_mask` with the provided value.
10203        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10204            self.read_mask = Some(field.into().into());
10205        }
10206        ///Sets `read_mask` with the provided value.
10207        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10208            mut self,
10209            field: T,
10210        ) -> Self {
10211            self.set_read_mask(field.into());
10212            self
10213        }
10214    }
10215    impl super::ListDynamicFieldsResponse {
10216        pub const fn const_default() -> Self {
10217            Self {
10218                dynamic_fields: Vec::new(),
10219                next_page_token: None,
10220            }
10221        }
10222        #[doc(hidden)]
10223        pub fn default_instance() -> &'static Self {
10224            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10225            &DEFAULT
10226        }
10227        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
10228        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10229            &self.dynamic_fields
10230        }
10231        ///Returns a mutable reference to `dynamic_fields`.
10232        ///If the field is unset, it is first initialized with the default value.
10233        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10234            &mut self.dynamic_fields
10235        }
10236        ///Sets `dynamic_fields` with the provided value.
10237        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10238            self.dynamic_fields = field;
10239        }
10240        ///Sets `dynamic_fields` with the provided value.
10241        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10242            self.set_dynamic_fields(field);
10243            self
10244        }
10245        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10246        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10247            self.next_page_token.as_ref().map(|field| field as _)
10248        }
10249        ///Sets `next_page_token` with the provided value.
10250        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10251            self.next_page_token = Some(field.into().into());
10252        }
10253        ///Sets `next_page_token` with the provided value.
10254        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10255            mut self,
10256            field: T,
10257        ) -> Self {
10258            self.set_next_page_token(field.into());
10259            self
10260        }
10261    }
10262    impl super::ListEventsRequest {
10263        pub const fn const_default() -> Self {
10264            Self {
10265                read_mask: None,
10266                start_checkpoint: None,
10267                end_checkpoint: None,
10268                filter: None,
10269                options: None,
10270            }
10271        }
10272        #[doc(hidden)]
10273        pub fn default_instance() -> &'static Self {
10274            static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10275            &DEFAULT
10276        }
10277        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10278        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10279            self.read_mask.as_mut().map(|field| field as _)
10280        }
10281        ///Returns a mutable reference to `read_mask`.
10282        ///If the field is unset, it is first initialized with the default value.
10283        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10284            self.read_mask.get_or_insert_default()
10285        }
10286        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10287        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10288            self.read_mask.as_ref().map(|field| field as _)
10289        }
10290        ///Sets `read_mask` with the provided value.
10291        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10292            self.read_mask = Some(field.into().into());
10293        }
10294        ///Sets `read_mask` with the provided value.
10295        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10296            mut self,
10297            field: T,
10298        ) -> Self {
10299            self.set_read_mask(field.into());
10300            self
10301        }
10302        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10303        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10304            self.start_checkpoint.as_mut().map(|field| field as _)
10305        }
10306        ///Returns a mutable reference to `start_checkpoint`.
10307        ///If the field is unset, it is first initialized with the default value.
10308        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10309            self.start_checkpoint.get_or_insert_default()
10310        }
10311        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10312        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10313            self.start_checkpoint.as_ref().map(|field| *field)
10314        }
10315        ///Sets `start_checkpoint` with the provided value.
10316        pub fn set_start_checkpoint(&mut self, field: u64) {
10317            self.start_checkpoint = Some(field);
10318        }
10319        ///Sets `start_checkpoint` with the provided value.
10320        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10321            self.set_start_checkpoint(field);
10322            self
10323        }
10324        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10325        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10326            self.end_checkpoint.as_mut().map(|field| field as _)
10327        }
10328        ///Returns a mutable reference to `end_checkpoint`.
10329        ///If the field is unset, it is first initialized with the default value.
10330        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10331            self.end_checkpoint.get_or_insert_default()
10332        }
10333        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10334        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10335            self.end_checkpoint.as_ref().map(|field| *field)
10336        }
10337        ///Sets `end_checkpoint` with the provided value.
10338        pub fn set_end_checkpoint(&mut self, field: u64) {
10339            self.end_checkpoint = Some(field);
10340        }
10341        ///Sets `end_checkpoint` with the provided value.
10342        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10343            self.set_end_checkpoint(field);
10344            self
10345        }
10346        ///Returns the value of `filter`, or the default value if `filter` is unset.
10347        pub fn filter(&self) -> &super::EventFilter {
10348            self.filter
10349                .as_ref()
10350                .map(|field| field as _)
10351                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10352        }
10353        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10354        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10355            self.filter.as_mut().map(|field| field as _)
10356        }
10357        ///Returns a mutable reference to `filter`.
10358        ///If the field is unset, it is first initialized with the default value.
10359        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10360            self.filter.get_or_insert_default()
10361        }
10362        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10363        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10364            self.filter.as_ref().map(|field| field as _)
10365        }
10366        ///Sets `filter` with the provided value.
10367        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10368            self.filter = Some(field.into().into());
10369        }
10370        ///Sets `filter` with the provided value.
10371        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10372            self.set_filter(field.into());
10373            self
10374        }
10375        ///Returns the value of `options`, or the default value if `options` is unset.
10376        pub fn options(&self) -> &super::QueryOptions {
10377            self.options
10378                .as_ref()
10379                .map(|field| field as _)
10380                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10381        }
10382        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10383        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10384            self.options.as_mut().map(|field| field as _)
10385        }
10386        ///Returns a mutable reference to `options`.
10387        ///If the field is unset, it is first initialized with the default value.
10388        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10389            self.options.get_or_insert_default()
10390        }
10391        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10392        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10393            self.options.as_ref().map(|field| field as _)
10394        }
10395        ///Sets `options` with the provided value.
10396        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10397            self.options = Some(field.into().into());
10398        }
10399        ///Sets `options` with the provided value.
10400        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10401            self.set_options(field.into());
10402            self
10403        }
10404    }
10405    impl super::ListEventsResponse {
10406        pub const fn const_default() -> Self {
10407            Self {
10408                event: None,
10409                watermark: None,
10410                end: None,
10411            }
10412        }
10413        #[doc(hidden)]
10414        pub fn default_instance() -> &'static Self {
10415            static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10416            &DEFAULT
10417        }
10418        ///Returns the value of `event`, or the default value if `event` is unset.
10419        pub fn event(&self) -> &super::Event {
10420            self.event
10421                .as_ref()
10422                .map(|field| field as _)
10423                .unwrap_or_else(|| super::Event::default_instance() as _)
10424        }
10425        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10426        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10427            self.event.as_mut().map(|field| field as _)
10428        }
10429        ///Returns a mutable reference to `event`.
10430        ///If the field is unset, it is first initialized with the default value.
10431        pub fn event_mut(&mut self) -> &mut super::Event {
10432            self.event.get_or_insert_default()
10433        }
10434        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
10435        pub fn event_opt(&self) -> Option<&super::Event> {
10436            self.event.as_ref().map(|field| field as _)
10437        }
10438        ///Sets `event` with the provided value.
10439        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10440            self.event = Some(field.into().into());
10441        }
10442        ///Sets `event` with the provided value.
10443        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10444            self.set_event(field.into());
10445            self
10446        }
10447        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10448        pub fn watermark(&self) -> &super::Watermark {
10449            self.watermark
10450                .as_ref()
10451                .map(|field| field as _)
10452                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10453        }
10454        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10455        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10456            self.watermark.as_mut().map(|field| field as _)
10457        }
10458        ///Returns a mutable reference to `watermark`.
10459        ///If the field is unset, it is first initialized with the default value.
10460        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10461            self.watermark.get_or_insert_default()
10462        }
10463        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10464        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10465            self.watermark.as_ref().map(|field| field as _)
10466        }
10467        ///Sets `watermark` with the provided value.
10468        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10469            self.watermark = Some(field.into().into());
10470        }
10471        ///Sets `watermark` with the provided value.
10472        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10473            self.set_watermark(field.into());
10474            self
10475        }
10476        ///Returns the value of `end`, or the default value if `end` is unset.
10477        pub fn end(&self) -> &super::QueryEnd {
10478            self.end
10479                .as_ref()
10480                .map(|field| field as _)
10481                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10482        }
10483        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10484        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10485            self.end.as_mut().map(|field| field as _)
10486        }
10487        ///Returns a mutable reference to `end`.
10488        ///If the field is unset, it is first initialized with the default value.
10489        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10490            self.end.get_or_insert_default()
10491        }
10492        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10493        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10494            self.end.as_ref().map(|field| field as _)
10495        }
10496        ///Sets `end` with the provided value.
10497        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10498            self.end = Some(field.into().into());
10499        }
10500        ///Sets `end` with the provided value.
10501        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10502            self.set_end(field.into());
10503            self
10504        }
10505    }
10506    impl super::ListOwnedObjectsRequest {
10507        pub const fn const_default() -> Self {
10508            Self {
10509                owner: None,
10510                page_size: None,
10511                page_token: None,
10512                read_mask: None,
10513                object_type: None,
10514            }
10515        }
10516        #[doc(hidden)]
10517        pub fn default_instance() -> &'static Self {
10518            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10519            &DEFAULT
10520        }
10521        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10522        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10523            self.owner.as_mut().map(|field| field as _)
10524        }
10525        ///Returns a mutable reference to `owner`.
10526        ///If the field is unset, it is first initialized with the default value.
10527        pub fn owner_mut(&mut self) -> &mut String {
10528            self.owner.get_or_insert_default()
10529        }
10530        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10531        pub fn owner_opt(&self) -> Option<&str> {
10532            self.owner.as_ref().map(|field| field as _)
10533        }
10534        ///Sets `owner` with the provided value.
10535        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10536            self.owner = Some(field.into().into());
10537        }
10538        ///Sets `owner` with the provided value.
10539        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10540            self.set_owner(field.into());
10541            self
10542        }
10543        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10544        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10545            self.page_size.as_mut().map(|field| field as _)
10546        }
10547        ///Returns a mutable reference to `page_size`.
10548        ///If the field is unset, it is first initialized with the default value.
10549        pub fn page_size_mut(&mut self) -> &mut u32 {
10550            self.page_size.get_or_insert_default()
10551        }
10552        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10553        pub fn page_size_opt(&self) -> Option<u32> {
10554            self.page_size.as_ref().map(|field| *field)
10555        }
10556        ///Sets `page_size` with the provided value.
10557        pub fn set_page_size(&mut self, field: u32) {
10558            self.page_size = Some(field);
10559        }
10560        ///Sets `page_size` with the provided value.
10561        pub fn with_page_size(mut self, field: u32) -> Self {
10562            self.set_page_size(field);
10563            self
10564        }
10565        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10566        pub fn page_token_opt(&self) -> Option<&[u8]> {
10567            self.page_token.as_ref().map(|field| field as _)
10568        }
10569        ///Sets `page_token` with the provided value.
10570        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10571            self.page_token = Some(field.into().into());
10572        }
10573        ///Sets `page_token` with the provided value.
10574        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10575            mut self,
10576            field: T,
10577        ) -> Self {
10578            self.set_page_token(field.into());
10579            self
10580        }
10581        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10582        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10583            self.read_mask.as_mut().map(|field| field as _)
10584        }
10585        ///Returns a mutable reference to `read_mask`.
10586        ///If the field is unset, it is first initialized with the default value.
10587        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10588            self.read_mask.get_or_insert_default()
10589        }
10590        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10591        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10592            self.read_mask.as_ref().map(|field| field as _)
10593        }
10594        ///Sets `read_mask` with the provided value.
10595        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10596            self.read_mask = Some(field.into().into());
10597        }
10598        ///Sets `read_mask` with the provided value.
10599        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10600            mut self,
10601            field: T,
10602        ) -> Self {
10603            self.set_read_mask(field.into());
10604            self
10605        }
10606        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10607        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10608            self.object_type.as_mut().map(|field| field as _)
10609        }
10610        ///Returns a mutable reference to `object_type`.
10611        ///If the field is unset, it is first initialized with the default value.
10612        pub fn object_type_mut(&mut self) -> &mut String {
10613            self.object_type.get_or_insert_default()
10614        }
10615        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10616        pub fn object_type_opt(&self) -> Option<&str> {
10617            self.object_type.as_ref().map(|field| field as _)
10618        }
10619        ///Sets `object_type` with the provided value.
10620        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10621            self.object_type = Some(field.into().into());
10622        }
10623        ///Sets `object_type` with the provided value.
10624        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10625            self.set_object_type(field.into());
10626            self
10627        }
10628    }
10629    impl super::ListOwnedObjectsResponse {
10630        pub const fn const_default() -> Self {
10631            Self {
10632                objects: Vec::new(),
10633                next_page_token: None,
10634            }
10635        }
10636        #[doc(hidden)]
10637        pub fn default_instance() -> &'static Self {
10638            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10639            &DEFAULT
10640        }
10641        ///Returns the value of `objects`, or the default value if `objects` is unset.
10642        pub fn objects(&self) -> &[super::Object] {
10643            &self.objects
10644        }
10645        ///Returns a mutable reference to `objects`.
10646        ///If the field is unset, it is first initialized with the default value.
10647        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10648            &mut self.objects
10649        }
10650        ///Sets `objects` with the provided value.
10651        pub fn set_objects(&mut self, field: Vec<super::Object>) {
10652            self.objects = field;
10653        }
10654        ///Sets `objects` with the provided value.
10655        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10656            self.set_objects(field);
10657            self
10658        }
10659        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10660        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10661            self.next_page_token.as_ref().map(|field| field as _)
10662        }
10663        ///Sets `next_page_token` with the provided value.
10664        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10665            self.next_page_token = Some(field.into().into());
10666        }
10667        ///Sets `next_page_token` with the provided value.
10668        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10669            mut self,
10670            field: T,
10671        ) -> Self {
10672            self.set_next_page_token(field.into());
10673            self
10674        }
10675    }
10676    impl super::ListPackageVersionsRequest {
10677        pub const fn const_default() -> Self {
10678            Self {
10679                package_id: None,
10680                page_size: None,
10681                page_token: None,
10682            }
10683        }
10684        #[doc(hidden)]
10685        pub fn default_instance() -> &'static Self {
10686            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10687            &DEFAULT
10688        }
10689        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10690        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10691            self.package_id.as_mut().map(|field| field as _)
10692        }
10693        ///Returns a mutable reference to `package_id`.
10694        ///If the field is unset, it is first initialized with the default value.
10695        pub fn package_id_mut(&mut self) -> &mut String {
10696            self.package_id.get_or_insert_default()
10697        }
10698        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10699        pub fn package_id_opt(&self) -> Option<&str> {
10700            self.package_id.as_ref().map(|field| field as _)
10701        }
10702        ///Sets `package_id` with the provided value.
10703        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10704            self.package_id = Some(field.into().into());
10705        }
10706        ///Sets `package_id` with the provided value.
10707        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10708            self.set_package_id(field.into());
10709            self
10710        }
10711        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10712        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10713            self.page_size.as_mut().map(|field| field as _)
10714        }
10715        ///Returns a mutable reference to `page_size`.
10716        ///If the field is unset, it is first initialized with the default value.
10717        pub fn page_size_mut(&mut self) -> &mut u32 {
10718            self.page_size.get_or_insert_default()
10719        }
10720        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10721        pub fn page_size_opt(&self) -> Option<u32> {
10722            self.page_size.as_ref().map(|field| *field)
10723        }
10724        ///Sets `page_size` with the provided value.
10725        pub fn set_page_size(&mut self, field: u32) {
10726            self.page_size = Some(field);
10727        }
10728        ///Sets `page_size` with the provided value.
10729        pub fn with_page_size(mut self, field: u32) -> Self {
10730            self.set_page_size(field);
10731            self
10732        }
10733        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10734        pub fn page_token_opt(&self) -> Option<&[u8]> {
10735            self.page_token.as_ref().map(|field| field as _)
10736        }
10737        ///Sets `page_token` with the provided value.
10738        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10739            self.page_token = Some(field.into().into());
10740        }
10741        ///Sets `page_token` with the provided value.
10742        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10743            mut self,
10744            field: T,
10745        ) -> Self {
10746            self.set_page_token(field.into());
10747            self
10748        }
10749    }
10750    impl super::ListPackageVersionsResponse {
10751        pub const fn const_default() -> Self {
10752            Self {
10753                versions: Vec::new(),
10754                next_page_token: None,
10755            }
10756        }
10757        #[doc(hidden)]
10758        pub fn default_instance() -> &'static Self {
10759            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10760            &DEFAULT
10761        }
10762        ///Returns the value of `versions`, or the default value if `versions` is unset.
10763        pub fn versions(&self) -> &[super::PackageVersion] {
10764            &self.versions
10765        }
10766        ///Returns a mutable reference to `versions`.
10767        ///If the field is unset, it is first initialized with the default value.
10768        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10769            &mut self.versions
10770        }
10771        ///Sets `versions` with the provided value.
10772        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10773            self.versions = field;
10774        }
10775        ///Sets `versions` with the provided value.
10776        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10777            self.set_versions(field);
10778            self
10779        }
10780        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10781        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10782            self.next_page_token.as_ref().map(|field| field as _)
10783        }
10784        ///Sets `next_page_token` with the provided value.
10785        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10786            self.next_page_token = Some(field.into().into());
10787        }
10788        ///Sets `next_page_token` with the provided value.
10789        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10790            mut self,
10791            field: T,
10792        ) -> Self {
10793            self.set_next_page_token(field.into());
10794            self
10795        }
10796    }
10797    impl super::ListTransactionsRequest {
10798        pub const fn const_default() -> Self {
10799            Self {
10800                read_mask: None,
10801                start_checkpoint: None,
10802                end_checkpoint: None,
10803                filter: None,
10804                options: None,
10805            }
10806        }
10807        #[doc(hidden)]
10808        pub fn default_instance() -> &'static Self {
10809            static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10810            &DEFAULT
10811        }
10812        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10813        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10814            self.read_mask.as_mut().map(|field| field as _)
10815        }
10816        ///Returns a mutable reference to `read_mask`.
10817        ///If the field is unset, it is first initialized with the default value.
10818        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10819            self.read_mask.get_or_insert_default()
10820        }
10821        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10822        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10823            self.read_mask.as_ref().map(|field| field as _)
10824        }
10825        ///Sets `read_mask` with the provided value.
10826        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10827            self.read_mask = Some(field.into().into());
10828        }
10829        ///Sets `read_mask` with the provided value.
10830        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10831            mut self,
10832            field: T,
10833        ) -> Self {
10834            self.set_read_mask(field.into());
10835            self
10836        }
10837        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10838        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10839            self.start_checkpoint.as_mut().map(|field| field as _)
10840        }
10841        ///Returns a mutable reference to `start_checkpoint`.
10842        ///If the field is unset, it is first initialized with the default value.
10843        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10844            self.start_checkpoint.get_or_insert_default()
10845        }
10846        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10847        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10848            self.start_checkpoint.as_ref().map(|field| *field)
10849        }
10850        ///Sets `start_checkpoint` with the provided value.
10851        pub fn set_start_checkpoint(&mut self, field: u64) {
10852            self.start_checkpoint = Some(field);
10853        }
10854        ///Sets `start_checkpoint` with the provided value.
10855        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10856            self.set_start_checkpoint(field);
10857            self
10858        }
10859        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10860        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10861            self.end_checkpoint.as_mut().map(|field| field as _)
10862        }
10863        ///Returns a mutable reference to `end_checkpoint`.
10864        ///If the field is unset, it is first initialized with the default value.
10865        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10866            self.end_checkpoint.get_or_insert_default()
10867        }
10868        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10869        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10870            self.end_checkpoint.as_ref().map(|field| *field)
10871        }
10872        ///Sets `end_checkpoint` with the provided value.
10873        pub fn set_end_checkpoint(&mut self, field: u64) {
10874            self.end_checkpoint = Some(field);
10875        }
10876        ///Sets `end_checkpoint` with the provided value.
10877        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10878            self.set_end_checkpoint(field);
10879            self
10880        }
10881        ///Returns the value of `filter`, or the default value if `filter` is unset.
10882        pub fn filter(&self) -> &super::TransactionFilter {
10883            self.filter
10884                .as_ref()
10885                .map(|field| field as _)
10886                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10887        }
10888        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10889        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10890            self.filter.as_mut().map(|field| field as _)
10891        }
10892        ///Returns a mutable reference to `filter`.
10893        ///If the field is unset, it is first initialized with the default value.
10894        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10895            self.filter.get_or_insert_default()
10896        }
10897        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10898        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10899            self.filter.as_ref().map(|field| field as _)
10900        }
10901        ///Sets `filter` with the provided value.
10902        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10903            self.filter = Some(field.into().into());
10904        }
10905        ///Sets `filter` with the provided value.
10906        pub fn with_filter<T: Into<super::TransactionFilter>>(
10907            mut self,
10908            field: T,
10909        ) -> Self {
10910            self.set_filter(field.into());
10911            self
10912        }
10913        ///Returns the value of `options`, or the default value if `options` is unset.
10914        pub fn options(&self) -> &super::QueryOptions {
10915            self.options
10916                .as_ref()
10917                .map(|field| field as _)
10918                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10919        }
10920        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10921        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10922            self.options.as_mut().map(|field| field as _)
10923        }
10924        ///Returns a mutable reference to `options`.
10925        ///If the field is unset, it is first initialized with the default value.
10926        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10927            self.options.get_or_insert_default()
10928        }
10929        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10930        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10931            self.options.as_ref().map(|field| field as _)
10932        }
10933        ///Sets `options` with the provided value.
10934        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10935            self.options = Some(field.into().into());
10936        }
10937        ///Sets `options` with the provided value.
10938        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10939            self.set_options(field.into());
10940            self
10941        }
10942    }
10943    impl super::ListTransactionsResponse {
10944        pub const fn const_default() -> Self {
10945            Self {
10946                transaction: None,
10947                watermark: None,
10948                end: None,
10949            }
10950        }
10951        #[doc(hidden)]
10952        pub fn default_instance() -> &'static Self {
10953            static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
10954            &DEFAULT
10955        }
10956        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
10957        pub fn transaction(&self) -> &super::ExecutedTransaction {
10958            self.transaction
10959                .as_ref()
10960                .map(|field| field as _)
10961                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
10962        }
10963        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10964        pub fn transaction_opt_mut(
10965            &mut self,
10966        ) -> Option<&mut super::ExecutedTransaction> {
10967            self.transaction.as_mut().map(|field| field as _)
10968        }
10969        ///Returns a mutable reference to `transaction`.
10970        ///If the field is unset, it is first initialized with the default value.
10971        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
10972            self.transaction.get_or_insert_default()
10973        }
10974        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10975        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
10976            self.transaction.as_ref().map(|field| field as _)
10977        }
10978        ///Sets `transaction` with the provided value.
10979        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
10980            &mut self,
10981            field: T,
10982        ) {
10983            self.transaction = Some(field.into().into());
10984        }
10985        ///Sets `transaction` with the provided value.
10986        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
10987            mut self,
10988            field: T,
10989        ) -> Self {
10990            self.set_transaction(field.into());
10991            self
10992        }
10993        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10994        pub fn watermark(&self) -> &super::Watermark {
10995            self.watermark
10996                .as_ref()
10997                .map(|field| field as _)
10998                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10999        }
11000        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11001        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11002            self.watermark.as_mut().map(|field| field as _)
11003        }
11004        ///Returns a mutable reference to `watermark`.
11005        ///If the field is unset, it is first initialized with the default value.
11006        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11007            self.watermark.get_or_insert_default()
11008        }
11009        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
11010        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11011            self.watermark.as_ref().map(|field| field as _)
11012        }
11013        ///Sets `watermark` with the provided value.
11014        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11015            self.watermark = Some(field.into().into());
11016        }
11017        ///Sets `watermark` with the provided value.
11018        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11019            self.set_watermark(field.into());
11020            self
11021        }
11022        ///Returns the value of `end`, or the default value if `end` is unset.
11023        pub fn end(&self) -> &super::QueryEnd {
11024            self.end
11025                .as_ref()
11026                .map(|field| field as _)
11027                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11028        }
11029        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11030        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11031            self.end.as_mut().map(|field| field as _)
11032        }
11033        ///Returns a mutable reference to `end`.
11034        ///If the field is unset, it is first initialized with the default value.
11035        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11036            self.end.get_or_insert_default()
11037        }
11038        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
11039        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11040            self.end.as_ref().map(|field| field as _)
11041        }
11042        ///Sets `end` with the provided value.
11043        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11044            self.end = Some(field.into().into());
11045        }
11046        ///Sets `end` with the provided value.
11047        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11048            self.set_end(field.into());
11049            self
11050        }
11051    }
11052    impl super::LookupNameRequest {
11053        pub const fn const_default() -> Self {
11054            Self { name: None }
11055        }
11056        #[doc(hidden)]
11057        pub fn default_instance() -> &'static Self {
11058            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11059            &DEFAULT
11060        }
11061        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11062        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11063            self.name.as_mut().map(|field| field as _)
11064        }
11065        ///Returns a mutable reference to `name`.
11066        ///If the field is unset, it is first initialized with the default value.
11067        pub fn name_mut(&mut self) -> &mut String {
11068            self.name.get_or_insert_default()
11069        }
11070        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11071        pub fn name_opt(&self) -> Option<&str> {
11072            self.name.as_ref().map(|field| field as _)
11073        }
11074        ///Sets `name` with the provided value.
11075        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11076            self.name = Some(field.into().into());
11077        }
11078        ///Sets `name` with the provided value.
11079        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11080            self.set_name(field.into());
11081            self
11082        }
11083    }
11084    impl super::LookupNameResponse {
11085        pub const fn const_default() -> Self {
11086            Self { record: None }
11087        }
11088        #[doc(hidden)]
11089        pub fn default_instance() -> &'static Self {
11090            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11091            &DEFAULT
11092        }
11093        ///Returns the value of `record`, or the default value if `record` is unset.
11094        pub fn record(&self) -> &super::NameRecord {
11095            self.record
11096                .as_ref()
11097                .map(|field| field as _)
11098                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11099        }
11100        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11101        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11102            self.record.as_mut().map(|field| field as _)
11103        }
11104        ///Returns a mutable reference to `record`.
11105        ///If the field is unset, it is first initialized with the default value.
11106        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11107            self.record.get_or_insert_default()
11108        }
11109        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11110        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11111            self.record.as_ref().map(|field| field as _)
11112        }
11113        ///Sets `record` with the provided value.
11114        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11115            self.record = Some(field.into().into());
11116        }
11117        ///Sets `record` with the provided value.
11118        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11119            self.set_record(field.into());
11120            self
11121        }
11122    }
11123    impl super::MakeMoveVector {
11124        pub const fn const_default() -> Self {
11125            Self {
11126                element_type: None,
11127                elements: Vec::new(),
11128            }
11129        }
11130        #[doc(hidden)]
11131        pub fn default_instance() -> &'static Self {
11132            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11133            &DEFAULT
11134        }
11135        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11136        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11137            self.element_type.as_mut().map(|field| field as _)
11138        }
11139        ///Returns a mutable reference to `element_type`.
11140        ///If the field is unset, it is first initialized with the default value.
11141        pub fn element_type_mut(&mut self) -> &mut String {
11142            self.element_type.get_or_insert_default()
11143        }
11144        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
11145        pub fn element_type_opt(&self) -> Option<&str> {
11146            self.element_type.as_ref().map(|field| field as _)
11147        }
11148        ///Sets `element_type` with the provided value.
11149        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11150            self.element_type = Some(field.into().into());
11151        }
11152        ///Sets `element_type` with the provided value.
11153        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11154            self.set_element_type(field.into());
11155            self
11156        }
11157        ///Returns the value of `elements`, or the default value if `elements` is unset.
11158        pub fn elements(&self) -> &[super::Argument] {
11159            &self.elements
11160        }
11161        ///Returns a mutable reference to `elements`.
11162        ///If the field is unset, it is first initialized with the default value.
11163        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11164            &mut self.elements
11165        }
11166        ///Sets `elements` with the provided value.
11167        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11168            self.elements = field;
11169        }
11170        ///Sets `elements` with the provided value.
11171        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11172            self.set_elements(field);
11173            self
11174        }
11175    }
11176    impl super::MergeCoins {
11177        pub const fn const_default() -> Self {
11178            Self {
11179                coin: None,
11180                coins_to_merge: Vec::new(),
11181            }
11182        }
11183        #[doc(hidden)]
11184        pub fn default_instance() -> &'static Self {
11185            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11186            &DEFAULT
11187        }
11188        ///Returns the value of `coin`, or the default value if `coin` is unset.
11189        pub fn coin(&self) -> &super::Argument {
11190            self.coin
11191                .as_ref()
11192                .map(|field| field as _)
11193                .unwrap_or_else(|| super::Argument::default_instance() as _)
11194        }
11195        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11196        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11197            self.coin.as_mut().map(|field| field as _)
11198        }
11199        ///Returns a mutable reference to `coin`.
11200        ///If the field is unset, it is first initialized with the default value.
11201        pub fn coin_mut(&mut self) -> &mut super::Argument {
11202            self.coin.get_or_insert_default()
11203        }
11204        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
11205        pub fn coin_opt(&self) -> Option<&super::Argument> {
11206            self.coin.as_ref().map(|field| field as _)
11207        }
11208        ///Sets `coin` with the provided value.
11209        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11210            self.coin = Some(field.into().into());
11211        }
11212        ///Sets `coin` with the provided value.
11213        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11214            self.set_coin(field.into());
11215            self
11216        }
11217        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
11218        pub fn coins_to_merge(&self) -> &[super::Argument] {
11219            &self.coins_to_merge
11220        }
11221        ///Returns a mutable reference to `coins_to_merge`.
11222        ///If the field is unset, it is first initialized with the default value.
11223        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11224            &mut self.coins_to_merge
11225        }
11226        ///Sets `coins_to_merge` with the provided value.
11227        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11228            self.coins_to_merge = field;
11229        }
11230        ///Sets `coins_to_merge` with the provided value.
11231        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11232            self.set_coins_to_merge(field);
11233            self
11234        }
11235    }
11236    impl super::Module {
11237        pub const fn const_default() -> Self {
11238            Self {
11239                name: None,
11240                contents: None,
11241                datatypes: Vec::new(),
11242                functions: Vec::new(),
11243            }
11244        }
11245        #[doc(hidden)]
11246        pub fn default_instance() -> &'static Self {
11247            static DEFAULT: super::Module = super::Module::const_default();
11248            &DEFAULT
11249        }
11250        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11251        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11252            self.name.as_mut().map(|field| field as _)
11253        }
11254        ///Returns a mutable reference to `name`.
11255        ///If the field is unset, it is first initialized with the default value.
11256        pub fn name_mut(&mut self) -> &mut String {
11257            self.name.get_or_insert_default()
11258        }
11259        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11260        pub fn name_opt(&self) -> Option<&str> {
11261            self.name.as_ref().map(|field| field as _)
11262        }
11263        ///Sets `name` with the provided value.
11264        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11265            self.name = Some(field.into().into());
11266        }
11267        ///Sets `name` with the provided value.
11268        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11269            self.set_name(field.into());
11270            self
11271        }
11272        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
11273        pub fn contents_opt(&self) -> Option<&[u8]> {
11274            self.contents.as_ref().map(|field| field as _)
11275        }
11276        ///Sets `contents` with the provided value.
11277        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11278            self.contents = Some(field.into().into());
11279        }
11280        ///Sets `contents` with the provided value.
11281        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11282            mut self,
11283            field: T,
11284        ) -> Self {
11285            self.set_contents(field.into());
11286            self
11287        }
11288        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
11289        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11290            &self.datatypes
11291        }
11292        ///Returns a mutable reference to `datatypes`.
11293        ///If the field is unset, it is first initialized with the default value.
11294        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11295            &mut self.datatypes
11296        }
11297        ///Sets `datatypes` with the provided value.
11298        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11299            self.datatypes = field;
11300        }
11301        ///Sets `datatypes` with the provided value.
11302        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11303            self.set_datatypes(field);
11304            self
11305        }
11306        ///Returns the value of `functions`, or the default value if `functions` is unset.
11307        pub fn functions(&self) -> &[super::FunctionDescriptor] {
11308            &self.functions
11309        }
11310        ///Returns a mutable reference to `functions`.
11311        ///If the field is unset, it is first initialized with the default value.
11312        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11313            &mut self.functions
11314        }
11315        ///Sets `functions` with the provided value.
11316        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11317            self.functions = field;
11318        }
11319        ///Sets `functions` with the provided value.
11320        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11321            self.set_functions(field);
11322            self
11323        }
11324    }
11325    impl super::MoveAbort {
11326        pub const fn const_default() -> Self {
11327            Self {
11328                abort_code: None,
11329                location: None,
11330                clever_error: None,
11331            }
11332        }
11333        #[doc(hidden)]
11334        pub fn default_instance() -> &'static Self {
11335            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11336            &DEFAULT
11337        }
11338        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11339        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11340            self.abort_code.as_mut().map(|field| field as _)
11341        }
11342        ///Returns a mutable reference to `abort_code`.
11343        ///If the field is unset, it is first initialized with the default value.
11344        pub fn abort_code_mut(&mut self) -> &mut u64 {
11345            self.abort_code.get_or_insert_default()
11346        }
11347        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
11348        pub fn abort_code_opt(&self) -> Option<u64> {
11349            self.abort_code.as_ref().map(|field| *field)
11350        }
11351        ///Sets `abort_code` with the provided value.
11352        pub fn set_abort_code(&mut self, field: u64) {
11353            self.abort_code = Some(field);
11354        }
11355        ///Sets `abort_code` with the provided value.
11356        pub fn with_abort_code(mut self, field: u64) -> Self {
11357            self.set_abort_code(field);
11358            self
11359        }
11360        ///Returns the value of `location`, or the default value if `location` is unset.
11361        pub fn location(&self) -> &super::MoveLocation {
11362            self.location
11363                .as_ref()
11364                .map(|field| field as _)
11365                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11366        }
11367        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11368        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11369            self.location.as_mut().map(|field| field as _)
11370        }
11371        ///Returns a mutable reference to `location`.
11372        ///If the field is unset, it is first initialized with the default value.
11373        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11374            self.location.get_or_insert_default()
11375        }
11376        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
11377        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11378            self.location.as_ref().map(|field| field as _)
11379        }
11380        ///Sets `location` with the provided value.
11381        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11382            self.location = Some(field.into().into());
11383        }
11384        ///Sets `location` with the provided value.
11385        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11386            self.set_location(field.into());
11387            self
11388        }
11389        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
11390        pub fn clever_error(&self) -> &super::CleverError {
11391            self.clever_error
11392                .as_ref()
11393                .map(|field| field as _)
11394                .unwrap_or_else(|| super::CleverError::default_instance() as _)
11395        }
11396        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11397        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11398            self.clever_error.as_mut().map(|field| field as _)
11399        }
11400        ///Returns a mutable reference to `clever_error`.
11401        ///If the field is unset, it is first initialized with the default value.
11402        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11403            self.clever_error.get_or_insert_default()
11404        }
11405        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
11406        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11407            self.clever_error.as_ref().map(|field| field as _)
11408        }
11409        ///Sets `clever_error` with the provided value.
11410        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11411            self.clever_error = Some(field.into().into());
11412        }
11413        ///Sets `clever_error` with the provided value.
11414        pub fn with_clever_error<T: Into<super::CleverError>>(
11415            mut self,
11416            field: T,
11417        ) -> Self {
11418            self.set_clever_error(field.into());
11419            self
11420        }
11421    }
11422    impl super::MoveCall {
11423        pub const fn const_default() -> Self {
11424            Self {
11425                package: None,
11426                module: None,
11427                function: None,
11428                type_arguments: Vec::new(),
11429                arguments: Vec::new(),
11430            }
11431        }
11432        #[doc(hidden)]
11433        pub fn default_instance() -> &'static Self {
11434            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11435            &DEFAULT
11436        }
11437        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11438        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11439            self.package.as_mut().map(|field| field as _)
11440        }
11441        ///Returns a mutable reference to `package`.
11442        ///If the field is unset, it is first initialized with the default value.
11443        pub fn package_mut(&mut self) -> &mut String {
11444            self.package.get_or_insert_default()
11445        }
11446        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11447        pub fn package_opt(&self) -> Option<&str> {
11448            self.package.as_ref().map(|field| field as _)
11449        }
11450        ///Sets `package` with the provided value.
11451        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11452            self.package = Some(field.into().into());
11453        }
11454        ///Sets `package` with the provided value.
11455        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11456            self.set_package(field.into());
11457            self
11458        }
11459        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11460        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11461            self.module.as_mut().map(|field| field as _)
11462        }
11463        ///Returns a mutable reference to `module`.
11464        ///If the field is unset, it is first initialized with the default value.
11465        pub fn module_mut(&mut self) -> &mut String {
11466            self.module.get_or_insert_default()
11467        }
11468        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11469        pub fn module_opt(&self) -> Option<&str> {
11470            self.module.as_ref().map(|field| field as _)
11471        }
11472        ///Sets `module` with the provided value.
11473        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11474            self.module = Some(field.into().into());
11475        }
11476        ///Sets `module` with the provided value.
11477        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11478            self.set_module(field.into());
11479            self
11480        }
11481        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11482        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11483            self.function.as_mut().map(|field| field as _)
11484        }
11485        ///Returns a mutable reference to `function`.
11486        ///If the field is unset, it is first initialized with the default value.
11487        pub fn function_mut(&mut self) -> &mut String {
11488            self.function.get_or_insert_default()
11489        }
11490        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11491        pub fn function_opt(&self) -> Option<&str> {
11492            self.function.as_ref().map(|field| field as _)
11493        }
11494        ///Sets `function` with the provided value.
11495        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11496            self.function = Some(field.into().into());
11497        }
11498        ///Sets `function` with the provided value.
11499        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11500            self.set_function(field.into());
11501            self
11502        }
11503        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
11504        pub fn type_arguments(&self) -> &[String] {
11505            &self.type_arguments
11506        }
11507        ///Returns a mutable reference to `type_arguments`.
11508        ///If the field is unset, it is first initialized with the default value.
11509        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11510            &mut self.type_arguments
11511        }
11512        ///Sets `type_arguments` with the provided value.
11513        pub fn set_type_arguments(&mut self, field: Vec<String>) {
11514            self.type_arguments = field;
11515        }
11516        ///Sets `type_arguments` with the provided value.
11517        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11518            self.set_type_arguments(field);
11519            self
11520        }
11521        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
11522        pub fn arguments(&self) -> &[super::Argument] {
11523            &self.arguments
11524        }
11525        ///Returns a mutable reference to `arguments`.
11526        ///If the field is unset, it is first initialized with the default value.
11527        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11528            &mut self.arguments
11529        }
11530        ///Sets `arguments` with the provided value.
11531        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11532            self.arguments = field;
11533        }
11534        ///Sets `arguments` with the provided value.
11535        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11536            self.set_arguments(field);
11537            self
11538        }
11539    }
11540    impl super::MoveCallFilter {
11541        pub const fn const_default() -> Self {
11542            Self { function: None }
11543        }
11544        #[doc(hidden)]
11545        pub fn default_instance() -> &'static Self {
11546            static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11547            &DEFAULT
11548        }
11549        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11550        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11551            self.function.as_mut().map(|field| field as _)
11552        }
11553        ///Returns a mutable reference to `function`.
11554        ///If the field is unset, it is first initialized with the default value.
11555        pub fn function_mut(&mut self) -> &mut String {
11556            self.function.get_or_insert_default()
11557        }
11558        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11559        pub fn function_opt(&self) -> Option<&str> {
11560            self.function.as_ref().map(|field| field as _)
11561        }
11562        ///Sets `function` with the provided value.
11563        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11564            self.function = Some(field.into().into());
11565        }
11566        ///Sets `function` with the provided value.
11567        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11568            self.set_function(field.into());
11569            self
11570        }
11571    }
11572    impl super::MoveLocation {
11573        pub const fn const_default() -> Self {
11574            Self {
11575                package: None,
11576                module: None,
11577                function: None,
11578                instruction: None,
11579                function_name: None,
11580            }
11581        }
11582        #[doc(hidden)]
11583        pub fn default_instance() -> &'static Self {
11584            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11585            &DEFAULT
11586        }
11587        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11588        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11589            self.package.as_mut().map(|field| field as _)
11590        }
11591        ///Returns a mutable reference to `package`.
11592        ///If the field is unset, it is first initialized with the default value.
11593        pub fn package_mut(&mut self) -> &mut String {
11594            self.package.get_or_insert_default()
11595        }
11596        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11597        pub fn package_opt(&self) -> Option<&str> {
11598            self.package.as_ref().map(|field| field as _)
11599        }
11600        ///Sets `package` with the provided value.
11601        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11602            self.package = Some(field.into().into());
11603        }
11604        ///Sets `package` with the provided value.
11605        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11606            self.set_package(field.into());
11607            self
11608        }
11609        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11610        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11611            self.module.as_mut().map(|field| field as _)
11612        }
11613        ///Returns a mutable reference to `module`.
11614        ///If the field is unset, it is first initialized with the default value.
11615        pub fn module_mut(&mut self) -> &mut String {
11616            self.module.get_or_insert_default()
11617        }
11618        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11619        pub fn module_opt(&self) -> Option<&str> {
11620            self.module.as_ref().map(|field| field as _)
11621        }
11622        ///Sets `module` with the provided value.
11623        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11624            self.module = Some(field.into().into());
11625        }
11626        ///Sets `module` with the provided value.
11627        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11628            self.set_module(field.into());
11629            self
11630        }
11631        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11632        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11633            self.function.as_mut().map(|field| field as _)
11634        }
11635        ///Returns a mutable reference to `function`.
11636        ///If the field is unset, it is first initialized with the default value.
11637        pub fn function_mut(&mut self) -> &mut u32 {
11638            self.function.get_or_insert_default()
11639        }
11640        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11641        pub fn function_opt(&self) -> Option<u32> {
11642            self.function.as_ref().map(|field| *field)
11643        }
11644        ///Sets `function` with the provided value.
11645        pub fn set_function(&mut self, field: u32) {
11646            self.function = Some(field);
11647        }
11648        ///Sets `function` with the provided value.
11649        pub fn with_function(mut self, field: u32) -> Self {
11650            self.set_function(field);
11651            self
11652        }
11653        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11654        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11655            self.instruction.as_mut().map(|field| field as _)
11656        }
11657        ///Returns a mutable reference to `instruction`.
11658        ///If the field is unset, it is first initialized with the default value.
11659        pub fn instruction_mut(&mut self) -> &mut u32 {
11660            self.instruction.get_or_insert_default()
11661        }
11662        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11663        pub fn instruction_opt(&self) -> Option<u32> {
11664            self.instruction.as_ref().map(|field| *field)
11665        }
11666        ///Sets `instruction` with the provided value.
11667        pub fn set_instruction(&mut self, field: u32) {
11668            self.instruction = Some(field);
11669        }
11670        ///Sets `instruction` with the provided value.
11671        pub fn with_instruction(mut self, field: u32) -> Self {
11672            self.set_instruction(field);
11673            self
11674        }
11675        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11676        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11677            self.function_name.as_mut().map(|field| field as _)
11678        }
11679        ///Returns a mutable reference to `function_name`.
11680        ///If the field is unset, it is first initialized with the default value.
11681        pub fn function_name_mut(&mut self) -> &mut String {
11682            self.function_name.get_or_insert_default()
11683        }
11684        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11685        pub fn function_name_opt(&self) -> Option<&str> {
11686            self.function_name.as_ref().map(|field| field as _)
11687        }
11688        ///Sets `function_name` with the provided value.
11689        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11690            self.function_name = Some(field.into().into());
11691        }
11692        ///Sets `function_name` with the provided value.
11693        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11694            self.set_function_name(field.into());
11695            self
11696        }
11697    }
11698    impl super::MoveTable {
11699        pub const fn const_default() -> Self {
11700            Self { id: None, size: None }
11701        }
11702        #[doc(hidden)]
11703        pub fn default_instance() -> &'static Self {
11704            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11705            &DEFAULT
11706        }
11707        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11708        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11709            self.id.as_mut().map(|field| field as _)
11710        }
11711        ///Returns a mutable reference to `id`.
11712        ///If the field is unset, it is first initialized with the default value.
11713        pub fn id_mut(&mut self) -> &mut String {
11714            self.id.get_or_insert_default()
11715        }
11716        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11717        pub fn id_opt(&self) -> Option<&str> {
11718            self.id.as_ref().map(|field| field as _)
11719        }
11720        ///Sets `id` with the provided value.
11721        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11722            self.id = Some(field.into().into());
11723        }
11724        ///Sets `id` with the provided value.
11725        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11726            self.set_id(field.into());
11727            self
11728        }
11729        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11730        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11731            self.size.as_mut().map(|field| field as _)
11732        }
11733        ///Returns a mutable reference to `size`.
11734        ///If the field is unset, it is first initialized with the default value.
11735        pub fn size_mut(&mut self) -> &mut u64 {
11736            self.size.get_or_insert_default()
11737        }
11738        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
11739        pub fn size_opt(&self) -> Option<u64> {
11740            self.size.as_ref().map(|field| *field)
11741        }
11742        ///Sets `size` with the provided value.
11743        pub fn set_size(&mut self, field: u64) {
11744            self.size = Some(field);
11745        }
11746        ///Sets `size` with the provided value.
11747        pub fn with_size(mut self, field: u64) -> Self {
11748            self.set_size(field);
11749            self
11750        }
11751    }
11752    impl super::MultisigAggregatedSignature {
11753        pub const fn const_default() -> Self {
11754            Self {
11755                signatures: Vec::new(),
11756                bitmap: None,
11757                legacy_bitmap: None,
11758                committee: None,
11759            }
11760        }
11761        #[doc(hidden)]
11762        pub fn default_instance() -> &'static Self {
11763            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11764            &DEFAULT
11765        }
11766        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
11767        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11768            &self.signatures
11769        }
11770        ///Returns a mutable reference to `signatures`.
11771        ///If the field is unset, it is first initialized with the default value.
11772        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11773            &mut self.signatures
11774        }
11775        ///Sets `signatures` with the provided value.
11776        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11777            self.signatures = field;
11778        }
11779        ///Sets `signatures` with the provided value.
11780        pub fn with_signatures(
11781            mut self,
11782            field: Vec<super::MultisigMemberSignature>,
11783        ) -> Self {
11784            self.set_signatures(field);
11785            self
11786        }
11787        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11788        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11789            self.bitmap.as_mut().map(|field| field as _)
11790        }
11791        ///Returns a mutable reference to `bitmap`.
11792        ///If the field is unset, it is first initialized with the default value.
11793        pub fn bitmap_mut(&mut self) -> &mut u32 {
11794            self.bitmap.get_or_insert_default()
11795        }
11796        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11797        pub fn bitmap_opt(&self) -> Option<u32> {
11798            self.bitmap.as_ref().map(|field| *field)
11799        }
11800        ///Sets `bitmap` with the provided value.
11801        pub fn set_bitmap(&mut self, field: u32) {
11802            self.bitmap = Some(field);
11803        }
11804        ///Sets `bitmap` with the provided value.
11805        pub fn with_bitmap(mut self, field: u32) -> Self {
11806            self.set_bitmap(field);
11807            self
11808        }
11809        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11810        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11811            self.legacy_bitmap.as_ref().map(|field| field as _)
11812        }
11813        ///Sets `legacy_bitmap` with the provided value.
11814        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11815            self.legacy_bitmap = Some(field.into().into());
11816        }
11817        ///Sets `legacy_bitmap` with the provided value.
11818        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11819            mut self,
11820            field: T,
11821        ) -> Self {
11822            self.set_legacy_bitmap(field.into());
11823            self
11824        }
11825        ///Returns the value of `committee`, or the default value if `committee` is unset.
11826        pub fn committee(&self) -> &super::MultisigCommittee {
11827            self.committee
11828                .as_ref()
11829                .map(|field| field as _)
11830                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11831        }
11832        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11833        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11834            self.committee.as_mut().map(|field| field as _)
11835        }
11836        ///Returns a mutable reference to `committee`.
11837        ///If the field is unset, it is first initialized with the default value.
11838        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
11839            self.committee.get_or_insert_default()
11840        }
11841        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
11842        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
11843            self.committee.as_ref().map(|field| field as _)
11844        }
11845        ///Sets `committee` with the provided value.
11846        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
11847            self.committee = Some(field.into().into());
11848        }
11849        ///Sets `committee` with the provided value.
11850        pub fn with_committee<T: Into<super::MultisigCommittee>>(
11851            mut self,
11852            field: T,
11853        ) -> Self {
11854            self.set_committee(field.into());
11855            self
11856        }
11857    }
11858    impl super::MultisigCommittee {
11859        pub const fn const_default() -> Self {
11860            Self {
11861                members: Vec::new(),
11862                threshold: None,
11863            }
11864        }
11865        #[doc(hidden)]
11866        pub fn default_instance() -> &'static Self {
11867            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
11868            &DEFAULT
11869        }
11870        ///Returns the value of `members`, or the default value if `members` is unset.
11871        pub fn members(&self) -> &[super::MultisigMember] {
11872            &self.members
11873        }
11874        ///Returns a mutable reference to `members`.
11875        ///If the field is unset, it is first initialized with the default value.
11876        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
11877            &mut self.members
11878        }
11879        ///Sets `members` with the provided value.
11880        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
11881            self.members = field;
11882        }
11883        ///Sets `members` with the provided value.
11884        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
11885            self.set_members(field);
11886            self
11887        }
11888        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11889        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
11890            self.threshold.as_mut().map(|field| field as _)
11891        }
11892        ///Returns a mutable reference to `threshold`.
11893        ///If the field is unset, it is first initialized with the default value.
11894        pub fn threshold_mut(&mut self) -> &mut u32 {
11895            self.threshold.get_or_insert_default()
11896        }
11897        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
11898        pub fn threshold_opt(&self) -> Option<u32> {
11899            self.threshold.as_ref().map(|field| *field)
11900        }
11901        ///Sets `threshold` with the provided value.
11902        pub fn set_threshold(&mut self, field: u32) {
11903            self.threshold = Some(field);
11904        }
11905        ///Sets `threshold` with the provided value.
11906        pub fn with_threshold(mut self, field: u32) -> Self {
11907            self.set_threshold(field);
11908            self
11909        }
11910    }
11911    impl super::MultisigMember {
11912        pub const fn const_default() -> Self {
11913            Self {
11914                public_key: None,
11915                weight: None,
11916            }
11917        }
11918        #[doc(hidden)]
11919        pub fn default_instance() -> &'static Self {
11920            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
11921            &DEFAULT
11922        }
11923        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
11924        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
11925            self.public_key
11926                .as_ref()
11927                .map(|field| field as _)
11928                .unwrap_or_else(|| {
11929                    super::MultisigMemberPublicKey::default_instance() as _
11930                })
11931        }
11932        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11933        pub fn public_key_opt_mut(
11934            &mut self,
11935        ) -> Option<&mut super::MultisigMemberPublicKey> {
11936            self.public_key.as_mut().map(|field| field as _)
11937        }
11938        ///Returns a mutable reference to `public_key`.
11939        ///If the field is unset, it is first initialized with the default value.
11940        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
11941            self.public_key.get_or_insert_default()
11942        }
11943        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11944        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
11945            self.public_key.as_ref().map(|field| field as _)
11946        }
11947        ///Sets `public_key` with the provided value.
11948        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
11949            &mut self,
11950            field: T,
11951        ) {
11952            self.public_key = Some(field.into().into());
11953        }
11954        ///Sets `public_key` with the provided value.
11955        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
11956            mut self,
11957            field: T,
11958        ) -> Self {
11959            self.set_public_key(field.into());
11960            self
11961        }
11962        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11963        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
11964            self.weight.as_mut().map(|field| field as _)
11965        }
11966        ///Returns a mutable reference to `weight`.
11967        ///If the field is unset, it is first initialized with the default value.
11968        pub fn weight_mut(&mut self) -> &mut u32 {
11969            self.weight.get_or_insert_default()
11970        }
11971        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
11972        pub fn weight_opt(&self) -> Option<u32> {
11973            self.weight.as_ref().map(|field| *field)
11974        }
11975        ///Sets `weight` with the provided value.
11976        pub fn set_weight(&mut self, field: u32) {
11977            self.weight = Some(field);
11978        }
11979        ///Sets `weight` with the provided value.
11980        pub fn with_weight(mut self, field: u32) -> Self {
11981            self.set_weight(field);
11982            self
11983        }
11984    }
11985    impl super::MultisigMemberPublicKey {
11986        pub const fn const_default() -> Self {
11987            Self {
11988                scheme: None,
11989                public_key: None,
11990                zklogin: None,
11991            }
11992        }
11993        #[doc(hidden)]
11994        pub fn default_instance() -> &'static Self {
11995            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
11996            &DEFAULT
11997        }
11998        ///Sets `scheme` with the provided value.
11999        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12000            self.set_scheme(field.into());
12001            self
12002        }
12003        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12004        pub fn public_key_opt(&self) -> Option<&[u8]> {
12005            self.public_key.as_ref().map(|field| field as _)
12006        }
12007        ///Sets `public_key` with the provided value.
12008        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12009            self.public_key = Some(field.into().into());
12010        }
12011        ///Sets `public_key` with the provided value.
12012        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12013            mut self,
12014            field: T,
12015        ) -> Self {
12016            self.set_public_key(field.into());
12017            self
12018        }
12019        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12020        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
12021            self.zklogin
12022                .as_ref()
12023                .map(|field| field as _)
12024                .unwrap_or_else(|| {
12025                    super::ZkLoginPublicIdentifier::default_instance() as _
12026                })
12027        }
12028        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12029        pub fn zklogin_opt_mut(
12030            &mut self,
12031        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
12032            self.zklogin.as_mut().map(|field| field as _)
12033        }
12034        ///Returns a mutable reference to `zklogin`.
12035        ///If the field is unset, it is first initialized with the default value.
12036        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
12037            self.zklogin.get_or_insert_default()
12038        }
12039        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12040        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
12041            self.zklogin.as_ref().map(|field| field as _)
12042        }
12043        ///Sets `zklogin` with the provided value.
12044        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12045            &mut self,
12046            field: T,
12047        ) {
12048            self.zklogin = Some(field.into().into());
12049        }
12050        ///Sets `zklogin` with the provided value.
12051        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12052            mut self,
12053            field: T,
12054        ) -> Self {
12055            self.set_zklogin(field.into());
12056            self
12057        }
12058    }
12059    impl super::MultisigMemberSignature {
12060        pub const fn const_default() -> Self {
12061            Self {
12062                scheme: None,
12063                signature: None,
12064                zklogin: None,
12065                passkey: None,
12066            }
12067        }
12068        #[doc(hidden)]
12069        pub fn default_instance() -> &'static Self {
12070            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12071            &DEFAULT
12072        }
12073        ///Sets `scheme` with the provided value.
12074        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12075            self.set_scheme(field.into());
12076            self
12077        }
12078        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12079        pub fn signature_opt(&self) -> Option<&[u8]> {
12080            self.signature.as_ref().map(|field| field as _)
12081        }
12082        ///Sets `signature` with the provided value.
12083        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12084            self.signature = Some(field.into().into());
12085        }
12086        ///Sets `signature` with the provided value.
12087        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12088            mut self,
12089            field: T,
12090        ) -> Self {
12091            self.set_signature(field.into());
12092            self
12093        }
12094        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12095        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12096            self.zklogin
12097                .as_ref()
12098                .map(|field| field as _)
12099                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12100        }
12101        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12102        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12103            self.zklogin.as_mut().map(|field| field as _)
12104        }
12105        ///Returns a mutable reference to `zklogin`.
12106        ///If the field is unset, it is first initialized with the default value.
12107        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12108            self.zklogin.get_or_insert_default()
12109        }
12110        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12111        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12112            self.zklogin.as_ref().map(|field| field as _)
12113        }
12114        ///Sets `zklogin` with the provided value.
12115        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12116            self.zklogin = Some(field.into().into());
12117        }
12118        ///Sets `zklogin` with the provided value.
12119        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12120            mut self,
12121            field: T,
12122        ) -> Self {
12123            self.set_zklogin(field.into());
12124            self
12125        }
12126        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
12127        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12128            self.passkey
12129                .as_ref()
12130                .map(|field| field as _)
12131                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12132        }
12133        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12134        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12135            self.passkey.as_mut().map(|field| field as _)
12136        }
12137        ///Returns a mutable reference to `passkey`.
12138        ///If the field is unset, it is first initialized with the default value.
12139        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12140            self.passkey.get_or_insert_default()
12141        }
12142        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
12143        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12144            self.passkey.as_ref().map(|field| field as _)
12145        }
12146        ///Sets `passkey` with the provided value.
12147        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12148            self.passkey = Some(field.into().into());
12149        }
12150        ///Sets `passkey` with the provided value.
12151        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12152            mut self,
12153            field: T,
12154        ) -> Self {
12155            self.set_passkey(field.into());
12156            self
12157        }
12158    }
12159    impl super::NameRecord {
12160        pub const fn const_default() -> Self {
12161            Self {
12162                id: None,
12163                name: None,
12164                registration_nft_id: None,
12165                expiration_timestamp: None,
12166                target_address: None,
12167                data: std::collections::BTreeMap::new(),
12168            }
12169        }
12170        #[doc(hidden)]
12171        pub fn default_instance() -> &'static Self {
12172            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12173            &DEFAULT
12174        }
12175        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12176        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12177            self.id.as_mut().map(|field| field as _)
12178        }
12179        ///Returns a mutable reference to `id`.
12180        ///If the field is unset, it is first initialized with the default value.
12181        pub fn id_mut(&mut self) -> &mut String {
12182            self.id.get_or_insert_default()
12183        }
12184        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12185        pub fn id_opt(&self) -> Option<&str> {
12186            self.id.as_ref().map(|field| field as _)
12187        }
12188        ///Sets `id` with the provided value.
12189        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12190            self.id = Some(field.into().into());
12191        }
12192        ///Sets `id` with the provided value.
12193        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12194            self.set_id(field.into());
12195            self
12196        }
12197        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12198        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12199            self.name.as_mut().map(|field| field as _)
12200        }
12201        ///Returns a mutable reference to `name`.
12202        ///If the field is unset, it is first initialized with the default value.
12203        pub fn name_mut(&mut self) -> &mut String {
12204            self.name.get_or_insert_default()
12205        }
12206        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12207        pub fn name_opt(&self) -> Option<&str> {
12208            self.name.as_ref().map(|field| field as _)
12209        }
12210        ///Sets `name` with the provided value.
12211        pub fn set_name<T: Into<String>>(&mut self, field: T) {
12212            self.name = Some(field.into().into());
12213        }
12214        ///Sets `name` with the provided value.
12215        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12216            self.set_name(field.into());
12217            self
12218        }
12219        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12220        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12221            self.registration_nft_id.as_mut().map(|field| field as _)
12222        }
12223        ///Returns a mutable reference to `registration_nft_id`.
12224        ///If the field is unset, it is first initialized with the default value.
12225        pub fn registration_nft_id_mut(&mut self) -> &mut String {
12226            self.registration_nft_id.get_or_insert_default()
12227        }
12228        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12229        pub fn registration_nft_id_opt(&self) -> Option<&str> {
12230            self.registration_nft_id.as_ref().map(|field| field as _)
12231        }
12232        ///Sets `registration_nft_id` with the provided value.
12233        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12234            self.registration_nft_id = Some(field.into().into());
12235        }
12236        ///Sets `registration_nft_id` with the provided value.
12237        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12238            self.set_registration_nft_id(field.into());
12239            self
12240        }
12241        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12242        pub fn expiration_timestamp_opt_mut(
12243            &mut self,
12244        ) -> Option<&mut ::prost_types::Timestamp> {
12245            self.expiration_timestamp.as_mut().map(|field| field as _)
12246        }
12247        ///Returns a mutable reference to `expiration_timestamp`.
12248        ///If the field is unset, it is first initialized with the default value.
12249        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12250            self.expiration_timestamp.get_or_insert_default()
12251        }
12252        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
12253        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12254            self.expiration_timestamp.as_ref().map(|field| field as _)
12255        }
12256        ///Sets `expiration_timestamp` with the provided value.
12257        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12258            &mut self,
12259            field: T,
12260        ) {
12261            self.expiration_timestamp = Some(field.into().into());
12262        }
12263        ///Sets `expiration_timestamp` with the provided value.
12264        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12265            mut self,
12266            field: T,
12267        ) -> Self {
12268            self.set_expiration_timestamp(field.into());
12269            self
12270        }
12271        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12272        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12273            self.target_address.as_mut().map(|field| field as _)
12274        }
12275        ///Returns a mutable reference to `target_address`.
12276        ///If the field is unset, it is first initialized with the default value.
12277        pub fn target_address_mut(&mut self) -> &mut String {
12278            self.target_address.get_or_insert_default()
12279        }
12280        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12281        pub fn target_address_opt(&self) -> Option<&str> {
12282            self.target_address.as_ref().map(|field| field as _)
12283        }
12284        ///Sets `target_address` with the provided value.
12285        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12286            self.target_address = Some(field.into().into());
12287        }
12288        ///Sets `target_address` with the provided value.
12289        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12290            self.set_target_address(field.into());
12291            self
12292        }
12293        ///Returns the value of `data`, or the default value if `data` is unset.
12294        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12295            &self.data
12296        }
12297        ///Returns a mutable reference to `data`.
12298        ///If the field is unset, it is first initialized with the default value.
12299        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12300            &mut self.data
12301        }
12302        ///Sets `data` with the provided value.
12303        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12304            self.data = field;
12305        }
12306        ///Sets `data` with the provided value.
12307        pub fn with_data(
12308            mut self,
12309            field: ::std::collections::BTreeMap<String, String>,
12310        ) -> Self {
12311            self.set_data(field);
12312            self
12313        }
12314    }
12315    impl super::Object {
12316        pub const fn const_default() -> Self {
12317            Self {
12318                bcs: None,
12319                object_id: None,
12320                version: None,
12321                digest: None,
12322                owner: None,
12323                object_type: None,
12324                has_public_transfer: None,
12325                contents: None,
12326                package: None,
12327                previous_transaction: None,
12328                storage_rebate: None,
12329                json: None,
12330                balance: None,
12331                display: None,
12332            }
12333        }
12334        #[doc(hidden)]
12335        pub fn default_instance() -> &'static Self {
12336            static DEFAULT: super::Object = super::Object::const_default();
12337            &DEFAULT
12338        }
12339        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
12340        pub fn bcs(&self) -> &super::Bcs {
12341            self.bcs
12342                .as_ref()
12343                .map(|field| field as _)
12344                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12345        }
12346        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12347        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12348            self.bcs.as_mut().map(|field| field as _)
12349        }
12350        ///Returns a mutable reference to `bcs`.
12351        ///If the field is unset, it is first initialized with the default value.
12352        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12353            self.bcs.get_or_insert_default()
12354        }
12355        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
12356        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12357            self.bcs.as_ref().map(|field| field as _)
12358        }
12359        ///Sets `bcs` with the provided value.
12360        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12361            self.bcs = Some(field.into().into());
12362        }
12363        ///Sets `bcs` with the provided value.
12364        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12365            self.set_bcs(field.into());
12366            self
12367        }
12368        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12369        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12370            self.object_id.as_mut().map(|field| field as _)
12371        }
12372        ///Returns a mutable reference to `object_id`.
12373        ///If the field is unset, it is first initialized with the default value.
12374        pub fn object_id_mut(&mut self) -> &mut String {
12375            self.object_id.get_or_insert_default()
12376        }
12377        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12378        pub fn object_id_opt(&self) -> Option<&str> {
12379            self.object_id.as_ref().map(|field| field as _)
12380        }
12381        ///Sets `object_id` with the provided value.
12382        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12383            self.object_id = Some(field.into().into());
12384        }
12385        ///Sets `object_id` with the provided value.
12386        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12387            self.set_object_id(field.into());
12388            self
12389        }
12390        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12391        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12392            self.version.as_mut().map(|field| field as _)
12393        }
12394        ///Returns a mutable reference to `version`.
12395        ///If the field is unset, it is first initialized with the default value.
12396        pub fn version_mut(&mut self) -> &mut u64 {
12397            self.version.get_or_insert_default()
12398        }
12399        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12400        pub fn version_opt(&self) -> Option<u64> {
12401            self.version.as_ref().map(|field| *field)
12402        }
12403        ///Sets `version` with the provided value.
12404        pub fn set_version(&mut self, field: u64) {
12405            self.version = Some(field);
12406        }
12407        ///Sets `version` with the provided value.
12408        pub fn with_version(mut self, field: u64) -> Self {
12409            self.set_version(field);
12410            self
12411        }
12412        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12413        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12414            self.digest.as_mut().map(|field| field as _)
12415        }
12416        ///Returns a mutable reference to `digest`.
12417        ///If the field is unset, it is first initialized with the default value.
12418        pub fn digest_mut(&mut self) -> &mut String {
12419            self.digest.get_or_insert_default()
12420        }
12421        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12422        pub fn digest_opt(&self) -> Option<&str> {
12423            self.digest.as_ref().map(|field| field as _)
12424        }
12425        ///Sets `digest` with the provided value.
12426        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12427            self.digest = Some(field.into().into());
12428        }
12429        ///Sets `digest` with the provided value.
12430        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12431            self.set_digest(field.into());
12432            self
12433        }
12434        ///Returns the value of `owner`, or the default value if `owner` is unset.
12435        pub fn owner(&self) -> &super::Owner {
12436            self.owner
12437                .as_ref()
12438                .map(|field| field as _)
12439                .unwrap_or_else(|| super::Owner::default_instance() as _)
12440        }
12441        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12442        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12443            self.owner.as_mut().map(|field| field as _)
12444        }
12445        ///Returns a mutable reference to `owner`.
12446        ///If the field is unset, it is first initialized with the default value.
12447        pub fn owner_mut(&mut self) -> &mut super::Owner {
12448            self.owner.get_or_insert_default()
12449        }
12450        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
12451        pub fn owner_opt(&self) -> Option<&super::Owner> {
12452            self.owner.as_ref().map(|field| field as _)
12453        }
12454        ///Sets `owner` with the provided value.
12455        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12456            self.owner = Some(field.into().into());
12457        }
12458        ///Sets `owner` with the provided value.
12459        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12460            self.set_owner(field.into());
12461            self
12462        }
12463        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12464        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12465            self.object_type.as_mut().map(|field| field as _)
12466        }
12467        ///Returns a mutable reference to `object_type`.
12468        ///If the field is unset, it is first initialized with the default value.
12469        pub fn object_type_mut(&mut self) -> &mut String {
12470            self.object_type.get_or_insert_default()
12471        }
12472        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
12473        pub fn object_type_opt(&self) -> Option<&str> {
12474            self.object_type.as_ref().map(|field| field as _)
12475        }
12476        ///Sets `object_type` with the provided value.
12477        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12478            self.object_type = Some(field.into().into());
12479        }
12480        ///Sets `object_type` with the provided value.
12481        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12482            self.set_object_type(field.into());
12483            self
12484        }
12485        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12486        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12487            self.has_public_transfer.as_mut().map(|field| field as _)
12488        }
12489        ///Returns a mutable reference to `has_public_transfer`.
12490        ///If the field is unset, it is first initialized with the default value.
12491        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12492            self.has_public_transfer.get_or_insert_default()
12493        }
12494        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
12495        pub fn has_public_transfer_opt(&self) -> Option<bool> {
12496            self.has_public_transfer.as_ref().map(|field| *field)
12497        }
12498        ///Sets `has_public_transfer` with the provided value.
12499        pub fn set_has_public_transfer(&mut self, field: bool) {
12500            self.has_public_transfer = Some(field);
12501        }
12502        ///Sets `has_public_transfer` with the provided value.
12503        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12504            self.set_has_public_transfer(field);
12505            self
12506        }
12507        ///Returns the value of `contents`, or the default value if `contents` is unset.
12508        pub fn contents(&self) -> &super::Bcs {
12509            self.contents
12510                .as_ref()
12511                .map(|field| field as _)
12512                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12513        }
12514        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12515        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12516            self.contents.as_mut().map(|field| field as _)
12517        }
12518        ///Returns a mutable reference to `contents`.
12519        ///If the field is unset, it is first initialized with the default value.
12520        pub fn contents_mut(&mut self) -> &mut super::Bcs {
12521            self.contents.get_or_insert_default()
12522        }
12523        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
12524        pub fn contents_opt(&self) -> Option<&super::Bcs> {
12525            self.contents.as_ref().map(|field| field as _)
12526        }
12527        ///Sets `contents` with the provided value.
12528        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12529            self.contents = Some(field.into().into());
12530        }
12531        ///Sets `contents` with the provided value.
12532        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12533            self.set_contents(field.into());
12534            self
12535        }
12536        ///Returns the value of `package`, or the default value if `package` is unset.
12537        pub fn package(&self) -> &super::Package {
12538            self.package
12539                .as_ref()
12540                .map(|field| field as _)
12541                .unwrap_or_else(|| super::Package::default_instance() as _)
12542        }
12543        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12544        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12545            self.package.as_mut().map(|field| field as _)
12546        }
12547        ///Returns a mutable reference to `package`.
12548        ///If the field is unset, it is first initialized with the default value.
12549        pub fn package_mut(&mut self) -> &mut super::Package {
12550            self.package.get_or_insert_default()
12551        }
12552        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
12553        pub fn package_opt(&self) -> Option<&super::Package> {
12554            self.package.as_ref().map(|field| field as _)
12555        }
12556        ///Sets `package` with the provided value.
12557        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12558            self.package = Some(field.into().into());
12559        }
12560        ///Sets `package` with the provided value.
12561        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12562            self.set_package(field.into());
12563            self
12564        }
12565        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12566        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12567            self.previous_transaction.as_mut().map(|field| field as _)
12568        }
12569        ///Returns a mutable reference to `previous_transaction`.
12570        ///If the field is unset, it is first initialized with the default value.
12571        pub fn previous_transaction_mut(&mut self) -> &mut String {
12572            self.previous_transaction.get_or_insert_default()
12573        }
12574        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12575        pub fn previous_transaction_opt(&self) -> Option<&str> {
12576            self.previous_transaction.as_ref().map(|field| field as _)
12577        }
12578        ///Sets `previous_transaction` with the provided value.
12579        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12580            self.previous_transaction = Some(field.into().into());
12581        }
12582        ///Sets `previous_transaction` with the provided value.
12583        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12584            self.set_previous_transaction(field.into());
12585            self
12586        }
12587        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12588        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12589            self.storage_rebate.as_mut().map(|field| field as _)
12590        }
12591        ///Returns a mutable reference to `storage_rebate`.
12592        ///If the field is unset, it is first initialized with the default value.
12593        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12594            self.storage_rebate.get_or_insert_default()
12595        }
12596        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12597        pub fn storage_rebate_opt(&self) -> Option<u64> {
12598            self.storage_rebate.as_ref().map(|field| *field)
12599        }
12600        ///Sets `storage_rebate` with the provided value.
12601        pub fn set_storage_rebate(&mut self, field: u64) {
12602            self.storage_rebate = Some(field);
12603        }
12604        ///Sets `storage_rebate` with the provided value.
12605        pub fn with_storage_rebate(mut self, field: u64) -> Self {
12606            self.set_storage_rebate(field);
12607            self
12608        }
12609        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12610        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12611            self.json.as_mut().map(|field| field as _)
12612        }
12613        ///Returns a mutable reference to `json`.
12614        ///If the field is unset, it is first initialized with the default value.
12615        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12616            self.json.get_or_insert_default()
12617        }
12618        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
12619        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12620            self.json.as_ref().map(|field| field as _)
12621        }
12622        ///Sets `json` with the provided value.
12623        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12624            self.json = Some(field.into().into());
12625        }
12626        ///Sets `json` with the provided value.
12627        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12628            self.set_json(field.into());
12629            self
12630        }
12631        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12632        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12633            self.balance.as_mut().map(|field| field as _)
12634        }
12635        ///Returns a mutable reference to `balance`.
12636        ///If the field is unset, it is first initialized with the default value.
12637        pub fn balance_mut(&mut self) -> &mut u64 {
12638            self.balance.get_or_insert_default()
12639        }
12640        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12641        pub fn balance_opt(&self) -> Option<u64> {
12642            self.balance.as_ref().map(|field| *field)
12643        }
12644        ///Sets `balance` with the provided value.
12645        pub fn set_balance(&mut self, field: u64) {
12646            self.balance = Some(field);
12647        }
12648        ///Sets `balance` with the provided value.
12649        pub fn with_balance(mut self, field: u64) -> Self {
12650            self.set_balance(field);
12651            self
12652        }
12653        ///Returns the value of `display`, or the default value if `display` is unset.
12654        pub fn display(&self) -> &super::Display {
12655            self.display
12656                .as_ref()
12657                .map(|field| field as _)
12658                .unwrap_or_else(|| super::Display::default_instance() as _)
12659        }
12660        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12661        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12662            self.display.as_mut().map(|field| field as _)
12663        }
12664        ///Returns a mutable reference to `display`.
12665        ///If the field is unset, it is first initialized with the default value.
12666        pub fn display_mut(&mut self) -> &mut super::Display {
12667            self.display.get_or_insert_default()
12668        }
12669        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
12670        pub fn display_opt(&self) -> Option<&super::Display> {
12671            self.display.as_ref().map(|field| field as _)
12672        }
12673        ///Sets `display` with the provided value.
12674        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12675            self.display = Some(field.into().into());
12676        }
12677        ///Sets `display` with the provided value.
12678        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12679            self.set_display(field.into());
12680            self
12681        }
12682    }
12683    impl super::ObjectReference {
12684        pub const fn const_default() -> Self {
12685            Self {
12686                object_id: None,
12687                version: None,
12688                digest: None,
12689            }
12690        }
12691        #[doc(hidden)]
12692        pub fn default_instance() -> &'static Self {
12693            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12694            &DEFAULT
12695        }
12696        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12697        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12698            self.object_id.as_mut().map(|field| field as _)
12699        }
12700        ///Returns a mutable reference to `object_id`.
12701        ///If the field is unset, it is first initialized with the default value.
12702        pub fn object_id_mut(&mut self) -> &mut String {
12703            self.object_id.get_or_insert_default()
12704        }
12705        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12706        pub fn object_id_opt(&self) -> Option<&str> {
12707            self.object_id.as_ref().map(|field| field as _)
12708        }
12709        ///Sets `object_id` with the provided value.
12710        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12711            self.object_id = Some(field.into().into());
12712        }
12713        ///Sets `object_id` with the provided value.
12714        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12715            self.set_object_id(field.into());
12716            self
12717        }
12718        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12719        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12720            self.version.as_mut().map(|field| field as _)
12721        }
12722        ///Returns a mutable reference to `version`.
12723        ///If the field is unset, it is first initialized with the default value.
12724        pub fn version_mut(&mut self) -> &mut u64 {
12725            self.version.get_or_insert_default()
12726        }
12727        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12728        pub fn version_opt(&self) -> Option<u64> {
12729            self.version.as_ref().map(|field| *field)
12730        }
12731        ///Sets `version` with the provided value.
12732        pub fn set_version(&mut self, field: u64) {
12733            self.version = Some(field);
12734        }
12735        ///Sets `version` with the provided value.
12736        pub fn with_version(mut self, field: u64) -> Self {
12737            self.set_version(field);
12738            self
12739        }
12740        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12741        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12742            self.digest.as_mut().map(|field| field as _)
12743        }
12744        ///Returns a mutable reference to `digest`.
12745        ///If the field is unset, it is first initialized with the default value.
12746        pub fn digest_mut(&mut self) -> &mut String {
12747            self.digest.get_or_insert_default()
12748        }
12749        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12750        pub fn digest_opt(&self) -> Option<&str> {
12751            self.digest.as_ref().map(|field| field as _)
12752        }
12753        ///Sets `digest` with the provided value.
12754        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12755            self.digest = Some(field.into().into());
12756        }
12757        ///Sets `digest` with the provided value.
12758        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12759            self.set_digest(field.into());
12760            self
12761        }
12762    }
12763    impl super::ObjectSet {
12764        pub const fn const_default() -> Self {
12765            Self { objects: Vec::new() }
12766        }
12767        #[doc(hidden)]
12768        pub fn default_instance() -> &'static Self {
12769            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12770            &DEFAULT
12771        }
12772        ///Returns the value of `objects`, or the default value if `objects` is unset.
12773        pub fn objects(&self) -> &[super::Object] {
12774            &self.objects
12775        }
12776        ///Returns a mutable reference to `objects`.
12777        ///If the field is unset, it is first initialized with the default value.
12778        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12779            &mut self.objects
12780        }
12781        ///Sets `objects` with the provided value.
12782        pub fn set_objects(&mut self, field: Vec<super::Object>) {
12783            self.objects = field;
12784        }
12785        ///Sets `objects` with the provided value.
12786        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12787            self.set_objects(field);
12788            self
12789        }
12790    }
12791    impl super::OpenSignature {
12792        pub const fn const_default() -> Self {
12793            Self {
12794                reference: None,
12795                body: None,
12796            }
12797        }
12798        #[doc(hidden)]
12799        pub fn default_instance() -> &'static Self {
12800            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12801            &DEFAULT
12802        }
12803        ///Sets `reference` with the provided value.
12804        pub fn with_reference<T: Into<super::open_signature::Reference>>(
12805            mut self,
12806            field: T,
12807        ) -> Self {
12808            self.set_reference(field.into());
12809            self
12810        }
12811        ///Returns the value of `body`, or the default value if `body` is unset.
12812        pub fn body(&self) -> &super::OpenSignatureBody {
12813            self.body
12814                .as_ref()
12815                .map(|field| field as _)
12816                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12817        }
12818        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12819        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12820            self.body.as_mut().map(|field| field as _)
12821        }
12822        ///Returns a mutable reference to `body`.
12823        ///If the field is unset, it is first initialized with the default value.
12824        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12825            self.body.get_or_insert_default()
12826        }
12827        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
12828        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12829            self.body.as_ref().map(|field| field as _)
12830        }
12831        ///Sets `body` with the provided value.
12832        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12833            self.body = Some(field.into().into());
12834        }
12835        ///Sets `body` with the provided value.
12836        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12837            self.set_body(field.into());
12838            self
12839        }
12840    }
12841    impl super::OpenSignatureBody {
12842        pub const fn const_default() -> Self {
12843            Self {
12844                r#type: None,
12845                type_name: None,
12846                type_parameter_instantiation: Vec::new(),
12847                type_parameter: None,
12848            }
12849        }
12850        #[doc(hidden)]
12851        pub fn default_instance() -> &'static Self {
12852            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
12853            &DEFAULT
12854        }
12855        ///Sets `r#type` with the provided value.
12856        pub fn with_type<T: Into<super::open_signature_body::Type>>(
12857            mut self,
12858            field: T,
12859        ) -> Self {
12860            self.set_type(field.into());
12861            self
12862        }
12863        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12864        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
12865            self.type_name.as_mut().map(|field| field as _)
12866        }
12867        ///Returns a mutable reference to `type_name`.
12868        ///If the field is unset, it is first initialized with the default value.
12869        pub fn type_name_mut(&mut self) -> &mut String {
12870            self.type_name.get_or_insert_default()
12871        }
12872        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12873        pub fn type_name_opt(&self) -> Option<&str> {
12874            self.type_name.as_ref().map(|field| field as _)
12875        }
12876        ///Sets `type_name` with the provided value.
12877        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
12878            self.type_name = Some(field.into().into());
12879        }
12880        ///Sets `type_name` with the provided value.
12881        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
12882            self.set_type_name(field.into());
12883            self
12884        }
12885        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
12886        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
12887            &self.type_parameter_instantiation
12888        }
12889        ///Returns a mutable reference to `type_parameter_instantiation`.
12890        ///If the field is unset, it is first initialized with the default value.
12891        pub fn type_parameter_instantiation_mut(
12892            &mut self,
12893        ) -> &mut Vec<super::OpenSignatureBody> {
12894            &mut self.type_parameter_instantiation
12895        }
12896        ///Sets `type_parameter_instantiation` with the provided value.
12897        pub fn set_type_parameter_instantiation(
12898            &mut self,
12899            field: Vec<super::OpenSignatureBody>,
12900        ) {
12901            self.type_parameter_instantiation = field;
12902        }
12903        ///Sets `type_parameter_instantiation` with the provided value.
12904        pub fn with_type_parameter_instantiation(
12905            mut self,
12906            field: Vec<super::OpenSignatureBody>,
12907        ) -> Self {
12908            self.set_type_parameter_instantiation(field);
12909            self
12910        }
12911        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12912        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
12913            self.type_parameter.as_mut().map(|field| field as _)
12914        }
12915        ///Returns a mutable reference to `type_parameter`.
12916        ///If the field is unset, it is first initialized with the default value.
12917        pub fn type_parameter_mut(&mut self) -> &mut u32 {
12918            self.type_parameter.get_or_insert_default()
12919        }
12920        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12921        pub fn type_parameter_opt(&self) -> Option<u32> {
12922            self.type_parameter.as_ref().map(|field| *field)
12923        }
12924        ///Sets `type_parameter` with the provided value.
12925        pub fn set_type_parameter(&mut self, field: u32) {
12926            self.type_parameter = Some(field);
12927        }
12928        ///Sets `type_parameter` with the provided value.
12929        pub fn with_type_parameter(mut self, field: u32) -> Self {
12930            self.set_type_parameter(field);
12931            self
12932        }
12933    }
12934    impl super::Owner {
12935        pub const fn const_default() -> Self {
12936            Self {
12937                kind: None,
12938                address: None,
12939                version: None,
12940            }
12941        }
12942        #[doc(hidden)]
12943        pub fn default_instance() -> &'static Self {
12944            static DEFAULT: super::Owner = super::Owner::const_default();
12945            &DEFAULT
12946        }
12947        ///Sets `kind` with the provided value.
12948        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
12949            self.set_kind(field.into());
12950            self
12951        }
12952        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12953        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12954            self.address.as_mut().map(|field| field as _)
12955        }
12956        ///Returns a mutable reference to `address`.
12957        ///If the field is unset, it is first initialized with the default value.
12958        pub fn address_mut(&mut self) -> &mut String {
12959            self.address.get_or_insert_default()
12960        }
12961        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12962        pub fn address_opt(&self) -> Option<&str> {
12963            self.address.as_ref().map(|field| field as _)
12964        }
12965        ///Sets `address` with the provided value.
12966        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12967            self.address = Some(field.into().into());
12968        }
12969        ///Sets `address` with the provided value.
12970        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12971            self.set_address(field.into());
12972            self
12973        }
12974        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12975        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12976            self.version.as_mut().map(|field| field as _)
12977        }
12978        ///Returns a mutable reference to `version`.
12979        ///If the field is unset, it is first initialized with the default value.
12980        pub fn version_mut(&mut self) -> &mut u64 {
12981            self.version.get_or_insert_default()
12982        }
12983        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12984        pub fn version_opt(&self) -> Option<u64> {
12985            self.version.as_ref().map(|field| *field)
12986        }
12987        ///Sets `version` with the provided value.
12988        pub fn set_version(&mut self, field: u64) {
12989            self.version = Some(field);
12990        }
12991        ///Sets `version` with the provided value.
12992        pub fn with_version(mut self, field: u64) -> Self {
12993            self.set_version(field);
12994            self
12995        }
12996    }
12997    impl super::Package {
12998        pub const fn const_default() -> Self {
12999            Self {
13000                storage_id: None,
13001                original_id: None,
13002                version: None,
13003                modules: Vec::new(),
13004                type_origins: Vec::new(),
13005                linkage: Vec::new(),
13006            }
13007        }
13008        #[doc(hidden)]
13009        pub fn default_instance() -> &'static Self {
13010            static DEFAULT: super::Package = super::Package::const_default();
13011            &DEFAULT
13012        }
13013        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13014        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
13015            self.storage_id.as_mut().map(|field| field as _)
13016        }
13017        ///Returns a mutable reference to `storage_id`.
13018        ///If the field is unset, it is first initialized with the default value.
13019        pub fn storage_id_mut(&mut self) -> &mut String {
13020            self.storage_id.get_or_insert_default()
13021        }
13022        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13023        pub fn storage_id_opt(&self) -> Option<&str> {
13024            self.storage_id.as_ref().map(|field| field as _)
13025        }
13026        ///Sets `storage_id` with the provided value.
13027        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
13028            self.storage_id = Some(field.into().into());
13029        }
13030        ///Sets `storage_id` with the provided value.
13031        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
13032            self.set_storage_id(field.into());
13033            self
13034        }
13035        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13036        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
13037            self.original_id.as_mut().map(|field| field as _)
13038        }
13039        ///Returns a mutable reference to `original_id`.
13040        ///If the field is unset, it is first initialized with the default value.
13041        pub fn original_id_mut(&mut self) -> &mut String {
13042            self.original_id.get_or_insert_default()
13043        }
13044        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13045        pub fn original_id_opt(&self) -> Option<&str> {
13046            self.original_id.as_ref().map(|field| field as _)
13047        }
13048        ///Sets `original_id` with the provided value.
13049        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13050            self.original_id = Some(field.into().into());
13051        }
13052        ///Sets `original_id` with the provided value.
13053        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13054            self.set_original_id(field.into());
13055            self
13056        }
13057        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13058        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13059            self.version.as_mut().map(|field| field as _)
13060        }
13061        ///Returns a mutable reference to `version`.
13062        ///If the field is unset, it is first initialized with the default value.
13063        pub fn version_mut(&mut self) -> &mut u64 {
13064            self.version.get_or_insert_default()
13065        }
13066        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13067        pub fn version_opt(&self) -> Option<u64> {
13068            self.version.as_ref().map(|field| *field)
13069        }
13070        ///Sets `version` with the provided value.
13071        pub fn set_version(&mut self, field: u64) {
13072            self.version = Some(field);
13073        }
13074        ///Sets `version` with the provided value.
13075        pub fn with_version(mut self, field: u64) -> Self {
13076            self.set_version(field);
13077            self
13078        }
13079        ///Returns the value of `modules`, or the default value if `modules` is unset.
13080        pub fn modules(&self) -> &[super::Module] {
13081            &self.modules
13082        }
13083        ///Returns a mutable reference to `modules`.
13084        ///If the field is unset, it is first initialized with the default value.
13085        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13086            &mut self.modules
13087        }
13088        ///Sets `modules` with the provided value.
13089        pub fn set_modules(&mut self, field: Vec<super::Module>) {
13090            self.modules = field;
13091        }
13092        ///Sets `modules` with the provided value.
13093        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13094            self.set_modules(field);
13095            self
13096        }
13097        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
13098        pub fn type_origins(&self) -> &[super::TypeOrigin] {
13099            &self.type_origins
13100        }
13101        ///Returns a mutable reference to `type_origins`.
13102        ///If the field is unset, it is first initialized with the default value.
13103        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13104            &mut self.type_origins
13105        }
13106        ///Sets `type_origins` with the provided value.
13107        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13108            self.type_origins = field;
13109        }
13110        ///Sets `type_origins` with the provided value.
13111        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13112            self.set_type_origins(field);
13113            self
13114        }
13115        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
13116        pub fn linkage(&self) -> &[super::Linkage] {
13117            &self.linkage
13118        }
13119        ///Returns a mutable reference to `linkage`.
13120        ///If the field is unset, it is first initialized with the default value.
13121        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13122            &mut self.linkage
13123        }
13124        ///Sets `linkage` with the provided value.
13125        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13126            self.linkage = field;
13127        }
13128        ///Sets `linkage` with the provided value.
13129        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13130            self.set_linkage(field);
13131            self
13132        }
13133    }
13134    impl super::PackageUpgradeError {
13135        pub const fn const_default() -> Self {
13136            Self {
13137                kind: None,
13138                package_id: None,
13139                digest: None,
13140                policy: None,
13141                ticket_id: None,
13142            }
13143        }
13144        #[doc(hidden)]
13145        pub fn default_instance() -> &'static Self {
13146            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13147            &DEFAULT
13148        }
13149        ///Sets `kind` with the provided value.
13150        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13151            mut self,
13152            field: T,
13153        ) -> Self {
13154            self.set_kind(field.into());
13155            self
13156        }
13157        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13158        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13159            self.package_id.as_mut().map(|field| field as _)
13160        }
13161        ///Returns a mutable reference to `package_id`.
13162        ///If the field is unset, it is first initialized with the default value.
13163        pub fn package_id_mut(&mut self) -> &mut String {
13164            self.package_id.get_or_insert_default()
13165        }
13166        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13167        pub fn package_id_opt(&self) -> Option<&str> {
13168            self.package_id.as_ref().map(|field| field as _)
13169        }
13170        ///Sets `package_id` with the provided value.
13171        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13172            self.package_id = Some(field.into().into());
13173        }
13174        ///Sets `package_id` with the provided value.
13175        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13176            self.set_package_id(field.into());
13177            self
13178        }
13179        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13180        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13181            self.digest.as_mut().map(|field| field as _)
13182        }
13183        ///Returns a mutable reference to `digest`.
13184        ///If the field is unset, it is first initialized with the default value.
13185        pub fn digest_mut(&mut self) -> &mut String {
13186            self.digest.get_or_insert_default()
13187        }
13188        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13189        pub fn digest_opt(&self) -> Option<&str> {
13190            self.digest.as_ref().map(|field| field as _)
13191        }
13192        ///Sets `digest` with the provided value.
13193        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13194            self.digest = Some(field.into().into());
13195        }
13196        ///Sets `digest` with the provided value.
13197        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13198            self.set_digest(field.into());
13199            self
13200        }
13201        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13202        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13203            self.policy.as_mut().map(|field| field as _)
13204        }
13205        ///Returns a mutable reference to `policy`.
13206        ///If the field is unset, it is first initialized with the default value.
13207        pub fn policy_mut(&mut self) -> &mut u32 {
13208            self.policy.get_or_insert_default()
13209        }
13210        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13211        pub fn policy_opt(&self) -> Option<u32> {
13212            self.policy.as_ref().map(|field| *field)
13213        }
13214        ///Sets `policy` with the provided value.
13215        pub fn set_policy(&mut self, field: u32) {
13216            self.policy = Some(field);
13217        }
13218        ///Sets `policy` with the provided value.
13219        pub fn with_policy(mut self, field: u32) -> Self {
13220            self.set_policy(field);
13221            self
13222        }
13223        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13224        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13225            self.ticket_id.as_mut().map(|field| field as _)
13226        }
13227        ///Returns a mutable reference to `ticket_id`.
13228        ///If the field is unset, it is first initialized with the default value.
13229        pub fn ticket_id_mut(&mut self) -> &mut String {
13230            self.ticket_id.get_or_insert_default()
13231        }
13232        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13233        pub fn ticket_id_opt(&self) -> Option<&str> {
13234            self.ticket_id.as_ref().map(|field| field as _)
13235        }
13236        ///Sets `ticket_id` with the provided value.
13237        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13238            self.ticket_id = Some(field.into().into());
13239        }
13240        ///Sets `ticket_id` with the provided value.
13241        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13242            self.set_ticket_id(field.into());
13243            self
13244        }
13245    }
13246    impl super::PackageVersion {
13247        pub const fn const_default() -> Self {
13248            Self {
13249                package_id: None,
13250                version: None,
13251            }
13252        }
13253        #[doc(hidden)]
13254        pub fn default_instance() -> &'static Self {
13255            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13256            &DEFAULT
13257        }
13258        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13259        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13260            self.package_id.as_mut().map(|field| field as _)
13261        }
13262        ///Returns a mutable reference to `package_id`.
13263        ///If the field is unset, it is first initialized with the default value.
13264        pub fn package_id_mut(&mut self) -> &mut String {
13265            self.package_id.get_or_insert_default()
13266        }
13267        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13268        pub fn package_id_opt(&self) -> Option<&str> {
13269            self.package_id.as_ref().map(|field| field as _)
13270        }
13271        ///Sets `package_id` with the provided value.
13272        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13273            self.package_id = Some(field.into().into());
13274        }
13275        ///Sets `package_id` with the provided value.
13276        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13277            self.set_package_id(field.into());
13278            self
13279        }
13280        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13281        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13282            self.version.as_mut().map(|field| field as _)
13283        }
13284        ///Returns a mutable reference to `version`.
13285        ///If the field is unset, it is first initialized with the default value.
13286        pub fn version_mut(&mut self) -> &mut u64 {
13287            self.version.get_or_insert_default()
13288        }
13289        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13290        pub fn version_opt(&self) -> Option<u64> {
13291            self.version.as_ref().map(|field| *field)
13292        }
13293        ///Sets `version` with the provided value.
13294        pub fn set_version(&mut self, field: u64) {
13295            self.version = Some(field);
13296        }
13297        ///Sets `version` with the provided value.
13298        pub fn with_version(mut self, field: u64) -> Self {
13299            self.set_version(field);
13300            self
13301        }
13302    }
13303    impl super::PackageWriteFilter {
13304        pub const fn const_default() -> Self {
13305            Self {}
13306        }
13307        #[doc(hidden)]
13308        pub fn default_instance() -> &'static Self {
13309            static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13310            &DEFAULT
13311        }
13312    }
13313    impl super::PasskeyAuthenticator {
13314        pub const fn const_default() -> Self {
13315            Self {
13316                authenticator_data: None,
13317                client_data_json: None,
13318                signature: None,
13319            }
13320        }
13321        #[doc(hidden)]
13322        pub fn default_instance() -> &'static Self {
13323            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13324            &DEFAULT
13325        }
13326        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
13327        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13328            self.authenticator_data.as_ref().map(|field| field as _)
13329        }
13330        ///Sets `authenticator_data` with the provided value.
13331        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13332            &mut self,
13333            field: T,
13334        ) {
13335            self.authenticator_data = Some(field.into().into());
13336        }
13337        ///Sets `authenticator_data` with the provided value.
13338        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13339            mut self,
13340            field: T,
13341        ) -> Self {
13342            self.set_authenticator_data(field.into());
13343            self
13344        }
13345        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13346        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13347            self.client_data_json.as_mut().map(|field| field as _)
13348        }
13349        ///Returns a mutable reference to `client_data_json`.
13350        ///If the field is unset, it is first initialized with the default value.
13351        pub fn client_data_json_mut(&mut self) -> &mut String {
13352            self.client_data_json.get_or_insert_default()
13353        }
13354        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
13355        pub fn client_data_json_opt(&self) -> Option<&str> {
13356            self.client_data_json.as_ref().map(|field| field as _)
13357        }
13358        ///Sets `client_data_json` with the provided value.
13359        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13360            self.client_data_json = Some(field.into().into());
13361        }
13362        ///Sets `client_data_json` with the provided value.
13363        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13364            self.set_client_data_json(field.into());
13365            self
13366        }
13367        ///Returns the value of `signature`, or the default value if `signature` is unset.
13368        pub fn signature(&self) -> &super::SimpleSignature {
13369            self.signature
13370                .as_ref()
13371                .map(|field| field as _)
13372                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13373        }
13374        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13375        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13376            self.signature.as_mut().map(|field| field as _)
13377        }
13378        ///Returns a mutable reference to `signature`.
13379        ///If the field is unset, it is first initialized with the default value.
13380        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13381            self.signature.get_or_insert_default()
13382        }
13383        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
13384        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13385            self.signature.as_ref().map(|field| field as _)
13386        }
13387        ///Sets `signature` with the provided value.
13388        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13389            self.signature = Some(field.into().into());
13390        }
13391        ///Sets `signature` with the provided value.
13392        pub fn with_signature<T: Into<super::SimpleSignature>>(
13393            mut self,
13394            field: T,
13395        ) -> Self {
13396            self.set_signature(field.into());
13397            self
13398        }
13399    }
13400    impl super::ProgrammableTransaction {
13401        pub const fn const_default() -> Self {
13402            Self {
13403                inputs: Vec::new(),
13404                commands: Vec::new(),
13405            }
13406        }
13407        #[doc(hidden)]
13408        pub fn default_instance() -> &'static Self {
13409            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13410            &DEFAULT
13411        }
13412        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
13413        pub fn inputs(&self) -> &[super::Input] {
13414            &self.inputs
13415        }
13416        ///Returns a mutable reference to `inputs`.
13417        ///If the field is unset, it is first initialized with the default value.
13418        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13419            &mut self.inputs
13420        }
13421        ///Sets `inputs` with the provided value.
13422        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13423            self.inputs = field;
13424        }
13425        ///Sets `inputs` with the provided value.
13426        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13427            self.set_inputs(field);
13428            self
13429        }
13430        ///Returns the value of `commands`, or the default value if `commands` is unset.
13431        pub fn commands(&self) -> &[super::Command] {
13432            &self.commands
13433        }
13434        ///Returns a mutable reference to `commands`.
13435        ///If the field is unset, it is first initialized with the default value.
13436        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13437            &mut self.commands
13438        }
13439        ///Sets `commands` with the provided value.
13440        pub fn set_commands(&mut self, field: Vec<super::Command>) {
13441            self.commands = field;
13442        }
13443        ///Sets `commands` with the provided value.
13444        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13445            self.set_commands(field);
13446            self
13447        }
13448    }
13449    impl super::ProtocolConfig {
13450        pub const fn const_default() -> Self {
13451            Self {
13452                protocol_version: None,
13453                feature_flags: std::collections::BTreeMap::new(),
13454                attributes: std::collections::BTreeMap::new(),
13455                configs: std::collections::BTreeMap::new(),
13456            }
13457        }
13458        #[doc(hidden)]
13459        pub fn default_instance() -> &'static Self {
13460            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13461            &DEFAULT
13462        }
13463        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13464        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13465            self.protocol_version.as_mut().map(|field| field as _)
13466        }
13467        ///Returns a mutable reference to `protocol_version`.
13468        ///If the field is unset, it is first initialized with the default value.
13469        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13470            self.protocol_version.get_or_insert_default()
13471        }
13472        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13473        pub fn protocol_version_opt(&self) -> Option<u64> {
13474            self.protocol_version.as_ref().map(|field| *field)
13475        }
13476        ///Sets `protocol_version` with the provided value.
13477        pub fn set_protocol_version(&mut self, field: u64) {
13478            self.protocol_version = Some(field);
13479        }
13480        ///Sets `protocol_version` with the provided value.
13481        pub fn with_protocol_version(mut self, field: u64) -> Self {
13482            self.set_protocol_version(field);
13483            self
13484        }
13485        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
13486        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13487            &self.feature_flags
13488        }
13489        ///Returns a mutable reference to `feature_flags`.
13490        ///If the field is unset, it is first initialized with the default value.
13491        pub fn feature_flags_mut(
13492            &mut self,
13493        ) -> &mut ::std::collections::BTreeMap<String, bool> {
13494            &mut self.feature_flags
13495        }
13496        ///Sets `feature_flags` with the provided value.
13497        pub fn set_feature_flags(
13498            &mut self,
13499            field: ::std::collections::BTreeMap<String, bool>,
13500        ) {
13501            self.feature_flags = field;
13502        }
13503        ///Sets `feature_flags` with the provided value.
13504        pub fn with_feature_flags(
13505            mut self,
13506            field: ::std::collections::BTreeMap<String, bool>,
13507        ) -> Self {
13508            self.set_feature_flags(field);
13509            self
13510        }
13511        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
13512        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13513            &self.attributes
13514        }
13515        ///Returns a mutable reference to `attributes`.
13516        ///If the field is unset, it is first initialized with the default value.
13517        pub fn attributes_mut(
13518            &mut self,
13519        ) -> &mut ::std::collections::BTreeMap<String, String> {
13520            &mut self.attributes
13521        }
13522        ///Sets `attributes` with the provided value.
13523        pub fn set_attributes(
13524            &mut self,
13525            field: ::std::collections::BTreeMap<String, String>,
13526        ) {
13527            self.attributes = field;
13528        }
13529        ///Sets `attributes` with the provided value.
13530        pub fn with_attributes(
13531            mut self,
13532            field: ::std::collections::BTreeMap<String, String>,
13533        ) -> Self {
13534            self.set_attributes(field);
13535            self
13536        }
13537        ///Returns the value of `configs`, or the default value if `configs` is unset.
13538        pub fn configs(
13539            &self,
13540        ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13541            &self.configs
13542        }
13543        ///Returns a mutable reference to `configs`.
13544        ///If the field is unset, it is first initialized with the default value.
13545        pub fn configs_mut(
13546            &mut self,
13547        ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13548            &mut self.configs
13549        }
13550        ///Sets `configs` with the provided value.
13551        pub fn set_configs(
13552            &mut self,
13553            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13554        ) {
13555            self.configs = field;
13556        }
13557        ///Sets `configs` with the provided value.
13558        pub fn with_configs(
13559            mut self,
13560            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13561        ) -> Self {
13562            self.set_configs(field);
13563            self
13564        }
13565    }
13566    impl super::Publish {
13567        pub const fn const_default() -> Self {
13568            Self {
13569                modules: Vec::new(),
13570                dependencies: Vec::new(),
13571            }
13572        }
13573        #[doc(hidden)]
13574        pub fn default_instance() -> &'static Self {
13575            static DEFAULT: super::Publish = super::Publish::const_default();
13576            &DEFAULT
13577        }
13578        ///Returns the value of `modules`, or the default value if `modules` is unset.
13579        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13580            &self.modules
13581        }
13582        ///Returns a mutable reference to `modules`.
13583        ///If the field is unset, it is first initialized with the default value.
13584        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13585            &mut self.modules
13586        }
13587        ///Sets `modules` with the provided value.
13588        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13589            self.modules = field;
13590        }
13591        ///Sets `modules` with the provided value.
13592        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13593            self.set_modules(field);
13594            self
13595        }
13596        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13597        pub fn dependencies(&self) -> &[String] {
13598            &self.dependencies
13599        }
13600        ///Returns a mutable reference to `dependencies`.
13601        ///If the field is unset, it is first initialized with the default value.
13602        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13603            &mut self.dependencies
13604        }
13605        ///Sets `dependencies` with the provided value.
13606        pub fn set_dependencies(&mut self, field: Vec<String>) {
13607            self.dependencies = field;
13608        }
13609        ///Sets `dependencies` with the provided value.
13610        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13611            self.set_dependencies(field);
13612            self
13613        }
13614    }
13615    impl super::QueryEnd {
13616        pub const fn const_default() -> Self {
13617            Self { reason: None }
13618        }
13619        #[doc(hidden)]
13620        pub fn default_instance() -> &'static Self {
13621            static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13622            &DEFAULT
13623        }
13624        ///Sets `reason` with the provided value.
13625        pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13626            self.set_reason(field.into());
13627            self
13628        }
13629    }
13630    impl super::QueryOptions {
13631        pub const fn const_default() -> Self {
13632            Self {
13633                limit: None,
13634                after: None,
13635                before: None,
13636                ordering: None,
13637            }
13638        }
13639        #[doc(hidden)]
13640        pub fn default_instance() -> &'static Self {
13641            static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13642            &DEFAULT
13643        }
13644        ///If `limit` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13645        pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13646            self.limit.as_mut().map(|field| field as _)
13647        }
13648        ///Returns a mutable reference to `limit`.
13649        ///If the field is unset, it is first initialized with the default value.
13650        pub fn limit_mut(&mut self) -> &mut u32 {
13651            self.limit.get_or_insert_default()
13652        }
13653        ///If `limit` is set, returns [`Some`] with the value; otherwise returns [`None`].
13654        pub fn limit_opt(&self) -> Option<u32> {
13655            self.limit.as_ref().map(|field| *field)
13656        }
13657        ///Sets `limit` with the provided value.
13658        pub fn set_limit(&mut self, field: u32) {
13659            self.limit = Some(field);
13660        }
13661        ///Sets `limit` with the provided value.
13662        pub fn with_limit(mut self, field: u32) -> Self {
13663            self.set_limit(field);
13664            self
13665        }
13666        ///If `after` is set, returns [`Some`] with the value; otherwise returns [`None`].
13667        pub fn after_opt(&self) -> Option<&[u8]> {
13668            self.after.as_ref().map(|field| field as _)
13669        }
13670        ///Sets `after` with the provided value.
13671        pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13672            self.after = Some(field.into().into());
13673        }
13674        ///Sets `after` with the provided value.
13675        pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13676            self.set_after(field.into());
13677            self
13678        }
13679        ///If `before` is set, returns [`Some`] with the value; otherwise returns [`None`].
13680        pub fn before_opt(&self) -> Option<&[u8]> {
13681            self.before.as_ref().map(|field| field as _)
13682        }
13683        ///Sets `before` with the provided value.
13684        pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13685            self.before = Some(field.into().into());
13686        }
13687        ///Sets `before` with the provided value.
13688        pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13689            self.set_before(field.into());
13690            self
13691        }
13692        ///Sets `ordering` with the provided value.
13693        pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13694            self.set_ordering(field.into());
13695            self
13696        }
13697    }
13698    impl super::RandomnessStateUpdate {
13699        pub const fn const_default() -> Self {
13700            Self {
13701                epoch: None,
13702                randomness_round: None,
13703                random_bytes: None,
13704                randomness_object_initial_shared_version: None,
13705            }
13706        }
13707        #[doc(hidden)]
13708        pub fn default_instance() -> &'static Self {
13709            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13710            &DEFAULT
13711        }
13712        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13713        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13714            self.epoch.as_mut().map(|field| field as _)
13715        }
13716        ///Returns a mutable reference to `epoch`.
13717        ///If the field is unset, it is first initialized with the default value.
13718        pub fn epoch_mut(&mut self) -> &mut u64 {
13719            self.epoch.get_or_insert_default()
13720        }
13721        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13722        pub fn epoch_opt(&self) -> Option<u64> {
13723            self.epoch.as_ref().map(|field| *field)
13724        }
13725        ///Sets `epoch` with the provided value.
13726        pub fn set_epoch(&mut self, field: u64) {
13727            self.epoch = Some(field);
13728        }
13729        ///Sets `epoch` with the provided value.
13730        pub fn with_epoch(mut self, field: u64) -> Self {
13731            self.set_epoch(field);
13732            self
13733        }
13734        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13735        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13736            self.randomness_round.as_mut().map(|field| field as _)
13737        }
13738        ///Returns a mutable reference to `randomness_round`.
13739        ///If the field is unset, it is first initialized with the default value.
13740        pub fn randomness_round_mut(&mut self) -> &mut u64 {
13741            self.randomness_round.get_or_insert_default()
13742        }
13743        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
13744        pub fn randomness_round_opt(&self) -> Option<u64> {
13745            self.randomness_round.as_ref().map(|field| *field)
13746        }
13747        ///Sets `randomness_round` with the provided value.
13748        pub fn set_randomness_round(&mut self, field: u64) {
13749            self.randomness_round = Some(field);
13750        }
13751        ///Sets `randomness_round` with the provided value.
13752        pub fn with_randomness_round(mut self, field: u64) -> Self {
13753            self.set_randomness_round(field);
13754            self
13755        }
13756        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
13757        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13758            self.random_bytes.as_ref().map(|field| field as _)
13759        }
13760        ///Sets `random_bytes` with the provided value.
13761        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13762            self.random_bytes = Some(field.into().into());
13763        }
13764        ///Sets `random_bytes` with the provided value.
13765        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13766            mut self,
13767            field: T,
13768        ) -> Self {
13769            self.set_random_bytes(field.into());
13770            self
13771        }
13772        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13773        pub fn randomness_object_initial_shared_version_opt_mut(
13774            &mut self,
13775        ) -> Option<&mut u64> {
13776            self.randomness_object_initial_shared_version
13777                .as_mut()
13778                .map(|field| field as _)
13779        }
13780        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
13781        ///If the field is unset, it is first initialized with the default value.
13782        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13783            self.randomness_object_initial_shared_version.get_or_insert_default()
13784        }
13785        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13786        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13787            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13788        }
13789        ///Sets `randomness_object_initial_shared_version` with the provided value.
13790        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13791            self.randomness_object_initial_shared_version = Some(field);
13792        }
13793        ///Sets `randomness_object_initial_shared_version` with the provided value.
13794        pub fn with_randomness_object_initial_shared_version(
13795            mut self,
13796            field: u64,
13797        ) -> Self {
13798            self.set_randomness_object_initial_shared_version(field);
13799            self
13800        }
13801    }
13802    impl super::RegulatedCoinMetadata {
13803        pub const fn const_default() -> Self {
13804            Self {
13805                id: None,
13806                coin_metadata_object: None,
13807                deny_cap_object: None,
13808                allow_global_pause: None,
13809                variant: None,
13810                coin_regulated_state: None,
13811            }
13812        }
13813        #[doc(hidden)]
13814        pub fn default_instance() -> &'static Self {
13815            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13816            &DEFAULT
13817        }
13818        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13819        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13820            self.id.as_mut().map(|field| field as _)
13821        }
13822        ///Returns a mutable reference to `id`.
13823        ///If the field is unset, it is first initialized with the default value.
13824        pub fn id_mut(&mut self) -> &mut String {
13825            self.id.get_or_insert_default()
13826        }
13827        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13828        pub fn id_opt(&self) -> Option<&str> {
13829            self.id.as_ref().map(|field| field as _)
13830        }
13831        ///Sets `id` with the provided value.
13832        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13833            self.id = Some(field.into().into());
13834        }
13835        ///Sets `id` with the provided value.
13836        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13837            self.set_id(field.into());
13838            self
13839        }
13840        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13841        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
13842            self.coin_metadata_object.as_mut().map(|field| field as _)
13843        }
13844        ///Returns a mutable reference to `coin_metadata_object`.
13845        ///If the field is unset, it is first initialized with the default value.
13846        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
13847            self.coin_metadata_object.get_or_insert_default()
13848        }
13849        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13850        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
13851            self.coin_metadata_object.as_ref().map(|field| field as _)
13852        }
13853        ///Sets `coin_metadata_object` with the provided value.
13854        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
13855            self.coin_metadata_object = Some(field.into().into());
13856        }
13857        ///Sets `coin_metadata_object` with the provided value.
13858        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
13859            self.set_coin_metadata_object(field.into());
13860            self
13861        }
13862        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13863        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
13864            self.deny_cap_object.as_mut().map(|field| field as _)
13865        }
13866        ///Returns a mutable reference to `deny_cap_object`.
13867        ///If the field is unset, it is first initialized with the default value.
13868        pub fn deny_cap_object_mut(&mut self) -> &mut String {
13869            self.deny_cap_object.get_or_insert_default()
13870        }
13871        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13872        pub fn deny_cap_object_opt(&self) -> Option<&str> {
13873            self.deny_cap_object.as_ref().map(|field| field as _)
13874        }
13875        ///Sets `deny_cap_object` with the provided value.
13876        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
13877            self.deny_cap_object = Some(field.into().into());
13878        }
13879        ///Sets `deny_cap_object` with the provided value.
13880        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
13881            self.set_deny_cap_object(field.into());
13882            self
13883        }
13884        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13885        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
13886            self.allow_global_pause.as_mut().map(|field| field as _)
13887        }
13888        ///Returns a mutable reference to `allow_global_pause`.
13889        ///If the field is unset, it is first initialized with the default value.
13890        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
13891            self.allow_global_pause.get_or_insert_default()
13892        }
13893        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
13894        pub fn allow_global_pause_opt(&self) -> Option<bool> {
13895            self.allow_global_pause.as_ref().map(|field| *field)
13896        }
13897        ///Sets `allow_global_pause` with the provided value.
13898        pub fn set_allow_global_pause(&mut self, field: bool) {
13899            self.allow_global_pause = Some(field);
13900        }
13901        ///Sets `allow_global_pause` with the provided value.
13902        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
13903            self.set_allow_global_pause(field);
13904            self
13905        }
13906        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13907        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
13908            self.variant.as_mut().map(|field| field as _)
13909        }
13910        ///Returns a mutable reference to `variant`.
13911        ///If the field is unset, it is first initialized with the default value.
13912        pub fn variant_mut(&mut self) -> &mut u32 {
13913            self.variant.get_or_insert_default()
13914        }
13915        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
13916        pub fn variant_opt(&self) -> Option<u32> {
13917            self.variant.as_ref().map(|field| *field)
13918        }
13919        ///Sets `variant` with the provided value.
13920        pub fn set_variant(&mut self, field: u32) {
13921            self.variant = Some(field);
13922        }
13923        ///Sets `variant` with the provided value.
13924        pub fn with_variant(mut self, field: u32) -> Self {
13925            self.set_variant(field);
13926            self
13927        }
13928        ///Sets `coin_regulated_state` with the provided value.
13929        pub fn with_coin_regulated_state<
13930            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
13931        >(mut self, field: T) -> Self {
13932            self.set_coin_regulated_state(field.into());
13933            self
13934        }
13935    }
13936    impl super::ReverseLookupNameRequest {
13937        pub const fn const_default() -> Self {
13938            Self { address: None }
13939        }
13940        #[doc(hidden)]
13941        pub fn default_instance() -> &'static Self {
13942            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
13943            &DEFAULT
13944        }
13945        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13946        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13947            self.address.as_mut().map(|field| field as _)
13948        }
13949        ///Returns a mutable reference to `address`.
13950        ///If the field is unset, it is first initialized with the default value.
13951        pub fn address_mut(&mut self) -> &mut String {
13952            self.address.get_or_insert_default()
13953        }
13954        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
13955        pub fn address_opt(&self) -> Option<&str> {
13956            self.address.as_ref().map(|field| field as _)
13957        }
13958        ///Sets `address` with the provided value.
13959        pub fn set_address<T: Into<String>>(&mut self, field: T) {
13960            self.address = Some(field.into().into());
13961        }
13962        ///Sets `address` with the provided value.
13963        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13964            self.set_address(field.into());
13965            self
13966        }
13967    }
13968    impl super::ReverseLookupNameResponse {
13969        pub const fn const_default() -> Self {
13970            Self { record: None }
13971        }
13972        #[doc(hidden)]
13973        pub fn default_instance() -> &'static Self {
13974            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
13975            &DEFAULT
13976        }
13977        ///Returns the value of `record`, or the default value if `record` is unset.
13978        pub fn record(&self) -> &super::NameRecord {
13979            self.record
13980                .as_ref()
13981                .map(|field| field as _)
13982                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
13983        }
13984        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13985        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
13986            self.record.as_mut().map(|field| field as _)
13987        }
13988        ///Returns a mutable reference to `record`.
13989        ///If the field is unset, it is first initialized with the default value.
13990        pub fn record_mut(&mut self) -> &mut super::NameRecord {
13991            self.record.get_or_insert_default()
13992        }
13993        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
13994        pub fn record_opt(&self) -> Option<&super::NameRecord> {
13995            self.record.as_ref().map(|field| field as _)
13996        }
13997        ///Sets `record` with the provided value.
13998        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
13999            self.record = Some(field.into().into());
14000        }
14001        ///Sets `record` with the provided value.
14002        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
14003            self.set_record(field.into());
14004            self
14005        }
14006    }
14007    impl super::SenderFilter {
14008        pub const fn const_default() -> Self {
14009            Self { address: None }
14010        }
14011        #[doc(hidden)]
14012        pub fn default_instance() -> &'static Self {
14013            static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
14014            &DEFAULT
14015        }
14016        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14017        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14018            self.address.as_mut().map(|field| field as _)
14019        }
14020        ///Returns a mutable reference to `address`.
14021        ///If the field is unset, it is first initialized with the default value.
14022        pub fn address_mut(&mut self) -> &mut String {
14023            self.address.get_or_insert_default()
14024        }
14025        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14026        pub fn address_opt(&self) -> Option<&str> {
14027            self.address.as_ref().map(|field| field as _)
14028        }
14029        ///Sets `address` with the provided value.
14030        pub fn set_address<T: Into<String>>(&mut self, field: T) {
14031            self.address = Some(field.into().into());
14032        }
14033        ///Sets `address` with the provided value.
14034        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14035            self.set_address(field.into());
14036            self
14037        }
14038    }
14039    impl super::SimpleSignature {
14040        pub const fn const_default() -> Self {
14041            Self {
14042                scheme: None,
14043                signature: None,
14044                public_key: None,
14045            }
14046        }
14047        #[doc(hidden)]
14048        pub fn default_instance() -> &'static Self {
14049            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14050            &DEFAULT
14051        }
14052        ///Sets `scheme` with the provided value.
14053        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14054            self.set_scheme(field.into());
14055            self
14056        }
14057        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
14058        pub fn signature_opt(&self) -> Option<&[u8]> {
14059            self.signature.as_ref().map(|field| field as _)
14060        }
14061        ///Sets `signature` with the provided value.
14062        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14063            self.signature = Some(field.into().into());
14064        }
14065        ///Sets `signature` with the provided value.
14066        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14067            mut self,
14068            field: T,
14069        ) -> Self {
14070            self.set_signature(field.into());
14071            self
14072        }
14073        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
14074        pub fn public_key_opt(&self) -> Option<&[u8]> {
14075            self.public_key.as_ref().map(|field| field as _)
14076        }
14077        ///Sets `public_key` with the provided value.
14078        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14079            self.public_key = Some(field.into().into());
14080        }
14081        ///Sets `public_key` with the provided value.
14082        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14083            mut self,
14084            field: T,
14085        ) -> Self {
14086            self.set_public_key(field.into());
14087            self
14088        }
14089    }
14090    impl super::SimulateTransactionRequest {
14091        pub const fn const_default() -> Self {
14092            Self {
14093                transaction: None,
14094                read_mask: None,
14095                checks: None,
14096                do_gas_selection: None,
14097            }
14098        }
14099        #[doc(hidden)]
14100        pub fn default_instance() -> &'static Self {
14101            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14102            &DEFAULT
14103        }
14104        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14105        pub fn transaction(&self) -> &super::Transaction {
14106            self.transaction
14107                .as_ref()
14108                .map(|field| field as _)
14109                .unwrap_or_else(|| super::Transaction::default_instance() as _)
14110        }
14111        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14112        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14113            self.transaction.as_mut().map(|field| field as _)
14114        }
14115        ///Returns a mutable reference to `transaction`.
14116        ///If the field is unset, it is first initialized with the default value.
14117        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14118            self.transaction.get_or_insert_default()
14119        }
14120        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14121        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14122            self.transaction.as_ref().map(|field| field as _)
14123        }
14124        ///Sets `transaction` with the provided value.
14125        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14126            self.transaction = Some(field.into().into());
14127        }
14128        ///Sets `transaction` with the provided value.
14129        pub fn with_transaction<T: Into<super::Transaction>>(
14130            mut self,
14131            field: T,
14132        ) -> Self {
14133            self.set_transaction(field.into());
14134            self
14135        }
14136        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14137        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14138            self.read_mask.as_mut().map(|field| field as _)
14139        }
14140        ///Returns a mutable reference to `read_mask`.
14141        ///If the field is unset, it is first initialized with the default value.
14142        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14143            self.read_mask.get_or_insert_default()
14144        }
14145        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14146        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14147            self.read_mask.as_ref().map(|field| field as _)
14148        }
14149        ///Sets `read_mask` with the provided value.
14150        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14151            self.read_mask = Some(field.into().into());
14152        }
14153        ///Sets `read_mask` with the provided value.
14154        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14155            mut self,
14156            field: T,
14157        ) -> Self {
14158            self.set_read_mask(field.into());
14159            self
14160        }
14161        ///Sets `checks` with the provided value.
14162        pub fn with_checks<
14163            T: Into<super::simulate_transaction_request::TransactionChecks>,
14164        >(mut self, field: T) -> Self {
14165            self.set_checks(field.into());
14166            self
14167        }
14168        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14169        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14170            self.do_gas_selection.as_mut().map(|field| field as _)
14171        }
14172        ///Returns a mutable reference to `do_gas_selection`.
14173        ///If the field is unset, it is first initialized with the default value.
14174        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14175            self.do_gas_selection.get_or_insert_default()
14176        }
14177        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
14178        pub fn do_gas_selection_opt(&self) -> Option<bool> {
14179            self.do_gas_selection.as_ref().map(|field| *field)
14180        }
14181        ///Sets `do_gas_selection` with the provided value.
14182        pub fn set_do_gas_selection(&mut self, field: bool) {
14183            self.do_gas_selection = Some(field);
14184        }
14185        ///Sets `do_gas_selection` with the provided value.
14186        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14187            self.set_do_gas_selection(field);
14188            self
14189        }
14190    }
14191    impl super::SimulateTransactionResponse {
14192        pub const fn const_default() -> Self {
14193            Self {
14194                transaction: None,
14195                command_outputs: Vec::new(),
14196                suggested_gas_price: None,
14197            }
14198        }
14199        #[doc(hidden)]
14200        pub fn default_instance() -> &'static Self {
14201            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14202            &DEFAULT
14203        }
14204        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14205        pub fn transaction(&self) -> &super::ExecutedTransaction {
14206            self.transaction
14207                .as_ref()
14208                .map(|field| field as _)
14209                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14210        }
14211        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14212        pub fn transaction_opt_mut(
14213            &mut self,
14214        ) -> Option<&mut super::ExecutedTransaction> {
14215            self.transaction.as_mut().map(|field| field as _)
14216        }
14217        ///Returns a mutable reference to `transaction`.
14218        ///If the field is unset, it is first initialized with the default value.
14219        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14220            self.transaction.get_or_insert_default()
14221        }
14222        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14223        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14224            self.transaction.as_ref().map(|field| field as _)
14225        }
14226        ///Sets `transaction` with the provided value.
14227        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14228            &mut self,
14229            field: T,
14230        ) {
14231            self.transaction = Some(field.into().into());
14232        }
14233        ///Sets `transaction` with the provided value.
14234        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14235            mut self,
14236            field: T,
14237        ) -> Self {
14238            self.set_transaction(field.into());
14239            self
14240        }
14241        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
14242        pub fn command_outputs(&self) -> &[super::CommandResult] {
14243            &self.command_outputs
14244        }
14245        ///Returns a mutable reference to `command_outputs`.
14246        ///If the field is unset, it is first initialized with the default value.
14247        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14248            &mut self.command_outputs
14249        }
14250        ///Sets `command_outputs` with the provided value.
14251        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14252            self.command_outputs = field;
14253        }
14254        ///Sets `command_outputs` with the provided value.
14255        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14256            self.set_command_outputs(field);
14257            self
14258        }
14259        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14260        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14261            self.suggested_gas_price.as_mut().map(|field| field as _)
14262        }
14263        ///Returns a mutable reference to `suggested_gas_price`.
14264        ///If the field is unset, it is first initialized with the default value.
14265        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14266            self.suggested_gas_price.get_or_insert_default()
14267        }
14268        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
14269        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14270            self.suggested_gas_price.as_ref().map(|field| *field)
14271        }
14272        ///Sets `suggested_gas_price` with the provided value.
14273        pub fn set_suggested_gas_price(&mut self, field: u64) {
14274            self.suggested_gas_price = Some(field);
14275        }
14276        ///Sets `suggested_gas_price` with the provided value.
14277        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14278            self.set_suggested_gas_price(field);
14279            self
14280        }
14281    }
14282    impl super::SizeError {
14283        pub const fn const_default() -> Self {
14284            Self { size: None, max_size: None }
14285        }
14286        #[doc(hidden)]
14287        pub fn default_instance() -> &'static Self {
14288            static DEFAULT: super::SizeError = super::SizeError::const_default();
14289            &DEFAULT
14290        }
14291        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14292        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14293            self.size.as_mut().map(|field| field as _)
14294        }
14295        ///Returns a mutable reference to `size`.
14296        ///If the field is unset, it is first initialized with the default value.
14297        pub fn size_mut(&mut self) -> &mut u64 {
14298            self.size.get_or_insert_default()
14299        }
14300        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14301        pub fn size_opt(&self) -> Option<u64> {
14302            self.size.as_ref().map(|field| *field)
14303        }
14304        ///Sets `size` with the provided value.
14305        pub fn set_size(&mut self, field: u64) {
14306            self.size = Some(field);
14307        }
14308        ///Sets `size` with the provided value.
14309        pub fn with_size(mut self, field: u64) -> Self {
14310            self.set_size(field);
14311            self
14312        }
14313        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14314        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14315            self.max_size.as_mut().map(|field| field as _)
14316        }
14317        ///Returns a mutable reference to `max_size`.
14318        ///If the field is unset, it is first initialized with the default value.
14319        pub fn max_size_mut(&mut self) -> &mut u64 {
14320            self.max_size.get_or_insert_default()
14321        }
14322        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14323        pub fn max_size_opt(&self) -> Option<u64> {
14324            self.max_size.as_ref().map(|field| *field)
14325        }
14326        ///Sets `max_size` with the provided value.
14327        pub fn set_max_size(&mut self, field: u64) {
14328            self.max_size = Some(field);
14329        }
14330        ///Sets `max_size` with the provided value.
14331        pub fn with_max_size(mut self, field: u64) -> Self {
14332            self.set_max_size(field);
14333            self
14334        }
14335    }
14336    impl super::SplitCoins {
14337        pub const fn const_default() -> Self {
14338            Self {
14339                coin: None,
14340                amounts: Vec::new(),
14341            }
14342        }
14343        #[doc(hidden)]
14344        pub fn default_instance() -> &'static Self {
14345            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14346            &DEFAULT
14347        }
14348        ///Returns the value of `coin`, or the default value if `coin` is unset.
14349        pub fn coin(&self) -> &super::Argument {
14350            self.coin
14351                .as_ref()
14352                .map(|field| field as _)
14353                .unwrap_or_else(|| super::Argument::default_instance() as _)
14354        }
14355        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14356        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14357            self.coin.as_mut().map(|field| field as _)
14358        }
14359        ///Returns a mutable reference to `coin`.
14360        ///If the field is unset, it is first initialized with the default value.
14361        pub fn coin_mut(&mut self) -> &mut super::Argument {
14362            self.coin.get_or_insert_default()
14363        }
14364        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
14365        pub fn coin_opt(&self) -> Option<&super::Argument> {
14366            self.coin.as_ref().map(|field| field as _)
14367        }
14368        ///Sets `coin` with the provided value.
14369        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14370            self.coin = Some(field.into().into());
14371        }
14372        ///Sets `coin` with the provided value.
14373        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14374            self.set_coin(field.into());
14375            self
14376        }
14377        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
14378        pub fn amounts(&self) -> &[super::Argument] {
14379            &self.amounts
14380        }
14381        ///Returns a mutable reference to `amounts`.
14382        ///If the field is unset, it is first initialized with the default value.
14383        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14384            &mut self.amounts
14385        }
14386        ///Sets `amounts` with the provided value.
14387        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14388            self.amounts = field;
14389        }
14390        ///Sets `amounts` with the provided value.
14391        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14392            self.set_amounts(field);
14393            self
14394        }
14395    }
14396    impl super::StakeSubsidy {
14397        pub const fn const_default() -> Self {
14398            Self {
14399                balance: None,
14400                distribution_counter: None,
14401                current_distribution_amount: None,
14402                stake_subsidy_period_length: None,
14403                stake_subsidy_decrease_rate: None,
14404                extra_fields: None,
14405            }
14406        }
14407        #[doc(hidden)]
14408        pub fn default_instance() -> &'static Self {
14409            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14410            &DEFAULT
14411        }
14412        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14413        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14414            self.balance.as_mut().map(|field| field as _)
14415        }
14416        ///Returns a mutable reference to `balance`.
14417        ///If the field is unset, it is first initialized with the default value.
14418        pub fn balance_mut(&mut self) -> &mut u64 {
14419            self.balance.get_or_insert_default()
14420        }
14421        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14422        pub fn balance_opt(&self) -> Option<u64> {
14423            self.balance.as_ref().map(|field| *field)
14424        }
14425        ///Sets `balance` with the provided value.
14426        pub fn set_balance(&mut self, field: u64) {
14427            self.balance = Some(field);
14428        }
14429        ///Sets `balance` with the provided value.
14430        pub fn with_balance(mut self, field: u64) -> Self {
14431            self.set_balance(field);
14432            self
14433        }
14434        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14435        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14436            self.distribution_counter.as_mut().map(|field| field as _)
14437        }
14438        ///Returns a mutable reference to `distribution_counter`.
14439        ///If the field is unset, it is first initialized with the default value.
14440        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14441            self.distribution_counter.get_or_insert_default()
14442        }
14443        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14444        pub fn distribution_counter_opt(&self) -> Option<u64> {
14445            self.distribution_counter.as_ref().map(|field| *field)
14446        }
14447        ///Sets `distribution_counter` with the provided value.
14448        pub fn set_distribution_counter(&mut self, field: u64) {
14449            self.distribution_counter = Some(field);
14450        }
14451        ///Sets `distribution_counter` with the provided value.
14452        pub fn with_distribution_counter(mut self, field: u64) -> Self {
14453            self.set_distribution_counter(field);
14454            self
14455        }
14456        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14457        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14458            self.current_distribution_amount.as_mut().map(|field| field as _)
14459        }
14460        ///Returns a mutable reference to `current_distribution_amount`.
14461        ///If the field is unset, it is first initialized with the default value.
14462        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14463            self.current_distribution_amount.get_or_insert_default()
14464        }
14465        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
14466        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14467            self.current_distribution_amount.as_ref().map(|field| *field)
14468        }
14469        ///Sets `current_distribution_amount` with the provided value.
14470        pub fn set_current_distribution_amount(&mut self, field: u64) {
14471            self.current_distribution_amount = Some(field);
14472        }
14473        ///Sets `current_distribution_amount` with the provided value.
14474        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14475            self.set_current_distribution_amount(field);
14476            self
14477        }
14478        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14479        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14480            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14481        }
14482        ///Returns a mutable reference to `stake_subsidy_period_length`.
14483        ///If the field is unset, it is first initialized with the default value.
14484        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14485            self.stake_subsidy_period_length.get_or_insert_default()
14486        }
14487        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
14488        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14489            self.stake_subsidy_period_length.as_ref().map(|field| *field)
14490        }
14491        ///Sets `stake_subsidy_period_length` with the provided value.
14492        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14493            self.stake_subsidy_period_length = Some(field);
14494        }
14495        ///Sets `stake_subsidy_period_length` with the provided value.
14496        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14497            self.set_stake_subsidy_period_length(field);
14498            self
14499        }
14500        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14501        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14502            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14503        }
14504        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
14505        ///If the field is unset, it is first initialized with the default value.
14506        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14507            self.stake_subsidy_decrease_rate.get_or_insert_default()
14508        }
14509        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
14510        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14511            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14512        }
14513        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14514        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14515            self.stake_subsidy_decrease_rate = Some(field);
14516        }
14517        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14518        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14519            self.set_stake_subsidy_decrease_rate(field);
14520            self
14521        }
14522        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14523        pub fn extra_fields(&self) -> &super::MoveTable {
14524            self.extra_fields
14525                .as_ref()
14526                .map(|field| field as _)
14527                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14528        }
14529        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14530        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14531            self.extra_fields.as_mut().map(|field| field as _)
14532        }
14533        ///Returns a mutable reference to `extra_fields`.
14534        ///If the field is unset, it is first initialized with the default value.
14535        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14536            self.extra_fields.get_or_insert_default()
14537        }
14538        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14539        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14540            self.extra_fields.as_ref().map(|field| field as _)
14541        }
14542        ///Sets `extra_fields` with the provided value.
14543        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14544            self.extra_fields = Some(field.into().into());
14545        }
14546        ///Sets `extra_fields` with the provided value.
14547        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14548            self.set_extra_fields(field.into());
14549            self
14550        }
14551    }
14552    impl super::StakingPool {
14553        pub const fn const_default() -> Self {
14554            Self {
14555                id: None,
14556                activation_epoch: None,
14557                deactivation_epoch: None,
14558                sui_balance: None,
14559                rewards_pool: None,
14560                pool_token_balance: None,
14561                exchange_rates: None,
14562                pending_stake: None,
14563                pending_total_sui_withdraw: None,
14564                pending_pool_token_withdraw: None,
14565                extra_fields: None,
14566            }
14567        }
14568        #[doc(hidden)]
14569        pub fn default_instance() -> &'static Self {
14570            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14571            &DEFAULT
14572        }
14573        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14574        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14575            self.id.as_mut().map(|field| field as _)
14576        }
14577        ///Returns a mutable reference to `id`.
14578        ///If the field is unset, it is first initialized with the default value.
14579        pub fn id_mut(&mut self) -> &mut String {
14580            self.id.get_or_insert_default()
14581        }
14582        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14583        pub fn id_opt(&self) -> Option<&str> {
14584            self.id.as_ref().map(|field| field as _)
14585        }
14586        ///Sets `id` with the provided value.
14587        pub fn set_id<T: Into<String>>(&mut self, field: T) {
14588            self.id = Some(field.into().into());
14589        }
14590        ///Sets `id` with the provided value.
14591        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14592            self.set_id(field.into());
14593            self
14594        }
14595        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14596        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14597            self.activation_epoch.as_mut().map(|field| field as _)
14598        }
14599        ///Returns a mutable reference to `activation_epoch`.
14600        ///If the field is unset, it is first initialized with the default value.
14601        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14602            self.activation_epoch.get_or_insert_default()
14603        }
14604        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14605        pub fn activation_epoch_opt(&self) -> Option<u64> {
14606            self.activation_epoch.as_ref().map(|field| *field)
14607        }
14608        ///Sets `activation_epoch` with the provided value.
14609        pub fn set_activation_epoch(&mut self, field: u64) {
14610            self.activation_epoch = Some(field);
14611        }
14612        ///Sets `activation_epoch` with the provided value.
14613        pub fn with_activation_epoch(mut self, field: u64) -> Self {
14614            self.set_activation_epoch(field);
14615            self
14616        }
14617        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14618        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14619            self.deactivation_epoch.as_mut().map(|field| field as _)
14620        }
14621        ///Returns a mutable reference to `deactivation_epoch`.
14622        ///If the field is unset, it is first initialized with the default value.
14623        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14624            self.deactivation_epoch.get_or_insert_default()
14625        }
14626        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14627        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14628            self.deactivation_epoch.as_ref().map(|field| *field)
14629        }
14630        ///Sets `deactivation_epoch` with the provided value.
14631        pub fn set_deactivation_epoch(&mut self, field: u64) {
14632            self.deactivation_epoch = Some(field);
14633        }
14634        ///Sets `deactivation_epoch` with the provided value.
14635        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14636            self.set_deactivation_epoch(field);
14637            self
14638        }
14639        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14640        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14641            self.sui_balance.as_mut().map(|field| field as _)
14642        }
14643        ///Returns a mutable reference to `sui_balance`.
14644        ///If the field is unset, it is first initialized with the default value.
14645        pub fn sui_balance_mut(&mut self) -> &mut u64 {
14646            self.sui_balance.get_or_insert_default()
14647        }
14648        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14649        pub fn sui_balance_opt(&self) -> Option<u64> {
14650            self.sui_balance.as_ref().map(|field| *field)
14651        }
14652        ///Sets `sui_balance` with the provided value.
14653        pub fn set_sui_balance(&mut self, field: u64) {
14654            self.sui_balance = Some(field);
14655        }
14656        ///Sets `sui_balance` with the provided value.
14657        pub fn with_sui_balance(mut self, field: u64) -> Self {
14658            self.set_sui_balance(field);
14659            self
14660        }
14661        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14662        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14663            self.rewards_pool.as_mut().map(|field| field as _)
14664        }
14665        ///Returns a mutable reference to `rewards_pool`.
14666        ///If the field is unset, it is first initialized with the default value.
14667        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14668            self.rewards_pool.get_or_insert_default()
14669        }
14670        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
14671        pub fn rewards_pool_opt(&self) -> Option<u64> {
14672            self.rewards_pool.as_ref().map(|field| *field)
14673        }
14674        ///Sets `rewards_pool` with the provided value.
14675        pub fn set_rewards_pool(&mut self, field: u64) {
14676            self.rewards_pool = Some(field);
14677        }
14678        ///Sets `rewards_pool` with the provided value.
14679        pub fn with_rewards_pool(mut self, field: u64) -> Self {
14680            self.set_rewards_pool(field);
14681            self
14682        }
14683        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14684        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14685            self.pool_token_balance.as_mut().map(|field| field as _)
14686        }
14687        ///Returns a mutable reference to `pool_token_balance`.
14688        ///If the field is unset, it is first initialized with the default value.
14689        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14690            self.pool_token_balance.get_or_insert_default()
14691        }
14692        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14693        pub fn pool_token_balance_opt(&self) -> Option<u64> {
14694            self.pool_token_balance.as_ref().map(|field| *field)
14695        }
14696        ///Sets `pool_token_balance` with the provided value.
14697        pub fn set_pool_token_balance(&mut self, field: u64) {
14698            self.pool_token_balance = Some(field);
14699        }
14700        ///Sets `pool_token_balance` with the provided value.
14701        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14702            self.set_pool_token_balance(field);
14703            self
14704        }
14705        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
14706        pub fn exchange_rates(&self) -> &super::MoveTable {
14707            self.exchange_rates
14708                .as_ref()
14709                .map(|field| field as _)
14710                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14711        }
14712        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14713        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14714            self.exchange_rates.as_mut().map(|field| field as _)
14715        }
14716        ///Returns a mutable reference to `exchange_rates`.
14717        ///If the field is unset, it is first initialized with the default value.
14718        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14719            self.exchange_rates.get_or_insert_default()
14720        }
14721        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14722        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14723            self.exchange_rates.as_ref().map(|field| field as _)
14724        }
14725        ///Sets `exchange_rates` with the provided value.
14726        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14727            self.exchange_rates = Some(field.into().into());
14728        }
14729        ///Sets `exchange_rates` with the provided value.
14730        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14731            mut self,
14732            field: T,
14733        ) -> Self {
14734            self.set_exchange_rates(field.into());
14735            self
14736        }
14737        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14738        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14739            self.pending_stake.as_mut().map(|field| field as _)
14740        }
14741        ///Returns a mutable reference to `pending_stake`.
14742        ///If the field is unset, it is first initialized with the default value.
14743        pub fn pending_stake_mut(&mut self) -> &mut u64 {
14744            self.pending_stake.get_or_insert_default()
14745        }
14746        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
14747        pub fn pending_stake_opt(&self) -> Option<u64> {
14748            self.pending_stake.as_ref().map(|field| *field)
14749        }
14750        ///Sets `pending_stake` with the provided value.
14751        pub fn set_pending_stake(&mut self, field: u64) {
14752            self.pending_stake = Some(field);
14753        }
14754        ///Sets `pending_stake` with the provided value.
14755        pub fn with_pending_stake(mut self, field: u64) -> Self {
14756            self.set_pending_stake(field);
14757            self
14758        }
14759        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14760        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14761            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14762        }
14763        ///Returns a mutable reference to `pending_total_sui_withdraw`.
14764        ///If the field is unset, it is first initialized with the default value.
14765        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14766            self.pending_total_sui_withdraw.get_or_insert_default()
14767        }
14768        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14769        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14770            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14771        }
14772        ///Sets `pending_total_sui_withdraw` with the provided value.
14773        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14774            self.pending_total_sui_withdraw = Some(field);
14775        }
14776        ///Sets `pending_total_sui_withdraw` with the provided value.
14777        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14778            self.set_pending_total_sui_withdraw(field);
14779            self
14780        }
14781        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14782        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14783            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14784        }
14785        ///Returns a mutable reference to `pending_pool_token_withdraw`.
14786        ///If the field is unset, it is first initialized with the default value.
14787        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14788            self.pending_pool_token_withdraw.get_or_insert_default()
14789        }
14790        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14791        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14792            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14793        }
14794        ///Sets `pending_pool_token_withdraw` with the provided value.
14795        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14796            self.pending_pool_token_withdraw = Some(field);
14797        }
14798        ///Sets `pending_pool_token_withdraw` with the provided value.
14799        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14800            self.set_pending_pool_token_withdraw(field);
14801            self
14802        }
14803        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14804        pub fn extra_fields(&self) -> &super::MoveTable {
14805            self.extra_fields
14806                .as_ref()
14807                .map(|field| field as _)
14808                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14809        }
14810        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14811        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14812            self.extra_fields.as_mut().map(|field| field as _)
14813        }
14814        ///Returns a mutable reference to `extra_fields`.
14815        ///If the field is unset, it is first initialized with the default value.
14816        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14817            self.extra_fields.get_or_insert_default()
14818        }
14819        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14820        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14821            self.extra_fields.as_ref().map(|field| field as _)
14822        }
14823        ///Sets `extra_fields` with the provided value.
14824        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14825            self.extra_fields = Some(field.into().into());
14826        }
14827        ///Sets `extra_fields` with the provided value.
14828        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14829            self.set_extra_fields(field.into());
14830            self
14831        }
14832    }
14833    impl super::StorageFund {
14834        pub const fn const_default() -> Self {
14835            Self {
14836                total_object_storage_rebates: None,
14837                non_refundable_balance: None,
14838            }
14839        }
14840        #[doc(hidden)]
14841        pub fn default_instance() -> &'static Self {
14842            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
14843            &DEFAULT
14844        }
14845        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14846        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14847            self.total_object_storage_rebates.as_mut().map(|field| field as _)
14848        }
14849        ///Returns a mutable reference to `total_object_storage_rebates`.
14850        ///If the field is unset, it is first initialized with the default value.
14851        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
14852            self.total_object_storage_rebates.get_or_insert_default()
14853        }
14854        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14855        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
14856            self.total_object_storage_rebates.as_ref().map(|field| *field)
14857        }
14858        ///Sets `total_object_storage_rebates` with the provided value.
14859        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
14860            self.total_object_storage_rebates = Some(field);
14861        }
14862        ///Sets `total_object_storage_rebates` with the provided value.
14863        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
14864            self.set_total_object_storage_rebates(field);
14865            self
14866        }
14867        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14868        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
14869            self.non_refundable_balance.as_mut().map(|field| field as _)
14870        }
14871        ///Returns a mutable reference to `non_refundable_balance`.
14872        ///If the field is unset, it is first initialized with the default value.
14873        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
14874            self.non_refundable_balance.get_or_insert_default()
14875        }
14876        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14877        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
14878            self.non_refundable_balance.as_ref().map(|field| *field)
14879        }
14880        ///Sets `non_refundable_balance` with the provided value.
14881        pub fn set_non_refundable_balance(&mut self, field: u64) {
14882            self.non_refundable_balance = Some(field);
14883        }
14884        ///Sets `non_refundable_balance` with the provided value.
14885        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
14886            self.set_non_refundable_balance(field);
14887            self
14888        }
14889    }
14890    impl super::SubscribeCheckpointsRequest {
14891        pub const fn const_default() -> Self {
14892            Self {
14893                read_mask: None,
14894                filter: None,
14895            }
14896        }
14897        #[doc(hidden)]
14898        pub fn default_instance() -> &'static Self {
14899            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
14900            &DEFAULT
14901        }
14902        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14903        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14904            self.read_mask.as_mut().map(|field| field as _)
14905        }
14906        ///Returns a mutable reference to `read_mask`.
14907        ///If the field is unset, it is first initialized with the default value.
14908        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14909            self.read_mask.get_or_insert_default()
14910        }
14911        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14912        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14913            self.read_mask.as_ref().map(|field| field as _)
14914        }
14915        ///Sets `read_mask` with the provided value.
14916        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14917            self.read_mask = Some(field.into().into());
14918        }
14919        ///Sets `read_mask` with the provided value.
14920        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14921            mut self,
14922            field: T,
14923        ) -> Self {
14924            self.set_read_mask(field.into());
14925            self
14926        }
14927        ///Returns the value of `filter`, or the default value if `filter` is unset.
14928        pub fn filter(&self) -> &super::TransactionFilter {
14929            self.filter
14930                .as_ref()
14931                .map(|field| field as _)
14932                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
14933        }
14934        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14935        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
14936            self.filter.as_mut().map(|field| field as _)
14937        }
14938        ///Returns a mutable reference to `filter`.
14939        ///If the field is unset, it is first initialized with the default value.
14940        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
14941            self.filter.get_or_insert_default()
14942        }
14943        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14944        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
14945            self.filter.as_ref().map(|field| field as _)
14946        }
14947        ///Sets `filter` with the provided value.
14948        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
14949            self.filter = Some(field.into().into());
14950        }
14951        ///Sets `filter` with the provided value.
14952        pub fn with_filter<T: Into<super::TransactionFilter>>(
14953            mut self,
14954            field: T,
14955        ) -> Self {
14956            self.set_filter(field.into());
14957            self
14958        }
14959    }
14960    impl super::SubscribeCheckpointsResponse {
14961        pub const fn const_default() -> Self {
14962            Self {
14963                cursor: None,
14964                checkpoint: None,
14965            }
14966        }
14967        #[doc(hidden)]
14968        pub fn default_instance() -> &'static Self {
14969            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
14970            &DEFAULT
14971        }
14972        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14973        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
14974            self.cursor.as_mut().map(|field| field as _)
14975        }
14976        ///Returns a mutable reference to `cursor`.
14977        ///If the field is unset, it is first initialized with the default value.
14978        pub fn cursor_mut(&mut self) -> &mut u64 {
14979            self.cursor.get_or_insert_default()
14980        }
14981        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
14982        pub fn cursor_opt(&self) -> Option<u64> {
14983            self.cursor.as_ref().map(|field| *field)
14984        }
14985        ///Sets `cursor` with the provided value.
14986        pub fn set_cursor(&mut self, field: u64) {
14987            self.cursor = Some(field);
14988        }
14989        ///Sets `cursor` with the provided value.
14990        pub fn with_cursor(mut self, field: u64) -> Self {
14991            self.set_cursor(field);
14992            self
14993        }
14994        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
14995        pub fn checkpoint(&self) -> &super::Checkpoint {
14996            self.checkpoint
14997                .as_ref()
14998                .map(|field| field as _)
14999                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
15000        }
15001        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15002        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
15003            self.checkpoint.as_mut().map(|field| field as _)
15004        }
15005        ///Returns a mutable reference to `checkpoint`.
15006        ///If the field is unset, it is first initialized with the default value.
15007        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
15008            self.checkpoint.get_or_insert_default()
15009        }
15010        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
15011        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
15012            self.checkpoint.as_ref().map(|field| field as _)
15013        }
15014        ///Sets `checkpoint` with the provided value.
15015        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
15016            self.checkpoint = Some(field.into().into());
15017        }
15018        ///Sets `checkpoint` with the provided value.
15019        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
15020            self.set_checkpoint(field.into());
15021            self
15022        }
15023    }
15024    impl super::SubscribeEventsRequest {
15025        pub const fn const_default() -> Self {
15026            Self {
15027                read_mask: None,
15028                filter: None,
15029            }
15030        }
15031        #[doc(hidden)]
15032        pub fn default_instance() -> &'static Self {
15033            static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
15034            &DEFAULT
15035        }
15036        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15037        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15038            self.read_mask.as_mut().map(|field| field as _)
15039        }
15040        ///Returns a mutable reference to `read_mask`.
15041        ///If the field is unset, it is first initialized with the default value.
15042        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15043            self.read_mask.get_or_insert_default()
15044        }
15045        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15046        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15047            self.read_mask.as_ref().map(|field| field as _)
15048        }
15049        ///Sets `read_mask` with the provided value.
15050        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15051            self.read_mask = Some(field.into().into());
15052        }
15053        ///Sets `read_mask` with the provided value.
15054        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15055            mut self,
15056            field: T,
15057        ) -> Self {
15058            self.set_read_mask(field.into());
15059            self
15060        }
15061        ///Returns the value of `filter`, or the default value if `filter` is unset.
15062        pub fn filter(&self) -> &super::EventFilter {
15063            self.filter
15064                .as_ref()
15065                .map(|field| field as _)
15066                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15067        }
15068        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15069        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15070            self.filter.as_mut().map(|field| field as _)
15071        }
15072        ///Returns a mutable reference to `filter`.
15073        ///If the field is unset, it is first initialized with the default value.
15074        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15075            self.filter.get_or_insert_default()
15076        }
15077        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15078        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15079            self.filter.as_ref().map(|field| field as _)
15080        }
15081        ///Sets `filter` with the provided value.
15082        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15083            self.filter = Some(field.into().into());
15084        }
15085        ///Sets `filter` with the provided value.
15086        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15087            self.set_filter(field.into());
15088            self
15089        }
15090    }
15091    impl super::SubscribeEventsResponse {
15092        pub const fn const_default() -> Self {
15093            Self {
15094                event: None,
15095                watermark: None,
15096            }
15097        }
15098        #[doc(hidden)]
15099        pub fn default_instance() -> &'static Self {
15100            static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15101            &DEFAULT
15102        }
15103        ///Returns the value of `event`, or the default value if `event` is unset.
15104        pub fn event(&self) -> &super::Event {
15105            self.event
15106                .as_ref()
15107                .map(|field| field as _)
15108                .unwrap_or_else(|| super::Event::default_instance() as _)
15109        }
15110        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15111        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15112            self.event.as_mut().map(|field| field as _)
15113        }
15114        ///Returns a mutable reference to `event`.
15115        ///If the field is unset, it is first initialized with the default value.
15116        pub fn event_mut(&mut self) -> &mut super::Event {
15117            self.event.get_or_insert_default()
15118        }
15119        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
15120        pub fn event_opt(&self) -> Option<&super::Event> {
15121            self.event.as_ref().map(|field| field as _)
15122        }
15123        ///Sets `event` with the provided value.
15124        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15125            self.event = Some(field.into().into());
15126        }
15127        ///Sets `event` with the provided value.
15128        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15129            self.set_event(field.into());
15130            self
15131        }
15132        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15133        pub fn watermark(&self) -> &super::Watermark {
15134            self.watermark
15135                .as_ref()
15136                .map(|field| field as _)
15137                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15138        }
15139        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15140        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15141            self.watermark.as_mut().map(|field| field as _)
15142        }
15143        ///Returns a mutable reference to `watermark`.
15144        ///If the field is unset, it is first initialized with the default value.
15145        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15146            self.watermark.get_or_insert_default()
15147        }
15148        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15149        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15150            self.watermark.as_ref().map(|field| field as _)
15151        }
15152        ///Sets `watermark` with the provided value.
15153        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15154            self.watermark = Some(field.into().into());
15155        }
15156        ///Sets `watermark` with the provided value.
15157        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15158            self.set_watermark(field.into());
15159            self
15160        }
15161    }
15162    impl super::SubscribeTransactionsRequest {
15163        pub const fn const_default() -> Self {
15164            Self {
15165                read_mask: None,
15166                filter: None,
15167            }
15168        }
15169        #[doc(hidden)]
15170        pub fn default_instance() -> &'static Self {
15171            static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15172            &DEFAULT
15173        }
15174        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15175        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15176            self.read_mask.as_mut().map(|field| field as _)
15177        }
15178        ///Returns a mutable reference to `read_mask`.
15179        ///If the field is unset, it is first initialized with the default value.
15180        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15181            self.read_mask.get_or_insert_default()
15182        }
15183        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15184        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15185            self.read_mask.as_ref().map(|field| field as _)
15186        }
15187        ///Sets `read_mask` with the provided value.
15188        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15189            self.read_mask = Some(field.into().into());
15190        }
15191        ///Sets `read_mask` with the provided value.
15192        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15193            mut self,
15194            field: T,
15195        ) -> Self {
15196            self.set_read_mask(field.into());
15197            self
15198        }
15199        ///Returns the value of `filter`, or the default value if `filter` is unset.
15200        pub fn filter(&self) -> &super::TransactionFilter {
15201            self.filter
15202                .as_ref()
15203                .map(|field| field as _)
15204                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15205        }
15206        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15207        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15208            self.filter.as_mut().map(|field| field as _)
15209        }
15210        ///Returns a mutable reference to `filter`.
15211        ///If the field is unset, it is first initialized with the default value.
15212        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15213            self.filter.get_or_insert_default()
15214        }
15215        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15216        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15217            self.filter.as_ref().map(|field| field as _)
15218        }
15219        ///Sets `filter` with the provided value.
15220        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15221            self.filter = Some(field.into().into());
15222        }
15223        ///Sets `filter` with the provided value.
15224        pub fn with_filter<T: Into<super::TransactionFilter>>(
15225            mut self,
15226            field: T,
15227        ) -> Self {
15228            self.set_filter(field.into());
15229            self
15230        }
15231    }
15232    impl super::SubscribeTransactionsResponse {
15233        pub const fn const_default() -> Self {
15234            Self {
15235                transaction: None,
15236                watermark: None,
15237            }
15238        }
15239        #[doc(hidden)]
15240        pub fn default_instance() -> &'static Self {
15241            static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15242            &DEFAULT
15243        }
15244        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
15245        pub fn transaction(&self) -> &super::ExecutedTransaction {
15246            self.transaction
15247                .as_ref()
15248                .map(|field| field as _)
15249                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15250        }
15251        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15252        pub fn transaction_opt_mut(
15253            &mut self,
15254        ) -> Option<&mut super::ExecutedTransaction> {
15255            self.transaction.as_mut().map(|field| field as _)
15256        }
15257        ///Returns a mutable reference to `transaction`.
15258        ///If the field is unset, it is first initialized with the default value.
15259        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15260            self.transaction.get_or_insert_default()
15261        }
15262        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15263        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15264            self.transaction.as_ref().map(|field| field as _)
15265        }
15266        ///Sets `transaction` with the provided value.
15267        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15268            &mut self,
15269            field: T,
15270        ) {
15271            self.transaction = Some(field.into().into());
15272        }
15273        ///Sets `transaction` with the provided value.
15274        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15275            mut self,
15276            field: T,
15277        ) -> Self {
15278            self.set_transaction(field.into());
15279            self
15280        }
15281        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15282        pub fn watermark(&self) -> &super::Watermark {
15283            self.watermark
15284                .as_ref()
15285                .map(|field| field as _)
15286                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15287        }
15288        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15289        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15290            self.watermark.as_mut().map(|field| field as _)
15291        }
15292        ///Returns a mutable reference to `watermark`.
15293        ///If the field is unset, it is first initialized with the default value.
15294        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15295            self.watermark.get_or_insert_default()
15296        }
15297        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15298        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15299            self.watermark.as_ref().map(|field| field as _)
15300        }
15301        ///Sets `watermark` with the provided value.
15302        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15303            self.watermark = Some(field.into().into());
15304        }
15305        ///Sets `watermark` with the provided value.
15306        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15307            self.set_watermark(field.into());
15308            self
15309        }
15310    }
15311    impl super::SystemPackage {
15312        pub const fn const_default() -> Self {
15313            Self {
15314                version: None,
15315                modules: Vec::new(),
15316                dependencies: Vec::new(),
15317            }
15318        }
15319        #[doc(hidden)]
15320        pub fn default_instance() -> &'static Self {
15321            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15322            &DEFAULT
15323        }
15324        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15325        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15326            self.version.as_mut().map(|field| field as _)
15327        }
15328        ///Returns a mutable reference to `version`.
15329        ///If the field is unset, it is first initialized with the default value.
15330        pub fn version_mut(&mut self) -> &mut u64 {
15331            self.version.get_or_insert_default()
15332        }
15333        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15334        pub fn version_opt(&self) -> Option<u64> {
15335            self.version.as_ref().map(|field| *field)
15336        }
15337        ///Sets `version` with the provided value.
15338        pub fn set_version(&mut self, field: u64) {
15339            self.version = Some(field);
15340        }
15341        ///Sets `version` with the provided value.
15342        pub fn with_version(mut self, field: u64) -> Self {
15343            self.set_version(field);
15344            self
15345        }
15346        ///Returns the value of `modules`, or the default value if `modules` is unset.
15347        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15348            &self.modules
15349        }
15350        ///Returns a mutable reference to `modules`.
15351        ///If the field is unset, it is first initialized with the default value.
15352        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15353            &mut self.modules
15354        }
15355        ///Sets `modules` with the provided value.
15356        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15357            self.modules = field;
15358        }
15359        ///Sets `modules` with the provided value.
15360        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15361            self.set_modules(field);
15362            self
15363        }
15364        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15365        pub fn dependencies(&self) -> &[String] {
15366            &self.dependencies
15367        }
15368        ///Returns a mutable reference to `dependencies`.
15369        ///If the field is unset, it is first initialized with the default value.
15370        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15371            &mut self.dependencies
15372        }
15373        ///Sets `dependencies` with the provided value.
15374        pub fn set_dependencies(&mut self, field: Vec<String>) {
15375            self.dependencies = field;
15376        }
15377        ///Sets `dependencies` with the provided value.
15378        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15379            self.set_dependencies(field);
15380            self
15381        }
15382    }
15383    impl super::SystemParameters {
15384        pub const fn const_default() -> Self {
15385            Self {
15386                epoch_duration_ms: None,
15387                stake_subsidy_start_epoch: None,
15388                min_validator_count: None,
15389                max_validator_count: None,
15390                min_validator_joining_stake: None,
15391                validator_low_stake_threshold: None,
15392                validator_very_low_stake_threshold: None,
15393                validator_low_stake_grace_period: None,
15394                extra_fields: None,
15395            }
15396        }
15397        #[doc(hidden)]
15398        pub fn default_instance() -> &'static Self {
15399            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15400            &DEFAULT
15401        }
15402        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15403        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15404            self.epoch_duration_ms.as_mut().map(|field| field as _)
15405        }
15406        ///Returns a mutable reference to `epoch_duration_ms`.
15407        ///If the field is unset, it is first initialized with the default value.
15408        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15409            self.epoch_duration_ms.get_or_insert_default()
15410        }
15411        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
15412        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15413            self.epoch_duration_ms.as_ref().map(|field| *field)
15414        }
15415        ///Sets `epoch_duration_ms` with the provided value.
15416        pub fn set_epoch_duration_ms(&mut self, field: u64) {
15417            self.epoch_duration_ms = Some(field);
15418        }
15419        ///Sets `epoch_duration_ms` with the provided value.
15420        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15421            self.set_epoch_duration_ms(field);
15422            self
15423        }
15424        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15425        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15426            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15427        }
15428        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
15429        ///If the field is unset, it is first initialized with the default value.
15430        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15431            self.stake_subsidy_start_epoch.get_or_insert_default()
15432        }
15433        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15434        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15435            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15436        }
15437        ///Sets `stake_subsidy_start_epoch` with the provided value.
15438        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15439            self.stake_subsidy_start_epoch = Some(field);
15440        }
15441        ///Sets `stake_subsidy_start_epoch` with the provided value.
15442        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15443            self.set_stake_subsidy_start_epoch(field);
15444            self
15445        }
15446        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15447        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15448            self.min_validator_count.as_mut().map(|field| field as _)
15449        }
15450        ///Returns a mutable reference to `min_validator_count`.
15451        ///If the field is unset, it is first initialized with the default value.
15452        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15453            self.min_validator_count.get_or_insert_default()
15454        }
15455        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15456        pub fn min_validator_count_opt(&self) -> Option<u64> {
15457            self.min_validator_count.as_ref().map(|field| *field)
15458        }
15459        ///Sets `min_validator_count` with the provided value.
15460        pub fn set_min_validator_count(&mut self, field: u64) {
15461            self.min_validator_count = Some(field);
15462        }
15463        ///Sets `min_validator_count` with the provided value.
15464        pub fn with_min_validator_count(mut self, field: u64) -> Self {
15465            self.set_min_validator_count(field);
15466            self
15467        }
15468        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15469        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15470            self.max_validator_count.as_mut().map(|field| field as _)
15471        }
15472        ///Returns a mutable reference to `max_validator_count`.
15473        ///If the field is unset, it is first initialized with the default value.
15474        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15475            self.max_validator_count.get_or_insert_default()
15476        }
15477        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15478        pub fn max_validator_count_opt(&self) -> Option<u64> {
15479            self.max_validator_count.as_ref().map(|field| *field)
15480        }
15481        ///Sets `max_validator_count` with the provided value.
15482        pub fn set_max_validator_count(&mut self, field: u64) {
15483            self.max_validator_count = Some(field);
15484        }
15485        ///Sets `max_validator_count` with the provided value.
15486        pub fn with_max_validator_count(mut self, field: u64) -> Self {
15487            self.set_max_validator_count(field);
15488            self
15489        }
15490        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15491        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15492            self.min_validator_joining_stake.as_mut().map(|field| field as _)
15493        }
15494        ///Returns a mutable reference to `min_validator_joining_stake`.
15495        ///If the field is unset, it is first initialized with the default value.
15496        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15497            self.min_validator_joining_stake.get_or_insert_default()
15498        }
15499        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
15500        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15501            self.min_validator_joining_stake.as_ref().map(|field| *field)
15502        }
15503        ///Sets `min_validator_joining_stake` with the provided value.
15504        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15505            self.min_validator_joining_stake = Some(field);
15506        }
15507        ///Sets `min_validator_joining_stake` with the provided value.
15508        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15509            self.set_min_validator_joining_stake(field);
15510            self
15511        }
15512        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15513        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15514            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15515        }
15516        ///Returns a mutable reference to `validator_low_stake_threshold`.
15517        ///If the field is unset, it is first initialized with the default value.
15518        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15519            self.validator_low_stake_threshold.get_or_insert_default()
15520        }
15521        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15522        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15523            self.validator_low_stake_threshold.as_ref().map(|field| *field)
15524        }
15525        ///Sets `validator_low_stake_threshold` with the provided value.
15526        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15527            self.validator_low_stake_threshold = Some(field);
15528        }
15529        ///Sets `validator_low_stake_threshold` with the provided value.
15530        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15531            self.set_validator_low_stake_threshold(field);
15532            self
15533        }
15534        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15535        pub fn validator_very_low_stake_threshold_opt_mut(
15536            &mut self,
15537        ) -> Option<&mut u64> {
15538            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15539        }
15540        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
15541        ///If the field is unset, it is first initialized with the default value.
15542        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15543            self.validator_very_low_stake_threshold.get_or_insert_default()
15544        }
15545        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15546        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15547            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15548        }
15549        ///Sets `validator_very_low_stake_threshold` with the provided value.
15550        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15551            self.validator_very_low_stake_threshold = Some(field);
15552        }
15553        ///Sets `validator_very_low_stake_threshold` with the provided value.
15554        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15555            self.set_validator_very_low_stake_threshold(field);
15556            self
15557        }
15558        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15559        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15560            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15561        }
15562        ///Returns a mutable reference to `validator_low_stake_grace_period`.
15563        ///If the field is unset, it is first initialized with the default value.
15564        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15565            self.validator_low_stake_grace_period.get_or_insert_default()
15566        }
15567        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
15568        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15569            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15570        }
15571        ///Sets `validator_low_stake_grace_period` with the provided value.
15572        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15573            self.validator_low_stake_grace_period = Some(field);
15574        }
15575        ///Sets `validator_low_stake_grace_period` with the provided value.
15576        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15577            self.set_validator_low_stake_grace_period(field);
15578            self
15579        }
15580        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
15581        pub fn extra_fields(&self) -> &super::MoveTable {
15582            self.extra_fields
15583                .as_ref()
15584                .map(|field| field as _)
15585                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15586        }
15587        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15588        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15589            self.extra_fields.as_mut().map(|field| field as _)
15590        }
15591        ///Returns a mutable reference to `extra_fields`.
15592        ///If the field is unset, it is first initialized with the default value.
15593        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15594            self.extra_fields.get_or_insert_default()
15595        }
15596        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15597        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15598            self.extra_fields.as_ref().map(|field| field as _)
15599        }
15600        ///Sets `extra_fields` with the provided value.
15601        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15602            self.extra_fields = Some(field.into().into());
15603        }
15604        ///Sets `extra_fields` with the provided value.
15605        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15606            self.set_extra_fields(field.into());
15607            self
15608        }
15609    }
15610    impl super::SystemState {
15611        pub const fn const_default() -> Self {
15612            Self {
15613                version: None,
15614                epoch: None,
15615                protocol_version: None,
15616                validators: None,
15617                storage_fund: None,
15618                parameters: None,
15619                reference_gas_price: None,
15620                validator_report_records: Vec::new(),
15621                stake_subsidy: None,
15622                safe_mode: None,
15623                safe_mode_storage_rewards: None,
15624                safe_mode_computation_rewards: None,
15625                safe_mode_storage_rebates: None,
15626                safe_mode_non_refundable_storage_fee: None,
15627                epoch_start_timestamp_ms: None,
15628                extra_fields: None,
15629            }
15630        }
15631        #[doc(hidden)]
15632        pub fn default_instance() -> &'static Self {
15633            static DEFAULT: super::SystemState = super::SystemState::const_default();
15634            &DEFAULT
15635        }
15636        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15637        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15638            self.version.as_mut().map(|field| field as _)
15639        }
15640        ///Returns a mutable reference to `version`.
15641        ///If the field is unset, it is first initialized with the default value.
15642        pub fn version_mut(&mut self) -> &mut u64 {
15643            self.version.get_or_insert_default()
15644        }
15645        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15646        pub fn version_opt(&self) -> Option<u64> {
15647            self.version.as_ref().map(|field| *field)
15648        }
15649        ///Sets `version` with the provided value.
15650        pub fn set_version(&mut self, field: u64) {
15651            self.version = Some(field);
15652        }
15653        ///Sets `version` with the provided value.
15654        pub fn with_version(mut self, field: u64) -> Self {
15655            self.set_version(field);
15656            self
15657        }
15658        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15659        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15660            self.epoch.as_mut().map(|field| field as _)
15661        }
15662        ///Returns a mutable reference to `epoch`.
15663        ///If the field is unset, it is first initialized with the default value.
15664        pub fn epoch_mut(&mut self) -> &mut u64 {
15665            self.epoch.get_or_insert_default()
15666        }
15667        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15668        pub fn epoch_opt(&self) -> Option<u64> {
15669            self.epoch.as_ref().map(|field| *field)
15670        }
15671        ///Sets `epoch` with the provided value.
15672        pub fn set_epoch(&mut self, field: u64) {
15673            self.epoch = Some(field);
15674        }
15675        ///Sets `epoch` with the provided value.
15676        pub fn with_epoch(mut self, field: u64) -> Self {
15677            self.set_epoch(field);
15678            self
15679        }
15680        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15681        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15682            self.protocol_version.as_mut().map(|field| field as _)
15683        }
15684        ///Returns a mutable reference to `protocol_version`.
15685        ///If the field is unset, it is first initialized with the default value.
15686        pub fn protocol_version_mut(&mut self) -> &mut u64 {
15687            self.protocol_version.get_or_insert_default()
15688        }
15689        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15690        pub fn protocol_version_opt(&self) -> Option<u64> {
15691            self.protocol_version.as_ref().map(|field| *field)
15692        }
15693        ///Sets `protocol_version` with the provided value.
15694        pub fn set_protocol_version(&mut self, field: u64) {
15695            self.protocol_version = Some(field);
15696        }
15697        ///Sets `protocol_version` with the provided value.
15698        pub fn with_protocol_version(mut self, field: u64) -> Self {
15699            self.set_protocol_version(field);
15700            self
15701        }
15702        ///Returns the value of `validators`, or the default value if `validators` is unset.
15703        pub fn validators(&self) -> &super::ValidatorSet {
15704            self.validators
15705                .as_ref()
15706                .map(|field| field as _)
15707                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15708        }
15709        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15710        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15711            self.validators.as_mut().map(|field| field as _)
15712        }
15713        ///Returns a mutable reference to `validators`.
15714        ///If the field is unset, it is first initialized with the default value.
15715        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15716            self.validators.get_or_insert_default()
15717        }
15718        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
15719        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15720            self.validators.as_ref().map(|field| field as _)
15721        }
15722        ///Sets `validators` with the provided value.
15723        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15724            self.validators = Some(field.into().into());
15725        }
15726        ///Sets `validators` with the provided value.
15727        pub fn with_validators<T: Into<super::ValidatorSet>>(
15728            mut self,
15729            field: T,
15730        ) -> Self {
15731            self.set_validators(field.into());
15732            self
15733        }
15734        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
15735        pub fn storage_fund(&self) -> &super::StorageFund {
15736            self.storage_fund
15737                .as_ref()
15738                .map(|field| field as _)
15739                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15740        }
15741        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15742        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15743            self.storage_fund.as_mut().map(|field| field as _)
15744        }
15745        ///Returns a mutable reference to `storage_fund`.
15746        ///If the field is unset, it is first initialized with the default value.
15747        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15748            self.storage_fund.get_or_insert_default()
15749        }
15750        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
15751        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15752            self.storage_fund.as_ref().map(|field| field as _)
15753        }
15754        ///Sets `storage_fund` with the provided value.
15755        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15756            self.storage_fund = Some(field.into().into());
15757        }
15758        ///Sets `storage_fund` with the provided value.
15759        pub fn with_storage_fund<T: Into<super::StorageFund>>(
15760            mut self,
15761            field: T,
15762        ) -> Self {
15763            self.set_storage_fund(field.into());
15764            self
15765        }
15766        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
15767        pub fn parameters(&self) -> &super::SystemParameters {
15768            self.parameters
15769                .as_ref()
15770                .map(|field| field as _)
15771                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15772        }
15773        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15774        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15775            self.parameters.as_mut().map(|field| field as _)
15776        }
15777        ///Returns a mutable reference to `parameters`.
15778        ///If the field is unset, it is first initialized with the default value.
15779        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15780            self.parameters.get_or_insert_default()
15781        }
15782        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
15783        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15784            self.parameters.as_ref().map(|field| field as _)
15785        }
15786        ///Sets `parameters` with the provided value.
15787        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15788            self.parameters = Some(field.into().into());
15789        }
15790        ///Sets `parameters` with the provided value.
15791        pub fn with_parameters<T: Into<super::SystemParameters>>(
15792            mut self,
15793            field: T,
15794        ) -> Self {
15795            self.set_parameters(field.into());
15796            self
15797        }
15798        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15799        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15800            self.reference_gas_price.as_mut().map(|field| field as _)
15801        }
15802        ///Returns a mutable reference to `reference_gas_price`.
15803        ///If the field is unset, it is first initialized with the default value.
15804        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15805            self.reference_gas_price.get_or_insert_default()
15806        }
15807        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
15808        pub fn reference_gas_price_opt(&self) -> Option<u64> {
15809            self.reference_gas_price.as_ref().map(|field| *field)
15810        }
15811        ///Sets `reference_gas_price` with the provided value.
15812        pub fn set_reference_gas_price(&mut self, field: u64) {
15813            self.reference_gas_price = Some(field);
15814        }
15815        ///Sets `reference_gas_price` with the provided value.
15816        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15817            self.set_reference_gas_price(field);
15818            self
15819        }
15820        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
15821        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15822            &self.validator_report_records
15823        }
15824        ///Returns a mutable reference to `validator_report_records`.
15825        ///If the field is unset, it is first initialized with the default value.
15826        pub fn validator_report_records_mut(
15827            &mut self,
15828        ) -> &mut Vec<super::ValidatorReportRecord> {
15829            &mut self.validator_report_records
15830        }
15831        ///Sets `validator_report_records` with the provided value.
15832        pub fn set_validator_report_records(
15833            &mut self,
15834            field: Vec<super::ValidatorReportRecord>,
15835        ) {
15836            self.validator_report_records = field;
15837        }
15838        ///Sets `validator_report_records` with the provided value.
15839        pub fn with_validator_report_records(
15840            mut self,
15841            field: Vec<super::ValidatorReportRecord>,
15842        ) -> Self {
15843            self.set_validator_report_records(field);
15844            self
15845        }
15846        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
15847        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
15848            self.stake_subsidy
15849                .as_ref()
15850                .map(|field| field as _)
15851                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
15852        }
15853        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15854        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
15855            self.stake_subsidy.as_mut().map(|field| field as _)
15856        }
15857        ///Returns a mutable reference to `stake_subsidy`.
15858        ///If the field is unset, it is first initialized with the default value.
15859        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
15860            self.stake_subsidy.get_or_insert_default()
15861        }
15862        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
15863        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
15864            self.stake_subsidy.as_ref().map(|field| field as _)
15865        }
15866        ///Sets `stake_subsidy` with the provided value.
15867        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
15868            self.stake_subsidy = Some(field.into().into());
15869        }
15870        ///Sets `stake_subsidy` with the provided value.
15871        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
15872            mut self,
15873            field: T,
15874        ) -> Self {
15875            self.set_stake_subsidy(field.into());
15876            self
15877        }
15878        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15879        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
15880            self.safe_mode.as_mut().map(|field| field as _)
15881        }
15882        ///Returns a mutable reference to `safe_mode`.
15883        ///If the field is unset, it is first initialized with the default value.
15884        pub fn safe_mode_mut(&mut self) -> &mut bool {
15885            self.safe_mode.get_or_insert_default()
15886        }
15887        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
15888        pub fn safe_mode_opt(&self) -> Option<bool> {
15889            self.safe_mode.as_ref().map(|field| *field)
15890        }
15891        ///Sets `safe_mode` with the provided value.
15892        pub fn set_safe_mode(&mut self, field: bool) {
15893            self.safe_mode = Some(field);
15894        }
15895        ///Sets `safe_mode` with the provided value.
15896        pub fn with_safe_mode(mut self, field: bool) -> Self {
15897            self.set_safe_mode(field);
15898            self
15899        }
15900        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15901        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15902            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
15903        }
15904        ///Returns a mutable reference to `safe_mode_storage_rewards`.
15905        ///If the field is unset, it is first initialized with the default value.
15906        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
15907            self.safe_mode_storage_rewards.get_or_insert_default()
15908        }
15909        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
15910        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
15911            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
15912        }
15913        ///Sets `safe_mode_storage_rewards` with the provided value.
15914        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
15915            self.safe_mode_storage_rewards = Some(field);
15916        }
15917        ///Sets `safe_mode_storage_rewards` with the provided value.
15918        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
15919            self.set_safe_mode_storage_rewards(field);
15920            self
15921        }
15922        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15923        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15924            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
15925        }
15926        ///Returns a mutable reference to `safe_mode_computation_rewards`.
15927        ///If the field is unset, it is first initialized with the default value.
15928        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
15929            self.safe_mode_computation_rewards.get_or_insert_default()
15930        }
15931        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
15932        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
15933            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
15934        }
15935        ///Sets `safe_mode_computation_rewards` with the provided value.
15936        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
15937            self.safe_mode_computation_rewards = Some(field);
15938        }
15939        ///Sets `safe_mode_computation_rewards` with the provided value.
15940        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
15941            self.set_safe_mode_computation_rewards(field);
15942            self
15943        }
15944        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15945        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15946            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
15947        }
15948        ///Returns a mutable reference to `safe_mode_storage_rebates`.
15949        ///If the field is unset, it is first initialized with the default value.
15950        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
15951            self.safe_mode_storage_rebates.get_or_insert_default()
15952        }
15953        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
15954        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
15955            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
15956        }
15957        ///Sets `safe_mode_storage_rebates` with the provided value.
15958        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
15959            self.safe_mode_storage_rebates = Some(field);
15960        }
15961        ///Sets `safe_mode_storage_rebates` with the provided value.
15962        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
15963            self.set_safe_mode_storage_rebates(field);
15964            self
15965        }
15966        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15967        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
15968            &mut self,
15969        ) -> Option<&mut u64> {
15970            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
15971        }
15972        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
15973        ///If the field is unset, it is first initialized with the default value.
15974        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
15975            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
15976        }
15977        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
15978        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
15979            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
15980        }
15981        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
15982        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
15983            self.safe_mode_non_refundable_storage_fee = Some(field);
15984        }
15985        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
15986        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
15987            self.set_safe_mode_non_refundable_storage_fee(field);
15988            self
15989        }
15990        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15991        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
15992            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
15993        }
15994        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
15995        ///If the field is unset, it is first initialized with the default value.
15996        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
15997            self.epoch_start_timestamp_ms.get_or_insert_default()
15998        }
15999        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
16000        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
16001            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
16002        }
16003        ///Sets `epoch_start_timestamp_ms` with the provided value.
16004        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
16005            self.epoch_start_timestamp_ms = Some(field);
16006        }
16007        ///Sets `epoch_start_timestamp_ms` with the provided value.
16008        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
16009            self.set_epoch_start_timestamp_ms(field);
16010            self
16011        }
16012        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16013        pub fn extra_fields(&self) -> &super::MoveTable {
16014            self.extra_fields
16015                .as_ref()
16016                .map(|field| field as _)
16017                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16018        }
16019        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16020        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16021            self.extra_fields.as_mut().map(|field| field as _)
16022        }
16023        ///Returns a mutable reference to `extra_fields`.
16024        ///If the field is unset, it is first initialized with the default value.
16025        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16026            self.extra_fields.get_or_insert_default()
16027        }
16028        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16029        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16030            self.extra_fields.as_ref().map(|field| field as _)
16031        }
16032        ///Sets `extra_fields` with the provided value.
16033        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16034            self.extra_fields = Some(field.into().into());
16035        }
16036        ///Sets `extra_fields` with the provided value.
16037        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16038            self.set_extra_fields(field.into());
16039            self
16040        }
16041    }
16042    impl super::Transaction {
16043        pub const fn const_default() -> Self {
16044            Self {
16045                bcs: None,
16046                digest: None,
16047                version: None,
16048                kind: None,
16049                sender: None,
16050                gas_payment: None,
16051                expiration: None,
16052            }
16053        }
16054        #[doc(hidden)]
16055        pub fn default_instance() -> &'static Self {
16056            static DEFAULT: super::Transaction = super::Transaction::const_default();
16057            &DEFAULT
16058        }
16059        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16060        pub fn bcs(&self) -> &super::Bcs {
16061            self.bcs
16062                .as_ref()
16063                .map(|field| field as _)
16064                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16065        }
16066        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16067        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16068            self.bcs.as_mut().map(|field| field as _)
16069        }
16070        ///Returns a mutable reference to `bcs`.
16071        ///If the field is unset, it is first initialized with the default value.
16072        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16073            self.bcs.get_or_insert_default()
16074        }
16075        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16076        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16077            self.bcs.as_ref().map(|field| field as _)
16078        }
16079        ///Sets `bcs` with the provided value.
16080        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16081            self.bcs = Some(field.into().into());
16082        }
16083        ///Sets `bcs` with the provided value.
16084        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16085            self.set_bcs(field.into());
16086            self
16087        }
16088        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16089        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16090            self.digest.as_mut().map(|field| field as _)
16091        }
16092        ///Returns a mutable reference to `digest`.
16093        ///If the field is unset, it is first initialized with the default value.
16094        pub fn digest_mut(&mut self) -> &mut String {
16095            self.digest.get_or_insert_default()
16096        }
16097        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16098        pub fn digest_opt(&self) -> Option<&str> {
16099            self.digest.as_ref().map(|field| field as _)
16100        }
16101        ///Sets `digest` with the provided value.
16102        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16103            self.digest = Some(field.into().into());
16104        }
16105        ///Sets `digest` with the provided value.
16106        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16107            self.set_digest(field.into());
16108            self
16109        }
16110        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16111        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16112            self.version.as_mut().map(|field| field as _)
16113        }
16114        ///Returns a mutable reference to `version`.
16115        ///If the field is unset, it is first initialized with the default value.
16116        pub fn version_mut(&mut self) -> &mut i32 {
16117            self.version.get_or_insert_default()
16118        }
16119        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16120        pub fn version_opt(&self) -> Option<i32> {
16121            self.version.as_ref().map(|field| *field)
16122        }
16123        ///Sets `version` with the provided value.
16124        pub fn set_version(&mut self, field: i32) {
16125            self.version = Some(field);
16126        }
16127        ///Sets `version` with the provided value.
16128        pub fn with_version(mut self, field: i32) -> Self {
16129            self.set_version(field);
16130            self
16131        }
16132        ///Returns the value of `kind`, or the default value if `kind` is unset.
16133        pub fn kind(&self) -> &super::TransactionKind {
16134            self.kind
16135                .as_ref()
16136                .map(|field| field as _)
16137                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16138        }
16139        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16140        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16141            self.kind.as_mut().map(|field| field as _)
16142        }
16143        ///Returns a mutable reference to `kind`.
16144        ///If the field is unset, it is first initialized with the default value.
16145        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16146            self.kind.get_or_insert_default()
16147        }
16148        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
16149        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16150            self.kind.as_ref().map(|field| field as _)
16151        }
16152        ///Sets `kind` with the provided value.
16153        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16154            self.kind = Some(field.into().into());
16155        }
16156        ///Sets `kind` with the provided value.
16157        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16158            self.set_kind(field.into());
16159            self
16160        }
16161        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16162        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16163            self.sender.as_mut().map(|field| field as _)
16164        }
16165        ///Returns a mutable reference to `sender`.
16166        ///If the field is unset, it is first initialized with the default value.
16167        pub fn sender_mut(&mut self) -> &mut String {
16168            self.sender.get_or_insert_default()
16169        }
16170        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
16171        pub fn sender_opt(&self) -> Option<&str> {
16172            self.sender.as_ref().map(|field| field as _)
16173        }
16174        ///Sets `sender` with the provided value.
16175        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16176            self.sender = Some(field.into().into());
16177        }
16178        ///Sets `sender` with the provided value.
16179        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16180            self.set_sender(field.into());
16181            self
16182        }
16183        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
16184        pub fn gas_payment(&self) -> &super::GasPayment {
16185            self.gas_payment
16186                .as_ref()
16187                .map(|field| field as _)
16188                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16189        }
16190        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16191        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16192            self.gas_payment.as_mut().map(|field| field as _)
16193        }
16194        ///Returns a mutable reference to `gas_payment`.
16195        ///If the field is unset, it is first initialized with the default value.
16196        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16197            self.gas_payment.get_or_insert_default()
16198        }
16199        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
16200        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16201            self.gas_payment.as_ref().map(|field| field as _)
16202        }
16203        ///Sets `gas_payment` with the provided value.
16204        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16205            self.gas_payment = Some(field.into().into());
16206        }
16207        ///Sets `gas_payment` with the provided value.
16208        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16209            self.set_gas_payment(field.into());
16210            self
16211        }
16212        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
16213        pub fn expiration(&self) -> &super::TransactionExpiration {
16214            self.expiration
16215                .as_ref()
16216                .map(|field| field as _)
16217                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16218        }
16219        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16220        pub fn expiration_opt_mut(
16221            &mut self,
16222        ) -> Option<&mut super::TransactionExpiration> {
16223            self.expiration.as_mut().map(|field| field as _)
16224        }
16225        ///Returns a mutable reference to `expiration`.
16226        ///If the field is unset, it is first initialized with the default value.
16227        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16228            self.expiration.get_or_insert_default()
16229        }
16230        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16231        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16232            self.expiration.as_ref().map(|field| field as _)
16233        }
16234        ///Sets `expiration` with the provided value.
16235        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16236            &mut self,
16237            field: T,
16238        ) {
16239            self.expiration = Some(field.into().into());
16240        }
16241        ///Sets `expiration` with the provided value.
16242        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16243            mut self,
16244            field: T,
16245        ) -> Self {
16246            self.set_expiration(field.into());
16247            self
16248        }
16249    }
16250    impl super::TransactionEffects {
16251        pub const fn const_default() -> Self {
16252            Self {
16253                bcs: None,
16254                digest: None,
16255                version: None,
16256                status: None,
16257                epoch: None,
16258                gas_used: None,
16259                transaction_digest: None,
16260                gas_object: None,
16261                events_digest: None,
16262                dependencies: Vec::new(),
16263                lamport_version: None,
16264                changed_objects: Vec::new(),
16265                unchanged_consensus_objects: Vec::new(),
16266                auxiliary_data_digest: None,
16267                unchanged_loaded_runtime_objects: Vec::new(),
16268            }
16269        }
16270        #[doc(hidden)]
16271        pub fn default_instance() -> &'static Self {
16272            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16273            &DEFAULT
16274        }
16275        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16276        pub fn bcs(&self) -> &super::Bcs {
16277            self.bcs
16278                .as_ref()
16279                .map(|field| field as _)
16280                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16281        }
16282        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16283        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16284            self.bcs.as_mut().map(|field| field as _)
16285        }
16286        ///Returns a mutable reference to `bcs`.
16287        ///If the field is unset, it is first initialized with the default value.
16288        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16289            self.bcs.get_or_insert_default()
16290        }
16291        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16292        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16293            self.bcs.as_ref().map(|field| field as _)
16294        }
16295        ///Sets `bcs` with the provided value.
16296        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16297            self.bcs = Some(field.into().into());
16298        }
16299        ///Sets `bcs` with the provided value.
16300        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16301            self.set_bcs(field.into());
16302            self
16303        }
16304        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16305        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16306            self.digest.as_mut().map(|field| field as _)
16307        }
16308        ///Returns a mutable reference to `digest`.
16309        ///If the field is unset, it is first initialized with the default value.
16310        pub fn digest_mut(&mut self) -> &mut String {
16311            self.digest.get_or_insert_default()
16312        }
16313        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16314        pub fn digest_opt(&self) -> Option<&str> {
16315            self.digest.as_ref().map(|field| field as _)
16316        }
16317        ///Sets `digest` with the provided value.
16318        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16319            self.digest = Some(field.into().into());
16320        }
16321        ///Sets `digest` with the provided value.
16322        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16323            self.set_digest(field.into());
16324            self
16325        }
16326        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16327        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16328            self.version.as_mut().map(|field| field as _)
16329        }
16330        ///Returns a mutable reference to `version`.
16331        ///If the field is unset, it is first initialized with the default value.
16332        pub fn version_mut(&mut self) -> &mut i32 {
16333            self.version.get_or_insert_default()
16334        }
16335        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16336        pub fn version_opt(&self) -> Option<i32> {
16337            self.version.as_ref().map(|field| *field)
16338        }
16339        ///Sets `version` with the provided value.
16340        pub fn set_version(&mut self, field: i32) {
16341            self.version = Some(field);
16342        }
16343        ///Sets `version` with the provided value.
16344        pub fn with_version(mut self, field: i32) -> Self {
16345            self.set_version(field);
16346            self
16347        }
16348        ///Returns the value of `status`, or the default value if `status` is unset.
16349        pub fn status(&self) -> &super::ExecutionStatus {
16350            self.status
16351                .as_ref()
16352                .map(|field| field as _)
16353                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16354        }
16355        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16356        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16357            self.status.as_mut().map(|field| field as _)
16358        }
16359        ///Returns a mutable reference to `status`.
16360        ///If the field is unset, it is first initialized with the default value.
16361        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16362            self.status.get_or_insert_default()
16363        }
16364        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
16365        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16366            self.status.as_ref().map(|field| field as _)
16367        }
16368        ///Sets `status` with the provided value.
16369        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16370            self.status = Some(field.into().into());
16371        }
16372        ///Sets `status` with the provided value.
16373        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16374            self.set_status(field.into());
16375            self
16376        }
16377        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16378        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16379            self.epoch.as_mut().map(|field| field as _)
16380        }
16381        ///Returns a mutable reference to `epoch`.
16382        ///If the field is unset, it is first initialized with the default value.
16383        pub fn epoch_mut(&mut self) -> &mut u64 {
16384            self.epoch.get_or_insert_default()
16385        }
16386        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16387        pub fn epoch_opt(&self) -> Option<u64> {
16388            self.epoch.as_ref().map(|field| *field)
16389        }
16390        ///Sets `epoch` with the provided value.
16391        pub fn set_epoch(&mut self, field: u64) {
16392            self.epoch = Some(field);
16393        }
16394        ///Sets `epoch` with the provided value.
16395        pub fn with_epoch(mut self, field: u64) -> Self {
16396            self.set_epoch(field);
16397            self
16398        }
16399        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
16400        pub fn gas_used(&self) -> &super::GasCostSummary {
16401            self.gas_used
16402                .as_ref()
16403                .map(|field| field as _)
16404                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16405        }
16406        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16407        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16408            self.gas_used.as_mut().map(|field| field as _)
16409        }
16410        ///Returns a mutable reference to `gas_used`.
16411        ///If the field is unset, it is first initialized with the default value.
16412        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16413            self.gas_used.get_or_insert_default()
16414        }
16415        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
16416        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16417            self.gas_used.as_ref().map(|field| field as _)
16418        }
16419        ///Sets `gas_used` with the provided value.
16420        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16421            self.gas_used = Some(field.into().into());
16422        }
16423        ///Sets `gas_used` with the provided value.
16424        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16425            mut self,
16426            field: T,
16427        ) -> Self {
16428            self.set_gas_used(field.into());
16429            self
16430        }
16431        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16432        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16433            self.transaction_digest.as_mut().map(|field| field as _)
16434        }
16435        ///Returns a mutable reference to `transaction_digest`.
16436        ///If the field is unset, it is first initialized with the default value.
16437        pub fn transaction_digest_mut(&mut self) -> &mut String {
16438            self.transaction_digest.get_or_insert_default()
16439        }
16440        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16441        pub fn transaction_digest_opt(&self) -> Option<&str> {
16442            self.transaction_digest.as_ref().map(|field| field as _)
16443        }
16444        ///Sets `transaction_digest` with the provided value.
16445        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16446            self.transaction_digest = Some(field.into().into());
16447        }
16448        ///Sets `transaction_digest` with the provided value.
16449        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16450            self.set_transaction_digest(field.into());
16451            self
16452        }
16453        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
16454        pub fn gas_object(&self) -> &super::ChangedObject {
16455            self.gas_object
16456                .as_ref()
16457                .map(|field| field as _)
16458                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16459        }
16460        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16461        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16462            self.gas_object.as_mut().map(|field| field as _)
16463        }
16464        ///Returns a mutable reference to `gas_object`.
16465        ///If the field is unset, it is first initialized with the default value.
16466        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16467            self.gas_object.get_or_insert_default()
16468        }
16469        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
16470        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16471            self.gas_object.as_ref().map(|field| field as _)
16472        }
16473        ///Sets `gas_object` with the provided value.
16474        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16475            self.gas_object = Some(field.into().into());
16476        }
16477        ///Sets `gas_object` with the provided value.
16478        pub fn with_gas_object<T: Into<super::ChangedObject>>(
16479            mut self,
16480            field: T,
16481        ) -> Self {
16482            self.set_gas_object(field.into());
16483            self
16484        }
16485        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16486        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16487            self.events_digest.as_mut().map(|field| field as _)
16488        }
16489        ///Returns a mutable reference to `events_digest`.
16490        ///If the field is unset, it is first initialized with the default value.
16491        pub fn events_digest_mut(&mut self) -> &mut String {
16492            self.events_digest.get_or_insert_default()
16493        }
16494        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16495        pub fn events_digest_opt(&self) -> Option<&str> {
16496            self.events_digest.as_ref().map(|field| field as _)
16497        }
16498        ///Sets `events_digest` with the provided value.
16499        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16500            self.events_digest = Some(field.into().into());
16501        }
16502        ///Sets `events_digest` with the provided value.
16503        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16504            self.set_events_digest(field.into());
16505            self
16506        }
16507        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
16508        pub fn dependencies(&self) -> &[String] {
16509            &self.dependencies
16510        }
16511        ///Returns a mutable reference to `dependencies`.
16512        ///If the field is unset, it is first initialized with the default value.
16513        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16514            &mut self.dependencies
16515        }
16516        ///Sets `dependencies` with the provided value.
16517        pub fn set_dependencies(&mut self, field: Vec<String>) {
16518            self.dependencies = field;
16519        }
16520        ///Sets `dependencies` with the provided value.
16521        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16522            self.set_dependencies(field);
16523            self
16524        }
16525        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16526        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16527            self.lamport_version.as_mut().map(|field| field as _)
16528        }
16529        ///Returns a mutable reference to `lamport_version`.
16530        ///If the field is unset, it is first initialized with the default value.
16531        pub fn lamport_version_mut(&mut self) -> &mut u64 {
16532            self.lamport_version.get_or_insert_default()
16533        }
16534        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16535        pub fn lamport_version_opt(&self) -> Option<u64> {
16536            self.lamport_version.as_ref().map(|field| *field)
16537        }
16538        ///Sets `lamport_version` with the provided value.
16539        pub fn set_lamport_version(&mut self, field: u64) {
16540            self.lamport_version = Some(field);
16541        }
16542        ///Sets `lamport_version` with the provided value.
16543        pub fn with_lamport_version(mut self, field: u64) -> Self {
16544            self.set_lamport_version(field);
16545            self
16546        }
16547        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
16548        pub fn changed_objects(&self) -> &[super::ChangedObject] {
16549            &self.changed_objects
16550        }
16551        ///Returns a mutable reference to `changed_objects`.
16552        ///If the field is unset, it is first initialized with the default value.
16553        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16554            &mut self.changed_objects
16555        }
16556        ///Sets `changed_objects` with the provided value.
16557        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16558            self.changed_objects = field;
16559        }
16560        ///Sets `changed_objects` with the provided value.
16561        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16562            self.set_changed_objects(field);
16563            self
16564        }
16565        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
16566        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16567            &self.unchanged_consensus_objects
16568        }
16569        ///Returns a mutable reference to `unchanged_consensus_objects`.
16570        ///If the field is unset, it is first initialized with the default value.
16571        pub fn unchanged_consensus_objects_mut(
16572            &mut self,
16573        ) -> &mut Vec<super::UnchangedConsensusObject> {
16574            &mut self.unchanged_consensus_objects
16575        }
16576        ///Sets `unchanged_consensus_objects` with the provided value.
16577        pub fn set_unchanged_consensus_objects(
16578            &mut self,
16579            field: Vec<super::UnchangedConsensusObject>,
16580        ) {
16581            self.unchanged_consensus_objects = field;
16582        }
16583        ///Sets `unchanged_consensus_objects` with the provided value.
16584        pub fn with_unchanged_consensus_objects(
16585            mut self,
16586            field: Vec<super::UnchangedConsensusObject>,
16587        ) -> Self {
16588            self.set_unchanged_consensus_objects(field);
16589            self
16590        }
16591        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16592        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16593            self.auxiliary_data_digest.as_mut().map(|field| field as _)
16594        }
16595        ///Returns a mutable reference to `auxiliary_data_digest`.
16596        ///If the field is unset, it is first initialized with the default value.
16597        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16598            self.auxiliary_data_digest.get_or_insert_default()
16599        }
16600        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16601        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16602            self.auxiliary_data_digest.as_ref().map(|field| field as _)
16603        }
16604        ///Sets `auxiliary_data_digest` with the provided value.
16605        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16606            self.auxiliary_data_digest = Some(field.into().into());
16607        }
16608        ///Sets `auxiliary_data_digest` with the provided value.
16609        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16610            self.set_auxiliary_data_digest(field.into());
16611            self
16612        }
16613        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
16614        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16615            &self.unchanged_loaded_runtime_objects
16616        }
16617        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
16618        ///If the field is unset, it is first initialized with the default value.
16619        pub fn unchanged_loaded_runtime_objects_mut(
16620            &mut self,
16621        ) -> &mut Vec<super::ObjectReference> {
16622            &mut self.unchanged_loaded_runtime_objects
16623        }
16624        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16625        pub fn set_unchanged_loaded_runtime_objects(
16626            &mut self,
16627            field: Vec<super::ObjectReference>,
16628        ) {
16629            self.unchanged_loaded_runtime_objects = field;
16630        }
16631        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16632        pub fn with_unchanged_loaded_runtime_objects(
16633            mut self,
16634            field: Vec<super::ObjectReference>,
16635        ) -> Self {
16636            self.set_unchanged_loaded_runtime_objects(field);
16637            self
16638        }
16639    }
16640    impl super::TransactionEvents {
16641        pub const fn const_default() -> Self {
16642            Self {
16643                bcs: None,
16644                digest: None,
16645                events: Vec::new(),
16646            }
16647        }
16648        #[doc(hidden)]
16649        pub fn default_instance() -> &'static Self {
16650            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16651            &DEFAULT
16652        }
16653        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16654        pub fn bcs(&self) -> &super::Bcs {
16655            self.bcs
16656                .as_ref()
16657                .map(|field| field as _)
16658                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16659        }
16660        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16661        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16662            self.bcs.as_mut().map(|field| field as _)
16663        }
16664        ///Returns a mutable reference to `bcs`.
16665        ///If the field is unset, it is first initialized with the default value.
16666        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16667            self.bcs.get_or_insert_default()
16668        }
16669        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16670        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16671            self.bcs.as_ref().map(|field| field as _)
16672        }
16673        ///Sets `bcs` with the provided value.
16674        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16675            self.bcs = Some(field.into().into());
16676        }
16677        ///Sets `bcs` with the provided value.
16678        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16679            self.set_bcs(field.into());
16680            self
16681        }
16682        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16683        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16684            self.digest.as_mut().map(|field| field as _)
16685        }
16686        ///Returns a mutable reference to `digest`.
16687        ///If the field is unset, it is first initialized with the default value.
16688        pub fn digest_mut(&mut self) -> &mut String {
16689            self.digest.get_or_insert_default()
16690        }
16691        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16692        pub fn digest_opt(&self) -> Option<&str> {
16693            self.digest.as_ref().map(|field| field as _)
16694        }
16695        ///Sets `digest` with the provided value.
16696        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16697            self.digest = Some(field.into().into());
16698        }
16699        ///Sets `digest` with the provided value.
16700        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16701            self.set_digest(field.into());
16702            self
16703        }
16704        ///Returns the value of `events`, or the default value if `events` is unset.
16705        pub fn events(&self) -> &[super::Event] {
16706            &self.events
16707        }
16708        ///Returns a mutable reference to `events`.
16709        ///If the field is unset, it is first initialized with the default value.
16710        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16711            &mut self.events
16712        }
16713        ///Sets `events` with the provided value.
16714        pub fn set_events(&mut self, field: Vec<super::Event>) {
16715            self.events = field;
16716        }
16717        ///Sets `events` with the provided value.
16718        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16719            self.set_events(field);
16720            self
16721        }
16722    }
16723    impl super::TransactionExpiration {
16724        pub const fn const_default() -> Self {
16725            Self {
16726                kind: None,
16727                epoch: None,
16728                min_epoch: None,
16729                min_timestamp: None,
16730                max_timestamp: None,
16731                chain: None,
16732                nonce: None,
16733            }
16734        }
16735        #[doc(hidden)]
16736        pub fn default_instance() -> &'static Self {
16737            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16738            &DEFAULT
16739        }
16740        ///Sets `kind` with the provided value.
16741        pub fn with_kind<
16742            T: Into<super::transaction_expiration::TransactionExpirationKind>,
16743        >(mut self, field: T) -> Self {
16744            self.set_kind(field.into());
16745            self
16746        }
16747        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16748        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16749            self.epoch.as_mut().map(|field| field as _)
16750        }
16751        ///Returns a mutable reference to `epoch`.
16752        ///If the field is unset, it is first initialized with the default value.
16753        pub fn epoch_mut(&mut self) -> &mut u64 {
16754            self.epoch.get_or_insert_default()
16755        }
16756        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16757        pub fn epoch_opt(&self) -> Option<u64> {
16758            self.epoch.as_ref().map(|field| *field)
16759        }
16760        ///Sets `epoch` with the provided value.
16761        pub fn set_epoch(&mut self, field: u64) {
16762            self.epoch = Some(field);
16763        }
16764        ///Sets `epoch` with the provided value.
16765        pub fn with_epoch(mut self, field: u64) -> Self {
16766            self.set_epoch(field);
16767            self
16768        }
16769        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16770        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16771            self.min_epoch.as_mut().map(|field| field as _)
16772        }
16773        ///Returns a mutable reference to `min_epoch`.
16774        ///If the field is unset, it is first initialized with the default value.
16775        pub fn min_epoch_mut(&mut self) -> &mut u64 {
16776            self.min_epoch.get_or_insert_default()
16777        }
16778        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16779        pub fn min_epoch_opt(&self) -> Option<u64> {
16780            self.min_epoch.as_ref().map(|field| *field)
16781        }
16782        ///Sets `min_epoch` with the provided value.
16783        pub fn set_min_epoch(&mut self, field: u64) {
16784            self.min_epoch = Some(field);
16785        }
16786        ///Sets `min_epoch` with the provided value.
16787        pub fn with_min_epoch(mut self, field: u64) -> Self {
16788            self.set_min_epoch(field);
16789            self
16790        }
16791        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16792        pub fn min_timestamp_opt_mut(
16793            &mut self,
16794        ) -> Option<&mut ::prost_types::Timestamp> {
16795            self.min_timestamp.as_mut().map(|field| field as _)
16796        }
16797        ///Returns a mutable reference to `min_timestamp`.
16798        ///If the field is unset, it is first initialized with the default value.
16799        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16800            self.min_timestamp.get_or_insert_default()
16801        }
16802        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16803        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16804            self.min_timestamp.as_ref().map(|field| field as _)
16805        }
16806        ///Sets `min_timestamp` with the provided value.
16807        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16808            &mut self,
16809            field: T,
16810        ) {
16811            self.min_timestamp = Some(field.into().into());
16812        }
16813        ///Sets `min_timestamp` with the provided value.
16814        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16815            mut self,
16816            field: T,
16817        ) -> Self {
16818            self.set_min_timestamp(field.into());
16819            self
16820        }
16821        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16822        pub fn max_timestamp_opt_mut(
16823            &mut self,
16824        ) -> Option<&mut ::prost_types::Timestamp> {
16825            self.max_timestamp.as_mut().map(|field| field as _)
16826        }
16827        ///Returns a mutable reference to `max_timestamp`.
16828        ///If the field is unset, it is first initialized with the default value.
16829        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16830            self.max_timestamp.get_or_insert_default()
16831        }
16832        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16833        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16834            self.max_timestamp.as_ref().map(|field| field as _)
16835        }
16836        ///Sets `max_timestamp` with the provided value.
16837        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
16838            &mut self,
16839            field: T,
16840        ) {
16841            self.max_timestamp = Some(field.into().into());
16842        }
16843        ///Sets `max_timestamp` with the provided value.
16844        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
16845            mut self,
16846            field: T,
16847        ) -> Self {
16848            self.set_max_timestamp(field.into());
16849            self
16850        }
16851        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16852        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
16853            self.chain.as_mut().map(|field| field as _)
16854        }
16855        ///Returns a mutable reference to `chain`.
16856        ///If the field is unset, it is first initialized with the default value.
16857        pub fn chain_mut(&mut self) -> &mut String {
16858            self.chain.get_or_insert_default()
16859        }
16860        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
16861        pub fn chain_opt(&self) -> Option<&str> {
16862            self.chain.as_ref().map(|field| field as _)
16863        }
16864        ///Sets `chain` with the provided value.
16865        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
16866            self.chain = Some(field.into().into());
16867        }
16868        ///Sets `chain` with the provided value.
16869        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
16870            self.set_chain(field.into());
16871            self
16872        }
16873        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16874        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
16875            self.nonce.as_mut().map(|field| field as _)
16876        }
16877        ///Returns a mutable reference to `nonce`.
16878        ///If the field is unset, it is first initialized with the default value.
16879        pub fn nonce_mut(&mut self) -> &mut u32 {
16880            self.nonce.get_or_insert_default()
16881        }
16882        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
16883        pub fn nonce_opt(&self) -> Option<u32> {
16884            self.nonce.as_ref().map(|field| *field)
16885        }
16886        ///Sets `nonce` with the provided value.
16887        pub fn set_nonce(&mut self, field: u32) {
16888            self.nonce = Some(field);
16889        }
16890        ///Sets `nonce` with the provided value.
16891        pub fn with_nonce(mut self, field: u32) -> Self {
16892            self.set_nonce(field);
16893            self
16894        }
16895    }
16896    impl super::TransactionFilter {
16897        pub const fn const_default() -> Self {
16898            Self { terms: Vec::new() }
16899        }
16900        #[doc(hidden)]
16901        pub fn default_instance() -> &'static Self {
16902            static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
16903            &DEFAULT
16904        }
16905        ///Returns the value of `terms`, or the default value if `terms` is unset.
16906        pub fn terms(&self) -> &[super::TransactionTerm] {
16907            &self.terms
16908        }
16909        ///Returns a mutable reference to `terms`.
16910        ///If the field is unset, it is first initialized with the default value.
16911        pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
16912            &mut self.terms
16913        }
16914        ///Sets `terms` with the provided value.
16915        pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
16916            self.terms = field;
16917        }
16918        ///Sets `terms` with the provided value.
16919        pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
16920            self.set_terms(field);
16921            self
16922        }
16923    }
16924    impl super::TransactionKind {
16925        pub const fn const_default() -> Self {
16926            Self { kind: None, data: None }
16927        }
16928        #[doc(hidden)]
16929        pub fn default_instance() -> &'static Self {
16930            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
16931            &DEFAULT
16932        }
16933        ///Sets `kind` with the provided value.
16934        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
16935            mut self,
16936            field: T,
16937        ) -> Self {
16938            self.set_kind(field.into());
16939            self
16940        }
16941        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
16942        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
16943            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16944                .data
16945            {
16946                field as _
16947            } else {
16948                super::ProgrammableTransaction::default_instance() as _
16949            }
16950        }
16951        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
16952        pub fn programmable_transaction_opt(
16953            &self,
16954        ) -> Option<&super::ProgrammableTransaction> {
16955            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16956                .data
16957            {
16958                Some(field as _)
16959            } else {
16960                None
16961            }
16962        }
16963        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16964        pub fn programmable_transaction_opt_mut(
16965            &mut self,
16966        ) -> Option<&mut super::ProgrammableTransaction> {
16967            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
16968                .data
16969            {
16970                Some(field as _)
16971            } else {
16972                None
16973            }
16974        }
16975        ///Returns a mutable reference to `programmable_transaction`.
16976        ///If the field is unset, it is first initialized with the default value.
16977        ///If any other oneof field in the same oneof is set, it will be cleared.
16978        pub fn programmable_transaction_mut(
16979            &mut self,
16980        ) -> &mut super::ProgrammableTransaction {
16981            if self.programmable_transaction_opt_mut().is_none() {
16982                self.data = Some(
16983                    super::transaction_kind::Data::ProgrammableTransaction(
16984                        super::ProgrammableTransaction::default(),
16985                    ),
16986                );
16987            }
16988            self.programmable_transaction_opt_mut().unwrap()
16989        }
16990        ///Sets `programmable_transaction` with the provided value.
16991        ///If any other oneof field in the same oneof is set, it will be cleared.
16992        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
16993            &mut self,
16994            field: T,
16995        ) {
16996            self.data = Some(
16997                super::transaction_kind::Data::ProgrammableTransaction(
16998                    field.into().into(),
16999                ),
17000            );
17001        }
17002        ///Sets `programmable_transaction` with the provided value.
17003        ///If any other oneof field in the same oneof is set, it will be cleared.
17004        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17005            mut self,
17006            field: T,
17007        ) -> Self {
17008            self.set_programmable_transaction(field.into());
17009            self
17010        }
17011        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
17012        pub fn change_epoch(&self) -> &super::ChangeEpoch {
17013            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17014                field as _
17015            } else {
17016                super::ChangeEpoch::default_instance() as _
17017            }
17018        }
17019        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17020        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
17021            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17022                Some(field as _)
17023            } else {
17024                None
17025            }
17026        }
17027        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17028        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
17029            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
17030                .data
17031            {
17032                Some(field as _)
17033            } else {
17034                None
17035            }
17036        }
17037        ///Returns a mutable reference to `change_epoch`.
17038        ///If the field is unset, it is first initialized with the default value.
17039        ///If any other oneof field in the same oneof is set, it will be cleared.
17040        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
17041            if self.change_epoch_opt_mut().is_none() {
17042                self.data = Some(
17043                    super::transaction_kind::Data::ChangeEpoch(
17044                        super::ChangeEpoch::default(),
17045                    ),
17046                );
17047            }
17048            self.change_epoch_opt_mut().unwrap()
17049        }
17050        ///Sets `change_epoch` with the provided value.
17051        ///If any other oneof field in the same oneof is set, it will be cleared.
17052        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17053            self.data = Some(
17054                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17055            );
17056        }
17057        ///Sets `change_epoch` with the provided value.
17058        ///If any other oneof field in the same oneof is set, it will be cleared.
17059        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17060            mut self,
17061            field: T,
17062        ) -> Self {
17063            self.set_change_epoch(field.into());
17064            self
17065        }
17066        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
17067        pub fn genesis(&self) -> &super::GenesisTransaction {
17068            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17069                field as _
17070            } else {
17071                super::GenesisTransaction::default_instance() as _
17072            }
17073        }
17074        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
17075        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17076            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17077                Some(field as _)
17078            } else {
17079                None
17080            }
17081        }
17082        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17083        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17084            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17085                Some(field as _)
17086            } else {
17087                None
17088            }
17089        }
17090        ///Returns a mutable reference to `genesis`.
17091        ///If the field is unset, it is first initialized with the default value.
17092        ///If any other oneof field in the same oneof is set, it will be cleared.
17093        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17094            if self.genesis_opt_mut().is_none() {
17095                self.data = Some(
17096                    super::transaction_kind::Data::Genesis(
17097                        super::GenesisTransaction::default(),
17098                    ),
17099                );
17100            }
17101            self.genesis_opt_mut().unwrap()
17102        }
17103        ///Sets `genesis` with the provided value.
17104        ///If any other oneof field in the same oneof is set, it will be cleared.
17105        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17106            self.data = Some(
17107                super::transaction_kind::Data::Genesis(field.into().into()),
17108            );
17109        }
17110        ///Sets `genesis` with the provided value.
17111        ///If any other oneof field in the same oneof is set, it will be cleared.
17112        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17113            mut self,
17114            field: T,
17115        ) -> Self {
17116            self.set_genesis(field.into());
17117            self
17118        }
17119        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
17120        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17121            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17122                .data
17123            {
17124                field as _
17125            } else {
17126                super::ConsensusCommitPrologue::default_instance() as _
17127            }
17128        }
17129        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
17130        pub fn consensus_commit_prologue_opt(
17131            &self,
17132        ) -> Option<&super::ConsensusCommitPrologue> {
17133            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17134                .data
17135            {
17136                Some(field as _)
17137            } else {
17138                None
17139            }
17140        }
17141        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17142        pub fn consensus_commit_prologue_opt_mut(
17143            &mut self,
17144        ) -> Option<&mut super::ConsensusCommitPrologue> {
17145            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17146                .data
17147            {
17148                Some(field as _)
17149            } else {
17150                None
17151            }
17152        }
17153        ///Returns a mutable reference to `consensus_commit_prologue`.
17154        ///If the field is unset, it is first initialized with the default value.
17155        ///If any other oneof field in the same oneof is set, it will be cleared.
17156        pub fn consensus_commit_prologue_mut(
17157            &mut self,
17158        ) -> &mut super::ConsensusCommitPrologue {
17159            if self.consensus_commit_prologue_opt_mut().is_none() {
17160                self.data = Some(
17161                    super::transaction_kind::Data::ConsensusCommitPrologue(
17162                        super::ConsensusCommitPrologue::default(),
17163                    ),
17164                );
17165            }
17166            self.consensus_commit_prologue_opt_mut().unwrap()
17167        }
17168        ///Sets `consensus_commit_prologue` with the provided value.
17169        ///If any other oneof field in the same oneof is set, it will be cleared.
17170        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17171            &mut self,
17172            field: T,
17173        ) {
17174            self.data = Some(
17175                super::transaction_kind::Data::ConsensusCommitPrologue(
17176                    field.into().into(),
17177                ),
17178            );
17179        }
17180        ///Sets `consensus_commit_prologue` with the provided value.
17181        ///If any other oneof field in the same oneof is set, it will be cleared.
17182        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17183            mut self,
17184            field: T,
17185        ) -> Self {
17186            self.set_consensus_commit_prologue(field.into());
17187            self
17188        }
17189        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
17190        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17191            if let Some(
17192                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17193            ) = &self.data
17194            {
17195                field as _
17196            } else {
17197                super::AuthenticatorStateUpdate::default_instance() as _
17198            }
17199        }
17200        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17201        pub fn authenticator_state_update_opt(
17202            &self,
17203        ) -> Option<&super::AuthenticatorStateUpdate> {
17204            if let Some(
17205                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17206            ) = &self.data
17207            {
17208                Some(field as _)
17209            } else {
17210                None
17211            }
17212        }
17213        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17214        pub fn authenticator_state_update_opt_mut(
17215            &mut self,
17216        ) -> Option<&mut super::AuthenticatorStateUpdate> {
17217            if let Some(
17218                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17219            ) = &mut self.data
17220            {
17221                Some(field as _)
17222            } else {
17223                None
17224            }
17225        }
17226        ///Returns a mutable reference to `authenticator_state_update`.
17227        ///If the field is unset, it is first initialized with the default value.
17228        ///If any other oneof field in the same oneof is set, it will be cleared.
17229        pub fn authenticator_state_update_mut(
17230            &mut self,
17231        ) -> &mut super::AuthenticatorStateUpdate {
17232            if self.authenticator_state_update_opt_mut().is_none() {
17233                self.data = Some(
17234                    super::transaction_kind::Data::AuthenticatorStateUpdate(
17235                        super::AuthenticatorStateUpdate::default(),
17236                    ),
17237                );
17238            }
17239            self.authenticator_state_update_opt_mut().unwrap()
17240        }
17241        ///Sets `authenticator_state_update` with the provided value.
17242        ///If any other oneof field in the same oneof is set, it will be cleared.
17243        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17244            &mut self,
17245            field: T,
17246        ) {
17247            self.data = Some(
17248                super::transaction_kind::Data::AuthenticatorStateUpdate(
17249                    field.into().into(),
17250                ),
17251            );
17252        }
17253        ///Sets `authenticator_state_update` with the provided value.
17254        ///If any other oneof field in the same oneof is set, it will be cleared.
17255        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17256            mut self,
17257            field: T,
17258        ) -> Self {
17259            self.set_authenticator_state_update(field.into());
17260            self
17261        }
17262        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
17263        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17264            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17265                field as _
17266            } else {
17267                super::EndOfEpochTransaction::default_instance() as _
17268            }
17269        }
17270        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17271        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17272            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17273                Some(field as _)
17274            } else {
17275                None
17276            }
17277        }
17278        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17279        pub fn end_of_epoch_opt_mut(
17280            &mut self,
17281        ) -> Option<&mut super::EndOfEpochTransaction> {
17282            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17283                .data
17284            {
17285                Some(field as _)
17286            } else {
17287                None
17288            }
17289        }
17290        ///Returns a mutable reference to `end_of_epoch`.
17291        ///If the field is unset, it is first initialized with the default value.
17292        ///If any other oneof field in the same oneof is set, it will be cleared.
17293        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17294            if self.end_of_epoch_opt_mut().is_none() {
17295                self.data = Some(
17296                    super::transaction_kind::Data::EndOfEpoch(
17297                        super::EndOfEpochTransaction::default(),
17298                    ),
17299                );
17300            }
17301            self.end_of_epoch_opt_mut().unwrap()
17302        }
17303        ///Sets `end_of_epoch` with the provided value.
17304        ///If any other oneof field in the same oneof is set, it will be cleared.
17305        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17306            &mut self,
17307            field: T,
17308        ) {
17309            self.data = Some(
17310                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17311            );
17312        }
17313        ///Sets `end_of_epoch` with the provided value.
17314        ///If any other oneof field in the same oneof is set, it will be cleared.
17315        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17316            mut self,
17317            field: T,
17318        ) -> Self {
17319            self.set_end_of_epoch(field.into());
17320            self
17321        }
17322        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
17323        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17324            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17325                .data
17326            {
17327                field as _
17328            } else {
17329                super::RandomnessStateUpdate::default_instance() as _
17330            }
17331        }
17332        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17333        pub fn randomness_state_update_opt(
17334            &self,
17335        ) -> Option<&super::RandomnessStateUpdate> {
17336            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17337                .data
17338            {
17339                Some(field as _)
17340            } else {
17341                None
17342            }
17343        }
17344        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17345        pub fn randomness_state_update_opt_mut(
17346            &mut self,
17347        ) -> Option<&mut super::RandomnessStateUpdate> {
17348            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17349                .data
17350            {
17351                Some(field as _)
17352            } else {
17353                None
17354            }
17355        }
17356        ///Returns a mutable reference to `randomness_state_update`.
17357        ///If the field is unset, it is first initialized with the default value.
17358        ///If any other oneof field in the same oneof is set, it will be cleared.
17359        pub fn randomness_state_update_mut(
17360            &mut self,
17361        ) -> &mut super::RandomnessStateUpdate {
17362            if self.randomness_state_update_opt_mut().is_none() {
17363                self.data = Some(
17364                    super::transaction_kind::Data::RandomnessStateUpdate(
17365                        super::RandomnessStateUpdate::default(),
17366                    ),
17367                );
17368            }
17369            self.randomness_state_update_opt_mut().unwrap()
17370        }
17371        ///Sets `randomness_state_update` with the provided value.
17372        ///If any other oneof field in the same oneof is set, it will be cleared.
17373        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17374            &mut self,
17375            field: T,
17376        ) {
17377            self.data = Some(
17378                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17379            );
17380        }
17381        ///Sets `randomness_state_update` with the provided value.
17382        ///If any other oneof field in the same oneof is set, it will be cleared.
17383        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17384            mut self,
17385            field: T,
17386        ) -> Self {
17387            self.set_randomness_state_update(field.into());
17388            self
17389        }
17390    }
17391    impl super::TransactionLiteral {
17392        pub const fn const_default() -> Self {
17393            Self {
17394                negated: false,
17395                predicate: None,
17396            }
17397        }
17398        #[doc(hidden)]
17399        pub fn default_instance() -> &'static Self {
17400            static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17401            &DEFAULT
17402        }
17403        ///Returns a mutable reference to `negated`.
17404        ///If the field is unset, it is first initialized with the default value.
17405        pub fn negated_mut(&mut self) -> &mut bool {
17406            &mut self.negated
17407        }
17408        ///Sets `negated` with the provided value.
17409        pub fn set_negated(&mut self, field: bool) {
17410            self.negated = field;
17411        }
17412        ///Sets `negated` with the provided value.
17413        pub fn with_negated(mut self, field: bool) -> Self {
17414            self.set_negated(field);
17415            self
17416        }
17417        ///Returns the value of `sender`, or the default value if `sender` is unset.
17418        pub fn sender(&self) -> &super::SenderFilter {
17419            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17420                .predicate
17421            {
17422                field as _
17423            } else {
17424                super::SenderFilter::default_instance() as _
17425            }
17426        }
17427        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
17428        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17429            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17430                .predicate
17431            {
17432                Some(field as _)
17433            } else {
17434                None
17435            }
17436        }
17437        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17438        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17439            if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17440                .predicate
17441            {
17442                Some(field as _)
17443            } else {
17444                None
17445            }
17446        }
17447        ///Returns a mutable reference to `sender`.
17448        ///If the field is unset, it is first initialized with the default value.
17449        ///If any other oneof field in the same oneof is set, it will be cleared.
17450        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17451            if self.sender_opt_mut().is_none() {
17452                self.predicate = Some(
17453                    super::transaction_literal::Predicate::Sender(
17454                        super::SenderFilter::default(),
17455                    ),
17456                );
17457            }
17458            self.sender_opt_mut().unwrap()
17459        }
17460        ///Sets `sender` with the provided value.
17461        ///If any other oneof field in the same oneof is set, it will be cleared.
17462        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17463            self.predicate = Some(
17464                super::transaction_literal::Predicate::Sender(field.into().into()),
17465            );
17466        }
17467        ///Sets `sender` with the provided value.
17468        ///If any other oneof field in the same oneof is set, it will be cleared.
17469        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17470            self.set_sender(field.into());
17471            self
17472        }
17473        ///Returns the value of `affected_address`, or the default value if `affected_address` is unset.
17474        pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17475            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17476                .predicate
17477            {
17478                field as _
17479            } else {
17480                super::AffectedAddressFilter::default_instance() as _
17481            }
17482        }
17483        ///If `affected_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17484        pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17485            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17486                .predicate
17487            {
17488                Some(field as _)
17489            } else {
17490                None
17491            }
17492        }
17493        ///If `affected_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17494        pub fn affected_address_opt_mut(
17495            &mut self,
17496        ) -> Option<&mut super::AffectedAddressFilter> {
17497            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17498                .predicate
17499            {
17500                Some(field as _)
17501            } else {
17502                None
17503            }
17504        }
17505        ///Returns a mutable reference to `affected_address`.
17506        ///If the field is unset, it is first initialized with the default value.
17507        ///If any other oneof field in the same oneof is set, it will be cleared.
17508        pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17509            if self.affected_address_opt_mut().is_none() {
17510                self.predicate = Some(
17511                    super::transaction_literal::Predicate::AffectedAddress(
17512                        super::AffectedAddressFilter::default(),
17513                    ),
17514                );
17515            }
17516            self.affected_address_opt_mut().unwrap()
17517        }
17518        ///Sets `affected_address` with the provided value.
17519        ///If any other oneof field in the same oneof is set, it will be cleared.
17520        pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17521            &mut self,
17522            field: T,
17523        ) {
17524            self.predicate = Some(
17525                super::transaction_literal::Predicate::AffectedAddress(
17526                    field.into().into(),
17527                ),
17528            );
17529        }
17530        ///Sets `affected_address` with the provided value.
17531        ///If any other oneof field in the same oneof is set, it will be cleared.
17532        pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17533            mut self,
17534            field: T,
17535        ) -> Self {
17536            self.set_affected_address(field.into());
17537            self
17538        }
17539        ///Returns the value of `affected_object`, or the default value if `affected_object` is unset.
17540        pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17541            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17542                .predicate
17543            {
17544                field as _
17545            } else {
17546                super::AffectedObjectFilter::default_instance() as _
17547            }
17548        }
17549        ///If `affected_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
17550        pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17551            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17552                .predicate
17553            {
17554                Some(field as _)
17555            } else {
17556                None
17557            }
17558        }
17559        ///If `affected_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17560        pub fn affected_object_opt_mut(
17561            &mut self,
17562        ) -> Option<&mut super::AffectedObjectFilter> {
17563            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17564                .predicate
17565            {
17566                Some(field as _)
17567            } else {
17568                None
17569            }
17570        }
17571        ///Returns a mutable reference to `affected_object`.
17572        ///If the field is unset, it is first initialized with the default value.
17573        ///If any other oneof field in the same oneof is set, it will be cleared.
17574        pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17575            if self.affected_object_opt_mut().is_none() {
17576                self.predicate = Some(
17577                    super::transaction_literal::Predicate::AffectedObject(
17578                        super::AffectedObjectFilter::default(),
17579                    ),
17580                );
17581            }
17582            self.affected_object_opt_mut().unwrap()
17583        }
17584        ///Sets `affected_object` with the provided value.
17585        ///If any other oneof field in the same oneof is set, it will be cleared.
17586        pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17587            &mut self,
17588            field: T,
17589        ) {
17590            self.predicate = Some(
17591                super::transaction_literal::Predicate::AffectedObject(
17592                    field.into().into(),
17593                ),
17594            );
17595        }
17596        ///Sets `affected_object` with the provided value.
17597        ///If any other oneof field in the same oneof is set, it will be cleared.
17598        pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17599            mut self,
17600            field: T,
17601        ) -> Self {
17602            self.set_affected_object(field.into());
17603            self
17604        }
17605        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
17606        pub fn move_call(&self) -> &super::MoveCallFilter {
17607            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17608                .predicate
17609            {
17610                field as _
17611            } else {
17612                super::MoveCallFilter::default_instance() as _
17613            }
17614        }
17615        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
17616        pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17617            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17618                .predicate
17619            {
17620                Some(field as _)
17621            } else {
17622                None
17623            }
17624        }
17625        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17626        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17627            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17628                .predicate
17629            {
17630                Some(field as _)
17631            } else {
17632                None
17633            }
17634        }
17635        ///Returns a mutable reference to `move_call`.
17636        ///If the field is unset, it is first initialized with the default value.
17637        ///If any other oneof field in the same oneof is set, it will be cleared.
17638        pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17639            if self.move_call_opt_mut().is_none() {
17640                self.predicate = Some(
17641                    super::transaction_literal::Predicate::MoveCall(
17642                        super::MoveCallFilter::default(),
17643                    ),
17644                );
17645            }
17646            self.move_call_opt_mut().unwrap()
17647        }
17648        ///Sets `move_call` with the provided value.
17649        ///If any other oneof field in the same oneof is set, it will be cleared.
17650        pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17651            self.predicate = Some(
17652                super::transaction_literal::Predicate::MoveCall(field.into().into()),
17653            );
17654        }
17655        ///Sets `move_call` with the provided value.
17656        ///If any other oneof field in the same oneof is set, it will be cleared.
17657        pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17658            mut self,
17659            field: T,
17660        ) -> Self {
17661            self.set_move_call(field.into());
17662            self
17663        }
17664        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
17665        pub fn emit_module(&self) -> &super::EmitModuleFilter {
17666            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17667                .predicate
17668            {
17669                field as _
17670            } else {
17671                super::EmitModuleFilter::default_instance() as _
17672            }
17673        }
17674        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
17675        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17676            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17677                .predicate
17678            {
17679                Some(field as _)
17680            } else {
17681                None
17682            }
17683        }
17684        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17685        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17686            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17687                .predicate
17688            {
17689                Some(field as _)
17690            } else {
17691                None
17692            }
17693        }
17694        ///Returns a mutable reference to `emit_module`.
17695        ///If the field is unset, it is first initialized with the default value.
17696        ///If any other oneof field in the same oneof is set, it will be cleared.
17697        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17698            if self.emit_module_opt_mut().is_none() {
17699                self.predicate = Some(
17700                    super::transaction_literal::Predicate::EmitModule(
17701                        super::EmitModuleFilter::default(),
17702                    ),
17703                );
17704            }
17705            self.emit_module_opt_mut().unwrap()
17706        }
17707        ///Sets `emit_module` with the provided value.
17708        ///If any other oneof field in the same oneof is set, it will be cleared.
17709        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17710            self.predicate = Some(
17711                super::transaction_literal::Predicate::EmitModule(field.into().into()),
17712            );
17713        }
17714        ///Sets `emit_module` with the provided value.
17715        ///If any other oneof field in the same oneof is set, it will be cleared.
17716        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17717            mut self,
17718            field: T,
17719        ) -> Self {
17720            self.set_emit_module(field.into());
17721            self
17722        }
17723        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
17724        pub fn event_type(&self) -> &super::EventTypeFilter {
17725            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17726                .predicate
17727            {
17728                field as _
17729            } else {
17730                super::EventTypeFilter::default_instance() as _
17731            }
17732        }
17733        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
17734        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17735            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17736                .predicate
17737            {
17738                Some(field as _)
17739            } else {
17740                None
17741            }
17742        }
17743        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17744        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17745            if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17746                .predicate
17747            {
17748                Some(field as _)
17749            } else {
17750                None
17751            }
17752        }
17753        ///Returns a mutable reference to `event_type`.
17754        ///If the field is unset, it is first initialized with the default value.
17755        ///If any other oneof field in the same oneof is set, it will be cleared.
17756        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17757            if self.event_type_opt_mut().is_none() {
17758                self.predicate = Some(
17759                    super::transaction_literal::Predicate::EventType(
17760                        super::EventTypeFilter::default(),
17761                    ),
17762                );
17763            }
17764            self.event_type_opt_mut().unwrap()
17765        }
17766        ///Sets `event_type` with the provided value.
17767        ///If any other oneof field in the same oneof is set, it will be cleared.
17768        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17769            self.predicate = Some(
17770                super::transaction_literal::Predicate::EventType(field.into().into()),
17771            );
17772        }
17773        ///Sets `event_type` with the provided value.
17774        ///If any other oneof field in the same oneof is set, it will be cleared.
17775        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17776            mut self,
17777            field: T,
17778        ) -> Self {
17779            self.set_event_type(field.into());
17780            self
17781        }
17782        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
17783        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17784            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17785                .predicate
17786            {
17787                field as _
17788            } else {
17789                super::EventStreamHeadFilter::default_instance() as _
17790            }
17791        }
17792        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
17793        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17794            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17795                .predicate
17796            {
17797                Some(field as _)
17798            } else {
17799                None
17800            }
17801        }
17802        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17803        pub fn event_stream_head_opt_mut(
17804            &mut self,
17805        ) -> Option<&mut super::EventStreamHeadFilter> {
17806            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
17807                .predicate
17808            {
17809                Some(field as _)
17810            } else {
17811                None
17812            }
17813        }
17814        ///Returns a mutable reference to `event_stream_head`.
17815        ///If the field is unset, it is first initialized with the default value.
17816        ///If any other oneof field in the same oneof is set, it will be cleared.
17817        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
17818            if self.event_stream_head_opt_mut().is_none() {
17819                self.predicate = Some(
17820                    super::transaction_literal::Predicate::EventStreamHead(
17821                        super::EventStreamHeadFilter::default(),
17822                    ),
17823                );
17824            }
17825            self.event_stream_head_opt_mut().unwrap()
17826        }
17827        ///Sets `event_stream_head` with the provided value.
17828        ///If any other oneof field in the same oneof is set, it will be cleared.
17829        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17830            &mut self,
17831            field: T,
17832        ) {
17833            self.predicate = Some(
17834                super::transaction_literal::Predicate::EventStreamHead(
17835                    field.into().into(),
17836                ),
17837            );
17838        }
17839        ///Sets `event_stream_head` with the provided value.
17840        ///If any other oneof field in the same oneof is set, it will be cleared.
17841        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17842            mut self,
17843            field: T,
17844        ) -> Self {
17845            self.set_event_stream_head(field.into());
17846            self
17847        }
17848        ///Returns the value of `package_write`, or the default value if `package_write` is unset.
17849        pub fn package_write(&self) -> &super::PackageWriteFilter {
17850            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17851                .predicate
17852            {
17853                field as _
17854            } else {
17855                super::PackageWriteFilter::default_instance() as _
17856            }
17857        }
17858        ///If `package_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
17859        pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
17860            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17861                .predicate
17862            {
17863                Some(field as _)
17864            } else {
17865                None
17866            }
17867        }
17868        ///If `package_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17869        pub fn package_write_opt_mut(
17870            &mut self,
17871        ) -> Option<&mut super::PackageWriteFilter> {
17872            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
17873                .predicate
17874            {
17875                Some(field as _)
17876            } else {
17877                None
17878            }
17879        }
17880        ///Returns a mutable reference to `package_write`.
17881        ///If the field is unset, it is first initialized with the default value.
17882        ///If any other oneof field in the same oneof is set, it will be cleared.
17883        pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
17884            if self.package_write_opt_mut().is_none() {
17885                self.predicate = Some(
17886                    super::transaction_literal::Predicate::PackageWrite(
17887                        super::PackageWriteFilter::default(),
17888                    ),
17889                );
17890            }
17891            self.package_write_opt_mut().unwrap()
17892        }
17893        ///Sets `package_write` with the provided value.
17894        ///If any other oneof field in the same oneof is set, it will be cleared.
17895        pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
17896            &mut self,
17897            field: T,
17898        ) {
17899            self.predicate = Some(
17900                super::transaction_literal::Predicate::PackageWrite(field.into().into()),
17901            );
17902        }
17903        ///Sets `package_write` with the provided value.
17904        ///If any other oneof field in the same oneof is set, it will be cleared.
17905        pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
17906            mut self,
17907            field: T,
17908        ) -> Self {
17909            self.set_package_write(field.into());
17910            self
17911        }
17912    }
17913    impl super::TransactionTerm {
17914        pub const fn const_default() -> Self {
17915            Self { literals: Vec::new() }
17916        }
17917        #[doc(hidden)]
17918        pub fn default_instance() -> &'static Self {
17919            static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
17920            &DEFAULT
17921        }
17922        ///Returns the value of `literals`, or the default value if `literals` is unset.
17923        pub fn literals(&self) -> &[super::TransactionLiteral] {
17924            &self.literals
17925        }
17926        ///Returns a mutable reference to `literals`.
17927        ///If the field is unset, it is first initialized with the default value.
17928        pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
17929            &mut self.literals
17930        }
17931        ///Sets `literals` with the provided value.
17932        pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
17933            self.literals = field;
17934        }
17935        ///Sets `literals` with the provided value.
17936        pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
17937            self.set_literals(field);
17938            self
17939        }
17940    }
17941    impl super::TransferObjects {
17942        pub const fn const_default() -> Self {
17943            Self {
17944                objects: Vec::new(),
17945                address: None,
17946            }
17947        }
17948        #[doc(hidden)]
17949        pub fn default_instance() -> &'static Self {
17950            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
17951            &DEFAULT
17952        }
17953        ///Returns the value of `objects`, or the default value if `objects` is unset.
17954        pub fn objects(&self) -> &[super::Argument] {
17955            &self.objects
17956        }
17957        ///Returns a mutable reference to `objects`.
17958        ///If the field is unset, it is first initialized with the default value.
17959        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
17960            &mut self.objects
17961        }
17962        ///Sets `objects` with the provided value.
17963        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
17964            self.objects = field;
17965        }
17966        ///Sets `objects` with the provided value.
17967        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
17968            self.set_objects(field);
17969            self
17970        }
17971        ///Returns the value of `address`, or the default value if `address` is unset.
17972        pub fn address(&self) -> &super::Argument {
17973            self.address
17974                .as_ref()
17975                .map(|field| field as _)
17976                .unwrap_or_else(|| super::Argument::default_instance() as _)
17977        }
17978        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17979        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
17980            self.address.as_mut().map(|field| field as _)
17981        }
17982        ///Returns a mutable reference to `address`.
17983        ///If the field is unset, it is first initialized with the default value.
17984        pub fn address_mut(&mut self) -> &mut super::Argument {
17985            self.address.get_or_insert_default()
17986        }
17987        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17988        pub fn address_opt(&self) -> Option<&super::Argument> {
17989            self.address.as_ref().map(|field| field as _)
17990        }
17991        ///Sets `address` with the provided value.
17992        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
17993            self.address = Some(field.into().into());
17994        }
17995        ///Sets `address` with the provided value.
17996        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
17997            self.set_address(field.into());
17998            self
17999        }
18000    }
18001    impl super::TypeArgumentError {
18002        pub const fn const_default() -> Self {
18003            Self {
18004                type_argument: None,
18005                kind: None,
18006            }
18007        }
18008        #[doc(hidden)]
18009        pub fn default_instance() -> &'static Self {
18010            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
18011            &DEFAULT
18012        }
18013        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18014        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
18015            self.type_argument.as_mut().map(|field| field as _)
18016        }
18017        ///Returns a mutable reference to `type_argument`.
18018        ///If the field is unset, it is first initialized with the default value.
18019        pub fn type_argument_mut(&mut self) -> &mut u32 {
18020            self.type_argument.get_or_insert_default()
18021        }
18022        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
18023        pub fn type_argument_opt(&self) -> Option<u32> {
18024            self.type_argument.as_ref().map(|field| *field)
18025        }
18026        ///Sets `type_argument` with the provided value.
18027        pub fn set_type_argument(&mut self, field: u32) {
18028            self.type_argument = Some(field);
18029        }
18030        ///Sets `type_argument` with the provided value.
18031        pub fn with_type_argument(mut self, field: u32) -> Self {
18032            self.set_type_argument(field);
18033            self
18034        }
18035        ///Sets `kind` with the provided value.
18036        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
18037            mut self,
18038            field: T,
18039        ) -> Self {
18040            self.set_kind(field.into());
18041            self
18042        }
18043    }
18044    impl super::TypeOrigin {
18045        pub const fn const_default() -> Self {
18046            Self {
18047                module_name: None,
18048                datatype_name: None,
18049                package_id: None,
18050            }
18051        }
18052        #[doc(hidden)]
18053        pub fn default_instance() -> &'static Self {
18054            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18055            &DEFAULT
18056        }
18057        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18058        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18059            self.module_name.as_mut().map(|field| field as _)
18060        }
18061        ///Returns a mutable reference to `module_name`.
18062        ///If the field is unset, it is first initialized with the default value.
18063        pub fn module_name_mut(&mut self) -> &mut String {
18064            self.module_name.get_or_insert_default()
18065        }
18066        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18067        pub fn module_name_opt(&self) -> Option<&str> {
18068            self.module_name.as_ref().map(|field| field as _)
18069        }
18070        ///Sets `module_name` with the provided value.
18071        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18072            self.module_name = Some(field.into().into());
18073        }
18074        ///Sets `module_name` with the provided value.
18075        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18076            self.set_module_name(field.into());
18077            self
18078        }
18079        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18080        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18081            self.datatype_name.as_mut().map(|field| field as _)
18082        }
18083        ///Returns a mutable reference to `datatype_name`.
18084        ///If the field is unset, it is first initialized with the default value.
18085        pub fn datatype_name_mut(&mut self) -> &mut String {
18086            self.datatype_name.get_or_insert_default()
18087        }
18088        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18089        pub fn datatype_name_opt(&self) -> Option<&str> {
18090            self.datatype_name.as_ref().map(|field| field as _)
18091        }
18092        ///Sets `datatype_name` with the provided value.
18093        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18094            self.datatype_name = Some(field.into().into());
18095        }
18096        ///Sets `datatype_name` with the provided value.
18097        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18098            self.set_datatype_name(field.into());
18099            self
18100        }
18101        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18102        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18103            self.package_id.as_mut().map(|field| field as _)
18104        }
18105        ///Returns a mutable reference to `package_id`.
18106        ///If the field is unset, it is first initialized with the default value.
18107        pub fn package_id_mut(&mut self) -> &mut String {
18108            self.package_id.get_or_insert_default()
18109        }
18110        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18111        pub fn package_id_opt(&self) -> Option<&str> {
18112            self.package_id.as_ref().map(|field| field as _)
18113        }
18114        ///Sets `package_id` with the provided value.
18115        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18116            self.package_id = Some(field.into().into());
18117        }
18118        ///Sets `package_id` with the provided value.
18119        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18120            self.set_package_id(field.into());
18121            self
18122        }
18123    }
18124    impl super::TypeParameter {
18125        pub const fn const_default() -> Self {
18126            Self {
18127                constraints: Vec::new(),
18128                is_phantom: None,
18129            }
18130        }
18131        #[doc(hidden)]
18132        pub fn default_instance() -> &'static Self {
18133            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18134            &DEFAULT
18135        }
18136        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18137        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18138            self.is_phantom.as_mut().map(|field| field as _)
18139        }
18140        ///Returns a mutable reference to `is_phantom`.
18141        ///If the field is unset, it is first initialized with the default value.
18142        pub fn is_phantom_mut(&mut self) -> &mut bool {
18143            self.is_phantom.get_or_insert_default()
18144        }
18145        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
18146        pub fn is_phantom_opt(&self) -> Option<bool> {
18147            self.is_phantom.as_ref().map(|field| *field)
18148        }
18149        ///Sets `is_phantom` with the provided value.
18150        pub fn set_is_phantom(&mut self, field: bool) {
18151            self.is_phantom = Some(field);
18152        }
18153        ///Sets `is_phantom` with the provided value.
18154        pub fn with_is_phantom(mut self, field: bool) -> Self {
18155            self.set_is_phantom(field);
18156            self
18157        }
18158    }
18159    impl super::UnchangedConsensusObject {
18160        pub const fn const_default() -> Self {
18161            Self {
18162                kind: None,
18163                object_id: None,
18164                version: None,
18165                digest: None,
18166                object_type: None,
18167            }
18168        }
18169        #[doc(hidden)]
18170        pub fn default_instance() -> &'static Self {
18171            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18172            &DEFAULT
18173        }
18174        ///Sets `kind` with the provided value.
18175        pub fn with_kind<
18176            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18177        >(mut self, field: T) -> Self {
18178            self.set_kind(field.into());
18179            self
18180        }
18181        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18182        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18183            self.object_id.as_mut().map(|field| field as _)
18184        }
18185        ///Returns a mutable reference to `object_id`.
18186        ///If the field is unset, it is first initialized with the default value.
18187        pub fn object_id_mut(&mut self) -> &mut String {
18188            self.object_id.get_or_insert_default()
18189        }
18190        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18191        pub fn object_id_opt(&self) -> Option<&str> {
18192            self.object_id.as_ref().map(|field| field as _)
18193        }
18194        ///Sets `object_id` with the provided value.
18195        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18196            self.object_id = Some(field.into().into());
18197        }
18198        ///Sets `object_id` with the provided value.
18199        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18200            self.set_object_id(field.into());
18201            self
18202        }
18203        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18204        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18205            self.version.as_mut().map(|field| field as _)
18206        }
18207        ///Returns a mutable reference to `version`.
18208        ///If the field is unset, it is first initialized with the default value.
18209        pub fn version_mut(&mut self) -> &mut u64 {
18210            self.version.get_or_insert_default()
18211        }
18212        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
18213        pub fn version_opt(&self) -> Option<u64> {
18214            self.version.as_ref().map(|field| *field)
18215        }
18216        ///Sets `version` with the provided value.
18217        pub fn set_version(&mut self, field: u64) {
18218            self.version = Some(field);
18219        }
18220        ///Sets `version` with the provided value.
18221        pub fn with_version(mut self, field: u64) -> Self {
18222            self.set_version(field);
18223            self
18224        }
18225        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18226        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18227            self.digest.as_mut().map(|field| field as _)
18228        }
18229        ///Returns a mutable reference to `digest`.
18230        ///If the field is unset, it is first initialized with the default value.
18231        pub fn digest_mut(&mut self) -> &mut String {
18232            self.digest.get_or_insert_default()
18233        }
18234        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18235        pub fn digest_opt(&self) -> Option<&str> {
18236            self.digest.as_ref().map(|field| field as _)
18237        }
18238        ///Sets `digest` with the provided value.
18239        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18240            self.digest = Some(field.into().into());
18241        }
18242        ///Sets `digest` with the provided value.
18243        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18244            self.set_digest(field.into());
18245            self
18246        }
18247        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18248        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18249            self.object_type.as_mut().map(|field| field as _)
18250        }
18251        ///Returns a mutable reference to `object_type`.
18252        ///If the field is unset, it is first initialized with the default value.
18253        pub fn object_type_mut(&mut self) -> &mut String {
18254            self.object_type.get_or_insert_default()
18255        }
18256        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
18257        pub fn object_type_opt(&self) -> Option<&str> {
18258            self.object_type.as_ref().map(|field| field as _)
18259        }
18260        ///Sets `object_type` with the provided value.
18261        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18262            self.object_type = Some(field.into().into());
18263        }
18264        ///Sets `object_type` with the provided value.
18265        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18266            self.set_object_type(field.into());
18267            self
18268        }
18269    }
18270    impl super::Upgrade {
18271        pub const fn const_default() -> Self {
18272            Self {
18273                modules: Vec::new(),
18274                dependencies: Vec::new(),
18275                package: None,
18276                ticket: None,
18277            }
18278        }
18279        #[doc(hidden)]
18280        pub fn default_instance() -> &'static Self {
18281            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18282            &DEFAULT
18283        }
18284        ///Returns the value of `modules`, or the default value if `modules` is unset.
18285        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18286            &self.modules
18287        }
18288        ///Returns a mutable reference to `modules`.
18289        ///If the field is unset, it is first initialized with the default value.
18290        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18291            &mut self.modules
18292        }
18293        ///Sets `modules` with the provided value.
18294        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18295            self.modules = field;
18296        }
18297        ///Sets `modules` with the provided value.
18298        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18299            self.set_modules(field);
18300            self
18301        }
18302        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
18303        pub fn dependencies(&self) -> &[String] {
18304            &self.dependencies
18305        }
18306        ///Returns a mutable reference to `dependencies`.
18307        ///If the field is unset, it is first initialized with the default value.
18308        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18309            &mut self.dependencies
18310        }
18311        ///Sets `dependencies` with the provided value.
18312        pub fn set_dependencies(&mut self, field: Vec<String>) {
18313            self.dependencies = field;
18314        }
18315        ///Sets `dependencies` with the provided value.
18316        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18317            self.set_dependencies(field);
18318            self
18319        }
18320        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18321        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18322            self.package.as_mut().map(|field| field as _)
18323        }
18324        ///Returns a mutable reference to `package`.
18325        ///If the field is unset, it is first initialized with the default value.
18326        pub fn package_mut(&mut self) -> &mut String {
18327            self.package.get_or_insert_default()
18328        }
18329        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
18330        pub fn package_opt(&self) -> Option<&str> {
18331            self.package.as_ref().map(|field| field as _)
18332        }
18333        ///Sets `package` with the provided value.
18334        pub fn set_package<T: Into<String>>(&mut self, field: T) {
18335            self.package = Some(field.into().into());
18336        }
18337        ///Sets `package` with the provided value.
18338        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18339            self.set_package(field.into());
18340            self
18341        }
18342        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
18343        pub fn ticket(&self) -> &super::Argument {
18344            self.ticket
18345                .as_ref()
18346                .map(|field| field as _)
18347                .unwrap_or_else(|| super::Argument::default_instance() as _)
18348        }
18349        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18350        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18351            self.ticket.as_mut().map(|field| field as _)
18352        }
18353        ///Returns a mutable reference to `ticket`.
18354        ///If the field is unset, it is first initialized with the default value.
18355        pub fn ticket_mut(&mut self) -> &mut super::Argument {
18356            self.ticket.get_or_insert_default()
18357        }
18358        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
18359        pub fn ticket_opt(&self) -> Option<&super::Argument> {
18360            self.ticket.as_ref().map(|field| field as _)
18361        }
18362        ///Sets `ticket` with the provided value.
18363        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18364            self.ticket = Some(field.into().into());
18365        }
18366        ///Sets `ticket` with the provided value.
18367        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18368            self.set_ticket(field.into());
18369            self
18370        }
18371    }
18372    impl super::UserSignature {
18373        pub const fn const_default() -> Self {
18374            Self {
18375                bcs: None,
18376                scheme: None,
18377                signature: None,
18378            }
18379        }
18380        #[doc(hidden)]
18381        pub fn default_instance() -> &'static Self {
18382            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18383            &DEFAULT
18384        }
18385        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
18386        pub fn bcs(&self) -> &super::Bcs {
18387            self.bcs
18388                .as_ref()
18389                .map(|field| field as _)
18390                .unwrap_or_else(|| super::Bcs::default_instance() as _)
18391        }
18392        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18393        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18394            self.bcs.as_mut().map(|field| field as _)
18395        }
18396        ///Returns a mutable reference to `bcs`.
18397        ///If the field is unset, it is first initialized with the default value.
18398        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18399            self.bcs.get_or_insert_default()
18400        }
18401        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
18402        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18403            self.bcs.as_ref().map(|field| field as _)
18404        }
18405        ///Sets `bcs` with the provided value.
18406        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18407            self.bcs = Some(field.into().into());
18408        }
18409        ///Sets `bcs` with the provided value.
18410        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18411            self.set_bcs(field.into());
18412            self
18413        }
18414        ///Sets `scheme` with the provided value.
18415        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18416            self.set_scheme(field.into());
18417            self
18418        }
18419        ///Returns the value of `simple`, or the default value if `simple` is unset.
18420        pub fn simple(&self) -> &super::SimpleSignature {
18421            if let Some(super::user_signature::Signature::Simple(field)) = &self
18422                .signature
18423            {
18424                field as _
18425            } else {
18426                super::SimpleSignature::default_instance() as _
18427            }
18428        }
18429        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
18430        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18431            if let Some(super::user_signature::Signature::Simple(field)) = &self
18432                .signature
18433            {
18434                Some(field as _)
18435            } else {
18436                None
18437            }
18438        }
18439        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18440        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18441            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18442                .signature
18443            {
18444                Some(field as _)
18445            } else {
18446                None
18447            }
18448        }
18449        ///Returns a mutable reference to `simple`.
18450        ///If the field is unset, it is first initialized with the default value.
18451        ///If any other oneof field in the same oneof is set, it will be cleared.
18452        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18453            if self.simple_opt_mut().is_none() {
18454                self.signature = Some(
18455                    super::user_signature::Signature::Simple(
18456                        super::SimpleSignature::default(),
18457                    ),
18458                );
18459            }
18460            self.simple_opt_mut().unwrap()
18461        }
18462        ///Sets `simple` with the provided value.
18463        ///If any other oneof field in the same oneof is set, it will be cleared.
18464        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18465            self.signature = Some(
18466                super::user_signature::Signature::Simple(field.into().into()),
18467            );
18468        }
18469        ///Sets `simple` with the provided value.
18470        ///If any other oneof field in the same oneof is set, it will be cleared.
18471        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18472            self.set_simple(field.into());
18473            self
18474        }
18475        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
18476        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18477            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18478                .signature
18479            {
18480                field as _
18481            } else {
18482                super::MultisigAggregatedSignature::default_instance() as _
18483            }
18484        }
18485        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
18486        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18487            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18488                .signature
18489            {
18490                Some(field as _)
18491            } else {
18492                None
18493            }
18494        }
18495        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18496        pub fn multisig_opt_mut(
18497            &mut self,
18498        ) -> Option<&mut super::MultisigAggregatedSignature> {
18499            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18500                .signature
18501            {
18502                Some(field as _)
18503            } else {
18504                None
18505            }
18506        }
18507        ///Returns a mutable reference to `multisig`.
18508        ///If the field is unset, it is first initialized with the default value.
18509        ///If any other oneof field in the same oneof is set, it will be cleared.
18510        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18511            if self.multisig_opt_mut().is_none() {
18512                self.signature = Some(
18513                    super::user_signature::Signature::Multisig(
18514                        super::MultisigAggregatedSignature::default(),
18515                    ),
18516                );
18517            }
18518            self.multisig_opt_mut().unwrap()
18519        }
18520        ///Sets `multisig` with the provided value.
18521        ///If any other oneof field in the same oneof is set, it will be cleared.
18522        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18523            &mut self,
18524            field: T,
18525        ) {
18526            self.signature = Some(
18527                super::user_signature::Signature::Multisig(field.into().into()),
18528            );
18529        }
18530        ///Sets `multisig` with the provided value.
18531        ///If any other oneof field in the same oneof is set, it will be cleared.
18532        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18533            mut self,
18534            field: T,
18535        ) -> Self {
18536            self.set_multisig(field.into());
18537            self
18538        }
18539        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
18540        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18541            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18542                .signature
18543            {
18544                field as _
18545            } else {
18546                super::ZkLoginAuthenticator::default_instance() as _
18547            }
18548        }
18549        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
18550        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18551            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18552                .signature
18553            {
18554                Some(field as _)
18555            } else {
18556                None
18557            }
18558        }
18559        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18560        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18561            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18562                .signature
18563            {
18564                Some(field as _)
18565            } else {
18566                None
18567            }
18568        }
18569        ///Returns a mutable reference to `zklogin`.
18570        ///If the field is unset, it is first initialized with the default value.
18571        ///If any other oneof field in the same oneof is set, it will be cleared.
18572        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18573            if self.zklogin_opt_mut().is_none() {
18574                self.signature = Some(
18575                    super::user_signature::Signature::Zklogin(
18576                        super::ZkLoginAuthenticator::default(),
18577                    ),
18578                );
18579            }
18580            self.zklogin_opt_mut().unwrap()
18581        }
18582        ///Sets `zklogin` with the provided value.
18583        ///If any other oneof field in the same oneof is set, it will be cleared.
18584        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18585            self.signature = Some(
18586                super::user_signature::Signature::Zklogin(field.into().into()),
18587            );
18588        }
18589        ///Sets `zklogin` with the provided value.
18590        ///If any other oneof field in the same oneof is set, it will be cleared.
18591        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18592            mut self,
18593            field: T,
18594        ) -> Self {
18595            self.set_zklogin(field.into());
18596            self
18597        }
18598        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
18599        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18600            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18601                .signature
18602            {
18603                field as _
18604            } else {
18605                super::PasskeyAuthenticator::default_instance() as _
18606            }
18607        }
18608        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
18609        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18610            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18611                .signature
18612            {
18613                Some(field as _)
18614            } else {
18615                None
18616            }
18617        }
18618        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18619        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18620            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18621                .signature
18622            {
18623                Some(field as _)
18624            } else {
18625                None
18626            }
18627        }
18628        ///Returns a mutable reference to `passkey`.
18629        ///If the field is unset, it is first initialized with the default value.
18630        ///If any other oneof field in the same oneof is set, it will be cleared.
18631        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18632            if self.passkey_opt_mut().is_none() {
18633                self.signature = Some(
18634                    super::user_signature::Signature::Passkey(
18635                        super::PasskeyAuthenticator::default(),
18636                    ),
18637                );
18638            }
18639            self.passkey_opt_mut().unwrap()
18640        }
18641        ///Sets `passkey` with the provided value.
18642        ///If any other oneof field in the same oneof is set, it will be cleared.
18643        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18644            self.signature = Some(
18645                super::user_signature::Signature::Passkey(field.into().into()),
18646            );
18647        }
18648        ///Sets `passkey` with the provided value.
18649        ///If any other oneof field in the same oneof is set, it will be cleared.
18650        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18651            mut self,
18652            field: T,
18653        ) -> Self {
18654            self.set_passkey(field.into());
18655            self
18656        }
18657    }
18658    impl super::Validator {
18659        pub const fn const_default() -> Self {
18660            Self {
18661                name: None,
18662                address: None,
18663                description: None,
18664                image_url: None,
18665                project_url: None,
18666                protocol_public_key: None,
18667                proof_of_possession: None,
18668                network_public_key: None,
18669                worker_public_key: None,
18670                network_address: None,
18671                p2p_address: None,
18672                primary_address: None,
18673                worker_address: None,
18674                next_epoch_protocol_public_key: None,
18675                next_epoch_proof_of_possession: None,
18676                next_epoch_network_public_key: None,
18677                next_epoch_worker_public_key: None,
18678                next_epoch_network_address: None,
18679                next_epoch_p2p_address: None,
18680                next_epoch_primary_address: None,
18681                next_epoch_worker_address: None,
18682                metadata_extra_fields: None,
18683                voting_power: None,
18684                operation_cap_id: None,
18685                gas_price: None,
18686                staking_pool: None,
18687                commission_rate: None,
18688                next_epoch_stake: None,
18689                next_epoch_gas_price: None,
18690                next_epoch_commission_rate: None,
18691                extra_fields: None,
18692            }
18693        }
18694        #[doc(hidden)]
18695        pub fn default_instance() -> &'static Self {
18696            static DEFAULT: super::Validator = super::Validator::const_default();
18697            &DEFAULT
18698        }
18699        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18700        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18701            self.name.as_mut().map(|field| field as _)
18702        }
18703        ///Returns a mutable reference to `name`.
18704        ///If the field is unset, it is first initialized with the default value.
18705        pub fn name_mut(&mut self) -> &mut String {
18706            self.name.get_or_insert_default()
18707        }
18708        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18709        pub fn name_opt(&self) -> Option<&str> {
18710            self.name.as_ref().map(|field| field as _)
18711        }
18712        ///Sets `name` with the provided value.
18713        pub fn set_name<T: Into<String>>(&mut self, field: T) {
18714            self.name = Some(field.into().into());
18715        }
18716        ///Sets `name` with the provided value.
18717        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18718            self.set_name(field.into());
18719            self
18720        }
18721        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18722        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18723            self.address.as_mut().map(|field| field as _)
18724        }
18725        ///Returns a mutable reference to `address`.
18726        ///If the field is unset, it is first initialized with the default value.
18727        pub fn address_mut(&mut self) -> &mut String {
18728            self.address.get_or_insert_default()
18729        }
18730        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18731        pub fn address_opt(&self) -> Option<&str> {
18732            self.address.as_ref().map(|field| field as _)
18733        }
18734        ///Sets `address` with the provided value.
18735        pub fn set_address<T: Into<String>>(&mut self, field: T) {
18736            self.address = Some(field.into().into());
18737        }
18738        ///Sets `address` with the provided value.
18739        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18740            self.set_address(field.into());
18741            self
18742        }
18743        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18744        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18745            self.description.as_mut().map(|field| field as _)
18746        }
18747        ///Returns a mutable reference to `description`.
18748        ///If the field is unset, it is first initialized with the default value.
18749        pub fn description_mut(&mut self) -> &mut String {
18750            self.description.get_or_insert_default()
18751        }
18752        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
18753        pub fn description_opt(&self) -> Option<&str> {
18754            self.description.as_ref().map(|field| field as _)
18755        }
18756        ///Sets `description` with the provided value.
18757        pub fn set_description<T: Into<String>>(&mut self, field: T) {
18758            self.description = Some(field.into().into());
18759        }
18760        ///Sets `description` with the provided value.
18761        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18762            self.set_description(field.into());
18763            self
18764        }
18765        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18766        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18767            self.image_url.as_mut().map(|field| field as _)
18768        }
18769        ///Returns a mutable reference to `image_url`.
18770        ///If the field is unset, it is first initialized with the default value.
18771        pub fn image_url_mut(&mut self) -> &mut String {
18772            self.image_url.get_or_insert_default()
18773        }
18774        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18775        pub fn image_url_opt(&self) -> Option<&str> {
18776            self.image_url.as_ref().map(|field| field as _)
18777        }
18778        ///Sets `image_url` with the provided value.
18779        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18780            self.image_url = Some(field.into().into());
18781        }
18782        ///Sets `image_url` with the provided value.
18783        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18784            self.set_image_url(field.into());
18785            self
18786        }
18787        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18788        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18789            self.project_url.as_mut().map(|field| field as _)
18790        }
18791        ///Returns a mutable reference to `project_url`.
18792        ///If the field is unset, it is first initialized with the default value.
18793        pub fn project_url_mut(&mut self) -> &mut String {
18794            self.project_url.get_or_insert_default()
18795        }
18796        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18797        pub fn project_url_opt(&self) -> Option<&str> {
18798            self.project_url.as_ref().map(|field| field as _)
18799        }
18800        ///Sets `project_url` with the provided value.
18801        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
18802            self.project_url = Some(field.into().into());
18803        }
18804        ///Sets `project_url` with the provided value.
18805        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
18806            self.set_project_url(field.into());
18807            self
18808        }
18809        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18810        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
18811            self.protocol_public_key.as_ref().map(|field| field as _)
18812        }
18813        ///Sets `protocol_public_key` with the provided value.
18814        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18815            &mut self,
18816            field: T,
18817        ) {
18818            self.protocol_public_key = Some(field.into().into());
18819        }
18820        ///Sets `protocol_public_key` with the provided value.
18821        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18822            mut self,
18823            field: T,
18824        ) -> Self {
18825            self.set_protocol_public_key(field.into());
18826            self
18827        }
18828        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
18829        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
18830            self.proof_of_possession.as_ref().map(|field| field as _)
18831        }
18832        ///Sets `proof_of_possession` with the provided value.
18833        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18834            &mut self,
18835            field: T,
18836        ) {
18837            self.proof_of_possession = Some(field.into().into());
18838        }
18839        ///Sets `proof_of_possession` with the provided value.
18840        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18841            mut self,
18842            field: T,
18843        ) -> Self {
18844            self.set_proof_of_possession(field.into());
18845            self
18846        }
18847        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18848        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
18849            self.network_public_key.as_ref().map(|field| field as _)
18850        }
18851        ///Sets `network_public_key` with the provided value.
18852        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
18853            &mut self,
18854            field: T,
18855        ) {
18856            self.network_public_key = Some(field.into().into());
18857        }
18858        ///Sets `network_public_key` with the provided value.
18859        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
18860            mut self,
18861            field: T,
18862        ) -> Self {
18863            self.set_network_public_key(field.into());
18864            self
18865        }
18866        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18867        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
18868            self.worker_public_key.as_ref().map(|field| field as _)
18869        }
18870        ///Sets `worker_public_key` with the provided value.
18871        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18872            &mut self,
18873            field: T,
18874        ) {
18875            self.worker_public_key = Some(field.into().into());
18876        }
18877        ///Sets `worker_public_key` with the provided value.
18878        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18879            mut self,
18880            field: T,
18881        ) -> Self {
18882            self.set_worker_public_key(field.into());
18883            self
18884        }
18885        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18886        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
18887            self.network_address.as_mut().map(|field| field as _)
18888        }
18889        ///Returns a mutable reference to `network_address`.
18890        ///If the field is unset, it is first initialized with the default value.
18891        pub fn network_address_mut(&mut self) -> &mut String {
18892            self.network_address.get_or_insert_default()
18893        }
18894        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18895        pub fn network_address_opt(&self) -> Option<&str> {
18896            self.network_address.as_ref().map(|field| field as _)
18897        }
18898        ///Sets `network_address` with the provided value.
18899        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
18900            self.network_address = Some(field.into().into());
18901        }
18902        ///Sets `network_address` with the provided value.
18903        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
18904            self.set_network_address(field.into());
18905            self
18906        }
18907        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18908        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
18909            self.p2p_address.as_mut().map(|field| field as _)
18910        }
18911        ///Returns a mutable reference to `p2p_address`.
18912        ///If the field is unset, it is first initialized with the default value.
18913        pub fn p2p_address_mut(&mut self) -> &mut String {
18914            self.p2p_address.get_or_insert_default()
18915        }
18916        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18917        pub fn p2p_address_opt(&self) -> Option<&str> {
18918            self.p2p_address.as_ref().map(|field| field as _)
18919        }
18920        ///Sets `p2p_address` with the provided value.
18921        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
18922            self.p2p_address = Some(field.into().into());
18923        }
18924        ///Sets `p2p_address` with the provided value.
18925        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
18926            self.set_p2p_address(field.into());
18927            self
18928        }
18929        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18930        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
18931            self.primary_address.as_mut().map(|field| field as _)
18932        }
18933        ///Returns a mutable reference to `primary_address`.
18934        ///If the field is unset, it is first initialized with the default value.
18935        pub fn primary_address_mut(&mut self) -> &mut String {
18936            self.primary_address.get_or_insert_default()
18937        }
18938        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18939        pub fn primary_address_opt(&self) -> Option<&str> {
18940            self.primary_address.as_ref().map(|field| field as _)
18941        }
18942        ///Sets `primary_address` with the provided value.
18943        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
18944            self.primary_address = Some(field.into().into());
18945        }
18946        ///Sets `primary_address` with the provided value.
18947        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
18948            self.set_primary_address(field.into());
18949            self
18950        }
18951        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18952        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
18953            self.worker_address.as_mut().map(|field| field as _)
18954        }
18955        ///Returns a mutable reference to `worker_address`.
18956        ///If the field is unset, it is first initialized with the default value.
18957        pub fn worker_address_mut(&mut self) -> &mut String {
18958            self.worker_address.get_or_insert_default()
18959        }
18960        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18961        pub fn worker_address_opt(&self) -> Option<&str> {
18962            self.worker_address.as_ref().map(|field| field as _)
18963        }
18964        ///Sets `worker_address` with the provided value.
18965        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
18966            self.worker_address = Some(field.into().into());
18967        }
18968        ///Sets `worker_address` with the provided value.
18969        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
18970            self.set_worker_address(field.into());
18971            self
18972        }
18973        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18974        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
18975            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
18976        }
18977        ///Sets `next_epoch_protocol_public_key` with the provided value.
18978        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18979            &mut self,
18980            field: T,
18981        ) {
18982            self.next_epoch_protocol_public_key = Some(field.into().into());
18983        }
18984        ///Sets `next_epoch_protocol_public_key` with the provided value.
18985        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18986            mut self,
18987            field: T,
18988        ) -> Self {
18989            self.set_next_epoch_protocol_public_key(field.into());
18990            self
18991        }
18992        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
18993        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
18994            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
18995        }
18996        ///Sets `next_epoch_proof_of_possession` with the provided value.
18997        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18998            &mut self,
18999            field: T,
19000        ) {
19001            self.next_epoch_proof_of_possession = Some(field.into().into());
19002        }
19003        ///Sets `next_epoch_proof_of_possession` with the provided value.
19004        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19005            mut self,
19006            field: T,
19007        ) -> Self {
19008            self.set_next_epoch_proof_of_possession(field.into());
19009            self
19010        }
19011        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19012        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
19013            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
19014        }
19015        ///Sets `next_epoch_network_public_key` with the provided value.
19016        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19017            &mut self,
19018            field: T,
19019        ) {
19020            self.next_epoch_network_public_key = Some(field.into().into());
19021        }
19022        ///Sets `next_epoch_network_public_key` with the provided value.
19023        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19024            mut self,
19025            field: T,
19026        ) -> Self {
19027            self.set_next_epoch_network_public_key(field.into());
19028            self
19029        }
19030        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19031        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
19032            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
19033        }
19034        ///Sets `next_epoch_worker_public_key` with the provided value.
19035        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19036            &mut self,
19037            field: T,
19038        ) {
19039            self.next_epoch_worker_public_key = Some(field.into().into());
19040        }
19041        ///Sets `next_epoch_worker_public_key` with the provided value.
19042        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19043            mut self,
19044            field: T,
19045        ) -> Self {
19046            self.set_next_epoch_worker_public_key(field.into());
19047            self
19048        }
19049        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19050        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19051            self.next_epoch_network_address.as_mut().map(|field| field as _)
19052        }
19053        ///Returns a mutable reference to `next_epoch_network_address`.
19054        ///If the field is unset, it is first initialized with the default value.
19055        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19056            self.next_epoch_network_address.get_or_insert_default()
19057        }
19058        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19059        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19060            self.next_epoch_network_address.as_ref().map(|field| field as _)
19061        }
19062        ///Sets `next_epoch_network_address` with the provided value.
19063        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19064            self.next_epoch_network_address = Some(field.into().into());
19065        }
19066        ///Sets `next_epoch_network_address` with the provided value.
19067        pub fn with_next_epoch_network_address<T: Into<String>>(
19068            mut self,
19069            field: T,
19070        ) -> Self {
19071            self.set_next_epoch_network_address(field.into());
19072            self
19073        }
19074        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19075        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19076            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19077        }
19078        ///Returns a mutable reference to `next_epoch_p2p_address`.
19079        ///If the field is unset, it is first initialized with the default value.
19080        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19081            self.next_epoch_p2p_address.get_or_insert_default()
19082        }
19083        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19084        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19085            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19086        }
19087        ///Sets `next_epoch_p2p_address` with the provided value.
19088        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19089            self.next_epoch_p2p_address = Some(field.into().into());
19090        }
19091        ///Sets `next_epoch_p2p_address` with the provided value.
19092        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19093            self.set_next_epoch_p2p_address(field.into());
19094            self
19095        }
19096        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19097        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19098            self.next_epoch_primary_address.as_mut().map(|field| field as _)
19099        }
19100        ///Returns a mutable reference to `next_epoch_primary_address`.
19101        ///If the field is unset, it is first initialized with the default value.
19102        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19103            self.next_epoch_primary_address.get_or_insert_default()
19104        }
19105        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19106        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19107            self.next_epoch_primary_address.as_ref().map(|field| field as _)
19108        }
19109        ///Sets `next_epoch_primary_address` with the provided value.
19110        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19111            self.next_epoch_primary_address = Some(field.into().into());
19112        }
19113        ///Sets `next_epoch_primary_address` with the provided value.
19114        pub fn with_next_epoch_primary_address<T: Into<String>>(
19115            mut self,
19116            field: T,
19117        ) -> Self {
19118            self.set_next_epoch_primary_address(field.into());
19119            self
19120        }
19121        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19122        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19123            self.next_epoch_worker_address.as_mut().map(|field| field as _)
19124        }
19125        ///Returns a mutable reference to `next_epoch_worker_address`.
19126        ///If the field is unset, it is first initialized with the default value.
19127        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19128            self.next_epoch_worker_address.get_or_insert_default()
19129        }
19130        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19131        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19132            self.next_epoch_worker_address.as_ref().map(|field| field as _)
19133        }
19134        ///Sets `next_epoch_worker_address` with the provided value.
19135        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19136            self.next_epoch_worker_address = Some(field.into().into());
19137        }
19138        ///Sets `next_epoch_worker_address` with the provided value.
19139        pub fn with_next_epoch_worker_address<T: Into<String>>(
19140            mut self,
19141            field: T,
19142        ) -> Self {
19143            self.set_next_epoch_worker_address(field.into());
19144            self
19145        }
19146        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
19147        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19148            self.metadata_extra_fields
19149                .as_ref()
19150                .map(|field| field as _)
19151                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19152        }
19153        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19154        pub fn metadata_extra_fields_opt_mut(
19155            &mut self,
19156        ) -> Option<&mut super::MoveTable> {
19157            self.metadata_extra_fields.as_mut().map(|field| field as _)
19158        }
19159        ///Returns a mutable reference to `metadata_extra_fields`.
19160        ///If the field is unset, it is first initialized with the default value.
19161        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19162            self.metadata_extra_fields.get_or_insert_default()
19163        }
19164        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19165        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19166            self.metadata_extra_fields.as_ref().map(|field| field as _)
19167        }
19168        ///Sets `metadata_extra_fields` with the provided value.
19169        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19170            &mut self,
19171            field: T,
19172        ) {
19173            self.metadata_extra_fields = Some(field.into().into());
19174        }
19175        ///Sets `metadata_extra_fields` with the provided value.
19176        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19177            mut self,
19178            field: T,
19179        ) -> Self {
19180            self.set_metadata_extra_fields(field.into());
19181            self
19182        }
19183        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19184        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19185            self.voting_power.as_mut().map(|field| field as _)
19186        }
19187        ///Returns a mutable reference to `voting_power`.
19188        ///If the field is unset, it is first initialized with the default value.
19189        pub fn voting_power_mut(&mut self) -> &mut u64 {
19190            self.voting_power.get_or_insert_default()
19191        }
19192        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
19193        pub fn voting_power_opt(&self) -> Option<u64> {
19194            self.voting_power.as_ref().map(|field| *field)
19195        }
19196        ///Sets `voting_power` with the provided value.
19197        pub fn set_voting_power(&mut self, field: u64) {
19198            self.voting_power = Some(field);
19199        }
19200        ///Sets `voting_power` with the provided value.
19201        pub fn with_voting_power(mut self, field: u64) -> Self {
19202            self.set_voting_power(field);
19203            self
19204        }
19205        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19206        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19207            self.operation_cap_id.as_mut().map(|field| field as _)
19208        }
19209        ///Returns a mutable reference to `operation_cap_id`.
19210        ///If the field is unset, it is first initialized with the default value.
19211        pub fn operation_cap_id_mut(&mut self) -> &mut String {
19212            self.operation_cap_id.get_or_insert_default()
19213        }
19214        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
19215        pub fn operation_cap_id_opt(&self) -> Option<&str> {
19216            self.operation_cap_id.as_ref().map(|field| field as _)
19217        }
19218        ///Sets `operation_cap_id` with the provided value.
19219        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19220            self.operation_cap_id = Some(field.into().into());
19221        }
19222        ///Sets `operation_cap_id` with the provided value.
19223        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19224            self.set_operation_cap_id(field.into());
19225            self
19226        }
19227        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19228        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19229            self.gas_price.as_mut().map(|field| field as _)
19230        }
19231        ///Returns a mutable reference to `gas_price`.
19232        ///If the field is unset, it is first initialized with the default value.
19233        pub fn gas_price_mut(&mut self) -> &mut u64 {
19234            self.gas_price.get_or_insert_default()
19235        }
19236        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19237        pub fn gas_price_opt(&self) -> Option<u64> {
19238            self.gas_price.as_ref().map(|field| *field)
19239        }
19240        ///Sets `gas_price` with the provided value.
19241        pub fn set_gas_price(&mut self, field: u64) {
19242            self.gas_price = Some(field);
19243        }
19244        ///Sets `gas_price` with the provided value.
19245        pub fn with_gas_price(mut self, field: u64) -> Self {
19246            self.set_gas_price(field);
19247            self
19248        }
19249        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
19250        pub fn staking_pool(&self) -> &super::StakingPool {
19251            self.staking_pool
19252                .as_ref()
19253                .map(|field| field as _)
19254                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19255        }
19256        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19257        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19258            self.staking_pool.as_mut().map(|field| field as _)
19259        }
19260        ///Returns a mutable reference to `staking_pool`.
19261        ///If the field is unset, it is first initialized with the default value.
19262        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19263            self.staking_pool.get_or_insert_default()
19264        }
19265        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
19266        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19267            self.staking_pool.as_ref().map(|field| field as _)
19268        }
19269        ///Sets `staking_pool` with the provided value.
19270        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19271            self.staking_pool = Some(field.into().into());
19272        }
19273        ///Sets `staking_pool` with the provided value.
19274        pub fn with_staking_pool<T: Into<super::StakingPool>>(
19275            mut self,
19276            field: T,
19277        ) -> Self {
19278            self.set_staking_pool(field.into());
19279            self
19280        }
19281        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19282        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19283            self.commission_rate.as_mut().map(|field| field as _)
19284        }
19285        ///Returns a mutable reference to `commission_rate`.
19286        ///If the field is unset, it is first initialized with the default value.
19287        pub fn commission_rate_mut(&mut self) -> &mut u64 {
19288            self.commission_rate.get_or_insert_default()
19289        }
19290        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19291        pub fn commission_rate_opt(&self) -> Option<u64> {
19292            self.commission_rate.as_ref().map(|field| *field)
19293        }
19294        ///Sets `commission_rate` with the provided value.
19295        pub fn set_commission_rate(&mut self, field: u64) {
19296            self.commission_rate = Some(field);
19297        }
19298        ///Sets `commission_rate` with the provided value.
19299        pub fn with_commission_rate(mut self, field: u64) -> Self {
19300            self.set_commission_rate(field);
19301            self
19302        }
19303        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19304        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19305            self.next_epoch_stake.as_mut().map(|field| field as _)
19306        }
19307        ///Returns a mutable reference to `next_epoch_stake`.
19308        ///If the field is unset, it is first initialized with the default value.
19309        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19310            self.next_epoch_stake.get_or_insert_default()
19311        }
19312        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19313        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19314            self.next_epoch_stake.as_ref().map(|field| *field)
19315        }
19316        ///Sets `next_epoch_stake` with the provided value.
19317        pub fn set_next_epoch_stake(&mut self, field: u64) {
19318            self.next_epoch_stake = Some(field);
19319        }
19320        ///Sets `next_epoch_stake` with the provided value.
19321        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19322            self.set_next_epoch_stake(field);
19323            self
19324        }
19325        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19326        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19327            self.next_epoch_gas_price.as_mut().map(|field| field as _)
19328        }
19329        ///Returns a mutable reference to `next_epoch_gas_price`.
19330        ///If the field is unset, it is first initialized with the default value.
19331        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19332            self.next_epoch_gas_price.get_or_insert_default()
19333        }
19334        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19335        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19336            self.next_epoch_gas_price.as_ref().map(|field| *field)
19337        }
19338        ///Sets `next_epoch_gas_price` with the provided value.
19339        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19340            self.next_epoch_gas_price = Some(field);
19341        }
19342        ///Sets `next_epoch_gas_price` with the provided value.
19343        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19344            self.set_next_epoch_gas_price(field);
19345            self
19346        }
19347        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19348        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19349            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19350        }
19351        ///Returns a mutable reference to `next_epoch_commission_rate`.
19352        ///If the field is unset, it is first initialized with the default value.
19353        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19354            self.next_epoch_commission_rate.get_or_insert_default()
19355        }
19356        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19357        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19358            self.next_epoch_commission_rate.as_ref().map(|field| *field)
19359        }
19360        ///Sets `next_epoch_commission_rate` with the provided value.
19361        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19362            self.next_epoch_commission_rate = Some(field);
19363        }
19364        ///Sets `next_epoch_commission_rate` with the provided value.
19365        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19366            self.set_next_epoch_commission_rate(field);
19367            self
19368        }
19369        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
19370        pub fn extra_fields(&self) -> &super::MoveTable {
19371            self.extra_fields
19372                .as_ref()
19373                .map(|field| field as _)
19374                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19375        }
19376        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19377        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19378            self.extra_fields.as_mut().map(|field| field as _)
19379        }
19380        ///Returns a mutable reference to `extra_fields`.
19381        ///If the field is unset, it is first initialized with the default value.
19382        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19383            self.extra_fields.get_or_insert_default()
19384        }
19385        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19386        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19387            self.extra_fields.as_ref().map(|field| field as _)
19388        }
19389        ///Sets `extra_fields` with the provided value.
19390        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19391            self.extra_fields = Some(field.into().into());
19392        }
19393        ///Sets `extra_fields` with the provided value.
19394        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19395            self.set_extra_fields(field.into());
19396            self
19397        }
19398    }
19399    impl super::ValidatorAggregatedSignature {
19400        pub const fn const_default() -> Self {
19401            Self {
19402                epoch: None,
19403                signature: None,
19404                bitmap: None,
19405            }
19406        }
19407        #[doc(hidden)]
19408        pub fn default_instance() -> &'static Self {
19409            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19410            &DEFAULT
19411        }
19412        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19413        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19414            self.epoch.as_mut().map(|field| field as _)
19415        }
19416        ///Returns a mutable reference to `epoch`.
19417        ///If the field is unset, it is first initialized with the default value.
19418        pub fn epoch_mut(&mut self) -> &mut u64 {
19419            self.epoch.get_or_insert_default()
19420        }
19421        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19422        pub fn epoch_opt(&self) -> Option<u64> {
19423            self.epoch.as_ref().map(|field| *field)
19424        }
19425        ///Sets `epoch` with the provided value.
19426        pub fn set_epoch(&mut self, field: u64) {
19427            self.epoch = Some(field);
19428        }
19429        ///Sets `epoch` with the provided value.
19430        pub fn with_epoch(mut self, field: u64) -> Self {
19431            self.set_epoch(field);
19432            self
19433        }
19434        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
19435        pub fn signature_opt(&self) -> Option<&[u8]> {
19436            self.signature.as_ref().map(|field| field as _)
19437        }
19438        ///Sets `signature` with the provided value.
19439        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19440            self.signature = Some(field.into().into());
19441        }
19442        ///Sets `signature` with the provided value.
19443        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19444            mut self,
19445            field: T,
19446        ) -> Self {
19447            self.set_signature(field.into());
19448            self
19449        }
19450        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
19451        pub fn bitmap_opt(&self) -> Option<&[u8]> {
19452            self.bitmap.as_ref().map(|field| field as _)
19453        }
19454        ///Sets `bitmap` with the provided value.
19455        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19456            self.bitmap = Some(field.into().into());
19457        }
19458        ///Sets `bitmap` with the provided value.
19459        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19460            self.set_bitmap(field.into());
19461            self
19462        }
19463    }
19464    impl super::ValidatorCommittee {
19465        pub const fn const_default() -> Self {
19466            Self {
19467                epoch: None,
19468                members: Vec::new(),
19469            }
19470        }
19471        #[doc(hidden)]
19472        pub fn default_instance() -> &'static Self {
19473            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19474            &DEFAULT
19475        }
19476        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19477        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19478            self.epoch.as_mut().map(|field| field as _)
19479        }
19480        ///Returns a mutable reference to `epoch`.
19481        ///If the field is unset, it is first initialized with the default value.
19482        pub fn epoch_mut(&mut self) -> &mut u64 {
19483            self.epoch.get_or_insert_default()
19484        }
19485        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19486        pub fn epoch_opt(&self) -> Option<u64> {
19487            self.epoch.as_ref().map(|field| *field)
19488        }
19489        ///Sets `epoch` with the provided value.
19490        pub fn set_epoch(&mut self, field: u64) {
19491            self.epoch = Some(field);
19492        }
19493        ///Sets `epoch` with the provided value.
19494        pub fn with_epoch(mut self, field: u64) -> Self {
19495            self.set_epoch(field);
19496            self
19497        }
19498        ///Returns the value of `members`, or the default value if `members` is unset.
19499        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19500            &self.members
19501        }
19502        ///Returns a mutable reference to `members`.
19503        ///If the field is unset, it is first initialized with the default value.
19504        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19505            &mut self.members
19506        }
19507        ///Sets `members` with the provided value.
19508        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19509            self.members = field;
19510        }
19511        ///Sets `members` with the provided value.
19512        pub fn with_members(
19513            mut self,
19514            field: Vec<super::ValidatorCommitteeMember>,
19515        ) -> Self {
19516            self.set_members(field);
19517            self
19518        }
19519    }
19520    impl super::ValidatorCommitteeMember {
19521        pub const fn const_default() -> Self {
19522            Self {
19523                public_key: None,
19524                weight: None,
19525            }
19526        }
19527        #[doc(hidden)]
19528        pub fn default_instance() -> &'static Self {
19529            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19530            &DEFAULT
19531        }
19532        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19533        pub fn public_key_opt(&self) -> Option<&[u8]> {
19534            self.public_key.as_ref().map(|field| field as _)
19535        }
19536        ///Sets `public_key` with the provided value.
19537        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19538            self.public_key = Some(field.into().into());
19539        }
19540        ///Sets `public_key` with the provided value.
19541        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19542            mut self,
19543            field: T,
19544        ) -> Self {
19545            self.set_public_key(field.into());
19546            self
19547        }
19548        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19549        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19550            self.weight.as_mut().map(|field| field as _)
19551        }
19552        ///Returns a mutable reference to `weight`.
19553        ///If the field is unset, it is first initialized with the default value.
19554        pub fn weight_mut(&mut self) -> &mut u64 {
19555            self.weight.get_or_insert_default()
19556        }
19557        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
19558        pub fn weight_opt(&self) -> Option<u64> {
19559            self.weight.as_ref().map(|field| *field)
19560        }
19561        ///Sets `weight` with the provided value.
19562        pub fn set_weight(&mut self, field: u64) {
19563            self.weight = Some(field);
19564        }
19565        ///Sets `weight` with the provided value.
19566        pub fn with_weight(mut self, field: u64) -> Self {
19567            self.set_weight(field);
19568            self
19569        }
19570    }
19571    impl super::ValidatorExecutionTimeObservation {
19572        pub const fn const_default() -> Self {
19573            Self {
19574                validator: None,
19575                duration: None,
19576            }
19577        }
19578        #[doc(hidden)]
19579        pub fn default_instance() -> &'static Self {
19580            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19581            &DEFAULT
19582        }
19583        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
19584        pub fn validator_opt(&self) -> Option<&[u8]> {
19585            self.validator.as_ref().map(|field| field as _)
19586        }
19587        ///Sets `validator` with the provided value.
19588        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19589            self.validator = Some(field.into().into());
19590        }
19591        ///Sets `validator` with the provided value.
19592        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19593            mut self,
19594            field: T,
19595        ) -> Self {
19596            self.set_validator(field.into());
19597            self
19598        }
19599        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19600        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19601            self.duration.as_mut().map(|field| field as _)
19602        }
19603        ///Returns a mutable reference to `duration`.
19604        ///If the field is unset, it is first initialized with the default value.
19605        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19606            self.duration.get_or_insert_default()
19607        }
19608        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
19609        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19610            self.duration.as_ref().map(|field| field as _)
19611        }
19612        ///Sets `duration` with the provided value.
19613        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19614            self.duration = Some(field.into().into());
19615        }
19616        ///Sets `duration` with the provided value.
19617        pub fn with_duration<T: Into<::prost_types::Duration>>(
19618            mut self,
19619            field: T,
19620        ) -> Self {
19621            self.set_duration(field.into());
19622            self
19623        }
19624    }
19625    impl super::ValidatorReportRecord {
19626        pub const fn const_default() -> Self {
19627            Self {
19628                reported: None,
19629                reporters: Vec::new(),
19630            }
19631        }
19632        #[doc(hidden)]
19633        pub fn default_instance() -> &'static Self {
19634            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19635            &DEFAULT
19636        }
19637        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19638        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19639            self.reported.as_mut().map(|field| field as _)
19640        }
19641        ///Returns a mutable reference to `reported`.
19642        ///If the field is unset, it is first initialized with the default value.
19643        pub fn reported_mut(&mut self) -> &mut String {
19644            self.reported.get_or_insert_default()
19645        }
19646        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
19647        pub fn reported_opt(&self) -> Option<&str> {
19648            self.reported.as_ref().map(|field| field as _)
19649        }
19650        ///Sets `reported` with the provided value.
19651        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19652            self.reported = Some(field.into().into());
19653        }
19654        ///Sets `reported` with the provided value.
19655        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19656            self.set_reported(field.into());
19657            self
19658        }
19659        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
19660        pub fn reporters(&self) -> &[String] {
19661            &self.reporters
19662        }
19663        ///Returns a mutable reference to `reporters`.
19664        ///If the field is unset, it is first initialized with the default value.
19665        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19666            &mut self.reporters
19667        }
19668        ///Sets `reporters` with the provided value.
19669        pub fn set_reporters(&mut self, field: Vec<String>) {
19670            self.reporters = field;
19671        }
19672        ///Sets `reporters` with the provided value.
19673        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19674            self.set_reporters(field);
19675            self
19676        }
19677    }
19678    impl super::ValidatorSet {
19679        pub const fn const_default() -> Self {
19680            Self {
19681                total_stake: None,
19682                active_validators: Vec::new(),
19683                pending_active_validators: None,
19684                pending_removals: Vec::new(),
19685                staking_pool_mappings: None,
19686                inactive_validators: None,
19687                validator_candidates: None,
19688                at_risk_validators: std::collections::BTreeMap::new(),
19689                extra_fields: None,
19690            }
19691        }
19692        #[doc(hidden)]
19693        pub fn default_instance() -> &'static Self {
19694            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19695            &DEFAULT
19696        }
19697        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19698        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19699            self.total_stake.as_mut().map(|field| field as _)
19700        }
19701        ///Returns a mutable reference to `total_stake`.
19702        ///If the field is unset, it is first initialized with the default value.
19703        pub fn total_stake_mut(&mut self) -> &mut u64 {
19704            self.total_stake.get_or_insert_default()
19705        }
19706        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19707        pub fn total_stake_opt(&self) -> Option<u64> {
19708            self.total_stake.as_ref().map(|field| *field)
19709        }
19710        ///Sets `total_stake` with the provided value.
19711        pub fn set_total_stake(&mut self, field: u64) {
19712            self.total_stake = Some(field);
19713        }
19714        ///Sets `total_stake` with the provided value.
19715        pub fn with_total_stake(mut self, field: u64) -> Self {
19716            self.set_total_stake(field);
19717            self
19718        }
19719        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
19720        pub fn active_validators(&self) -> &[super::Validator] {
19721            &self.active_validators
19722        }
19723        ///Returns a mutable reference to `active_validators`.
19724        ///If the field is unset, it is first initialized with the default value.
19725        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19726            &mut self.active_validators
19727        }
19728        ///Sets `active_validators` with the provided value.
19729        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19730            self.active_validators = field;
19731        }
19732        ///Sets `active_validators` with the provided value.
19733        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19734            self.set_active_validators(field);
19735            self
19736        }
19737        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
19738        pub fn pending_active_validators(&self) -> &super::MoveTable {
19739            self.pending_active_validators
19740                .as_ref()
19741                .map(|field| field as _)
19742                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19743        }
19744        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19745        pub fn pending_active_validators_opt_mut(
19746            &mut self,
19747        ) -> Option<&mut super::MoveTable> {
19748            self.pending_active_validators.as_mut().map(|field| field as _)
19749        }
19750        ///Returns a mutable reference to `pending_active_validators`.
19751        ///If the field is unset, it is first initialized with the default value.
19752        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19753            self.pending_active_validators.get_or_insert_default()
19754        }
19755        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19756        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19757            self.pending_active_validators.as_ref().map(|field| field as _)
19758        }
19759        ///Sets `pending_active_validators` with the provided value.
19760        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19761            &mut self,
19762            field: T,
19763        ) {
19764            self.pending_active_validators = Some(field.into().into());
19765        }
19766        ///Sets `pending_active_validators` with the provided value.
19767        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19768            mut self,
19769            field: T,
19770        ) -> Self {
19771            self.set_pending_active_validators(field.into());
19772            self
19773        }
19774        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
19775        pub fn pending_removals(&self) -> &[u64] {
19776            &self.pending_removals
19777        }
19778        ///Returns a mutable reference to `pending_removals`.
19779        ///If the field is unset, it is first initialized with the default value.
19780        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19781            &mut self.pending_removals
19782        }
19783        ///Sets `pending_removals` with the provided value.
19784        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19785            self.pending_removals = field;
19786        }
19787        ///Sets `pending_removals` with the provided value.
19788        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19789            self.set_pending_removals(field);
19790            self
19791        }
19792        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
19793        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19794            self.staking_pool_mappings
19795                .as_ref()
19796                .map(|field| field as _)
19797                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19798        }
19799        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19800        pub fn staking_pool_mappings_opt_mut(
19801            &mut self,
19802        ) -> Option<&mut super::MoveTable> {
19803            self.staking_pool_mappings.as_mut().map(|field| field as _)
19804        }
19805        ///Returns a mutable reference to `staking_pool_mappings`.
19806        ///If the field is unset, it is first initialized with the default value.
19807        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
19808            self.staking_pool_mappings.get_or_insert_default()
19809        }
19810        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
19811        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
19812            self.staking_pool_mappings.as_ref().map(|field| field as _)
19813        }
19814        ///Sets `staking_pool_mappings` with the provided value.
19815        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
19816            &mut self,
19817            field: T,
19818        ) {
19819            self.staking_pool_mappings = Some(field.into().into());
19820        }
19821        ///Sets `staking_pool_mappings` with the provided value.
19822        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
19823            mut self,
19824            field: T,
19825        ) -> Self {
19826            self.set_staking_pool_mappings(field.into());
19827            self
19828        }
19829        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
19830        pub fn inactive_validators(&self) -> &super::MoveTable {
19831            self.inactive_validators
19832                .as_ref()
19833                .map(|field| field as _)
19834                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19835        }
19836        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19837        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19838            self.inactive_validators.as_mut().map(|field| field as _)
19839        }
19840        ///Returns a mutable reference to `inactive_validators`.
19841        ///If the field is unset, it is first initialized with the default value.
19842        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
19843            self.inactive_validators.get_or_insert_default()
19844        }
19845        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19846        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
19847            self.inactive_validators.as_ref().map(|field| field as _)
19848        }
19849        ///Sets `inactive_validators` with the provided value.
19850        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
19851            self.inactive_validators = Some(field.into().into());
19852        }
19853        ///Sets `inactive_validators` with the provided value.
19854        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
19855            mut self,
19856            field: T,
19857        ) -> Self {
19858            self.set_inactive_validators(field.into());
19859            self
19860        }
19861        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
19862        pub fn validator_candidates(&self) -> &super::MoveTable {
19863            self.validator_candidates
19864                .as_ref()
19865                .map(|field| field as _)
19866                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19867        }
19868        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19869        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19870            self.validator_candidates.as_mut().map(|field| field as _)
19871        }
19872        ///Returns a mutable reference to `validator_candidates`.
19873        ///If the field is unset, it is first initialized with the default value.
19874        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
19875            self.validator_candidates.get_or_insert_default()
19876        }
19877        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
19878        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
19879            self.validator_candidates.as_ref().map(|field| field as _)
19880        }
19881        ///Sets `validator_candidates` with the provided value.
19882        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
19883            self.validator_candidates = Some(field.into().into());
19884        }
19885        ///Sets `validator_candidates` with the provided value.
19886        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
19887            mut self,
19888            field: T,
19889        ) -> Self {
19890            self.set_validator_candidates(field.into());
19891            self
19892        }
19893        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
19894        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
19895            &self.at_risk_validators
19896        }
19897        ///Returns a mutable reference to `at_risk_validators`.
19898        ///If the field is unset, it is first initialized with the default value.
19899        pub fn at_risk_validators_mut(
19900            &mut self,
19901        ) -> &mut ::std::collections::BTreeMap<String, u64> {
19902            &mut self.at_risk_validators
19903        }
19904        ///Sets `at_risk_validators` with the provided value.
19905        pub fn set_at_risk_validators(
19906            &mut self,
19907            field: ::std::collections::BTreeMap<String, u64>,
19908        ) {
19909            self.at_risk_validators = field;
19910        }
19911        ///Sets `at_risk_validators` with the provided value.
19912        pub fn with_at_risk_validators(
19913            mut self,
19914            field: ::std::collections::BTreeMap<String, u64>,
19915        ) -> Self {
19916            self.set_at_risk_validators(field);
19917            self
19918        }
19919        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
19920        pub fn extra_fields(&self) -> &super::MoveTable {
19921            self.extra_fields
19922                .as_ref()
19923                .map(|field| field as _)
19924                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19925        }
19926        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19927        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19928            self.extra_fields.as_mut().map(|field| field as _)
19929        }
19930        ///Returns a mutable reference to `extra_fields`.
19931        ///If the field is unset, it is first initialized with the default value.
19932        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19933            self.extra_fields.get_or_insert_default()
19934        }
19935        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19936        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19937            self.extra_fields.as_ref().map(|field| field as _)
19938        }
19939        ///Sets `extra_fields` with the provided value.
19940        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19941            self.extra_fields = Some(field.into().into());
19942        }
19943        ///Sets `extra_fields` with the provided value.
19944        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19945            self.set_extra_fields(field.into());
19946            self
19947        }
19948    }
19949    impl super::VariantDescriptor {
19950        pub const fn const_default() -> Self {
19951            Self {
19952                name: None,
19953                position: None,
19954                fields: Vec::new(),
19955            }
19956        }
19957        #[doc(hidden)]
19958        pub fn default_instance() -> &'static Self {
19959            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
19960            &DEFAULT
19961        }
19962        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19963        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
19964            self.name.as_mut().map(|field| field as _)
19965        }
19966        ///Returns a mutable reference to `name`.
19967        ///If the field is unset, it is first initialized with the default value.
19968        pub fn name_mut(&mut self) -> &mut String {
19969            self.name.get_or_insert_default()
19970        }
19971        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
19972        pub fn name_opt(&self) -> Option<&str> {
19973            self.name.as_ref().map(|field| field as _)
19974        }
19975        ///Sets `name` with the provided value.
19976        pub fn set_name<T: Into<String>>(&mut self, field: T) {
19977            self.name = Some(field.into().into());
19978        }
19979        ///Sets `name` with the provided value.
19980        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
19981            self.set_name(field.into());
19982            self
19983        }
19984        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19985        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
19986            self.position.as_mut().map(|field| field as _)
19987        }
19988        ///Returns a mutable reference to `position`.
19989        ///If the field is unset, it is first initialized with the default value.
19990        pub fn position_mut(&mut self) -> &mut u32 {
19991            self.position.get_or_insert_default()
19992        }
19993        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
19994        pub fn position_opt(&self) -> Option<u32> {
19995            self.position.as_ref().map(|field| *field)
19996        }
19997        ///Sets `position` with the provided value.
19998        pub fn set_position(&mut self, field: u32) {
19999            self.position = Some(field);
20000        }
20001        ///Sets `position` with the provided value.
20002        pub fn with_position(mut self, field: u32) -> Self {
20003            self.set_position(field);
20004            self
20005        }
20006        ///Returns the value of `fields`, or the default value if `fields` is unset.
20007        pub fn fields(&self) -> &[super::FieldDescriptor] {
20008            &self.fields
20009        }
20010        ///Returns a mutable reference to `fields`.
20011        ///If the field is unset, it is first initialized with the default value.
20012        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
20013            &mut self.fields
20014        }
20015        ///Sets `fields` with the provided value.
20016        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
20017            self.fields = field;
20018        }
20019        ///Sets `fields` with the provided value.
20020        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
20021            self.set_fields(field);
20022            self
20023        }
20024    }
20025    impl super::VerifySignatureRequest {
20026        pub const fn const_default() -> Self {
20027            Self {
20028                message: None,
20029                signature: None,
20030                address: None,
20031                jwks: Vec::new(),
20032            }
20033        }
20034        #[doc(hidden)]
20035        pub fn default_instance() -> &'static Self {
20036            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
20037            &DEFAULT
20038        }
20039        ///Returns the value of `message`, or the default value if `message` is unset.
20040        pub fn message(&self) -> &super::Bcs {
20041            self.message
20042                .as_ref()
20043                .map(|field| field as _)
20044                .unwrap_or_else(|| super::Bcs::default_instance() as _)
20045        }
20046        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20047        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20048            self.message.as_mut().map(|field| field as _)
20049        }
20050        ///Returns a mutable reference to `message`.
20051        ///If the field is unset, it is first initialized with the default value.
20052        pub fn message_mut(&mut self) -> &mut super::Bcs {
20053            self.message.get_or_insert_default()
20054        }
20055        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
20056        pub fn message_opt(&self) -> Option<&super::Bcs> {
20057            self.message.as_ref().map(|field| field as _)
20058        }
20059        ///Sets `message` with the provided value.
20060        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20061            self.message = Some(field.into().into());
20062        }
20063        ///Sets `message` with the provided value.
20064        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20065            self.set_message(field.into());
20066            self
20067        }
20068        ///Returns the value of `signature`, or the default value if `signature` is unset.
20069        pub fn signature(&self) -> &super::UserSignature {
20070            self.signature
20071                .as_ref()
20072                .map(|field| field as _)
20073                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20074        }
20075        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20076        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20077            self.signature.as_mut().map(|field| field as _)
20078        }
20079        ///Returns a mutable reference to `signature`.
20080        ///If the field is unset, it is first initialized with the default value.
20081        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20082            self.signature.get_or_insert_default()
20083        }
20084        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20085        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20086            self.signature.as_ref().map(|field| field as _)
20087        }
20088        ///Sets `signature` with the provided value.
20089        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20090            self.signature = Some(field.into().into());
20091        }
20092        ///Sets `signature` with the provided value.
20093        pub fn with_signature<T: Into<super::UserSignature>>(
20094            mut self,
20095            field: T,
20096        ) -> Self {
20097            self.set_signature(field.into());
20098            self
20099        }
20100        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20101        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20102            self.address.as_mut().map(|field| field as _)
20103        }
20104        ///Returns a mutable reference to `address`.
20105        ///If the field is unset, it is first initialized with the default value.
20106        pub fn address_mut(&mut self) -> &mut String {
20107            self.address.get_or_insert_default()
20108        }
20109        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20110        pub fn address_opt(&self) -> Option<&str> {
20111            self.address.as_ref().map(|field| field as _)
20112        }
20113        ///Sets `address` with the provided value.
20114        pub fn set_address<T: Into<String>>(&mut self, field: T) {
20115            self.address = Some(field.into().into());
20116        }
20117        ///Sets `address` with the provided value.
20118        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20119            self.set_address(field.into());
20120            self
20121        }
20122        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
20123        pub fn jwks(&self) -> &[super::ActiveJwk] {
20124            &self.jwks
20125        }
20126        ///Returns a mutable reference to `jwks`.
20127        ///If the field is unset, it is first initialized with the default value.
20128        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20129            &mut self.jwks
20130        }
20131        ///Sets `jwks` with the provided value.
20132        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20133            self.jwks = field;
20134        }
20135        ///Sets `jwks` with the provided value.
20136        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20137            self.set_jwks(field);
20138            self
20139        }
20140    }
20141    impl super::VerifySignatureResponse {
20142        pub const fn const_default() -> Self {
20143            Self {
20144                is_valid: None,
20145                reason: None,
20146            }
20147        }
20148        #[doc(hidden)]
20149        pub fn default_instance() -> &'static Self {
20150            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20151            &DEFAULT
20152        }
20153        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20154        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20155            self.is_valid.as_mut().map(|field| field as _)
20156        }
20157        ///Returns a mutable reference to `is_valid`.
20158        ///If the field is unset, it is first initialized with the default value.
20159        pub fn is_valid_mut(&mut self) -> &mut bool {
20160            self.is_valid.get_or_insert_default()
20161        }
20162        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
20163        pub fn is_valid_opt(&self) -> Option<bool> {
20164            self.is_valid.as_ref().map(|field| *field)
20165        }
20166        ///Sets `is_valid` with the provided value.
20167        pub fn set_is_valid(&mut self, field: bool) {
20168            self.is_valid = Some(field);
20169        }
20170        ///Sets `is_valid` with the provided value.
20171        pub fn with_is_valid(mut self, field: bool) -> Self {
20172            self.set_is_valid(field);
20173            self
20174        }
20175        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20176        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20177            self.reason.as_mut().map(|field| field as _)
20178        }
20179        ///Returns a mutable reference to `reason`.
20180        ///If the field is unset, it is first initialized with the default value.
20181        pub fn reason_mut(&mut self) -> &mut String {
20182            self.reason.get_or_insert_default()
20183        }
20184        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
20185        pub fn reason_opt(&self) -> Option<&str> {
20186            self.reason.as_ref().map(|field| field as _)
20187        }
20188        ///Sets `reason` with the provided value.
20189        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20190            self.reason = Some(field.into().into());
20191        }
20192        ///Sets `reason` with the provided value.
20193        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20194            self.set_reason(field.into());
20195            self
20196        }
20197    }
20198    impl super::VersionAssignment {
20199        pub const fn const_default() -> Self {
20200            Self {
20201                object_id: None,
20202                start_version: None,
20203                version: None,
20204            }
20205        }
20206        #[doc(hidden)]
20207        pub fn default_instance() -> &'static Self {
20208            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20209            &DEFAULT
20210        }
20211        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20212        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20213            self.object_id.as_mut().map(|field| field as _)
20214        }
20215        ///Returns a mutable reference to `object_id`.
20216        ///If the field is unset, it is first initialized with the default value.
20217        pub fn object_id_mut(&mut self) -> &mut String {
20218            self.object_id.get_or_insert_default()
20219        }
20220        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20221        pub fn object_id_opt(&self) -> Option<&str> {
20222            self.object_id.as_ref().map(|field| field as _)
20223        }
20224        ///Sets `object_id` with the provided value.
20225        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20226            self.object_id = Some(field.into().into());
20227        }
20228        ///Sets `object_id` with the provided value.
20229        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20230            self.set_object_id(field.into());
20231            self
20232        }
20233        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20234        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20235            self.start_version.as_mut().map(|field| field as _)
20236        }
20237        ///Returns a mutable reference to `start_version`.
20238        ///If the field is unset, it is first initialized with the default value.
20239        pub fn start_version_mut(&mut self) -> &mut u64 {
20240            self.start_version.get_or_insert_default()
20241        }
20242        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20243        pub fn start_version_opt(&self) -> Option<u64> {
20244            self.start_version.as_ref().map(|field| *field)
20245        }
20246        ///Sets `start_version` with the provided value.
20247        pub fn set_start_version(&mut self, field: u64) {
20248            self.start_version = Some(field);
20249        }
20250        ///Sets `start_version` with the provided value.
20251        pub fn with_start_version(mut self, field: u64) -> Self {
20252            self.set_start_version(field);
20253            self
20254        }
20255        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20256        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20257            self.version.as_mut().map(|field| field as _)
20258        }
20259        ///Returns a mutable reference to `version`.
20260        ///If the field is unset, it is first initialized with the default value.
20261        pub fn version_mut(&mut self) -> &mut u64 {
20262            self.version.get_or_insert_default()
20263        }
20264        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20265        pub fn version_opt(&self) -> Option<u64> {
20266            self.version.as_ref().map(|field| *field)
20267        }
20268        ///Sets `version` with the provided value.
20269        pub fn set_version(&mut self, field: u64) {
20270            self.version = Some(field);
20271        }
20272        ///Sets `version` with the provided value.
20273        pub fn with_version(mut self, field: u64) -> Self {
20274            self.set_version(field);
20275            self
20276        }
20277    }
20278    impl super::Watermark {
20279        pub const fn const_default() -> Self {
20280            Self {
20281                cursor: None,
20282                checkpoint: None,
20283            }
20284        }
20285        #[doc(hidden)]
20286        pub fn default_instance() -> &'static Self {
20287            static DEFAULT: super::Watermark = super::Watermark::const_default();
20288            &DEFAULT
20289        }
20290        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
20291        pub fn cursor_opt(&self) -> Option<&[u8]> {
20292            self.cursor.as_ref().map(|field| field as _)
20293        }
20294        ///Sets `cursor` with the provided value.
20295        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20296            self.cursor = Some(field.into().into());
20297        }
20298        ///Sets `cursor` with the provided value.
20299        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20300            self.set_cursor(field.into());
20301            self
20302        }
20303        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20304        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20305            self.checkpoint.as_mut().map(|field| field as _)
20306        }
20307        ///Returns a mutable reference to `checkpoint`.
20308        ///If the field is unset, it is first initialized with the default value.
20309        pub fn checkpoint_mut(&mut self) -> &mut u64 {
20310            self.checkpoint.get_or_insert_default()
20311        }
20312        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
20313        pub fn checkpoint_opt(&self) -> Option<u64> {
20314            self.checkpoint.as_ref().map(|field| *field)
20315        }
20316        ///Sets `checkpoint` with the provided value.
20317        pub fn set_checkpoint(&mut self, field: u64) {
20318            self.checkpoint = Some(field);
20319        }
20320        ///Sets `checkpoint` with the provided value.
20321        pub fn with_checkpoint(mut self, field: u64) -> Self {
20322            self.set_checkpoint(field);
20323            self
20324        }
20325    }
20326    impl super::ZkLoginAuthenticator {
20327        pub const fn const_default() -> Self {
20328            Self {
20329                inputs: None,
20330                max_epoch: None,
20331                signature: None,
20332                public_identifier: None,
20333                jwk_id: None,
20334            }
20335        }
20336        #[doc(hidden)]
20337        pub fn default_instance() -> &'static Self {
20338            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20339            &DEFAULT
20340        }
20341        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
20342        pub fn inputs(&self) -> &super::ZkLoginInputs {
20343            self.inputs
20344                .as_ref()
20345                .map(|field| field as _)
20346                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20347        }
20348        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20349        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20350            self.inputs.as_mut().map(|field| field as _)
20351        }
20352        ///Returns a mutable reference to `inputs`.
20353        ///If the field is unset, it is first initialized with the default value.
20354        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20355            self.inputs.get_or_insert_default()
20356        }
20357        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
20358        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20359            self.inputs.as_ref().map(|field| field as _)
20360        }
20361        ///Sets `inputs` with the provided value.
20362        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20363            self.inputs = Some(field.into().into());
20364        }
20365        ///Sets `inputs` with the provided value.
20366        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20367            self.set_inputs(field.into());
20368            self
20369        }
20370        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20371        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20372            self.max_epoch.as_mut().map(|field| field as _)
20373        }
20374        ///Returns a mutable reference to `max_epoch`.
20375        ///If the field is unset, it is first initialized with the default value.
20376        pub fn max_epoch_mut(&mut self) -> &mut u64 {
20377            self.max_epoch.get_or_insert_default()
20378        }
20379        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
20380        pub fn max_epoch_opt(&self) -> Option<u64> {
20381            self.max_epoch.as_ref().map(|field| *field)
20382        }
20383        ///Sets `max_epoch` with the provided value.
20384        pub fn set_max_epoch(&mut self, field: u64) {
20385            self.max_epoch = Some(field);
20386        }
20387        ///Sets `max_epoch` with the provided value.
20388        pub fn with_max_epoch(mut self, field: u64) -> Self {
20389            self.set_max_epoch(field);
20390            self
20391        }
20392        ///Returns the value of `signature`, or the default value if `signature` is unset.
20393        pub fn signature(&self) -> &super::SimpleSignature {
20394            self.signature
20395                .as_ref()
20396                .map(|field| field as _)
20397                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20398        }
20399        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20400        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20401            self.signature.as_mut().map(|field| field as _)
20402        }
20403        ///Returns a mutable reference to `signature`.
20404        ///If the field is unset, it is first initialized with the default value.
20405        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20406            self.signature.get_or_insert_default()
20407        }
20408        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20409        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20410            self.signature.as_ref().map(|field| field as _)
20411        }
20412        ///Sets `signature` with the provided value.
20413        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20414            self.signature = Some(field.into().into());
20415        }
20416        ///Sets `signature` with the provided value.
20417        pub fn with_signature<T: Into<super::SimpleSignature>>(
20418            mut self,
20419            field: T,
20420        ) -> Self {
20421            self.set_signature(field.into());
20422            self
20423        }
20424        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
20425        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20426            self.public_identifier
20427                .as_ref()
20428                .map(|field| field as _)
20429                .unwrap_or_else(|| {
20430                    super::ZkLoginPublicIdentifier::default_instance() as _
20431                })
20432        }
20433        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20434        pub fn public_identifier_opt_mut(
20435            &mut self,
20436        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20437            self.public_identifier.as_mut().map(|field| field as _)
20438        }
20439        ///Returns a mutable reference to `public_identifier`.
20440        ///If the field is unset, it is first initialized with the default value.
20441        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20442            self.public_identifier.get_or_insert_default()
20443        }
20444        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
20445        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20446            self.public_identifier.as_ref().map(|field| field as _)
20447        }
20448        ///Sets `public_identifier` with the provided value.
20449        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20450            &mut self,
20451            field: T,
20452        ) {
20453            self.public_identifier = Some(field.into().into());
20454        }
20455        ///Sets `public_identifier` with the provided value.
20456        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20457            mut self,
20458            field: T,
20459        ) -> Self {
20460            self.set_public_identifier(field.into());
20461            self
20462        }
20463        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
20464        pub fn jwk_id(&self) -> &super::JwkId {
20465            self.jwk_id
20466                .as_ref()
20467                .map(|field| field as _)
20468                .unwrap_or_else(|| super::JwkId::default_instance() as _)
20469        }
20470        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20471        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20472            self.jwk_id.as_mut().map(|field| field as _)
20473        }
20474        ///Returns a mutable reference to `jwk_id`.
20475        ///If the field is unset, it is first initialized with the default value.
20476        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20477            self.jwk_id.get_or_insert_default()
20478        }
20479        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20480        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20481            self.jwk_id.as_ref().map(|field| field as _)
20482        }
20483        ///Sets `jwk_id` with the provided value.
20484        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20485            self.jwk_id = Some(field.into().into());
20486        }
20487        ///Sets `jwk_id` with the provided value.
20488        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20489            self.set_jwk_id(field.into());
20490            self
20491        }
20492    }
20493    impl super::ZkLoginClaim {
20494        pub const fn const_default() -> Self {
20495            Self {
20496                value: None,
20497                index_mod_4: None,
20498            }
20499        }
20500        #[doc(hidden)]
20501        pub fn default_instance() -> &'static Self {
20502            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20503            &DEFAULT
20504        }
20505        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20506        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20507            self.value.as_mut().map(|field| field as _)
20508        }
20509        ///Returns a mutable reference to `value`.
20510        ///If the field is unset, it is first initialized with the default value.
20511        pub fn value_mut(&mut self) -> &mut String {
20512            self.value.get_or_insert_default()
20513        }
20514        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
20515        pub fn value_opt(&self) -> Option<&str> {
20516            self.value.as_ref().map(|field| field as _)
20517        }
20518        ///Sets `value` with the provided value.
20519        pub fn set_value<T: Into<String>>(&mut self, field: T) {
20520            self.value = Some(field.into().into());
20521        }
20522        ///Sets `value` with the provided value.
20523        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20524            self.set_value(field.into());
20525            self
20526        }
20527        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20528        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20529            self.index_mod_4.as_mut().map(|field| field as _)
20530        }
20531        ///Returns a mutable reference to `index_mod_4`.
20532        ///If the field is unset, it is first initialized with the default value.
20533        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20534            self.index_mod_4.get_or_insert_default()
20535        }
20536        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
20537        pub fn index_mod_4_opt(&self) -> Option<u32> {
20538            self.index_mod_4.as_ref().map(|field| *field)
20539        }
20540        ///Sets `index_mod_4` with the provided value.
20541        pub fn set_index_mod_4(&mut self, field: u32) {
20542            self.index_mod_4 = Some(field);
20543        }
20544        ///Sets `index_mod_4` with the provided value.
20545        pub fn with_index_mod_4(mut self, field: u32) -> Self {
20546            self.set_index_mod_4(field);
20547            self
20548        }
20549    }
20550    impl super::ZkLoginInputs {
20551        pub const fn const_default() -> Self {
20552            Self {
20553                proof_points: None,
20554                iss_base64_details: None,
20555                header_base64: None,
20556                address_seed: None,
20557            }
20558        }
20559        #[doc(hidden)]
20560        pub fn default_instance() -> &'static Self {
20561            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20562            &DEFAULT
20563        }
20564        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
20565        pub fn proof_points(&self) -> &super::ZkLoginProof {
20566            self.proof_points
20567                .as_ref()
20568                .map(|field| field as _)
20569                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20570        }
20571        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20572        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20573            self.proof_points.as_mut().map(|field| field as _)
20574        }
20575        ///Returns a mutable reference to `proof_points`.
20576        ///If the field is unset, it is first initialized with the default value.
20577        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20578            self.proof_points.get_or_insert_default()
20579        }
20580        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
20581        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20582            self.proof_points.as_ref().map(|field| field as _)
20583        }
20584        ///Sets `proof_points` with the provided value.
20585        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20586            self.proof_points = Some(field.into().into());
20587        }
20588        ///Sets `proof_points` with the provided value.
20589        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20590            mut self,
20591            field: T,
20592        ) -> Self {
20593            self.set_proof_points(field.into());
20594            self
20595        }
20596        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
20597        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20598            self.iss_base64_details
20599                .as_ref()
20600                .map(|field| field as _)
20601                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20602        }
20603        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20604        pub fn iss_base64_details_opt_mut(
20605            &mut self,
20606        ) -> Option<&mut super::ZkLoginClaim> {
20607            self.iss_base64_details.as_mut().map(|field| field as _)
20608        }
20609        ///Returns a mutable reference to `iss_base64_details`.
20610        ///If the field is unset, it is first initialized with the default value.
20611        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20612            self.iss_base64_details.get_or_insert_default()
20613        }
20614        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
20615        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20616            self.iss_base64_details.as_ref().map(|field| field as _)
20617        }
20618        ///Sets `iss_base64_details` with the provided value.
20619        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20620            &mut self,
20621            field: T,
20622        ) {
20623            self.iss_base64_details = Some(field.into().into());
20624        }
20625        ///Sets `iss_base64_details` with the provided value.
20626        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20627            mut self,
20628            field: T,
20629        ) -> Self {
20630            self.set_iss_base64_details(field.into());
20631            self
20632        }
20633        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20634        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20635            self.header_base64.as_mut().map(|field| field as _)
20636        }
20637        ///Returns a mutable reference to `header_base64`.
20638        ///If the field is unset, it is first initialized with the default value.
20639        pub fn header_base64_mut(&mut self) -> &mut String {
20640            self.header_base64.get_or_insert_default()
20641        }
20642        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
20643        pub fn header_base64_opt(&self) -> Option<&str> {
20644            self.header_base64.as_ref().map(|field| field as _)
20645        }
20646        ///Sets `header_base64` with the provided value.
20647        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20648            self.header_base64 = Some(field.into().into());
20649        }
20650        ///Sets `header_base64` with the provided value.
20651        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20652            self.set_header_base64(field.into());
20653            self
20654        }
20655        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20656        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20657            self.address_seed.as_mut().map(|field| field as _)
20658        }
20659        ///Returns a mutable reference to `address_seed`.
20660        ///If the field is unset, it is first initialized with the default value.
20661        pub fn address_seed_mut(&mut self) -> &mut String {
20662            self.address_seed.get_or_insert_default()
20663        }
20664        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20665        pub fn address_seed_opt(&self) -> Option<&str> {
20666            self.address_seed.as_ref().map(|field| field as _)
20667        }
20668        ///Sets `address_seed` with the provided value.
20669        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20670            self.address_seed = Some(field.into().into());
20671        }
20672        ///Sets `address_seed` with the provided value.
20673        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20674            self.set_address_seed(field.into());
20675            self
20676        }
20677    }
20678    impl super::ZkLoginProof {
20679        pub const fn const_default() -> Self {
20680            Self { a: None, b: None, c: None }
20681        }
20682        #[doc(hidden)]
20683        pub fn default_instance() -> &'static Self {
20684            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20685            &DEFAULT
20686        }
20687        ///Returns the value of `a`, or the default value if `a` is unset.
20688        pub fn a(&self) -> &super::CircomG1 {
20689            self.a
20690                .as_ref()
20691                .map(|field| field as _)
20692                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20693        }
20694        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20695        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20696            self.a.as_mut().map(|field| field as _)
20697        }
20698        ///Returns a mutable reference to `a`.
20699        ///If the field is unset, it is first initialized with the default value.
20700        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20701            self.a.get_or_insert_default()
20702        }
20703        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
20704        pub fn a_opt(&self) -> Option<&super::CircomG1> {
20705            self.a.as_ref().map(|field| field as _)
20706        }
20707        ///Sets `a` with the provided value.
20708        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20709            self.a = Some(field.into().into());
20710        }
20711        ///Sets `a` with the provided value.
20712        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20713            self.set_a(field.into());
20714            self
20715        }
20716        ///Returns the value of `b`, or the default value if `b` is unset.
20717        pub fn b(&self) -> &super::CircomG2 {
20718            self.b
20719                .as_ref()
20720                .map(|field| field as _)
20721                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20722        }
20723        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20724        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20725            self.b.as_mut().map(|field| field as _)
20726        }
20727        ///Returns a mutable reference to `b`.
20728        ///If the field is unset, it is first initialized with the default value.
20729        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20730            self.b.get_or_insert_default()
20731        }
20732        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
20733        pub fn b_opt(&self) -> Option<&super::CircomG2> {
20734            self.b.as_ref().map(|field| field as _)
20735        }
20736        ///Sets `b` with the provided value.
20737        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20738            self.b = Some(field.into().into());
20739        }
20740        ///Sets `b` with the provided value.
20741        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20742            self.set_b(field.into());
20743            self
20744        }
20745        ///Returns the value of `c`, or the default value if `c` is unset.
20746        pub fn c(&self) -> &super::CircomG1 {
20747            self.c
20748                .as_ref()
20749                .map(|field| field as _)
20750                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20751        }
20752        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20753        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20754            self.c.as_mut().map(|field| field as _)
20755        }
20756        ///Returns a mutable reference to `c`.
20757        ///If the field is unset, it is first initialized with the default value.
20758        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20759            self.c.get_or_insert_default()
20760        }
20761        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
20762        pub fn c_opt(&self) -> Option<&super::CircomG1> {
20763            self.c.as_ref().map(|field| field as _)
20764        }
20765        ///Sets `c` with the provided value.
20766        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20767            self.c = Some(field.into().into());
20768        }
20769        ///Sets `c` with the provided value.
20770        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20771            self.set_c(field.into());
20772            self
20773        }
20774    }
20775    impl super::ZkLoginPublicIdentifier {
20776        pub const fn const_default() -> Self {
20777            Self {
20778                iss: None,
20779                address_seed: None,
20780            }
20781        }
20782        #[doc(hidden)]
20783        pub fn default_instance() -> &'static Self {
20784            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20785            &DEFAULT
20786        }
20787        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20788        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20789            self.iss.as_mut().map(|field| field as _)
20790        }
20791        ///Returns a mutable reference to `iss`.
20792        ///If the field is unset, it is first initialized with the default value.
20793        pub fn iss_mut(&mut self) -> &mut String {
20794            self.iss.get_or_insert_default()
20795        }
20796        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
20797        pub fn iss_opt(&self) -> Option<&str> {
20798            self.iss.as_ref().map(|field| field as _)
20799        }
20800        ///Sets `iss` with the provided value.
20801        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
20802            self.iss = Some(field.into().into());
20803        }
20804        ///Sets `iss` with the provided value.
20805        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
20806            self.set_iss(field.into());
20807            self
20808        }
20809        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20810        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20811            self.address_seed.as_mut().map(|field| field as _)
20812        }
20813        ///Returns a mutable reference to `address_seed`.
20814        ///If the field is unset, it is first initialized with the default value.
20815        pub fn address_seed_mut(&mut self) -> &mut String {
20816            self.address_seed.get_or_insert_default()
20817        }
20818        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20819        pub fn address_seed_opt(&self) -> Option<&str> {
20820            self.address_seed.as_ref().map(|field| field as _)
20821        }
20822        ///Sets `address_seed` with the provided value.
20823        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20824            self.address_seed = Some(field.into().into());
20825        }
20826        ///Sets `address_seed` with the provided value.
20827        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20828            self.set_address_seed(field.into());
20829            self
20830        }
20831    }
20832}