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            }
7354        }
7355        #[doc(hidden)]
7356        pub fn default_instance() -> &'static Self {
7357            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7358            &DEFAULT
7359        }
7360        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7361        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7362            self.amount.as_mut().map(|field| field as _)
7363        }
7364        ///Returns a mutable reference to `amount`.
7365        ///If the field is unset, it is first initialized with the default value.
7366        pub fn amount_mut(&mut self) -> &mut u64 {
7367            self.amount.get_or_insert_default()
7368        }
7369        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
7370        pub fn amount_opt(&self) -> Option<u64> {
7371            self.amount.as_ref().map(|field| *field)
7372        }
7373        ///Sets `amount` with the provided value.
7374        pub fn set_amount(&mut self, field: u64) {
7375            self.amount = Some(field);
7376        }
7377        ///Sets `amount` with the provided value.
7378        pub fn with_amount(mut self, field: u64) -> Self {
7379            self.set_amount(field);
7380            self
7381        }
7382        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7383        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7384            self.coin_type.as_mut().map(|field| field as _)
7385        }
7386        ///Returns a mutable reference to `coin_type`.
7387        ///If the field is unset, it is first initialized with the default value.
7388        pub fn coin_type_mut(&mut self) -> &mut String {
7389            self.coin_type.get_or_insert_default()
7390        }
7391        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7392        pub fn coin_type_opt(&self) -> Option<&str> {
7393            self.coin_type.as_ref().map(|field| field as _)
7394        }
7395        ///Sets `coin_type` with the provided value.
7396        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7397            self.coin_type = Some(field.into().into());
7398        }
7399        ///Sets `coin_type` with the provided value.
7400        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7401            self.set_coin_type(field.into());
7402            self
7403        }
7404        ///Sets `source` with the provided value.
7405        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7406            mut self,
7407            field: T,
7408        ) -> Self {
7409            self.set_source(field.into());
7410            self
7411        }
7412    }
7413    impl super::GasCostSummary {
7414        pub const fn const_default() -> Self {
7415            Self {
7416                computation_cost: None,
7417                storage_cost: None,
7418                storage_rebate: None,
7419                non_refundable_storage_fee: None,
7420            }
7421        }
7422        #[doc(hidden)]
7423        pub fn default_instance() -> &'static Self {
7424            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7425            &DEFAULT
7426        }
7427        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7428        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7429            self.computation_cost.as_mut().map(|field| field as _)
7430        }
7431        ///Returns a mutable reference to `computation_cost`.
7432        ///If the field is unset, it is first initialized with the default value.
7433        pub fn computation_cost_mut(&mut self) -> &mut u64 {
7434            self.computation_cost.get_or_insert_default()
7435        }
7436        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7437        pub fn computation_cost_opt(&self) -> Option<u64> {
7438            self.computation_cost.as_ref().map(|field| *field)
7439        }
7440        ///Sets `computation_cost` with the provided value.
7441        pub fn set_computation_cost(&mut self, field: u64) {
7442            self.computation_cost = Some(field);
7443        }
7444        ///Sets `computation_cost` with the provided value.
7445        pub fn with_computation_cost(mut self, field: u64) -> Self {
7446            self.set_computation_cost(field);
7447            self
7448        }
7449        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7450        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7451            self.storage_cost.as_mut().map(|field| field as _)
7452        }
7453        ///Returns a mutable reference to `storage_cost`.
7454        ///If the field is unset, it is first initialized with the default value.
7455        pub fn storage_cost_mut(&mut self) -> &mut u64 {
7456            self.storage_cost.get_or_insert_default()
7457        }
7458        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7459        pub fn storage_cost_opt(&self) -> Option<u64> {
7460            self.storage_cost.as_ref().map(|field| *field)
7461        }
7462        ///Sets `storage_cost` with the provided value.
7463        pub fn set_storage_cost(&mut self, field: u64) {
7464            self.storage_cost = Some(field);
7465        }
7466        ///Sets `storage_cost` with the provided value.
7467        pub fn with_storage_cost(mut self, field: u64) -> Self {
7468            self.set_storage_cost(field);
7469            self
7470        }
7471        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7472        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7473            self.storage_rebate.as_mut().map(|field| field as _)
7474        }
7475        ///Returns a mutable reference to `storage_rebate`.
7476        ///If the field is unset, it is first initialized with the default value.
7477        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7478            self.storage_rebate.get_or_insert_default()
7479        }
7480        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
7481        pub fn storage_rebate_opt(&self) -> Option<u64> {
7482            self.storage_rebate.as_ref().map(|field| *field)
7483        }
7484        ///Sets `storage_rebate` with the provided value.
7485        pub fn set_storage_rebate(&mut self, field: u64) {
7486            self.storage_rebate = Some(field);
7487        }
7488        ///Sets `storage_rebate` with the provided value.
7489        pub fn with_storage_rebate(mut self, field: u64) -> Self {
7490            self.set_storage_rebate(field);
7491            self
7492        }
7493        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7494        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7495            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7496        }
7497        ///Returns a mutable reference to `non_refundable_storage_fee`.
7498        ///If the field is unset, it is first initialized with the default value.
7499        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7500            self.non_refundable_storage_fee.get_or_insert_default()
7501        }
7502        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
7503        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7504            self.non_refundable_storage_fee.as_ref().map(|field| *field)
7505        }
7506        ///Sets `non_refundable_storage_fee` with the provided value.
7507        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7508            self.non_refundable_storage_fee = Some(field);
7509        }
7510        ///Sets `non_refundable_storage_fee` with the provided value.
7511        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7512            self.set_non_refundable_storage_fee(field);
7513            self
7514        }
7515    }
7516    impl super::GasPayment {
7517        pub const fn const_default() -> Self {
7518            Self {
7519                objects: Vec::new(),
7520                owner: None,
7521                price: None,
7522                budget: None,
7523            }
7524        }
7525        #[doc(hidden)]
7526        pub fn default_instance() -> &'static Self {
7527            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7528            &DEFAULT
7529        }
7530        ///Returns the value of `objects`, or the default value if `objects` is unset.
7531        pub fn objects(&self) -> &[super::ObjectReference] {
7532            &self.objects
7533        }
7534        ///Returns a mutable reference to `objects`.
7535        ///If the field is unset, it is first initialized with the default value.
7536        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7537            &mut self.objects
7538        }
7539        ///Sets `objects` with the provided value.
7540        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7541            self.objects = field;
7542        }
7543        ///Sets `objects` with the provided value.
7544        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7545            self.set_objects(field);
7546            self
7547        }
7548        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7549        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7550            self.owner.as_mut().map(|field| field as _)
7551        }
7552        ///Returns a mutable reference to `owner`.
7553        ///If the field is unset, it is first initialized with the default value.
7554        pub fn owner_mut(&mut self) -> &mut String {
7555            self.owner.get_or_insert_default()
7556        }
7557        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7558        pub fn owner_opt(&self) -> Option<&str> {
7559            self.owner.as_ref().map(|field| field as _)
7560        }
7561        ///Sets `owner` with the provided value.
7562        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7563            self.owner = Some(field.into().into());
7564        }
7565        ///Sets `owner` with the provided value.
7566        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7567            self.set_owner(field.into());
7568            self
7569        }
7570        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7571        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7572            self.price.as_mut().map(|field| field as _)
7573        }
7574        ///Returns a mutable reference to `price`.
7575        ///If the field is unset, it is first initialized with the default value.
7576        pub fn price_mut(&mut self) -> &mut u64 {
7577            self.price.get_or_insert_default()
7578        }
7579        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
7580        pub fn price_opt(&self) -> Option<u64> {
7581            self.price.as_ref().map(|field| *field)
7582        }
7583        ///Sets `price` with the provided value.
7584        pub fn set_price(&mut self, field: u64) {
7585            self.price = Some(field);
7586        }
7587        ///Sets `price` with the provided value.
7588        pub fn with_price(mut self, field: u64) -> Self {
7589            self.set_price(field);
7590            self
7591        }
7592        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7593        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7594            self.budget.as_mut().map(|field| field as _)
7595        }
7596        ///Returns a mutable reference to `budget`.
7597        ///If the field is unset, it is first initialized with the default value.
7598        pub fn budget_mut(&mut self) -> &mut u64 {
7599            self.budget.get_or_insert_default()
7600        }
7601        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
7602        pub fn budget_opt(&self) -> Option<u64> {
7603            self.budget.as_ref().map(|field| *field)
7604        }
7605        ///Sets `budget` with the provided value.
7606        pub fn set_budget(&mut self, field: u64) {
7607            self.budget = Some(field);
7608        }
7609        ///Sets `budget` with the provided value.
7610        pub fn with_budget(mut self, field: u64) -> Self {
7611            self.set_budget(field);
7612            self
7613        }
7614    }
7615    impl super::GenesisTransaction {
7616        pub const fn const_default() -> Self {
7617            Self { objects: Vec::new() }
7618        }
7619        #[doc(hidden)]
7620        pub fn default_instance() -> &'static Self {
7621            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7622            &DEFAULT
7623        }
7624        ///Returns the value of `objects`, or the default value if `objects` is unset.
7625        pub fn objects(&self) -> &[super::Object] {
7626            &self.objects
7627        }
7628        ///Returns a mutable reference to `objects`.
7629        ///If the field is unset, it is first initialized with the default value.
7630        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7631            &mut self.objects
7632        }
7633        ///Sets `objects` with the provided value.
7634        pub fn set_objects(&mut self, field: Vec<super::Object>) {
7635            self.objects = field;
7636        }
7637        ///Sets `objects` with the provided value.
7638        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7639            self.set_objects(field);
7640            self
7641        }
7642    }
7643    impl super::GetBalanceRequest {
7644        pub const fn const_default() -> Self {
7645            Self {
7646                owner: None,
7647                coin_type: None,
7648            }
7649        }
7650        #[doc(hidden)]
7651        pub fn default_instance() -> &'static Self {
7652            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7653            &DEFAULT
7654        }
7655        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7656        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7657            self.owner.as_mut().map(|field| field as _)
7658        }
7659        ///Returns a mutable reference to `owner`.
7660        ///If the field is unset, it is first initialized with the default value.
7661        pub fn owner_mut(&mut self) -> &mut String {
7662            self.owner.get_or_insert_default()
7663        }
7664        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7665        pub fn owner_opt(&self) -> Option<&str> {
7666            self.owner.as_ref().map(|field| field as _)
7667        }
7668        ///Sets `owner` with the provided value.
7669        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7670            self.owner = Some(field.into().into());
7671        }
7672        ///Sets `owner` with the provided value.
7673        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7674            self.set_owner(field.into());
7675            self
7676        }
7677        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7678        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7679            self.coin_type.as_mut().map(|field| field as _)
7680        }
7681        ///Returns a mutable reference to `coin_type`.
7682        ///If the field is unset, it is first initialized with the default value.
7683        pub fn coin_type_mut(&mut self) -> &mut String {
7684            self.coin_type.get_or_insert_default()
7685        }
7686        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7687        pub fn coin_type_opt(&self) -> Option<&str> {
7688            self.coin_type.as_ref().map(|field| field as _)
7689        }
7690        ///Sets `coin_type` with the provided value.
7691        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7692            self.coin_type = Some(field.into().into());
7693        }
7694        ///Sets `coin_type` with the provided value.
7695        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7696            self.set_coin_type(field.into());
7697            self
7698        }
7699    }
7700    impl super::GetBalanceResponse {
7701        pub const fn const_default() -> Self {
7702            Self { balance: None }
7703        }
7704        #[doc(hidden)]
7705        pub fn default_instance() -> &'static Self {
7706            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7707            &DEFAULT
7708        }
7709        ///Returns the value of `balance`, or the default value if `balance` is unset.
7710        pub fn balance(&self) -> &super::Balance {
7711            self.balance
7712                .as_ref()
7713                .map(|field| field as _)
7714                .unwrap_or_else(|| super::Balance::default_instance() as _)
7715        }
7716        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7717        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7718            self.balance.as_mut().map(|field| field as _)
7719        }
7720        ///Returns a mutable reference to `balance`.
7721        ///If the field is unset, it is first initialized with the default value.
7722        pub fn balance_mut(&mut self) -> &mut super::Balance {
7723            self.balance.get_or_insert_default()
7724        }
7725        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7726        pub fn balance_opt(&self) -> Option<&super::Balance> {
7727            self.balance.as_ref().map(|field| field as _)
7728        }
7729        ///Sets `balance` with the provided value.
7730        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7731            self.balance = Some(field.into().into());
7732        }
7733        ///Sets `balance` with the provided value.
7734        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7735            self.set_balance(field.into());
7736            self
7737        }
7738    }
7739    impl super::GetCheckpointRequest {
7740        pub const fn const_default() -> Self {
7741            Self {
7742                read_mask: None,
7743                checkpoint_id: None,
7744            }
7745        }
7746        #[doc(hidden)]
7747        pub fn default_instance() -> &'static Self {
7748            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7749            &DEFAULT
7750        }
7751        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7752        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7753            self.read_mask.as_mut().map(|field| field as _)
7754        }
7755        ///Returns a mutable reference to `read_mask`.
7756        ///If the field is unset, it is first initialized with the default value.
7757        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7758            self.read_mask.get_or_insert_default()
7759        }
7760        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7761        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7762            self.read_mask.as_ref().map(|field| field as _)
7763        }
7764        ///Sets `read_mask` with the provided value.
7765        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7766            self.read_mask = Some(field.into().into());
7767        }
7768        ///Sets `read_mask` with the provided value.
7769        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7770            mut self,
7771            field: T,
7772        ) -> Self {
7773            self.set_read_mask(field.into());
7774            self
7775        }
7776        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
7777        pub fn sequence_number(&self) -> u64 {
7778            if let Some(
7779                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7780            ) = &self.checkpoint_id
7781            {
7782                *field
7783            } else {
7784                0u64
7785            }
7786        }
7787        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
7788        pub fn sequence_number_opt(&self) -> Option<u64> {
7789            if let Some(
7790                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7791            ) = &self.checkpoint_id
7792            {
7793                Some(*field)
7794            } else {
7795                None
7796            }
7797        }
7798        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7799        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7800            if let Some(
7801                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7802            ) = &mut self.checkpoint_id
7803            {
7804                Some(field as _)
7805            } else {
7806                None
7807            }
7808        }
7809        ///Returns a mutable reference to `sequence_number`.
7810        ///If the field is unset, it is first initialized with the default value.
7811        ///If any other oneof field in the same oneof is set, it will be cleared.
7812        pub fn sequence_number_mut(&mut self) -> &mut u64 {
7813            if self.sequence_number_opt_mut().is_none() {
7814                self.checkpoint_id = Some(
7815                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7816                        u64::default(),
7817                    ),
7818                );
7819            }
7820            self.sequence_number_opt_mut().unwrap()
7821        }
7822        ///Sets `sequence_number` with the provided value.
7823        ///If any other oneof field in the same oneof is set, it will be cleared.
7824        pub fn set_sequence_number(&mut self, field: u64) {
7825            self.checkpoint_id = Some(
7826                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7827            );
7828        }
7829        ///Sets `sequence_number` with the provided value.
7830        ///If any other oneof field in the same oneof is set, it will be cleared.
7831        pub fn with_sequence_number(mut self, field: u64) -> Self {
7832            self.set_sequence_number(field);
7833            self
7834        }
7835        ///Returns the value of `digest`, or the default value if `digest` is unset.
7836        pub fn digest(&self) -> &str {
7837            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7838                .checkpoint_id
7839            {
7840                field as _
7841            } else {
7842                ""
7843            }
7844        }
7845        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7846        pub fn digest_opt(&self) -> Option<&str> {
7847            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7848                .checkpoint_id
7849            {
7850                Some(field as _)
7851            } else {
7852                None
7853            }
7854        }
7855        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7856        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7857            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7858                .checkpoint_id
7859            {
7860                Some(field as _)
7861            } else {
7862                None
7863            }
7864        }
7865        ///Returns a mutable reference to `digest`.
7866        ///If the field is unset, it is first initialized with the default value.
7867        ///If any other oneof field in the same oneof is set, it will be cleared.
7868        pub fn digest_mut(&mut self) -> &mut String {
7869            if self.digest_opt_mut().is_none() {
7870                self.checkpoint_id = Some(
7871                    super::get_checkpoint_request::CheckpointId::Digest(
7872                        String::default(),
7873                    ),
7874                );
7875            }
7876            self.digest_opt_mut().unwrap()
7877        }
7878        ///Sets `digest` with the provided value.
7879        ///If any other oneof field in the same oneof is set, it will be cleared.
7880        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7881            self.checkpoint_id = Some(
7882                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7883            );
7884        }
7885        ///Sets `digest` with the provided value.
7886        ///If any other oneof field in the same oneof is set, it will be cleared.
7887        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7888            self.set_digest(field.into());
7889            self
7890        }
7891    }
7892    impl super::GetCheckpointResponse {
7893        pub const fn const_default() -> Self {
7894            Self { checkpoint: None }
7895        }
7896        #[doc(hidden)]
7897        pub fn default_instance() -> &'static Self {
7898            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7899            &DEFAULT
7900        }
7901        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7902        pub fn checkpoint(&self) -> &super::Checkpoint {
7903            self.checkpoint
7904                .as_ref()
7905                .map(|field| field as _)
7906                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7907        }
7908        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7909        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7910            self.checkpoint.as_mut().map(|field| field as _)
7911        }
7912        ///Returns a mutable reference to `checkpoint`.
7913        ///If the field is unset, it is first initialized with the default value.
7914        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7915            self.checkpoint.get_or_insert_default()
7916        }
7917        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7918        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7919            self.checkpoint.as_ref().map(|field| field as _)
7920        }
7921        ///Sets `checkpoint` with the provided value.
7922        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7923            self.checkpoint = Some(field.into().into());
7924        }
7925        ///Sets `checkpoint` with the provided value.
7926        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7927            self.set_checkpoint(field.into());
7928            self
7929        }
7930    }
7931    impl super::GetCoinInfoRequest {
7932        pub const fn const_default() -> Self {
7933            Self { coin_type: None }
7934        }
7935        #[doc(hidden)]
7936        pub fn default_instance() -> &'static Self {
7937            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7938            &DEFAULT
7939        }
7940        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7941        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7942            self.coin_type.as_mut().map(|field| field as _)
7943        }
7944        ///Returns a mutable reference to `coin_type`.
7945        ///If the field is unset, it is first initialized with the default value.
7946        pub fn coin_type_mut(&mut self) -> &mut String {
7947            self.coin_type.get_or_insert_default()
7948        }
7949        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7950        pub fn coin_type_opt(&self) -> Option<&str> {
7951            self.coin_type.as_ref().map(|field| field as _)
7952        }
7953        ///Sets `coin_type` with the provided value.
7954        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7955            self.coin_type = Some(field.into().into());
7956        }
7957        ///Sets `coin_type` with the provided value.
7958        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7959            self.set_coin_type(field.into());
7960            self
7961        }
7962    }
7963    impl super::GetCoinInfoResponse {
7964        pub const fn const_default() -> Self {
7965            Self {
7966                coin_type: None,
7967                metadata: None,
7968                treasury: None,
7969                regulated_metadata: None,
7970            }
7971        }
7972        #[doc(hidden)]
7973        pub fn default_instance() -> &'static Self {
7974            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7975            &DEFAULT
7976        }
7977        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7978        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7979            self.coin_type.as_mut().map(|field| field as _)
7980        }
7981        ///Returns a mutable reference to `coin_type`.
7982        ///If the field is unset, it is first initialized with the default value.
7983        pub fn coin_type_mut(&mut self) -> &mut String {
7984            self.coin_type.get_or_insert_default()
7985        }
7986        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7987        pub fn coin_type_opt(&self) -> Option<&str> {
7988            self.coin_type.as_ref().map(|field| field as _)
7989        }
7990        ///Sets `coin_type` with the provided value.
7991        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7992            self.coin_type = Some(field.into().into());
7993        }
7994        ///Sets `coin_type` with the provided value.
7995        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7996            self.set_coin_type(field.into());
7997            self
7998        }
7999        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
8000        pub fn metadata(&self) -> &super::CoinMetadata {
8001            self.metadata
8002                .as_ref()
8003                .map(|field| field as _)
8004                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8005        }
8006        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8007        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8008            self.metadata.as_mut().map(|field| field as _)
8009        }
8010        ///Returns a mutable reference to `metadata`.
8011        ///If the field is unset, it is first initialized with the default value.
8012        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8013            self.metadata.get_or_insert_default()
8014        }
8015        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8016        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8017            self.metadata.as_ref().map(|field| field as _)
8018        }
8019        ///Sets `metadata` with the provided value.
8020        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8021            self.metadata = Some(field.into().into());
8022        }
8023        ///Sets `metadata` with the provided value.
8024        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8025            self.set_metadata(field.into());
8026            self
8027        }
8028        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
8029        pub fn treasury(&self) -> &super::CoinTreasury {
8030            self.treasury
8031                .as_ref()
8032                .map(|field| field as _)
8033                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8034        }
8035        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8036        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8037            self.treasury.as_mut().map(|field| field as _)
8038        }
8039        ///Returns a mutable reference to `treasury`.
8040        ///If the field is unset, it is first initialized with the default value.
8041        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8042            self.treasury.get_or_insert_default()
8043        }
8044        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
8045        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8046            self.treasury.as_ref().map(|field| field as _)
8047        }
8048        ///Sets `treasury` with the provided value.
8049        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8050            self.treasury = Some(field.into().into());
8051        }
8052        ///Sets `treasury` with the provided value.
8053        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8054            self.set_treasury(field.into());
8055            self
8056        }
8057        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
8058        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8059            self.regulated_metadata
8060                .as_ref()
8061                .map(|field| field as _)
8062                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8063        }
8064        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8065        pub fn regulated_metadata_opt_mut(
8066            &mut self,
8067        ) -> Option<&mut super::RegulatedCoinMetadata> {
8068            self.regulated_metadata.as_mut().map(|field| field as _)
8069        }
8070        ///Returns a mutable reference to `regulated_metadata`.
8071        ///If the field is unset, it is first initialized with the default value.
8072        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8073            self.regulated_metadata.get_or_insert_default()
8074        }
8075        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8076        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8077            self.regulated_metadata.as_ref().map(|field| field as _)
8078        }
8079        ///Sets `regulated_metadata` with the provided value.
8080        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8081            &mut self,
8082            field: T,
8083        ) {
8084            self.regulated_metadata = Some(field.into().into());
8085        }
8086        ///Sets `regulated_metadata` with the provided value.
8087        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8088            mut self,
8089            field: T,
8090        ) -> Self {
8091            self.set_regulated_metadata(field.into());
8092            self
8093        }
8094    }
8095    impl super::GetDatatypeRequest {
8096        pub const fn const_default() -> Self {
8097            Self {
8098                package_id: None,
8099                module_name: None,
8100                name: None,
8101            }
8102        }
8103        #[doc(hidden)]
8104        pub fn default_instance() -> &'static Self {
8105            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8106            &DEFAULT
8107        }
8108        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8109        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8110            self.package_id.as_mut().map(|field| field as _)
8111        }
8112        ///Returns a mutable reference to `package_id`.
8113        ///If the field is unset, it is first initialized with the default value.
8114        pub fn package_id_mut(&mut self) -> &mut String {
8115            self.package_id.get_or_insert_default()
8116        }
8117        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8118        pub fn package_id_opt(&self) -> Option<&str> {
8119            self.package_id.as_ref().map(|field| field as _)
8120        }
8121        ///Sets `package_id` with the provided value.
8122        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8123            self.package_id = Some(field.into().into());
8124        }
8125        ///Sets `package_id` with the provided value.
8126        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8127            self.set_package_id(field.into());
8128            self
8129        }
8130        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8131        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8132            self.module_name.as_mut().map(|field| field as _)
8133        }
8134        ///Returns a mutable reference to `module_name`.
8135        ///If the field is unset, it is first initialized with the default value.
8136        pub fn module_name_mut(&mut self) -> &mut String {
8137            self.module_name.get_or_insert_default()
8138        }
8139        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8140        pub fn module_name_opt(&self) -> Option<&str> {
8141            self.module_name.as_ref().map(|field| field as _)
8142        }
8143        ///Sets `module_name` with the provided value.
8144        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8145            self.module_name = Some(field.into().into());
8146        }
8147        ///Sets `module_name` with the provided value.
8148        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8149            self.set_module_name(field.into());
8150            self
8151        }
8152        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8153        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8154            self.name.as_mut().map(|field| field as _)
8155        }
8156        ///Returns a mutable reference to `name`.
8157        ///If the field is unset, it is first initialized with the default value.
8158        pub fn name_mut(&mut self) -> &mut String {
8159            self.name.get_or_insert_default()
8160        }
8161        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8162        pub fn name_opt(&self) -> Option<&str> {
8163            self.name.as_ref().map(|field| field as _)
8164        }
8165        ///Sets `name` with the provided value.
8166        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8167            self.name = Some(field.into().into());
8168        }
8169        ///Sets `name` with the provided value.
8170        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8171            self.set_name(field.into());
8172            self
8173        }
8174    }
8175    impl super::GetDatatypeResponse {
8176        pub const fn const_default() -> Self {
8177            Self { datatype: None }
8178        }
8179        #[doc(hidden)]
8180        pub fn default_instance() -> &'static Self {
8181            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8182            &DEFAULT
8183        }
8184        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
8185        pub fn datatype(&self) -> &super::DatatypeDescriptor {
8186            self.datatype
8187                .as_ref()
8188                .map(|field| field as _)
8189                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8190        }
8191        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8192        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8193            self.datatype.as_mut().map(|field| field as _)
8194        }
8195        ///Returns a mutable reference to `datatype`.
8196        ///If the field is unset, it is first initialized with the default value.
8197        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8198            self.datatype.get_or_insert_default()
8199        }
8200        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
8201        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8202            self.datatype.as_ref().map(|field| field as _)
8203        }
8204        ///Sets `datatype` with the provided value.
8205        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8206            self.datatype = Some(field.into().into());
8207        }
8208        ///Sets `datatype` with the provided value.
8209        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8210            mut self,
8211            field: T,
8212        ) -> Self {
8213            self.set_datatype(field.into());
8214            self
8215        }
8216    }
8217    impl super::GetEpochRequest {
8218        pub const fn const_default() -> Self {
8219            Self {
8220                epoch: None,
8221                read_mask: None,
8222            }
8223        }
8224        #[doc(hidden)]
8225        pub fn default_instance() -> &'static Self {
8226            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8227            &DEFAULT
8228        }
8229        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8230        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8231            self.epoch.as_mut().map(|field| field as _)
8232        }
8233        ///Returns a mutable reference to `epoch`.
8234        ///If the field is unset, it is first initialized with the default value.
8235        pub fn epoch_mut(&mut self) -> &mut u64 {
8236            self.epoch.get_or_insert_default()
8237        }
8238        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8239        pub fn epoch_opt(&self) -> Option<u64> {
8240            self.epoch.as_ref().map(|field| *field)
8241        }
8242        ///Sets `epoch` with the provided value.
8243        pub fn set_epoch(&mut self, field: u64) {
8244            self.epoch = Some(field);
8245        }
8246        ///Sets `epoch` with the provided value.
8247        pub fn with_epoch(mut self, field: u64) -> Self {
8248            self.set_epoch(field);
8249            self
8250        }
8251        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8252        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8253            self.read_mask.as_mut().map(|field| field as _)
8254        }
8255        ///Returns a mutable reference to `read_mask`.
8256        ///If the field is unset, it is first initialized with the default value.
8257        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8258            self.read_mask.get_or_insert_default()
8259        }
8260        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8261        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8262            self.read_mask.as_ref().map(|field| field as _)
8263        }
8264        ///Sets `read_mask` with the provided value.
8265        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8266            self.read_mask = Some(field.into().into());
8267        }
8268        ///Sets `read_mask` with the provided value.
8269        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8270            mut self,
8271            field: T,
8272        ) -> Self {
8273            self.set_read_mask(field.into());
8274            self
8275        }
8276    }
8277    impl super::GetEpochResponse {
8278        pub const fn const_default() -> Self {
8279            Self { epoch: None }
8280        }
8281        #[doc(hidden)]
8282        pub fn default_instance() -> &'static Self {
8283            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8284            &DEFAULT
8285        }
8286        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
8287        pub fn epoch(&self) -> &super::Epoch {
8288            self.epoch
8289                .as_ref()
8290                .map(|field| field as _)
8291                .unwrap_or_else(|| super::Epoch::default_instance() as _)
8292        }
8293        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8294        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8295            self.epoch.as_mut().map(|field| field as _)
8296        }
8297        ///Returns a mutable reference to `epoch`.
8298        ///If the field is unset, it is first initialized with the default value.
8299        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8300            self.epoch.get_or_insert_default()
8301        }
8302        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8303        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8304            self.epoch.as_ref().map(|field| field as _)
8305        }
8306        ///Sets `epoch` with the provided value.
8307        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8308            self.epoch = Some(field.into().into());
8309        }
8310        ///Sets `epoch` with the provided value.
8311        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8312            self.set_epoch(field.into());
8313            self
8314        }
8315    }
8316    impl super::GetFunctionRequest {
8317        pub const fn const_default() -> Self {
8318            Self {
8319                package_id: None,
8320                module_name: None,
8321                name: None,
8322            }
8323        }
8324        #[doc(hidden)]
8325        pub fn default_instance() -> &'static Self {
8326            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8327            &DEFAULT
8328        }
8329        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8330        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8331            self.package_id.as_mut().map(|field| field as _)
8332        }
8333        ///Returns a mutable reference to `package_id`.
8334        ///If the field is unset, it is first initialized with the default value.
8335        pub fn package_id_mut(&mut self) -> &mut String {
8336            self.package_id.get_or_insert_default()
8337        }
8338        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8339        pub fn package_id_opt(&self) -> Option<&str> {
8340            self.package_id.as_ref().map(|field| field as _)
8341        }
8342        ///Sets `package_id` with the provided value.
8343        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8344            self.package_id = Some(field.into().into());
8345        }
8346        ///Sets `package_id` with the provided value.
8347        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8348            self.set_package_id(field.into());
8349            self
8350        }
8351        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8352        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8353            self.module_name.as_mut().map(|field| field as _)
8354        }
8355        ///Returns a mutable reference to `module_name`.
8356        ///If the field is unset, it is first initialized with the default value.
8357        pub fn module_name_mut(&mut self) -> &mut String {
8358            self.module_name.get_or_insert_default()
8359        }
8360        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8361        pub fn module_name_opt(&self) -> Option<&str> {
8362            self.module_name.as_ref().map(|field| field as _)
8363        }
8364        ///Sets `module_name` with the provided value.
8365        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8366            self.module_name = Some(field.into().into());
8367        }
8368        ///Sets `module_name` with the provided value.
8369        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8370            self.set_module_name(field.into());
8371            self
8372        }
8373        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8374        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8375            self.name.as_mut().map(|field| field as _)
8376        }
8377        ///Returns a mutable reference to `name`.
8378        ///If the field is unset, it is first initialized with the default value.
8379        pub fn name_mut(&mut self) -> &mut String {
8380            self.name.get_or_insert_default()
8381        }
8382        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8383        pub fn name_opt(&self) -> Option<&str> {
8384            self.name.as_ref().map(|field| field as _)
8385        }
8386        ///Sets `name` with the provided value.
8387        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8388            self.name = Some(field.into().into());
8389        }
8390        ///Sets `name` with the provided value.
8391        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8392            self.set_name(field.into());
8393            self
8394        }
8395    }
8396    impl super::GetFunctionResponse {
8397        pub const fn const_default() -> Self {
8398            Self { function: None }
8399        }
8400        #[doc(hidden)]
8401        pub fn default_instance() -> &'static Self {
8402            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8403            &DEFAULT
8404        }
8405        ///Returns the value of `function`, or the default value if `function` is unset.
8406        pub fn function(&self) -> &super::FunctionDescriptor {
8407            self.function
8408                .as_ref()
8409                .map(|field| field as _)
8410                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8411        }
8412        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8413        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8414            self.function.as_mut().map(|field| field as _)
8415        }
8416        ///Returns a mutable reference to `function`.
8417        ///If the field is unset, it is first initialized with the default value.
8418        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8419            self.function.get_or_insert_default()
8420        }
8421        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
8422        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8423            self.function.as_ref().map(|field| field as _)
8424        }
8425        ///Sets `function` with the provided value.
8426        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8427            self.function = Some(field.into().into());
8428        }
8429        ///Sets `function` with the provided value.
8430        pub fn with_function<T: Into<super::FunctionDescriptor>>(
8431            mut self,
8432            field: T,
8433        ) -> Self {
8434            self.set_function(field.into());
8435            self
8436        }
8437    }
8438    impl super::GetObjectRequest {
8439        pub const fn const_default() -> Self {
8440            Self {
8441                object_id: None,
8442                version: None,
8443                read_mask: None,
8444            }
8445        }
8446        #[doc(hidden)]
8447        pub fn default_instance() -> &'static Self {
8448            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8449            &DEFAULT
8450        }
8451        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8452        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8453            self.object_id.as_mut().map(|field| field as _)
8454        }
8455        ///Returns a mutable reference to `object_id`.
8456        ///If the field is unset, it is first initialized with the default value.
8457        pub fn object_id_mut(&mut self) -> &mut String {
8458            self.object_id.get_or_insert_default()
8459        }
8460        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8461        pub fn object_id_opt(&self) -> Option<&str> {
8462            self.object_id.as_ref().map(|field| field as _)
8463        }
8464        ///Sets `object_id` with the provided value.
8465        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8466            self.object_id = Some(field.into().into());
8467        }
8468        ///Sets `object_id` with the provided value.
8469        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8470            self.set_object_id(field.into());
8471            self
8472        }
8473        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8474        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8475            self.version.as_mut().map(|field| field as _)
8476        }
8477        ///Returns a mutable reference to `version`.
8478        ///If the field is unset, it is first initialized with the default value.
8479        pub fn version_mut(&mut self) -> &mut u64 {
8480            self.version.get_or_insert_default()
8481        }
8482        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8483        pub fn version_opt(&self) -> Option<u64> {
8484            self.version.as_ref().map(|field| *field)
8485        }
8486        ///Sets `version` with the provided value.
8487        pub fn set_version(&mut self, field: u64) {
8488            self.version = Some(field);
8489        }
8490        ///Sets `version` with the provided value.
8491        pub fn with_version(mut self, field: u64) -> Self {
8492            self.set_version(field);
8493            self
8494        }
8495        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8496        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8497            self.read_mask.as_mut().map(|field| field as _)
8498        }
8499        ///Returns a mutable reference to `read_mask`.
8500        ///If the field is unset, it is first initialized with the default value.
8501        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8502            self.read_mask.get_or_insert_default()
8503        }
8504        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8505        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8506            self.read_mask.as_ref().map(|field| field as _)
8507        }
8508        ///Sets `read_mask` with the provided value.
8509        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8510            self.read_mask = Some(field.into().into());
8511        }
8512        ///Sets `read_mask` with the provided value.
8513        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8514            mut self,
8515            field: T,
8516        ) -> Self {
8517            self.set_read_mask(field.into());
8518            self
8519        }
8520    }
8521    impl super::GetObjectResponse {
8522        pub const fn const_default() -> Self {
8523            Self { object: None }
8524        }
8525        #[doc(hidden)]
8526        pub fn default_instance() -> &'static Self {
8527            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8528            &DEFAULT
8529        }
8530        ///Returns the value of `object`, or the default value if `object` is unset.
8531        pub fn object(&self) -> &super::Object {
8532            self.object
8533                .as_ref()
8534                .map(|field| field as _)
8535                .unwrap_or_else(|| super::Object::default_instance() as _)
8536        }
8537        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8538        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8539            self.object.as_mut().map(|field| field as _)
8540        }
8541        ///Returns a mutable reference to `object`.
8542        ///If the field is unset, it is first initialized with the default value.
8543        pub fn object_mut(&mut self) -> &mut super::Object {
8544            self.object.get_or_insert_default()
8545        }
8546        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8547        pub fn object_opt(&self) -> Option<&super::Object> {
8548            self.object.as_ref().map(|field| field as _)
8549        }
8550        ///Sets `object` with the provided value.
8551        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8552            self.object = Some(field.into().into());
8553        }
8554        ///Sets `object` with the provided value.
8555        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8556            self.set_object(field.into());
8557            self
8558        }
8559    }
8560    impl super::GetObjectResult {
8561        pub const fn const_default() -> Self {
8562            Self { result: None }
8563        }
8564        #[doc(hidden)]
8565        pub fn default_instance() -> &'static Self {
8566            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8567            &DEFAULT
8568        }
8569        ///Returns the value of `object`, or the default value if `object` is unset.
8570        pub fn object(&self) -> &super::Object {
8571            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8572                field as _
8573            } else {
8574                super::Object::default_instance() as _
8575            }
8576        }
8577        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8578        pub fn object_opt(&self) -> Option<&super::Object> {
8579            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8580                Some(field as _)
8581            } else {
8582                None
8583            }
8584        }
8585        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8586        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8587            if let Some(super::get_object_result::Result::Object(field)) = &mut self
8588                .result
8589            {
8590                Some(field as _)
8591            } else {
8592                None
8593            }
8594        }
8595        ///Returns a mutable reference to `object`.
8596        ///If the field is unset, it is first initialized with the default value.
8597        ///If any other oneof field in the same oneof is set, it will be cleared.
8598        pub fn object_mut(&mut self) -> &mut super::Object {
8599            if self.object_opt_mut().is_none() {
8600                self.result = Some(
8601                    super::get_object_result::Result::Object(super::Object::default()),
8602                );
8603            }
8604            self.object_opt_mut().unwrap()
8605        }
8606        ///Sets `object` with the provided value.
8607        ///If any other oneof field in the same oneof is set, it will be cleared.
8608        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8609            self.result = Some(
8610                super::get_object_result::Result::Object(field.into().into()),
8611            );
8612        }
8613        ///Sets `object` with the provided value.
8614        ///If any other oneof field in the same oneof is set, it will be cleared.
8615        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8616            self.set_object(field.into());
8617            self
8618        }
8619        ///Returns the value of `error`, or the default value if `error` is unset.
8620        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8621            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8622                field as _
8623            } else {
8624                super::super::super::super::google::rpc::Status::default_instance() as _
8625            }
8626        }
8627        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8628        pub fn error_opt(
8629            &self,
8630        ) -> Option<&super::super::super::super::google::rpc::Status> {
8631            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8632                Some(field as _)
8633            } else {
8634                None
8635            }
8636        }
8637        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8638        pub fn error_opt_mut(
8639            &mut self,
8640        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8641            if let Some(super::get_object_result::Result::Error(field)) = &mut self
8642                .result
8643            {
8644                Some(field as _)
8645            } else {
8646                None
8647            }
8648        }
8649        ///Returns a mutable reference to `error`.
8650        ///If the field is unset, it is first initialized with the default value.
8651        ///If any other oneof field in the same oneof is set, it will be cleared.
8652        pub fn error_mut(
8653            &mut self,
8654        ) -> &mut super::super::super::super::google::rpc::Status {
8655            if self.error_opt_mut().is_none() {
8656                self.result = Some(
8657                    super::get_object_result::Result::Error(
8658                        super::super::super::super::google::rpc::Status::default(),
8659                    ),
8660                );
8661            }
8662            self.error_opt_mut().unwrap()
8663        }
8664        ///Sets `error` with the provided value.
8665        ///If any other oneof field in the same oneof is set, it will be cleared.
8666        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8667            &mut self,
8668            field: T,
8669        ) {
8670            self.result = Some(
8671                super::get_object_result::Result::Error(field.into().into()),
8672            );
8673        }
8674        ///Sets `error` with the provided value.
8675        ///If any other oneof field in the same oneof is set, it will be cleared.
8676        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8677            mut self,
8678            field: T,
8679        ) -> Self {
8680            self.set_error(field.into());
8681            self
8682        }
8683    }
8684    impl super::GetPackageRequest {
8685        pub const fn const_default() -> Self {
8686            Self { package_id: None }
8687        }
8688        #[doc(hidden)]
8689        pub fn default_instance() -> &'static Self {
8690            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8691            &DEFAULT
8692        }
8693        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8694        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8695            self.package_id.as_mut().map(|field| field as _)
8696        }
8697        ///Returns a mutable reference to `package_id`.
8698        ///If the field is unset, it is first initialized with the default value.
8699        pub fn package_id_mut(&mut self) -> &mut String {
8700            self.package_id.get_or_insert_default()
8701        }
8702        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8703        pub fn package_id_opt(&self) -> Option<&str> {
8704            self.package_id.as_ref().map(|field| field as _)
8705        }
8706        ///Sets `package_id` with the provided value.
8707        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8708            self.package_id = Some(field.into().into());
8709        }
8710        ///Sets `package_id` with the provided value.
8711        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8712            self.set_package_id(field.into());
8713            self
8714        }
8715    }
8716    impl super::GetPackageResponse {
8717        pub const fn const_default() -> Self {
8718            Self { package: None }
8719        }
8720        #[doc(hidden)]
8721        pub fn default_instance() -> &'static Self {
8722            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8723            &DEFAULT
8724        }
8725        ///Returns the value of `package`, or the default value if `package` is unset.
8726        pub fn package(&self) -> &super::Package {
8727            self.package
8728                .as_ref()
8729                .map(|field| field as _)
8730                .unwrap_or_else(|| super::Package::default_instance() as _)
8731        }
8732        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8733        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8734            self.package.as_mut().map(|field| field as _)
8735        }
8736        ///Returns a mutable reference to `package`.
8737        ///If the field is unset, it is first initialized with the default value.
8738        pub fn package_mut(&mut self) -> &mut super::Package {
8739            self.package.get_or_insert_default()
8740        }
8741        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
8742        pub fn package_opt(&self) -> Option<&super::Package> {
8743            self.package.as_ref().map(|field| field as _)
8744        }
8745        ///Sets `package` with the provided value.
8746        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8747            self.package = Some(field.into().into());
8748        }
8749        ///Sets `package` with the provided value.
8750        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8751            self.set_package(field.into());
8752            self
8753        }
8754    }
8755    impl super::GetServiceInfoRequest {
8756        pub const fn const_default() -> Self {
8757            Self {}
8758        }
8759        #[doc(hidden)]
8760        pub fn default_instance() -> &'static Self {
8761            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8762            &DEFAULT
8763        }
8764    }
8765    impl super::GetServiceInfoResponse {
8766        pub const fn const_default() -> Self {
8767            Self {
8768                chain_id: None,
8769                chain: None,
8770                epoch: None,
8771                checkpoint_height: None,
8772                timestamp: None,
8773                lowest_available_checkpoint: None,
8774                lowest_available_checkpoint_objects: None,
8775                server: None,
8776            }
8777        }
8778        #[doc(hidden)]
8779        pub fn default_instance() -> &'static Self {
8780            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8781            &DEFAULT
8782        }
8783        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8784        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8785            self.chain_id.as_mut().map(|field| field as _)
8786        }
8787        ///Returns a mutable reference to `chain_id`.
8788        ///If the field is unset, it is first initialized with the default value.
8789        pub fn chain_id_mut(&mut self) -> &mut String {
8790            self.chain_id.get_or_insert_default()
8791        }
8792        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8793        pub fn chain_id_opt(&self) -> Option<&str> {
8794            self.chain_id.as_ref().map(|field| field as _)
8795        }
8796        ///Sets `chain_id` with the provided value.
8797        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8798            self.chain_id = Some(field.into().into());
8799        }
8800        ///Sets `chain_id` with the provided value.
8801        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8802            self.set_chain_id(field.into());
8803            self
8804        }
8805        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8806        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8807            self.chain.as_mut().map(|field| field as _)
8808        }
8809        ///Returns a mutable reference to `chain`.
8810        ///If the field is unset, it is first initialized with the default value.
8811        pub fn chain_mut(&mut self) -> &mut String {
8812            self.chain.get_or_insert_default()
8813        }
8814        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8815        pub fn chain_opt(&self) -> Option<&str> {
8816            self.chain.as_ref().map(|field| field as _)
8817        }
8818        ///Sets `chain` with the provided value.
8819        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8820            self.chain = Some(field.into().into());
8821        }
8822        ///Sets `chain` with the provided value.
8823        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8824            self.set_chain(field.into());
8825            self
8826        }
8827        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8828        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8829            self.epoch.as_mut().map(|field| field as _)
8830        }
8831        ///Returns a mutable reference to `epoch`.
8832        ///If the field is unset, it is first initialized with the default value.
8833        pub fn epoch_mut(&mut self) -> &mut u64 {
8834            self.epoch.get_or_insert_default()
8835        }
8836        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8837        pub fn epoch_opt(&self) -> Option<u64> {
8838            self.epoch.as_ref().map(|field| *field)
8839        }
8840        ///Sets `epoch` with the provided value.
8841        pub fn set_epoch(&mut self, field: u64) {
8842            self.epoch = Some(field);
8843        }
8844        ///Sets `epoch` with the provided value.
8845        pub fn with_epoch(mut self, field: u64) -> Self {
8846            self.set_epoch(field);
8847            self
8848        }
8849        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8850        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8851            self.checkpoint_height.as_mut().map(|field| field as _)
8852        }
8853        ///Returns a mutable reference to `checkpoint_height`.
8854        ///If the field is unset, it is first initialized with the default value.
8855        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8856            self.checkpoint_height.get_or_insert_default()
8857        }
8858        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8859        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8860            self.checkpoint_height.as_ref().map(|field| *field)
8861        }
8862        ///Sets `checkpoint_height` with the provided value.
8863        pub fn set_checkpoint_height(&mut self, field: u64) {
8864            self.checkpoint_height = Some(field);
8865        }
8866        ///Sets `checkpoint_height` with the provided value.
8867        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8868            self.set_checkpoint_height(field);
8869            self
8870        }
8871        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8872        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8873            self.timestamp.as_mut().map(|field| field as _)
8874        }
8875        ///Returns a mutable reference to `timestamp`.
8876        ///If the field is unset, it is first initialized with the default value.
8877        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8878            self.timestamp.get_or_insert_default()
8879        }
8880        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8881        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8882            self.timestamp.as_ref().map(|field| field as _)
8883        }
8884        ///Sets `timestamp` with the provided value.
8885        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8886            self.timestamp = Some(field.into().into());
8887        }
8888        ///Sets `timestamp` with the provided value.
8889        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8890            mut self,
8891            field: T,
8892        ) -> Self {
8893            self.set_timestamp(field.into());
8894            self
8895        }
8896        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8897        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8898            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8899        }
8900        ///Returns a mutable reference to `lowest_available_checkpoint`.
8901        ///If the field is unset, it is first initialized with the default value.
8902        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8903            self.lowest_available_checkpoint.get_or_insert_default()
8904        }
8905        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8906        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8907            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8908        }
8909        ///Sets `lowest_available_checkpoint` with the provided value.
8910        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8911            self.lowest_available_checkpoint = Some(field);
8912        }
8913        ///Sets `lowest_available_checkpoint` with the provided value.
8914        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8915            self.set_lowest_available_checkpoint(field);
8916            self
8917        }
8918        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8919        pub fn lowest_available_checkpoint_objects_opt_mut(
8920            &mut self,
8921        ) -> Option<&mut u64> {
8922            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8923        }
8924        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8925        ///If the field is unset, it is first initialized with the default value.
8926        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8927            self.lowest_available_checkpoint_objects.get_or_insert_default()
8928        }
8929        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8930        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8931            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8932        }
8933        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8934        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8935            self.lowest_available_checkpoint_objects = Some(field);
8936        }
8937        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8938        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8939            self.set_lowest_available_checkpoint_objects(field);
8940            self
8941        }
8942        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8943        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8944            self.server.as_mut().map(|field| field as _)
8945        }
8946        ///Returns a mutable reference to `server`.
8947        ///If the field is unset, it is first initialized with the default value.
8948        pub fn server_mut(&mut self) -> &mut String {
8949            self.server.get_or_insert_default()
8950        }
8951        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8952        pub fn server_opt(&self) -> Option<&str> {
8953            self.server.as_ref().map(|field| field as _)
8954        }
8955        ///Sets `server` with the provided value.
8956        pub fn set_server<T: Into<String>>(&mut self, field: T) {
8957            self.server = Some(field.into().into());
8958        }
8959        ///Sets `server` with the provided value.
8960        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8961            self.set_server(field.into());
8962            self
8963        }
8964    }
8965    impl super::GetTransactionRequest {
8966        pub const fn const_default() -> Self {
8967            Self {
8968                digest: None,
8969                read_mask: None,
8970            }
8971        }
8972        #[doc(hidden)]
8973        pub fn default_instance() -> &'static Self {
8974            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8975            &DEFAULT
8976        }
8977        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8978        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8979            self.digest.as_mut().map(|field| field as _)
8980        }
8981        ///Returns a mutable reference to `digest`.
8982        ///If the field is unset, it is first initialized with the default value.
8983        pub fn digest_mut(&mut self) -> &mut String {
8984            self.digest.get_or_insert_default()
8985        }
8986        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8987        pub fn digest_opt(&self) -> Option<&str> {
8988            self.digest.as_ref().map(|field| field as _)
8989        }
8990        ///Sets `digest` with the provided value.
8991        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8992            self.digest = Some(field.into().into());
8993        }
8994        ///Sets `digest` with the provided value.
8995        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8996            self.set_digest(field.into());
8997            self
8998        }
8999        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9000        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9001            self.read_mask.as_mut().map(|field| field as _)
9002        }
9003        ///Returns a mutable reference to `read_mask`.
9004        ///If the field is unset, it is first initialized with the default value.
9005        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9006            self.read_mask.get_or_insert_default()
9007        }
9008        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9009        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9010            self.read_mask.as_ref().map(|field| field as _)
9011        }
9012        ///Sets `read_mask` with the provided value.
9013        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9014            self.read_mask = Some(field.into().into());
9015        }
9016        ///Sets `read_mask` with the provided value.
9017        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9018            mut self,
9019            field: T,
9020        ) -> Self {
9021            self.set_read_mask(field.into());
9022            self
9023        }
9024    }
9025    impl super::GetTransactionResponse {
9026        pub const fn const_default() -> Self {
9027            Self { transaction: None }
9028        }
9029        #[doc(hidden)]
9030        pub fn default_instance() -> &'static Self {
9031            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9032            &DEFAULT
9033        }
9034        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9035        pub fn transaction(&self) -> &super::ExecutedTransaction {
9036            self.transaction
9037                .as_ref()
9038                .map(|field| field as _)
9039                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9040        }
9041        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9042        pub fn transaction_opt_mut(
9043            &mut self,
9044        ) -> Option<&mut super::ExecutedTransaction> {
9045            self.transaction.as_mut().map(|field| field as _)
9046        }
9047        ///Returns a mutable reference to `transaction`.
9048        ///If the field is unset, it is first initialized with the default value.
9049        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9050            self.transaction.get_or_insert_default()
9051        }
9052        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9053        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9054            self.transaction.as_ref().map(|field| field as _)
9055        }
9056        ///Sets `transaction` with the provided value.
9057        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9058            &mut self,
9059            field: T,
9060        ) {
9061            self.transaction = Some(field.into().into());
9062        }
9063        ///Sets `transaction` with the provided value.
9064        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9065            mut self,
9066            field: T,
9067        ) -> Self {
9068            self.set_transaction(field.into());
9069            self
9070        }
9071    }
9072    impl super::GetTransactionResult {
9073        pub const fn const_default() -> Self {
9074            Self { result: None }
9075        }
9076        #[doc(hidden)]
9077        pub fn default_instance() -> &'static Self {
9078            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9079            &DEFAULT
9080        }
9081        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9082        pub fn transaction(&self) -> &super::ExecutedTransaction {
9083            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9084                .result
9085            {
9086                field as _
9087            } else {
9088                super::ExecutedTransaction::default_instance() as _
9089            }
9090        }
9091        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9092        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9093            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9094                .result
9095            {
9096                Some(field as _)
9097            } else {
9098                None
9099            }
9100        }
9101        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9102        pub fn transaction_opt_mut(
9103            &mut self,
9104        ) -> Option<&mut super::ExecutedTransaction> {
9105            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9106                .result
9107            {
9108                Some(field as _)
9109            } else {
9110                None
9111            }
9112        }
9113        ///Returns a mutable reference to `transaction`.
9114        ///If the field is unset, it is first initialized with the default value.
9115        ///If any other oneof field in the same oneof is set, it will be cleared.
9116        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9117            if self.transaction_opt_mut().is_none() {
9118                self.result = Some(
9119                    super::get_transaction_result::Result::Transaction(
9120                        super::ExecutedTransaction::default(),
9121                    ),
9122                );
9123            }
9124            self.transaction_opt_mut().unwrap()
9125        }
9126        ///Sets `transaction` with the provided value.
9127        ///If any other oneof field in the same oneof is set, it will be cleared.
9128        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9129            &mut self,
9130            field: T,
9131        ) {
9132            self.result = Some(
9133                super::get_transaction_result::Result::Transaction(field.into().into()),
9134            );
9135        }
9136        ///Sets `transaction` with the provided value.
9137        ///If any other oneof field in the same oneof is set, it will be cleared.
9138        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9139            mut self,
9140            field: T,
9141        ) -> Self {
9142            self.set_transaction(field.into());
9143            self
9144        }
9145        ///Returns the value of `error`, or the default value if `error` is unset.
9146        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9147            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9148                .result
9149            {
9150                field as _
9151            } else {
9152                super::super::super::super::google::rpc::Status::default_instance() as _
9153            }
9154        }
9155        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9156        pub fn error_opt(
9157            &self,
9158        ) -> Option<&super::super::super::super::google::rpc::Status> {
9159            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9160                .result
9161            {
9162                Some(field as _)
9163            } else {
9164                None
9165            }
9166        }
9167        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9168        pub fn error_opt_mut(
9169            &mut self,
9170        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9171            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9172                .result
9173            {
9174                Some(field as _)
9175            } else {
9176                None
9177            }
9178        }
9179        ///Returns a mutable reference to `error`.
9180        ///If the field is unset, it is first initialized with the default value.
9181        ///If any other oneof field in the same oneof is set, it will be cleared.
9182        pub fn error_mut(
9183            &mut self,
9184        ) -> &mut super::super::super::super::google::rpc::Status {
9185            if self.error_opt_mut().is_none() {
9186                self.result = Some(
9187                    super::get_transaction_result::Result::Error(
9188                        super::super::super::super::google::rpc::Status::default(),
9189                    ),
9190                );
9191            }
9192            self.error_opt_mut().unwrap()
9193        }
9194        ///Sets `error` with the provided value.
9195        ///If any other oneof field in the same oneof is set, it will be cleared.
9196        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9197            &mut self,
9198            field: T,
9199        ) {
9200            self.result = Some(
9201                super::get_transaction_result::Result::Error(field.into().into()),
9202            );
9203        }
9204        ///Sets `error` with the provided value.
9205        ///If any other oneof field in the same oneof is set, it will be cleared.
9206        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9207            mut self,
9208            field: T,
9209        ) -> Self {
9210            self.set_error(field.into());
9211            self
9212        }
9213    }
9214    impl super::IndexError {
9215        pub const fn const_default() -> Self {
9216            Self {
9217                index: None,
9218                subresult: None,
9219            }
9220        }
9221        #[doc(hidden)]
9222        pub fn default_instance() -> &'static Self {
9223            static DEFAULT: super::IndexError = super::IndexError::const_default();
9224            &DEFAULT
9225        }
9226        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9227        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9228            self.index.as_mut().map(|field| field as _)
9229        }
9230        ///Returns a mutable reference to `index`.
9231        ///If the field is unset, it is first initialized with the default value.
9232        pub fn index_mut(&mut self) -> &mut u32 {
9233            self.index.get_or_insert_default()
9234        }
9235        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
9236        pub fn index_opt(&self) -> Option<u32> {
9237            self.index.as_ref().map(|field| *field)
9238        }
9239        ///Sets `index` with the provided value.
9240        pub fn set_index(&mut self, field: u32) {
9241            self.index = Some(field);
9242        }
9243        ///Sets `index` with the provided value.
9244        pub fn with_index(mut self, field: u32) -> Self {
9245            self.set_index(field);
9246            self
9247        }
9248        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9249        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9250            self.subresult.as_mut().map(|field| field as _)
9251        }
9252        ///Returns a mutable reference to `subresult`.
9253        ///If the field is unset, it is first initialized with the default value.
9254        pub fn subresult_mut(&mut self) -> &mut u32 {
9255            self.subresult.get_or_insert_default()
9256        }
9257        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
9258        pub fn subresult_opt(&self) -> Option<u32> {
9259            self.subresult.as_ref().map(|field| *field)
9260        }
9261        ///Sets `subresult` with the provided value.
9262        pub fn set_subresult(&mut self, field: u32) {
9263            self.subresult = Some(field);
9264        }
9265        ///Sets `subresult` with the provided value.
9266        pub fn with_subresult(mut self, field: u32) -> Self {
9267            self.set_subresult(field);
9268            self
9269        }
9270    }
9271    impl super::Input {
9272        pub const fn const_default() -> Self {
9273            Self {
9274                kind: None,
9275                pure: None,
9276                object_id: None,
9277                version: None,
9278                digest: None,
9279                mutable: None,
9280                mutability: None,
9281                funds_withdrawal: None,
9282                literal: None,
9283            }
9284        }
9285        #[doc(hidden)]
9286        pub fn default_instance() -> &'static Self {
9287            static DEFAULT: super::Input = super::Input::const_default();
9288            &DEFAULT
9289        }
9290        ///Sets `kind` with the provided value.
9291        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9292            self.set_kind(field.into());
9293            self
9294        }
9295        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
9296        pub fn pure_opt(&self) -> Option<&[u8]> {
9297            self.pure.as_ref().map(|field| field as _)
9298        }
9299        ///Sets `pure` with the provided value.
9300        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9301            self.pure = Some(field.into().into());
9302        }
9303        ///Sets `pure` with the provided value.
9304        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9305            self.set_pure(field.into());
9306            self
9307        }
9308        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9309        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9310            self.object_id.as_mut().map(|field| field as _)
9311        }
9312        ///Returns a mutable reference to `object_id`.
9313        ///If the field is unset, it is first initialized with the default value.
9314        pub fn object_id_mut(&mut self) -> &mut String {
9315            self.object_id.get_or_insert_default()
9316        }
9317        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9318        pub fn object_id_opt(&self) -> Option<&str> {
9319            self.object_id.as_ref().map(|field| field as _)
9320        }
9321        ///Sets `object_id` with the provided value.
9322        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9323            self.object_id = Some(field.into().into());
9324        }
9325        ///Sets `object_id` with the provided value.
9326        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9327            self.set_object_id(field.into());
9328            self
9329        }
9330        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9331        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9332            self.version.as_mut().map(|field| field as _)
9333        }
9334        ///Returns a mutable reference to `version`.
9335        ///If the field is unset, it is first initialized with the default value.
9336        pub fn version_mut(&mut self) -> &mut u64 {
9337            self.version.get_or_insert_default()
9338        }
9339        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9340        pub fn version_opt(&self) -> Option<u64> {
9341            self.version.as_ref().map(|field| *field)
9342        }
9343        ///Sets `version` with the provided value.
9344        pub fn set_version(&mut self, field: u64) {
9345            self.version = Some(field);
9346        }
9347        ///Sets `version` with the provided value.
9348        pub fn with_version(mut self, field: u64) -> Self {
9349            self.set_version(field);
9350            self
9351        }
9352        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9353        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9354            self.digest.as_mut().map(|field| field as _)
9355        }
9356        ///Returns a mutable reference to `digest`.
9357        ///If the field is unset, it is first initialized with the default value.
9358        pub fn digest_mut(&mut self) -> &mut String {
9359            self.digest.get_or_insert_default()
9360        }
9361        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9362        pub fn digest_opt(&self) -> Option<&str> {
9363            self.digest.as_ref().map(|field| field as _)
9364        }
9365        ///Sets `digest` with the provided value.
9366        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9367            self.digest = Some(field.into().into());
9368        }
9369        ///Sets `digest` with the provided value.
9370        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9371            self.set_digest(field.into());
9372            self
9373        }
9374        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9375        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9376            self.mutable.as_mut().map(|field| field as _)
9377        }
9378        ///Returns a mutable reference to `mutable`.
9379        ///If the field is unset, it is first initialized with the default value.
9380        pub fn mutable_mut(&mut self) -> &mut bool {
9381            self.mutable.get_or_insert_default()
9382        }
9383        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
9384        pub fn mutable_opt(&self) -> Option<bool> {
9385            self.mutable.as_ref().map(|field| *field)
9386        }
9387        ///Sets `mutable` with the provided value.
9388        pub fn set_mutable(&mut self, field: bool) {
9389            self.mutable = Some(field);
9390        }
9391        ///Sets `mutable` with the provided value.
9392        pub fn with_mutable(mut self, field: bool) -> Self {
9393            self.set_mutable(field);
9394            self
9395        }
9396        ///Sets `mutability` with the provided value.
9397        pub fn with_mutability<T: Into<super::input::Mutability>>(
9398            mut self,
9399            field: T,
9400        ) -> Self {
9401            self.set_mutability(field.into());
9402            self
9403        }
9404        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
9405        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9406            self.funds_withdrawal
9407                .as_ref()
9408                .map(|field| field as _)
9409                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9410        }
9411        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9412        pub fn funds_withdrawal_opt_mut(
9413            &mut self,
9414        ) -> Option<&mut super::FundsWithdrawal> {
9415            self.funds_withdrawal.as_mut().map(|field| field as _)
9416        }
9417        ///Returns a mutable reference to `funds_withdrawal`.
9418        ///If the field is unset, it is first initialized with the default value.
9419        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9420            self.funds_withdrawal.get_or_insert_default()
9421        }
9422        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9423        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9424            self.funds_withdrawal.as_ref().map(|field| field as _)
9425        }
9426        ///Sets `funds_withdrawal` with the provided value.
9427        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9428            &mut self,
9429            field: T,
9430        ) {
9431            self.funds_withdrawal = Some(field.into().into());
9432        }
9433        ///Sets `funds_withdrawal` with the provided value.
9434        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9435            mut self,
9436            field: T,
9437        ) -> Self {
9438            self.set_funds_withdrawal(field.into());
9439            self
9440        }
9441        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9442        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9443            self.literal.as_mut().map(|field| field as _)
9444        }
9445        ///Returns a mutable reference to `literal`.
9446        ///If the field is unset, it is first initialized with the default value.
9447        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9448            self.literal.get_or_insert_default()
9449        }
9450        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9451        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9452            self.literal.as_ref().map(|field| field as _)
9453        }
9454        ///Sets `literal` with the provided value.
9455        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9456            self.literal = Some(field.into().into());
9457        }
9458        ///Sets `literal` with the provided value.
9459        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9460            self.set_literal(field.into());
9461            self
9462        }
9463    }
9464    impl super::Jwk {
9465        pub const fn const_default() -> Self {
9466            Self {
9467                kty: None,
9468                e: None,
9469                n: None,
9470                alg: None,
9471            }
9472        }
9473        #[doc(hidden)]
9474        pub fn default_instance() -> &'static Self {
9475            static DEFAULT: super::Jwk = super::Jwk::const_default();
9476            &DEFAULT
9477        }
9478        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9479        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9480            self.kty.as_mut().map(|field| field as _)
9481        }
9482        ///Returns a mutable reference to `kty`.
9483        ///If the field is unset, it is first initialized with the default value.
9484        pub fn kty_mut(&mut self) -> &mut String {
9485            self.kty.get_or_insert_default()
9486        }
9487        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
9488        pub fn kty_opt(&self) -> Option<&str> {
9489            self.kty.as_ref().map(|field| field as _)
9490        }
9491        ///Sets `kty` with the provided value.
9492        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9493            self.kty = Some(field.into().into());
9494        }
9495        ///Sets `kty` with the provided value.
9496        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9497            self.set_kty(field.into());
9498            self
9499        }
9500        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9501        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9502            self.e.as_mut().map(|field| field as _)
9503        }
9504        ///Returns a mutable reference to `e`.
9505        ///If the field is unset, it is first initialized with the default value.
9506        pub fn e_mut(&mut self) -> &mut String {
9507            self.e.get_or_insert_default()
9508        }
9509        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
9510        pub fn e_opt(&self) -> Option<&str> {
9511            self.e.as_ref().map(|field| field as _)
9512        }
9513        ///Sets `e` with the provided value.
9514        pub fn set_e<T: Into<String>>(&mut self, field: T) {
9515            self.e = Some(field.into().into());
9516        }
9517        ///Sets `e` with the provided value.
9518        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9519            self.set_e(field.into());
9520            self
9521        }
9522        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9523        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9524            self.n.as_mut().map(|field| field as _)
9525        }
9526        ///Returns a mutable reference to `n`.
9527        ///If the field is unset, it is first initialized with the default value.
9528        pub fn n_mut(&mut self) -> &mut String {
9529            self.n.get_or_insert_default()
9530        }
9531        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
9532        pub fn n_opt(&self) -> Option<&str> {
9533            self.n.as_ref().map(|field| field as _)
9534        }
9535        ///Sets `n` with the provided value.
9536        pub fn set_n<T: Into<String>>(&mut self, field: T) {
9537            self.n = Some(field.into().into());
9538        }
9539        ///Sets `n` with the provided value.
9540        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9541            self.set_n(field.into());
9542            self
9543        }
9544        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9545        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9546            self.alg.as_mut().map(|field| field as _)
9547        }
9548        ///Returns a mutable reference to `alg`.
9549        ///If the field is unset, it is first initialized with the default value.
9550        pub fn alg_mut(&mut self) -> &mut String {
9551            self.alg.get_or_insert_default()
9552        }
9553        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
9554        pub fn alg_opt(&self) -> Option<&str> {
9555            self.alg.as_ref().map(|field| field as _)
9556        }
9557        ///Sets `alg` with the provided value.
9558        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9559            self.alg = Some(field.into().into());
9560        }
9561        ///Sets `alg` with the provided value.
9562        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9563            self.set_alg(field.into());
9564            self
9565        }
9566    }
9567    impl super::JwkId {
9568        pub const fn const_default() -> Self {
9569            Self { iss: None, kid: None }
9570        }
9571        #[doc(hidden)]
9572        pub fn default_instance() -> &'static Self {
9573            static DEFAULT: super::JwkId = super::JwkId::const_default();
9574            &DEFAULT
9575        }
9576        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9577        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9578            self.iss.as_mut().map(|field| field as _)
9579        }
9580        ///Returns a mutable reference to `iss`.
9581        ///If the field is unset, it is first initialized with the default value.
9582        pub fn iss_mut(&mut self) -> &mut String {
9583            self.iss.get_or_insert_default()
9584        }
9585        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
9586        pub fn iss_opt(&self) -> Option<&str> {
9587            self.iss.as_ref().map(|field| field as _)
9588        }
9589        ///Sets `iss` with the provided value.
9590        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9591            self.iss = Some(field.into().into());
9592        }
9593        ///Sets `iss` with the provided value.
9594        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9595            self.set_iss(field.into());
9596            self
9597        }
9598        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9599        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9600            self.kid.as_mut().map(|field| field as _)
9601        }
9602        ///Returns a mutable reference to `kid`.
9603        ///If the field is unset, it is first initialized with the default value.
9604        pub fn kid_mut(&mut self) -> &mut String {
9605            self.kid.get_or_insert_default()
9606        }
9607        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
9608        pub fn kid_opt(&self) -> Option<&str> {
9609            self.kid.as_ref().map(|field| field as _)
9610        }
9611        ///Sets `kid` with the provided value.
9612        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9613            self.kid = Some(field.into().into());
9614        }
9615        ///Sets `kid` with the provided value.
9616        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9617            self.set_kid(field.into());
9618            self
9619        }
9620    }
9621    impl super::Linkage {
9622        pub const fn const_default() -> Self {
9623            Self {
9624                original_id: None,
9625                upgraded_id: None,
9626                upgraded_version: None,
9627            }
9628        }
9629        #[doc(hidden)]
9630        pub fn default_instance() -> &'static Self {
9631            static DEFAULT: super::Linkage = super::Linkage::const_default();
9632            &DEFAULT
9633        }
9634        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9635        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9636            self.original_id.as_mut().map(|field| field as _)
9637        }
9638        ///Returns a mutable reference to `original_id`.
9639        ///If the field is unset, it is first initialized with the default value.
9640        pub fn original_id_mut(&mut self) -> &mut String {
9641            self.original_id.get_or_insert_default()
9642        }
9643        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9644        pub fn original_id_opt(&self) -> Option<&str> {
9645            self.original_id.as_ref().map(|field| field as _)
9646        }
9647        ///Sets `original_id` with the provided value.
9648        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9649            self.original_id = Some(field.into().into());
9650        }
9651        ///Sets `original_id` with the provided value.
9652        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9653            self.set_original_id(field.into());
9654            self
9655        }
9656        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9657        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9658            self.upgraded_id.as_mut().map(|field| field as _)
9659        }
9660        ///Returns a mutable reference to `upgraded_id`.
9661        ///If the field is unset, it is first initialized with the default value.
9662        pub fn upgraded_id_mut(&mut self) -> &mut String {
9663            self.upgraded_id.get_or_insert_default()
9664        }
9665        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9666        pub fn upgraded_id_opt(&self) -> Option<&str> {
9667            self.upgraded_id.as_ref().map(|field| field as _)
9668        }
9669        ///Sets `upgraded_id` with the provided value.
9670        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9671            self.upgraded_id = Some(field.into().into());
9672        }
9673        ///Sets `upgraded_id` with the provided value.
9674        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9675            self.set_upgraded_id(field.into());
9676            self
9677        }
9678        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9679        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9680            self.upgraded_version.as_mut().map(|field| field as _)
9681        }
9682        ///Returns a mutable reference to `upgraded_version`.
9683        ///If the field is unset, it is first initialized with the default value.
9684        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9685            self.upgraded_version.get_or_insert_default()
9686        }
9687        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9688        pub fn upgraded_version_opt(&self) -> Option<u64> {
9689            self.upgraded_version.as_ref().map(|field| *field)
9690        }
9691        ///Sets `upgraded_version` with the provided value.
9692        pub fn set_upgraded_version(&mut self, field: u64) {
9693            self.upgraded_version = Some(field);
9694        }
9695        ///Sets `upgraded_version` with the provided value.
9696        pub fn with_upgraded_version(mut self, field: u64) -> Self {
9697            self.set_upgraded_version(field);
9698            self
9699        }
9700    }
9701    impl super::ListBalancesRequest {
9702        pub const fn const_default() -> Self {
9703            Self {
9704                owner: None,
9705                page_size: None,
9706                page_token: None,
9707            }
9708        }
9709        #[doc(hidden)]
9710        pub fn default_instance() -> &'static Self {
9711            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9712            &DEFAULT
9713        }
9714        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9715        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9716            self.owner.as_mut().map(|field| field as _)
9717        }
9718        ///Returns a mutable reference to `owner`.
9719        ///If the field is unset, it is first initialized with the default value.
9720        pub fn owner_mut(&mut self) -> &mut String {
9721            self.owner.get_or_insert_default()
9722        }
9723        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9724        pub fn owner_opt(&self) -> Option<&str> {
9725            self.owner.as_ref().map(|field| field as _)
9726        }
9727        ///Sets `owner` with the provided value.
9728        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9729            self.owner = Some(field.into().into());
9730        }
9731        ///Sets `owner` with the provided value.
9732        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9733            self.set_owner(field.into());
9734            self
9735        }
9736        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9737        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9738            self.page_size.as_mut().map(|field| field as _)
9739        }
9740        ///Returns a mutable reference to `page_size`.
9741        ///If the field is unset, it is first initialized with the default value.
9742        pub fn page_size_mut(&mut self) -> &mut u32 {
9743            self.page_size.get_or_insert_default()
9744        }
9745        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9746        pub fn page_size_opt(&self) -> Option<u32> {
9747            self.page_size.as_ref().map(|field| *field)
9748        }
9749        ///Sets `page_size` with the provided value.
9750        pub fn set_page_size(&mut self, field: u32) {
9751            self.page_size = Some(field);
9752        }
9753        ///Sets `page_size` with the provided value.
9754        pub fn with_page_size(mut self, field: u32) -> Self {
9755            self.set_page_size(field);
9756            self
9757        }
9758        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9759        pub fn page_token_opt(&self) -> Option<&[u8]> {
9760            self.page_token.as_ref().map(|field| field as _)
9761        }
9762        ///Sets `page_token` with the provided value.
9763        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9764            self.page_token = Some(field.into().into());
9765        }
9766        ///Sets `page_token` with the provided value.
9767        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9768            mut self,
9769            field: T,
9770        ) -> Self {
9771            self.set_page_token(field.into());
9772            self
9773        }
9774    }
9775    impl super::ListBalancesResponse {
9776        pub const fn const_default() -> Self {
9777            Self {
9778                balances: Vec::new(),
9779                next_page_token: None,
9780            }
9781        }
9782        #[doc(hidden)]
9783        pub fn default_instance() -> &'static Self {
9784            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9785            &DEFAULT
9786        }
9787        ///Returns the value of `balances`, or the default value if `balances` is unset.
9788        pub fn balances(&self) -> &[super::Balance] {
9789            &self.balances
9790        }
9791        ///Returns a mutable reference to `balances`.
9792        ///If the field is unset, it is first initialized with the default value.
9793        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9794            &mut self.balances
9795        }
9796        ///Sets `balances` with the provided value.
9797        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9798            self.balances = field;
9799        }
9800        ///Sets `balances` with the provided value.
9801        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9802            self.set_balances(field);
9803            self
9804        }
9805        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9806        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9807            self.next_page_token.as_ref().map(|field| field as _)
9808        }
9809        ///Sets `next_page_token` with the provided value.
9810        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9811            self.next_page_token = Some(field.into().into());
9812        }
9813        ///Sets `next_page_token` with the provided value.
9814        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9815            mut self,
9816            field: T,
9817        ) -> Self {
9818            self.set_next_page_token(field.into());
9819            self
9820        }
9821    }
9822    impl super::ListCheckpointsRequest {
9823        pub const fn const_default() -> Self {
9824            Self {
9825                read_mask: None,
9826                start_checkpoint: None,
9827                end_checkpoint: None,
9828                filter: None,
9829                options: None,
9830            }
9831        }
9832        #[doc(hidden)]
9833        pub fn default_instance() -> &'static Self {
9834            static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
9835            &DEFAULT
9836        }
9837        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9838        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9839            self.read_mask.as_mut().map(|field| field as _)
9840        }
9841        ///Returns a mutable reference to `read_mask`.
9842        ///If the field is unset, it is first initialized with the default value.
9843        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9844            self.read_mask.get_or_insert_default()
9845        }
9846        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9847        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9848            self.read_mask.as_ref().map(|field| field as _)
9849        }
9850        ///Sets `read_mask` with the provided value.
9851        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9852            self.read_mask = Some(field.into().into());
9853        }
9854        ///Sets `read_mask` with the provided value.
9855        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9856            mut self,
9857            field: T,
9858        ) -> Self {
9859            self.set_read_mask(field.into());
9860            self
9861        }
9862        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9863        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9864            self.start_checkpoint.as_mut().map(|field| field as _)
9865        }
9866        ///Returns a mutable reference to `start_checkpoint`.
9867        ///If the field is unset, it is first initialized with the default value.
9868        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
9869            self.start_checkpoint.get_or_insert_default()
9870        }
9871        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9872        pub fn start_checkpoint_opt(&self) -> Option<u64> {
9873            self.start_checkpoint.as_ref().map(|field| *field)
9874        }
9875        ///Sets `start_checkpoint` with the provided value.
9876        pub fn set_start_checkpoint(&mut self, field: u64) {
9877            self.start_checkpoint = Some(field);
9878        }
9879        ///Sets `start_checkpoint` with the provided value.
9880        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
9881            self.set_start_checkpoint(field);
9882            self
9883        }
9884        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9885        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9886            self.end_checkpoint.as_mut().map(|field| field as _)
9887        }
9888        ///Returns a mutable reference to `end_checkpoint`.
9889        ///If the field is unset, it is first initialized with the default value.
9890        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
9891            self.end_checkpoint.get_or_insert_default()
9892        }
9893        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9894        pub fn end_checkpoint_opt(&self) -> Option<u64> {
9895            self.end_checkpoint.as_ref().map(|field| *field)
9896        }
9897        ///Sets `end_checkpoint` with the provided value.
9898        pub fn set_end_checkpoint(&mut self, field: u64) {
9899            self.end_checkpoint = Some(field);
9900        }
9901        ///Sets `end_checkpoint` with the provided value.
9902        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
9903            self.set_end_checkpoint(field);
9904            self
9905        }
9906        ///Returns the value of `filter`, or the default value if `filter` is unset.
9907        pub fn filter(&self) -> &super::TransactionFilter {
9908            self.filter
9909                .as_ref()
9910                .map(|field| field as _)
9911                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
9912        }
9913        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9914        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
9915            self.filter.as_mut().map(|field| field as _)
9916        }
9917        ///Returns a mutable reference to `filter`.
9918        ///If the field is unset, it is first initialized with the default value.
9919        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
9920            self.filter.get_or_insert_default()
9921        }
9922        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
9923        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
9924            self.filter.as_ref().map(|field| field as _)
9925        }
9926        ///Sets `filter` with the provided value.
9927        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
9928            self.filter = Some(field.into().into());
9929        }
9930        ///Sets `filter` with the provided value.
9931        pub fn with_filter<T: Into<super::TransactionFilter>>(
9932            mut self,
9933            field: T,
9934        ) -> Self {
9935            self.set_filter(field.into());
9936            self
9937        }
9938        ///Returns the value of `options`, or the default value if `options` is unset.
9939        pub fn options(&self) -> &super::QueryOptions {
9940            self.options
9941                .as_ref()
9942                .map(|field| field as _)
9943                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
9944        }
9945        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9946        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
9947            self.options.as_mut().map(|field| field as _)
9948        }
9949        ///Returns a mutable reference to `options`.
9950        ///If the field is unset, it is first initialized with the default value.
9951        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
9952            self.options.get_or_insert_default()
9953        }
9954        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
9955        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
9956            self.options.as_ref().map(|field| field as _)
9957        }
9958        ///Sets `options` with the provided value.
9959        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
9960            self.options = Some(field.into().into());
9961        }
9962        ///Sets `options` with the provided value.
9963        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
9964            self.set_options(field.into());
9965            self
9966        }
9967    }
9968    impl super::ListCheckpointsResponse {
9969        pub const fn const_default() -> Self {
9970            Self {
9971                checkpoint: None,
9972                watermark: None,
9973                end: None,
9974            }
9975        }
9976        #[doc(hidden)]
9977        pub fn default_instance() -> &'static Self {
9978            static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
9979            &DEFAULT
9980        }
9981        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
9982        pub fn checkpoint(&self) -> &super::Checkpoint {
9983            self.checkpoint
9984                .as_ref()
9985                .map(|field| field as _)
9986                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
9987        }
9988        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9989        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
9990            self.checkpoint.as_mut().map(|field| field as _)
9991        }
9992        ///Returns a mutable reference to `checkpoint`.
9993        ///If the field is unset, it is first initialized with the default value.
9994        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
9995            self.checkpoint.get_or_insert_default()
9996        }
9997        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9998        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
9999            self.checkpoint.as_ref().map(|field| field as _)
10000        }
10001        ///Sets `checkpoint` with the provided value.
10002        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10003            self.checkpoint = Some(field.into().into());
10004        }
10005        ///Sets `checkpoint` with the provided value.
10006        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10007            self.set_checkpoint(field.into());
10008            self
10009        }
10010        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10011        pub fn watermark(&self) -> &super::Watermark {
10012            self.watermark
10013                .as_ref()
10014                .map(|field| field as _)
10015                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10016        }
10017        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10018        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10019            self.watermark.as_mut().map(|field| field as _)
10020        }
10021        ///Returns a mutable reference to `watermark`.
10022        ///If the field is unset, it is first initialized with the default value.
10023        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10024            self.watermark.get_or_insert_default()
10025        }
10026        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10027        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10028            self.watermark.as_ref().map(|field| field as _)
10029        }
10030        ///Sets `watermark` with the provided value.
10031        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10032            self.watermark = Some(field.into().into());
10033        }
10034        ///Sets `watermark` with the provided value.
10035        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10036            self.set_watermark(field.into());
10037            self
10038        }
10039        ///Returns the value of `end`, or the default value if `end` is unset.
10040        pub fn end(&self) -> &super::QueryEnd {
10041            self.end
10042                .as_ref()
10043                .map(|field| field as _)
10044                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10045        }
10046        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10047        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10048            self.end.as_mut().map(|field| field as _)
10049        }
10050        ///Returns a mutable reference to `end`.
10051        ///If the field is unset, it is first initialized with the default value.
10052        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10053            self.end.get_or_insert_default()
10054        }
10055        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10056        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10057            self.end.as_ref().map(|field| field as _)
10058        }
10059        ///Sets `end` with the provided value.
10060        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10061            self.end = Some(field.into().into());
10062        }
10063        ///Sets `end` with the provided value.
10064        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10065            self.set_end(field.into());
10066            self
10067        }
10068    }
10069    impl super::ListDynamicFieldsRequest {
10070        pub const fn const_default() -> Self {
10071            Self {
10072                parent: None,
10073                page_size: None,
10074                page_token: None,
10075                read_mask: None,
10076            }
10077        }
10078        #[doc(hidden)]
10079        pub fn default_instance() -> &'static Self {
10080            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10081            &DEFAULT
10082        }
10083        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10084        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10085            self.parent.as_mut().map(|field| field as _)
10086        }
10087        ///Returns a mutable reference to `parent`.
10088        ///If the field is unset, it is first initialized with the default value.
10089        pub fn parent_mut(&mut self) -> &mut String {
10090            self.parent.get_or_insert_default()
10091        }
10092        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
10093        pub fn parent_opt(&self) -> Option<&str> {
10094            self.parent.as_ref().map(|field| field as _)
10095        }
10096        ///Sets `parent` with the provided value.
10097        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10098            self.parent = Some(field.into().into());
10099        }
10100        ///Sets `parent` with the provided value.
10101        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10102            self.set_parent(field.into());
10103            self
10104        }
10105        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10106        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10107            self.page_size.as_mut().map(|field| field as _)
10108        }
10109        ///Returns a mutable reference to `page_size`.
10110        ///If the field is unset, it is first initialized with the default value.
10111        pub fn page_size_mut(&mut self) -> &mut u32 {
10112            self.page_size.get_or_insert_default()
10113        }
10114        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10115        pub fn page_size_opt(&self) -> Option<u32> {
10116            self.page_size.as_ref().map(|field| *field)
10117        }
10118        ///Sets `page_size` with the provided value.
10119        pub fn set_page_size(&mut self, field: u32) {
10120            self.page_size = Some(field);
10121        }
10122        ///Sets `page_size` with the provided value.
10123        pub fn with_page_size(mut self, field: u32) -> Self {
10124            self.set_page_size(field);
10125            self
10126        }
10127        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10128        pub fn page_token_opt(&self) -> Option<&[u8]> {
10129            self.page_token.as_ref().map(|field| field as _)
10130        }
10131        ///Sets `page_token` with the provided value.
10132        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10133            self.page_token = Some(field.into().into());
10134        }
10135        ///Sets `page_token` with the provided value.
10136        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10137            mut self,
10138            field: T,
10139        ) -> Self {
10140            self.set_page_token(field.into());
10141            self
10142        }
10143        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10144        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10145            self.read_mask.as_mut().map(|field| field as _)
10146        }
10147        ///Returns a mutable reference to `read_mask`.
10148        ///If the field is unset, it is first initialized with the default value.
10149        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10150            self.read_mask.get_or_insert_default()
10151        }
10152        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10153        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10154            self.read_mask.as_ref().map(|field| field as _)
10155        }
10156        ///Sets `read_mask` with the provided value.
10157        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10158            self.read_mask = Some(field.into().into());
10159        }
10160        ///Sets `read_mask` with the provided value.
10161        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10162            mut self,
10163            field: T,
10164        ) -> Self {
10165            self.set_read_mask(field.into());
10166            self
10167        }
10168    }
10169    impl super::ListDynamicFieldsResponse {
10170        pub const fn const_default() -> Self {
10171            Self {
10172                dynamic_fields: Vec::new(),
10173                next_page_token: None,
10174            }
10175        }
10176        #[doc(hidden)]
10177        pub fn default_instance() -> &'static Self {
10178            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10179            &DEFAULT
10180        }
10181        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
10182        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10183            &self.dynamic_fields
10184        }
10185        ///Returns a mutable reference to `dynamic_fields`.
10186        ///If the field is unset, it is first initialized with the default value.
10187        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10188            &mut self.dynamic_fields
10189        }
10190        ///Sets `dynamic_fields` with the provided value.
10191        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10192            self.dynamic_fields = field;
10193        }
10194        ///Sets `dynamic_fields` with the provided value.
10195        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10196            self.set_dynamic_fields(field);
10197            self
10198        }
10199        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10200        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10201            self.next_page_token.as_ref().map(|field| field as _)
10202        }
10203        ///Sets `next_page_token` with the provided value.
10204        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10205            self.next_page_token = Some(field.into().into());
10206        }
10207        ///Sets `next_page_token` with the provided value.
10208        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10209            mut self,
10210            field: T,
10211        ) -> Self {
10212            self.set_next_page_token(field.into());
10213            self
10214        }
10215    }
10216    impl super::ListEventsRequest {
10217        pub const fn const_default() -> Self {
10218            Self {
10219                read_mask: None,
10220                start_checkpoint: None,
10221                end_checkpoint: None,
10222                filter: None,
10223                options: None,
10224            }
10225        }
10226        #[doc(hidden)]
10227        pub fn default_instance() -> &'static Self {
10228            static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10229            &DEFAULT
10230        }
10231        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10232        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10233            self.read_mask.as_mut().map(|field| field as _)
10234        }
10235        ///Returns a mutable reference to `read_mask`.
10236        ///If the field is unset, it is first initialized with the default value.
10237        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10238            self.read_mask.get_or_insert_default()
10239        }
10240        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10241        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10242            self.read_mask.as_ref().map(|field| field as _)
10243        }
10244        ///Sets `read_mask` with the provided value.
10245        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10246            self.read_mask = Some(field.into().into());
10247        }
10248        ///Sets `read_mask` with the provided value.
10249        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10250            mut self,
10251            field: T,
10252        ) -> Self {
10253            self.set_read_mask(field.into());
10254            self
10255        }
10256        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10257        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10258            self.start_checkpoint.as_mut().map(|field| field as _)
10259        }
10260        ///Returns a mutable reference to `start_checkpoint`.
10261        ///If the field is unset, it is first initialized with the default value.
10262        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10263            self.start_checkpoint.get_or_insert_default()
10264        }
10265        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10266        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10267            self.start_checkpoint.as_ref().map(|field| *field)
10268        }
10269        ///Sets `start_checkpoint` with the provided value.
10270        pub fn set_start_checkpoint(&mut self, field: u64) {
10271            self.start_checkpoint = Some(field);
10272        }
10273        ///Sets `start_checkpoint` with the provided value.
10274        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10275            self.set_start_checkpoint(field);
10276            self
10277        }
10278        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10279        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10280            self.end_checkpoint.as_mut().map(|field| field as _)
10281        }
10282        ///Returns a mutable reference to `end_checkpoint`.
10283        ///If the field is unset, it is first initialized with the default value.
10284        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10285            self.end_checkpoint.get_or_insert_default()
10286        }
10287        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10288        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10289            self.end_checkpoint.as_ref().map(|field| *field)
10290        }
10291        ///Sets `end_checkpoint` with the provided value.
10292        pub fn set_end_checkpoint(&mut self, field: u64) {
10293            self.end_checkpoint = Some(field);
10294        }
10295        ///Sets `end_checkpoint` with the provided value.
10296        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10297            self.set_end_checkpoint(field);
10298            self
10299        }
10300        ///Returns the value of `filter`, or the default value if `filter` is unset.
10301        pub fn filter(&self) -> &super::EventFilter {
10302            self.filter
10303                .as_ref()
10304                .map(|field| field as _)
10305                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10306        }
10307        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10308        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10309            self.filter.as_mut().map(|field| field as _)
10310        }
10311        ///Returns a mutable reference to `filter`.
10312        ///If the field is unset, it is first initialized with the default value.
10313        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10314            self.filter.get_or_insert_default()
10315        }
10316        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10317        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10318            self.filter.as_ref().map(|field| field as _)
10319        }
10320        ///Sets `filter` with the provided value.
10321        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10322            self.filter = Some(field.into().into());
10323        }
10324        ///Sets `filter` with the provided value.
10325        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10326            self.set_filter(field.into());
10327            self
10328        }
10329        ///Returns the value of `options`, or the default value if `options` is unset.
10330        pub fn options(&self) -> &super::QueryOptions {
10331            self.options
10332                .as_ref()
10333                .map(|field| field as _)
10334                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10335        }
10336        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10337        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10338            self.options.as_mut().map(|field| field as _)
10339        }
10340        ///Returns a mutable reference to `options`.
10341        ///If the field is unset, it is first initialized with the default value.
10342        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10343            self.options.get_or_insert_default()
10344        }
10345        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10346        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10347            self.options.as_ref().map(|field| field as _)
10348        }
10349        ///Sets `options` with the provided value.
10350        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10351            self.options = Some(field.into().into());
10352        }
10353        ///Sets `options` with the provided value.
10354        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10355            self.set_options(field.into());
10356            self
10357        }
10358    }
10359    impl super::ListEventsResponse {
10360        pub const fn const_default() -> Self {
10361            Self {
10362                event: None,
10363                watermark: None,
10364                end: None,
10365            }
10366        }
10367        #[doc(hidden)]
10368        pub fn default_instance() -> &'static Self {
10369            static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10370            &DEFAULT
10371        }
10372        ///Returns the value of `event`, or the default value if `event` is unset.
10373        pub fn event(&self) -> &super::Event {
10374            self.event
10375                .as_ref()
10376                .map(|field| field as _)
10377                .unwrap_or_else(|| super::Event::default_instance() as _)
10378        }
10379        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10380        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10381            self.event.as_mut().map(|field| field as _)
10382        }
10383        ///Returns a mutable reference to `event`.
10384        ///If the field is unset, it is first initialized with the default value.
10385        pub fn event_mut(&mut self) -> &mut super::Event {
10386            self.event.get_or_insert_default()
10387        }
10388        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
10389        pub fn event_opt(&self) -> Option<&super::Event> {
10390            self.event.as_ref().map(|field| field as _)
10391        }
10392        ///Sets `event` with the provided value.
10393        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10394            self.event = Some(field.into().into());
10395        }
10396        ///Sets `event` with the provided value.
10397        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10398            self.set_event(field.into());
10399            self
10400        }
10401        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10402        pub fn watermark(&self) -> &super::Watermark {
10403            self.watermark
10404                .as_ref()
10405                .map(|field| field as _)
10406                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10407        }
10408        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10409        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10410            self.watermark.as_mut().map(|field| field as _)
10411        }
10412        ///Returns a mutable reference to `watermark`.
10413        ///If the field is unset, it is first initialized with the default value.
10414        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10415            self.watermark.get_or_insert_default()
10416        }
10417        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10418        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10419            self.watermark.as_ref().map(|field| field as _)
10420        }
10421        ///Sets `watermark` with the provided value.
10422        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10423            self.watermark = Some(field.into().into());
10424        }
10425        ///Sets `watermark` with the provided value.
10426        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10427            self.set_watermark(field.into());
10428            self
10429        }
10430        ///Returns the value of `end`, or the default value if `end` is unset.
10431        pub fn end(&self) -> &super::QueryEnd {
10432            self.end
10433                .as_ref()
10434                .map(|field| field as _)
10435                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10436        }
10437        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10438        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10439            self.end.as_mut().map(|field| field as _)
10440        }
10441        ///Returns a mutable reference to `end`.
10442        ///If the field is unset, it is first initialized with the default value.
10443        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10444            self.end.get_or_insert_default()
10445        }
10446        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10447        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10448            self.end.as_ref().map(|field| field as _)
10449        }
10450        ///Sets `end` with the provided value.
10451        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10452            self.end = Some(field.into().into());
10453        }
10454        ///Sets `end` with the provided value.
10455        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10456            self.set_end(field.into());
10457            self
10458        }
10459    }
10460    impl super::ListOwnedObjectsRequest {
10461        pub const fn const_default() -> Self {
10462            Self {
10463                owner: None,
10464                page_size: None,
10465                page_token: None,
10466                read_mask: None,
10467                object_type: None,
10468            }
10469        }
10470        #[doc(hidden)]
10471        pub fn default_instance() -> &'static Self {
10472            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10473            &DEFAULT
10474        }
10475        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10476        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10477            self.owner.as_mut().map(|field| field as _)
10478        }
10479        ///Returns a mutable reference to `owner`.
10480        ///If the field is unset, it is first initialized with the default value.
10481        pub fn owner_mut(&mut self) -> &mut String {
10482            self.owner.get_or_insert_default()
10483        }
10484        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10485        pub fn owner_opt(&self) -> Option<&str> {
10486            self.owner.as_ref().map(|field| field as _)
10487        }
10488        ///Sets `owner` with the provided value.
10489        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10490            self.owner = Some(field.into().into());
10491        }
10492        ///Sets `owner` with the provided value.
10493        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10494            self.set_owner(field.into());
10495            self
10496        }
10497        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10498        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10499            self.page_size.as_mut().map(|field| field as _)
10500        }
10501        ///Returns a mutable reference to `page_size`.
10502        ///If the field is unset, it is first initialized with the default value.
10503        pub fn page_size_mut(&mut self) -> &mut u32 {
10504            self.page_size.get_or_insert_default()
10505        }
10506        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10507        pub fn page_size_opt(&self) -> Option<u32> {
10508            self.page_size.as_ref().map(|field| *field)
10509        }
10510        ///Sets `page_size` with the provided value.
10511        pub fn set_page_size(&mut self, field: u32) {
10512            self.page_size = Some(field);
10513        }
10514        ///Sets `page_size` with the provided value.
10515        pub fn with_page_size(mut self, field: u32) -> Self {
10516            self.set_page_size(field);
10517            self
10518        }
10519        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10520        pub fn page_token_opt(&self) -> Option<&[u8]> {
10521            self.page_token.as_ref().map(|field| field as _)
10522        }
10523        ///Sets `page_token` with the provided value.
10524        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10525            self.page_token = Some(field.into().into());
10526        }
10527        ///Sets `page_token` with the provided value.
10528        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10529            mut self,
10530            field: T,
10531        ) -> Self {
10532            self.set_page_token(field.into());
10533            self
10534        }
10535        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10536        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10537            self.read_mask.as_mut().map(|field| field as _)
10538        }
10539        ///Returns a mutable reference to `read_mask`.
10540        ///If the field is unset, it is first initialized with the default value.
10541        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10542            self.read_mask.get_or_insert_default()
10543        }
10544        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10545        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10546            self.read_mask.as_ref().map(|field| field as _)
10547        }
10548        ///Sets `read_mask` with the provided value.
10549        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10550            self.read_mask = Some(field.into().into());
10551        }
10552        ///Sets `read_mask` with the provided value.
10553        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10554            mut self,
10555            field: T,
10556        ) -> Self {
10557            self.set_read_mask(field.into());
10558            self
10559        }
10560        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10561        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10562            self.object_type.as_mut().map(|field| field as _)
10563        }
10564        ///Returns a mutable reference to `object_type`.
10565        ///If the field is unset, it is first initialized with the default value.
10566        pub fn object_type_mut(&mut self) -> &mut String {
10567            self.object_type.get_or_insert_default()
10568        }
10569        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10570        pub fn object_type_opt(&self) -> Option<&str> {
10571            self.object_type.as_ref().map(|field| field as _)
10572        }
10573        ///Sets `object_type` with the provided value.
10574        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10575            self.object_type = Some(field.into().into());
10576        }
10577        ///Sets `object_type` with the provided value.
10578        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10579            self.set_object_type(field.into());
10580            self
10581        }
10582    }
10583    impl super::ListOwnedObjectsResponse {
10584        pub const fn const_default() -> Self {
10585            Self {
10586                objects: Vec::new(),
10587                next_page_token: None,
10588            }
10589        }
10590        #[doc(hidden)]
10591        pub fn default_instance() -> &'static Self {
10592            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10593            &DEFAULT
10594        }
10595        ///Returns the value of `objects`, or the default value if `objects` is unset.
10596        pub fn objects(&self) -> &[super::Object] {
10597            &self.objects
10598        }
10599        ///Returns a mutable reference to `objects`.
10600        ///If the field is unset, it is first initialized with the default value.
10601        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10602            &mut self.objects
10603        }
10604        ///Sets `objects` with the provided value.
10605        pub fn set_objects(&mut self, field: Vec<super::Object>) {
10606            self.objects = field;
10607        }
10608        ///Sets `objects` with the provided value.
10609        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10610            self.set_objects(field);
10611            self
10612        }
10613        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10614        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10615            self.next_page_token.as_ref().map(|field| field as _)
10616        }
10617        ///Sets `next_page_token` with the provided value.
10618        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10619            self.next_page_token = Some(field.into().into());
10620        }
10621        ///Sets `next_page_token` with the provided value.
10622        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10623            mut self,
10624            field: T,
10625        ) -> Self {
10626            self.set_next_page_token(field.into());
10627            self
10628        }
10629    }
10630    impl super::ListPackageVersionsRequest {
10631        pub const fn const_default() -> Self {
10632            Self {
10633                package_id: None,
10634                page_size: None,
10635                page_token: None,
10636            }
10637        }
10638        #[doc(hidden)]
10639        pub fn default_instance() -> &'static Self {
10640            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10641            &DEFAULT
10642        }
10643        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10644        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10645            self.package_id.as_mut().map(|field| field as _)
10646        }
10647        ///Returns a mutable reference to `package_id`.
10648        ///If the field is unset, it is first initialized with the default value.
10649        pub fn package_id_mut(&mut self) -> &mut String {
10650            self.package_id.get_or_insert_default()
10651        }
10652        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10653        pub fn package_id_opt(&self) -> Option<&str> {
10654            self.package_id.as_ref().map(|field| field as _)
10655        }
10656        ///Sets `package_id` with the provided value.
10657        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10658            self.package_id = Some(field.into().into());
10659        }
10660        ///Sets `package_id` with the provided value.
10661        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10662            self.set_package_id(field.into());
10663            self
10664        }
10665        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10666        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10667            self.page_size.as_mut().map(|field| field as _)
10668        }
10669        ///Returns a mutable reference to `page_size`.
10670        ///If the field is unset, it is first initialized with the default value.
10671        pub fn page_size_mut(&mut self) -> &mut u32 {
10672            self.page_size.get_or_insert_default()
10673        }
10674        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10675        pub fn page_size_opt(&self) -> Option<u32> {
10676            self.page_size.as_ref().map(|field| *field)
10677        }
10678        ///Sets `page_size` with the provided value.
10679        pub fn set_page_size(&mut self, field: u32) {
10680            self.page_size = Some(field);
10681        }
10682        ///Sets `page_size` with the provided value.
10683        pub fn with_page_size(mut self, field: u32) -> Self {
10684            self.set_page_size(field);
10685            self
10686        }
10687        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10688        pub fn page_token_opt(&self) -> Option<&[u8]> {
10689            self.page_token.as_ref().map(|field| field as _)
10690        }
10691        ///Sets `page_token` with the provided value.
10692        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10693            self.page_token = Some(field.into().into());
10694        }
10695        ///Sets `page_token` with the provided value.
10696        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10697            mut self,
10698            field: T,
10699        ) -> Self {
10700            self.set_page_token(field.into());
10701            self
10702        }
10703    }
10704    impl super::ListPackageVersionsResponse {
10705        pub const fn const_default() -> Self {
10706            Self {
10707                versions: Vec::new(),
10708                next_page_token: None,
10709            }
10710        }
10711        #[doc(hidden)]
10712        pub fn default_instance() -> &'static Self {
10713            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10714            &DEFAULT
10715        }
10716        ///Returns the value of `versions`, or the default value if `versions` is unset.
10717        pub fn versions(&self) -> &[super::PackageVersion] {
10718            &self.versions
10719        }
10720        ///Returns a mutable reference to `versions`.
10721        ///If the field is unset, it is first initialized with the default value.
10722        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10723            &mut self.versions
10724        }
10725        ///Sets `versions` with the provided value.
10726        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10727            self.versions = field;
10728        }
10729        ///Sets `versions` with the provided value.
10730        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10731            self.set_versions(field);
10732            self
10733        }
10734        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10735        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10736            self.next_page_token.as_ref().map(|field| field as _)
10737        }
10738        ///Sets `next_page_token` with the provided value.
10739        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10740            self.next_page_token = Some(field.into().into());
10741        }
10742        ///Sets `next_page_token` with the provided value.
10743        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10744            mut self,
10745            field: T,
10746        ) -> Self {
10747            self.set_next_page_token(field.into());
10748            self
10749        }
10750    }
10751    impl super::ListTransactionsRequest {
10752        pub const fn const_default() -> Self {
10753            Self {
10754                read_mask: None,
10755                start_checkpoint: None,
10756                end_checkpoint: None,
10757                filter: None,
10758                options: None,
10759            }
10760        }
10761        #[doc(hidden)]
10762        pub fn default_instance() -> &'static Self {
10763            static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10764            &DEFAULT
10765        }
10766        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10767        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10768            self.read_mask.as_mut().map(|field| field as _)
10769        }
10770        ///Returns a mutable reference to `read_mask`.
10771        ///If the field is unset, it is first initialized with the default value.
10772        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10773            self.read_mask.get_or_insert_default()
10774        }
10775        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10776        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10777            self.read_mask.as_ref().map(|field| field as _)
10778        }
10779        ///Sets `read_mask` with the provided value.
10780        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10781            self.read_mask = Some(field.into().into());
10782        }
10783        ///Sets `read_mask` with the provided value.
10784        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10785            mut self,
10786            field: T,
10787        ) -> Self {
10788            self.set_read_mask(field.into());
10789            self
10790        }
10791        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10792        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10793            self.start_checkpoint.as_mut().map(|field| field as _)
10794        }
10795        ///Returns a mutable reference to `start_checkpoint`.
10796        ///If the field is unset, it is first initialized with the default value.
10797        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10798            self.start_checkpoint.get_or_insert_default()
10799        }
10800        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10801        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10802            self.start_checkpoint.as_ref().map(|field| *field)
10803        }
10804        ///Sets `start_checkpoint` with the provided value.
10805        pub fn set_start_checkpoint(&mut self, field: u64) {
10806            self.start_checkpoint = Some(field);
10807        }
10808        ///Sets `start_checkpoint` with the provided value.
10809        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10810            self.set_start_checkpoint(field);
10811            self
10812        }
10813        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10814        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10815            self.end_checkpoint.as_mut().map(|field| field as _)
10816        }
10817        ///Returns a mutable reference to `end_checkpoint`.
10818        ///If the field is unset, it is first initialized with the default value.
10819        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10820            self.end_checkpoint.get_or_insert_default()
10821        }
10822        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10823        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10824            self.end_checkpoint.as_ref().map(|field| *field)
10825        }
10826        ///Sets `end_checkpoint` with the provided value.
10827        pub fn set_end_checkpoint(&mut self, field: u64) {
10828            self.end_checkpoint = Some(field);
10829        }
10830        ///Sets `end_checkpoint` with the provided value.
10831        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10832            self.set_end_checkpoint(field);
10833            self
10834        }
10835        ///Returns the value of `filter`, or the default value if `filter` is unset.
10836        pub fn filter(&self) -> &super::TransactionFilter {
10837            self.filter
10838                .as_ref()
10839                .map(|field| field as _)
10840                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10841        }
10842        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10843        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10844            self.filter.as_mut().map(|field| field as _)
10845        }
10846        ///Returns a mutable reference to `filter`.
10847        ///If the field is unset, it is first initialized with the default value.
10848        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10849            self.filter.get_or_insert_default()
10850        }
10851        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10852        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10853            self.filter.as_ref().map(|field| field as _)
10854        }
10855        ///Sets `filter` with the provided value.
10856        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10857            self.filter = Some(field.into().into());
10858        }
10859        ///Sets `filter` with the provided value.
10860        pub fn with_filter<T: Into<super::TransactionFilter>>(
10861            mut self,
10862            field: T,
10863        ) -> Self {
10864            self.set_filter(field.into());
10865            self
10866        }
10867        ///Returns the value of `options`, or the default value if `options` is unset.
10868        pub fn options(&self) -> &super::QueryOptions {
10869            self.options
10870                .as_ref()
10871                .map(|field| field as _)
10872                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10873        }
10874        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10875        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10876            self.options.as_mut().map(|field| field as _)
10877        }
10878        ///Returns a mutable reference to `options`.
10879        ///If the field is unset, it is first initialized with the default value.
10880        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10881            self.options.get_or_insert_default()
10882        }
10883        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10884        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10885            self.options.as_ref().map(|field| field as _)
10886        }
10887        ///Sets `options` with the provided value.
10888        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10889            self.options = Some(field.into().into());
10890        }
10891        ///Sets `options` with the provided value.
10892        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10893            self.set_options(field.into());
10894            self
10895        }
10896    }
10897    impl super::ListTransactionsResponse {
10898        pub const fn const_default() -> Self {
10899            Self {
10900                transaction: None,
10901                watermark: None,
10902                end: None,
10903            }
10904        }
10905        #[doc(hidden)]
10906        pub fn default_instance() -> &'static Self {
10907            static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
10908            &DEFAULT
10909        }
10910        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
10911        pub fn transaction(&self) -> &super::ExecutedTransaction {
10912            self.transaction
10913                .as_ref()
10914                .map(|field| field as _)
10915                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
10916        }
10917        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10918        pub fn transaction_opt_mut(
10919            &mut self,
10920        ) -> Option<&mut super::ExecutedTransaction> {
10921            self.transaction.as_mut().map(|field| field as _)
10922        }
10923        ///Returns a mutable reference to `transaction`.
10924        ///If the field is unset, it is first initialized with the default value.
10925        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
10926            self.transaction.get_or_insert_default()
10927        }
10928        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10929        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
10930            self.transaction.as_ref().map(|field| field as _)
10931        }
10932        ///Sets `transaction` with the provided value.
10933        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
10934            &mut self,
10935            field: T,
10936        ) {
10937            self.transaction = Some(field.into().into());
10938        }
10939        ///Sets `transaction` with the provided value.
10940        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
10941            mut self,
10942            field: T,
10943        ) -> Self {
10944            self.set_transaction(field.into());
10945            self
10946        }
10947        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10948        pub fn watermark(&self) -> &super::Watermark {
10949            self.watermark
10950                .as_ref()
10951                .map(|field| field as _)
10952                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10953        }
10954        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10955        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10956            self.watermark.as_mut().map(|field| field as _)
10957        }
10958        ///Returns a mutable reference to `watermark`.
10959        ///If the field is unset, it is first initialized with the default value.
10960        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10961            self.watermark.get_or_insert_default()
10962        }
10963        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10964        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10965            self.watermark.as_ref().map(|field| field as _)
10966        }
10967        ///Sets `watermark` with the provided value.
10968        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10969            self.watermark = Some(field.into().into());
10970        }
10971        ///Sets `watermark` with the provided value.
10972        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10973            self.set_watermark(field.into());
10974            self
10975        }
10976        ///Returns the value of `end`, or the default value if `end` is unset.
10977        pub fn end(&self) -> &super::QueryEnd {
10978            self.end
10979                .as_ref()
10980                .map(|field| field as _)
10981                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10982        }
10983        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10984        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10985            self.end.as_mut().map(|field| field as _)
10986        }
10987        ///Returns a mutable reference to `end`.
10988        ///If the field is unset, it is first initialized with the default value.
10989        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10990            self.end.get_or_insert_default()
10991        }
10992        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10993        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10994            self.end.as_ref().map(|field| field as _)
10995        }
10996        ///Sets `end` with the provided value.
10997        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10998            self.end = Some(field.into().into());
10999        }
11000        ///Sets `end` with the provided value.
11001        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11002            self.set_end(field.into());
11003            self
11004        }
11005    }
11006    impl super::LookupNameRequest {
11007        pub const fn const_default() -> Self {
11008            Self { name: None }
11009        }
11010        #[doc(hidden)]
11011        pub fn default_instance() -> &'static Self {
11012            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11013            &DEFAULT
11014        }
11015        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11016        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11017            self.name.as_mut().map(|field| field as _)
11018        }
11019        ///Returns a mutable reference to `name`.
11020        ///If the field is unset, it is first initialized with the default value.
11021        pub fn name_mut(&mut self) -> &mut String {
11022            self.name.get_or_insert_default()
11023        }
11024        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11025        pub fn name_opt(&self) -> Option<&str> {
11026            self.name.as_ref().map(|field| field as _)
11027        }
11028        ///Sets `name` with the provided value.
11029        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11030            self.name = Some(field.into().into());
11031        }
11032        ///Sets `name` with the provided value.
11033        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11034            self.set_name(field.into());
11035            self
11036        }
11037    }
11038    impl super::LookupNameResponse {
11039        pub const fn const_default() -> Self {
11040            Self { record: None }
11041        }
11042        #[doc(hidden)]
11043        pub fn default_instance() -> &'static Self {
11044            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11045            &DEFAULT
11046        }
11047        ///Returns the value of `record`, or the default value if `record` is unset.
11048        pub fn record(&self) -> &super::NameRecord {
11049            self.record
11050                .as_ref()
11051                .map(|field| field as _)
11052                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11053        }
11054        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11055        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11056            self.record.as_mut().map(|field| field as _)
11057        }
11058        ///Returns a mutable reference to `record`.
11059        ///If the field is unset, it is first initialized with the default value.
11060        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11061            self.record.get_or_insert_default()
11062        }
11063        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11064        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11065            self.record.as_ref().map(|field| field as _)
11066        }
11067        ///Sets `record` with the provided value.
11068        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11069            self.record = Some(field.into().into());
11070        }
11071        ///Sets `record` with the provided value.
11072        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11073            self.set_record(field.into());
11074            self
11075        }
11076    }
11077    impl super::MakeMoveVector {
11078        pub const fn const_default() -> Self {
11079            Self {
11080                element_type: None,
11081                elements: Vec::new(),
11082            }
11083        }
11084        #[doc(hidden)]
11085        pub fn default_instance() -> &'static Self {
11086            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11087            &DEFAULT
11088        }
11089        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11090        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11091            self.element_type.as_mut().map(|field| field as _)
11092        }
11093        ///Returns a mutable reference to `element_type`.
11094        ///If the field is unset, it is first initialized with the default value.
11095        pub fn element_type_mut(&mut self) -> &mut String {
11096            self.element_type.get_or_insert_default()
11097        }
11098        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
11099        pub fn element_type_opt(&self) -> Option<&str> {
11100            self.element_type.as_ref().map(|field| field as _)
11101        }
11102        ///Sets `element_type` with the provided value.
11103        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11104            self.element_type = Some(field.into().into());
11105        }
11106        ///Sets `element_type` with the provided value.
11107        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11108            self.set_element_type(field.into());
11109            self
11110        }
11111        ///Returns the value of `elements`, or the default value if `elements` is unset.
11112        pub fn elements(&self) -> &[super::Argument] {
11113            &self.elements
11114        }
11115        ///Returns a mutable reference to `elements`.
11116        ///If the field is unset, it is first initialized with the default value.
11117        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11118            &mut self.elements
11119        }
11120        ///Sets `elements` with the provided value.
11121        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11122            self.elements = field;
11123        }
11124        ///Sets `elements` with the provided value.
11125        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11126            self.set_elements(field);
11127            self
11128        }
11129    }
11130    impl super::MergeCoins {
11131        pub const fn const_default() -> Self {
11132            Self {
11133                coin: None,
11134                coins_to_merge: Vec::new(),
11135            }
11136        }
11137        #[doc(hidden)]
11138        pub fn default_instance() -> &'static Self {
11139            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11140            &DEFAULT
11141        }
11142        ///Returns the value of `coin`, or the default value if `coin` is unset.
11143        pub fn coin(&self) -> &super::Argument {
11144            self.coin
11145                .as_ref()
11146                .map(|field| field as _)
11147                .unwrap_or_else(|| super::Argument::default_instance() as _)
11148        }
11149        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11150        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11151            self.coin.as_mut().map(|field| field as _)
11152        }
11153        ///Returns a mutable reference to `coin`.
11154        ///If the field is unset, it is first initialized with the default value.
11155        pub fn coin_mut(&mut self) -> &mut super::Argument {
11156            self.coin.get_or_insert_default()
11157        }
11158        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
11159        pub fn coin_opt(&self) -> Option<&super::Argument> {
11160            self.coin.as_ref().map(|field| field as _)
11161        }
11162        ///Sets `coin` with the provided value.
11163        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11164            self.coin = Some(field.into().into());
11165        }
11166        ///Sets `coin` with the provided value.
11167        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11168            self.set_coin(field.into());
11169            self
11170        }
11171        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
11172        pub fn coins_to_merge(&self) -> &[super::Argument] {
11173            &self.coins_to_merge
11174        }
11175        ///Returns a mutable reference to `coins_to_merge`.
11176        ///If the field is unset, it is first initialized with the default value.
11177        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11178            &mut self.coins_to_merge
11179        }
11180        ///Sets `coins_to_merge` with the provided value.
11181        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11182            self.coins_to_merge = field;
11183        }
11184        ///Sets `coins_to_merge` with the provided value.
11185        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11186            self.set_coins_to_merge(field);
11187            self
11188        }
11189    }
11190    impl super::Module {
11191        pub const fn const_default() -> Self {
11192            Self {
11193                name: None,
11194                contents: None,
11195                datatypes: Vec::new(),
11196                functions: Vec::new(),
11197            }
11198        }
11199        #[doc(hidden)]
11200        pub fn default_instance() -> &'static Self {
11201            static DEFAULT: super::Module = super::Module::const_default();
11202            &DEFAULT
11203        }
11204        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11205        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11206            self.name.as_mut().map(|field| field as _)
11207        }
11208        ///Returns a mutable reference to `name`.
11209        ///If the field is unset, it is first initialized with the default value.
11210        pub fn name_mut(&mut self) -> &mut String {
11211            self.name.get_or_insert_default()
11212        }
11213        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11214        pub fn name_opt(&self) -> Option<&str> {
11215            self.name.as_ref().map(|field| field as _)
11216        }
11217        ///Sets `name` with the provided value.
11218        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11219            self.name = Some(field.into().into());
11220        }
11221        ///Sets `name` with the provided value.
11222        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11223            self.set_name(field.into());
11224            self
11225        }
11226        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
11227        pub fn contents_opt(&self) -> Option<&[u8]> {
11228            self.contents.as_ref().map(|field| field as _)
11229        }
11230        ///Sets `contents` with the provided value.
11231        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11232            self.contents = Some(field.into().into());
11233        }
11234        ///Sets `contents` with the provided value.
11235        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11236            mut self,
11237            field: T,
11238        ) -> Self {
11239            self.set_contents(field.into());
11240            self
11241        }
11242        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
11243        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11244            &self.datatypes
11245        }
11246        ///Returns a mutable reference to `datatypes`.
11247        ///If the field is unset, it is first initialized with the default value.
11248        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11249            &mut self.datatypes
11250        }
11251        ///Sets `datatypes` with the provided value.
11252        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11253            self.datatypes = field;
11254        }
11255        ///Sets `datatypes` with the provided value.
11256        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11257            self.set_datatypes(field);
11258            self
11259        }
11260        ///Returns the value of `functions`, or the default value if `functions` is unset.
11261        pub fn functions(&self) -> &[super::FunctionDescriptor] {
11262            &self.functions
11263        }
11264        ///Returns a mutable reference to `functions`.
11265        ///If the field is unset, it is first initialized with the default value.
11266        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11267            &mut self.functions
11268        }
11269        ///Sets `functions` with the provided value.
11270        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11271            self.functions = field;
11272        }
11273        ///Sets `functions` with the provided value.
11274        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11275            self.set_functions(field);
11276            self
11277        }
11278    }
11279    impl super::MoveAbort {
11280        pub const fn const_default() -> Self {
11281            Self {
11282                abort_code: None,
11283                location: None,
11284                clever_error: None,
11285            }
11286        }
11287        #[doc(hidden)]
11288        pub fn default_instance() -> &'static Self {
11289            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11290            &DEFAULT
11291        }
11292        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11293        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11294            self.abort_code.as_mut().map(|field| field as _)
11295        }
11296        ///Returns a mutable reference to `abort_code`.
11297        ///If the field is unset, it is first initialized with the default value.
11298        pub fn abort_code_mut(&mut self) -> &mut u64 {
11299            self.abort_code.get_or_insert_default()
11300        }
11301        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
11302        pub fn abort_code_opt(&self) -> Option<u64> {
11303            self.abort_code.as_ref().map(|field| *field)
11304        }
11305        ///Sets `abort_code` with the provided value.
11306        pub fn set_abort_code(&mut self, field: u64) {
11307            self.abort_code = Some(field);
11308        }
11309        ///Sets `abort_code` with the provided value.
11310        pub fn with_abort_code(mut self, field: u64) -> Self {
11311            self.set_abort_code(field);
11312            self
11313        }
11314        ///Returns the value of `location`, or the default value if `location` is unset.
11315        pub fn location(&self) -> &super::MoveLocation {
11316            self.location
11317                .as_ref()
11318                .map(|field| field as _)
11319                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11320        }
11321        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11322        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11323            self.location.as_mut().map(|field| field as _)
11324        }
11325        ///Returns a mutable reference to `location`.
11326        ///If the field is unset, it is first initialized with the default value.
11327        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11328            self.location.get_or_insert_default()
11329        }
11330        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
11331        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11332            self.location.as_ref().map(|field| field as _)
11333        }
11334        ///Sets `location` with the provided value.
11335        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11336            self.location = Some(field.into().into());
11337        }
11338        ///Sets `location` with the provided value.
11339        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11340            self.set_location(field.into());
11341            self
11342        }
11343        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
11344        pub fn clever_error(&self) -> &super::CleverError {
11345            self.clever_error
11346                .as_ref()
11347                .map(|field| field as _)
11348                .unwrap_or_else(|| super::CleverError::default_instance() as _)
11349        }
11350        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11351        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11352            self.clever_error.as_mut().map(|field| field as _)
11353        }
11354        ///Returns a mutable reference to `clever_error`.
11355        ///If the field is unset, it is first initialized with the default value.
11356        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11357            self.clever_error.get_or_insert_default()
11358        }
11359        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
11360        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11361            self.clever_error.as_ref().map(|field| field as _)
11362        }
11363        ///Sets `clever_error` with the provided value.
11364        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11365            self.clever_error = Some(field.into().into());
11366        }
11367        ///Sets `clever_error` with the provided value.
11368        pub fn with_clever_error<T: Into<super::CleverError>>(
11369            mut self,
11370            field: T,
11371        ) -> Self {
11372            self.set_clever_error(field.into());
11373            self
11374        }
11375    }
11376    impl super::MoveCall {
11377        pub const fn const_default() -> Self {
11378            Self {
11379                package: None,
11380                module: None,
11381                function: None,
11382                type_arguments: Vec::new(),
11383                arguments: Vec::new(),
11384            }
11385        }
11386        #[doc(hidden)]
11387        pub fn default_instance() -> &'static Self {
11388            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11389            &DEFAULT
11390        }
11391        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11392        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11393            self.package.as_mut().map(|field| field as _)
11394        }
11395        ///Returns a mutable reference to `package`.
11396        ///If the field is unset, it is first initialized with the default value.
11397        pub fn package_mut(&mut self) -> &mut String {
11398            self.package.get_or_insert_default()
11399        }
11400        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11401        pub fn package_opt(&self) -> Option<&str> {
11402            self.package.as_ref().map(|field| field as _)
11403        }
11404        ///Sets `package` with the provided value.
11405        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11406            self.package = Some(field.into().into());
11407        }
11408        ///Sets `package` with the provided value.
11409        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11410            self.set_package(field.into());
11411            self
11412        }
11413        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11414        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11415            self.module.as_mut().map(|field| field as _)
11416        }
11417        ///Returns a mutable reference to `module`.
11418        ///If the field is unset, it is first initialized with the default value.
11419        pub fn module_mut(&mut self) -> &mut String {
11420            self.module.get_or_insert_default()
11421        }
11422        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11423        pub fn module_opt(&self) -> Option<&str> {
11424            self.module.as_ref().map(|field| field as _)
11425        }
11426        ///Sets `module` with the provided value.
11427        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11428            self.module = Some(field.into().into());
11429        }
11430        ///Sets `module` with the provided value.
11431        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11432            self.set_module(field.into());
11433            self
11434        }
11435        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11436        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11437            self.function.as_mut().map(|field| field as _)
11438        }
11439        ///Returns a mutable reference to `function`.
11440        ///If the field is unset, it is first initialized with the default value.
11441        pub fn function_mut(&mut self) -> &mut String {
11442            self.function.get_or_insert_default()
11443        }
11444        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11445        pub fn function_opt(&self) -> Option<&str> {
11446            self.function.as_ref().map(|field| field as _)
11447        }
11448        ///Sets `function` with the provided value.
11449        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11450            self.function = Some(field.into().into());
11451        }
11452        ///Sets `function` with the provided value.
11453        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11454            self.set_function(field.into());
11455            self
11456        }
11457        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
11458        pub fn type_arguments(&self) -> &[String] {
11459            &self.type_arguments
11460        }
11461        ///Returns a mutable reference to `type_arguments`.
11462        ///If the field is unset, it is first initialized with the default value.
11463        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11464            &mut self.type_arguments
11465        }
11466        ///Sets `type_arguments` with the provided value.
11467        pub fn set_type_arguments(&mut self, field: Vec<String>) {
11468            self.type_arguments = field;
11469        }
11470        ///Sets `type_arguments` with the provided value.
11471        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11472            self.set_type_arguments(field);
11473            self
11474        }
11475        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
11476        pub fn arguments(&self) -> &[super::Argument] {
11477            &self.arguments
11478        }
11479        ///Returns a mutable reference to `arguments`.
11480        ///If the field is unset, it is first initialized with the default value.
11481        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11482            &mut self.arguments
11483        }
11484        ///Sets `arguments` with the provided value.
11485        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11486            self.arguments = field;
11487        }
11488        ///Sets `arguments` with the provided value.
11489        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11490            self.set_arguments(field);
11491            self
11492        }
11493    }
11494    impl super::MoveCallFilter {
11495        pub const fn const_default() -> Self {
11496            Self { function: None }
11497        }
11498        #[doc(hidden)]
11499        pub fn default_instance() -> &'static Self {
11500            static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11501            &DEFAULT
11502        }
11503        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11504        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11505            self.function.as_mut().map(|field| field as _)
11506        }
11507        ///Returns a mutable reference to `function`.
11508        ///If the field is unset, it is first initialized with the default value.
11509        pub fn function_mut(&mut self) -> &mut String {
11510            self.function.get_or_insert_default()
11511        }
11512        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11513        pub fn function_opt(&self) -> Option<&str> {
11514            self.function.as_ref().map(|field| field as _)
11515        }
11516        ///Sets `function` with the provided value.
11517        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11518            self.function = Some(field.into().into());
11519        }
11520        ///Sets `function` with the provided value.
11521        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11522            self.set_function(field.into());
11523            self
11524        }
11525    }
11526    impl super::MoveLocation {
11527        pub const fn const_default() -> Self {
11528            Self {
11529                package: None,
11530                module: None,
11531                function: None,
11532                instruction: None,
11533                function_name: None,
11534            }
11535        }
11536        #[doc(hidden)]
11537        pub fn default_instance() -> &'static Self {
11538            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11539            &DEFAULT
11540        }
11541        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11542        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11543            self.package.as_mut().map(|field| field as _)
11544        }
11545        ///Returns a mutable reference to `package`.
11546        ///If the field is unset, it is first initialized with the default value.
11547        pub fn package_mut(&mut self) -> &mut String {
11548            self.package.get_or_insert_default()
11549        }
11550        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11551        pub fn package_opt(&self) -> Option<&str> {
11552            self.package.as_ref().map(|field| field as _)
11553        }
11554        ///Sets `package` with the provided value.
11555        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11556            self.package = Some(field.into().into());
11557        }
11558        ///Sets `package` with the provided value.
11559        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11560            self.set_package(field.into());
11561            self
11562        }
11563        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11564        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11565            self.module.as_mut().map(|field| field as _)
11566        }
11567        ///Returns a mutable reference to `module`.
11568        ///If the field is unset, it is first initialized with the default value.
11569        pub fn module_mut(&mut self) -> &mut String {
11570            self.module.get_or_insert_default()
11571        }
11572        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11573        pub fn module_opt(&self) -> Option<&str> {
11574            self.module.as_ref().map(|field| field as _)
11575        }
11576        ///Sets `module` with the provided value.
11577        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11578            self.module = Some(field.into().into());
11579        }
11580        ///Sets `module` with the provided value.
11581        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11582            self.set_module(field.into());
11583            self
11584        }
11585        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11586        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11587            self.function.as_mut().map(|field| field as _)
11588        }
11589        ///Returns a mutable reference to `function`.
11590        ///If the field is unset, it is first initialized with the default value.
11591        pub fn function_mut(&mut self) -> &mut u32 {
11592            self.function.get_or_insert_default()
11593        }
11594        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11595        pub fn function_opt(&self) -> Option<u32> {
11596            self.function.as_ref().map(|field| *field)
11597        }
11598        ///Sets `function` with the provided value.
11599        pub fn set_function(&mut self, field: u32) {
11600            self.function = Some(field);
11601        }
11602        ///Sets `function` with the provided value.
11603        pub fn with_function(mut self, field: u32) -> Self {
11604            self.set_function(field);
11605            self
11606        }
11607        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11608        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11609            self.instruction.as_mut().map(|field| field as _)
11610        }
11611        ///Returns a mutable reference to `instruction`.
11612        ///If the field is unset, it is first initialized with the default value.
11613        pub fn instruction_mut(&mut self) -> &mut u32 {
11614            self.instruction.get_or_insert_default()
11615        }
11616        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11617        pub fn instruction_opt(&self) -> Option<u32> {
11618            self.instruction.as_ref().map(|field| *field)
11619        }
11620        ///Sets `instruction` with the provided value.
11621        pub fn set_instruction(&mut self, field: u32) {
11622            self.instruction = Some(field);
11623        }
11624        ///Sets `instruction` with the provided value.
11625        pub fn with_instruction(mut self, field: u32) -> Self {
11626            self.set_instruction(field);
11627            self
11628        }
11629        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11630        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11631            self.function_name.as_mut().map(|field| field as _)
11632        }
11633        ///Returns a mutable reference to `function_name`.
11634        ///If the field is unset, it is first initialized with the default value.
11635        pub fn function_name_mut(&mut self) -> &mut String {
11636            self.function_name.get_or_insert_default()
11637        }
11638        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11639        pub fn function_name_opt(&self) -> Option<&str> {
11640            self.function_name.as_ref().map(|field| field as _)
11641        }
11642        ///Sets `function_name` with the provided value.
11643        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11644            self.function_name = Some(field.into().into());
11645        }
11646        ///Sets `function_name` with the provided value.
11647        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11648            self.set_function_name(field.into());
11649            self
11650        }
11651    }
11652    impl super::MoveTable {
11653        pub const fn const_default() -> Self {
11654            Self { id: None, size: None }
11655        }
11656        #[doc(hidden)]
11657        pub fn default_instance() -> &'static Self {
11658            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11659            &DEFAULT
11660        }
11661        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11662        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11663            self.id.as_mut().map(|field| field as _)
11664        }
11665        ///Returns a mutable reference to `id`.
11666        ///If the field is unset, it is first initialized with the default value.
11667        pub fn id_mut(&mut self) -> &mut String {
11668            self.id.get_or_insert_default()
11669        }
11670        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11671        pub fn id_opt(&self) -> Option<&str> {
11672            self.id.as_ref().map(|field| field as _)
11673        }
11674        ///Sets `id` with the provided value.
11675        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11676            self.id = Some(field.into().into());
11677        }
11678        ///Sets `id` with the provided value.
11679        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11680            self.set_id(field.into());
11681            self
11682        }
11683        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11684        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11685            self.size.as_mut().map(|field| field as _)
11686        }
11687        ///Returns a mutable reference to `size`.
11688        ///If the field is unset, it is first initialized with the default value.
11689        pub fn size_mut(&mut self) -> &mut u64 {
11690            self.size.get_or_insert_default()
11691        }
11692        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
11693        pub fn size_opt(&self) -> Option<u64> {
11694            self.size.as_ref().map(|field| *field)
11695        }
11696        ///Sets `size` with the provided value.
11697        pub fn set_size(&mut self, field: u64) {
11698            self.size = Some(field);
11699        }
11700        ///Sets `size` with the provided value.
11701        pub fn with_size(mut self, field: u64) -> Self {
11702            self.set_size(field);
11703            self
11704        }
11705    }
11706    impl super::MultisigAggregatedSignature {
11707        pub const fn const_default() -> Self {
11708            Self {
11709                signatures: Vec::new(),
11710                bitmap: None,
11711                legacy_bitmap: None,
11712                committee: None,
11713            }
11714        }
11715        #[doc(hidden)]
11716        pub fn default_instance() -> &'static Self {
11717            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11718            &DEFAULT
11719        }
11720        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
11721        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11722            &self.signatures
11723        }
11724        ///Returns a mutable reference to `signatures`.
11725        ///If the field is unset, it is first initialized with the default value.
11726        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11727            &mut self.signatures
11728        }
11729        ///Sets `signatures` with the provided value.
11730        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11731            self.signatures = field;
11732        }
11733        ///Sets `signatures` with the provided value.
11734        pub fn with_signatures(
11735            mut self,
11736            field: Vec<super::MultisigMemberSignature>,
11737        ) -> Self {
11738            self.set_signatures(field);
11739            self
11740        }
11741        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11742        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11743            self.bitmap.as_mut().map(|field| field as _)
11744        }
11745        ///Returns a mutable reference to `bitmap`.
11746        ///If the field is unset, it is first initialized with the default value.
11747        pub fn bitmap_mut(&mut self) -> &mut u32 {
11748            self.bitmap.get_or_insert_default()
11749        }
11750        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11751        pub fn bitmap_opt(&self) -> Option<u32> {
11752            self.bitmap.as_ref().map(|field| *field)
11753        }
11754        ///Sets `bitmap` with the provided value.
11755        pub fn set_bitmap(&mut self, field: u32) {
11756            self.bitmap = Some(field);
11757        }
11758        ///Sets `bitmap` with the provided value.
11759        pub fn with_bitmap(mut self, field: u32) -> Self {
11760            self.set_bitmap(field);
11761            self
11762        }
11763        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11764        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11765            self.legacy_bitmap.as_ref().map(|field| field as _)
11766        }
11767        ///Sets `legacy_bitmap` with the provided value.
11768        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11769            self.legacy_bitmap = Some(field.into().into());
11770        }
11771        ///Sets `legacy_bitmap` with the provided value.
11772        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11773            mut self,
11774            field: T,
11775        ) -> Self {
11776            self.set_legacy_bitmap(field.into());
11777            self
11778        }
11779        ///Returns the value of `committee`, or the default value if `committee` is unset.
11780        pub fn committee(&self) -> &super::MultisigCommittee {
11781            self.committee
11782                .as_ref()
11783                .map(|field| field as _)
11784                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11785        }
11786        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11787        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11788            self.committee.as_mut().map(|field| field as _)
11789        }
11790        ///Returns a mutable reference to `committee`.
11791        ///If the field is unset, it is first initialized with the default value.
11792        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
11793            self.committee.get_or_insert_default()
11794        }
11795        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
11796        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
11797            self.committee.as_ref().map(|field| field as _)
11798        }
11799        ///Sets `committee` with the provided value.
11800        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
11801            self.committee = Some(field.into().into());
11802        }
11803        ///Sets `committee` with the provided value.
11804        pub fn with_committee<T: Into<super::MultisigCommittee>>(
11805            mut self,
11806            field: T,
11807        ) -> Self {
11808            self.set_committee(field.into());
11809            self
11810        }
11811    }
11812    impl super::MultisigCommittee {
11813        pub const fn const_default() -> Self {
11814            Self {
11815                members: Vec::new(),
11816                threshold: None,
11817            }
11818        }
11819        #[doc(hidden)]
11820        pub fn default_instance() -> &'static Self {
11821            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
11822            &DEFAULT
11823        }
11824        ///Returns the value of `members`, or the default value if `members` is unset.
11825        pub fn members(&self) -> &[super::MultisigMember] {
11826            &self.members
11827        }
11828        ///Returns a mutable reference to `members`.
11829        ///If the field is unset, it is first initialized with the default value.
11830        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
11831            &mut self.members
11832        }
11833        ///Sets `members` with the provided value.
11834        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
11835            self.members = field;
11836        }
11837        ///Sets `members` with the provided value.
11838        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
11839            self.set_members(field);
11840            self
11841        }
11842        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11843        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
11844            self.threshold.as_mut().map(|field| field as _)
11845        }
11846        ///Returns a mutable reference to `threshold`.
11847        ///If the field is unset, it is first initialized with the default value.
11848        pub fn threshold_mut(&mut self) -> &mut u32 {
11849            self.threshold.get_or_insert_default()
11850        }
11851        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
11852        pub fn threshold_opt(&self) -> Option<u32> {
11853            self.threshold.as_ref().map(|field| *field)
11854        }
11855        ///Sets `threshold` with the provided value.
11856        pub fn set_threshold(&mut self, field: u32) {
11857            self.threshold = Some(field);
11858        }
11859        ///Sets `threshold` with the provided value.
11860        pub fn with_threshold(mut self, field: u32) -> Self {
11861            self.set_threshold(field);
11862            self
11863        }
11864    }
11865    impl super::MultisigMember {
11866        pub const fn const_default() -> Self {
11867            Self {
11868                public_key: None,
11869                weight: None,
11870            }
11871        }
11872        #[doc(hidden)]
11873        pub fn default_instance() -> &'static Self {
11874            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
11875            &DEFAULT
11876        }
11877        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
11878        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
11879            self.public_key
11880                .as_ref()
11881                .map(|field| field as _)
11882                .unwrap_or_else(|| {
11883                    super::MultisigMemberPublicKey::default_instance() as _
11884                })
11885        }
11886        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11887        pub fn public_key_opt_mut(
11888            &mut self,
11889        ) -> Option<&mut super::MultisigMemberPublicKey> {
11890            self.public_key.as_mut().map(|field| field as _)
11891        }
11892        ///Returns a mutable reference to `public_key`.
11893        ///If the field is unset, it is first initialized with the default value.
11894        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
11895            self.public_key.get_or_insert_default()
11896        }
11897        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11898        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
11899            self.public_key.as_ref().map(|field| field as _)
11900        }
11901        ///Sets `public_key` with the provided value.
11902        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
11903            &mut self,
11904            field: T,
11905        ) {
11906            self.public_key = Some(field.into().into());
11907        }
11908        ///Sets `public_key` with the provided value.
11909        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
11910            mut self,
11911            field: T,
11912        ) -> Self {
11913            self.set_public_key(field.into());
11914            self
11915        }
11916        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11917        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
11918            self.weight.as_mut().map(|field| field as _)
11919        }
11920        ///Returns a mutable reference to `weight`.
11921        ///If the field is unset, it is first initialized with the default value.
11922        pub fn weight_mut(&mut self) -> &mut u32 {
11923            self.weight.get_or_insert_default()
11924        }
11925        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
11926        pub fn weight_opt(&self) -> Option<u32> {
11927            self.weight.as_ref().map(|field| *field)
11928        }
11929        ///Sets `weight` with the provided value.
11930        pub fn set_weight(&mut self, field: u32) {
11931            self.weight = Some(field);
11932        }
11933        ///Sets `weight` with the provided value.
11934        pub fn with_weight(mut self, field: u32) -> Self {
11935            self.set_weight(field);
11936            self
11937        }
11938    }
11939    impl super::MultisigMemberPublicKey {
11940        pub const fn const_default() -> Self {
11941            Self {
11942                scheme: None,
11943                public_key: None,
11944                zklogin: None,
11945            }
11946        }
11947        #[doc(hidden)]
11948        pub fn default_instance() -> &'static Self {
11949            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
11950            &DEFAULT
11951        }
11952        ///Sets `scheme` with the provided value.
11953        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11954            self.set_scheme(field.into());
11955            self
11956        }
11957        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11958        pub fn public_key_opt(&self) -> Option<&[u8]> {
11959            self.public_key.as_ref().map(|field| field as _)
11960        }
11961        ///Sets `public_key` with the provided value.
11962        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11963            self.public_key = Some(field.into().into());
11964        }
11965        ///Sets `public_key` with the provided value.
11966        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11967            mut self,
11968            field: T,
11969        ) -> Self {
11970            self.set_public_key(field.into());
11971            self
11972        }
11973        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
11974        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
11975            self.zklogin
11976                .as_ref()
11977                .map(|field| field as _)
11978                .unwrap_or_else(|| {
11979                    super::ZkLoginPublicIdentifier::default_instance() as _
11980                })
11981        }
11982        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11983        pub fn zklogin_opt_mut(
11984            &mut self,
11985        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
11986            self.zklogin.as_mut().map(|field| field as _)
11987        }
11988        ///Returns a mutable reference to `zklogin`.
11989        ///If the field is unset, it is first initialized with the default value.
11990        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
11991            self.zklogin.get_or_insert_default()
11992        }
11993        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
11994        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
11995            self.zklogin.as_ref().map(|field| field as _)
11996        }
11997        ///Sets `zklogin` with the provided value.
11998        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
11999            &mut self,
12000            field: T,
12001        ) {
12002            self.zklogin = Some(field.into().into());
12003        }
12004        ///Sets `zklogin` with the provided value.
12005        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12006            mut self,
12007            field: T,
12008        ) -> Self {
12009            self.set_zklogin(field.into());
12010            self
12011        }
12012    }
12013    impl super::MultisigMemberSignature {
12014        pub const fn const_default() -> Self {
12015            Self {
12016                scheme: None,
12017                signature: None,
12018                zklogin: None,
12019                passkey: None,
12020            }
12021        }
12022        #[doc(hidden)]
12023        pub fn default_instance() -> &'static Self {
12024            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12025            &DEFAULT
12026        }
12027        ///Sets `scheme` with the provided value.
12028        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12029            self.set_scheme(field.into());
12030            self
12031        }
12032        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12033        pub fn signature_opt(&self) -> Option<&[u8]> {
12034            self.signature.as_ref().map(|field| field as _)
12035        }
12036        ///Sets `signature` with the provided value.
12037        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12038            self.signature = Some(field.into().into());
12039        }
12040        ///Sets `signature` with the provided value.
12041        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12042            mut self,
12043            field: T,
12044        ) -> Self {
12045            self.set_signature(field.into());
12046            self
12047        }
12048        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12049        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12050            self.zklogin
12051                .as_ref()
12052                .map(|field| field as _)
12053                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12054        }
12055        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12056        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12057            self.zklogin.as_mut().map(|field| field as _)
12058        }
12059        ///Returns a mutable reference to `zklogin`.
12060        ///If the field is unset, it is first initialized with the default value.
12061        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12062            self.zklogin.get_or_insert_default()
12063        }
12064        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12065        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12066            self.zklogin.as_ref().map(|field| field as _)
12067        }
12068        ///Sets `zklogin` with the provided value.
12069        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12070            self.zklogin = Some(field.into().into());
12071        }
12072        ///Sets `zklogin` with the provided value.
12073        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12074            mut self,
12075            field: T,
12076        ) -> Self {
12077            self.set_zklogin(field.into());
12078            self
12079        }
12080        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
12081        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12082            self.passkey
12083                .as_ref()
12084                .map(|field| field as _)
12085                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12086        }
12087        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12088        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12089            self.passkey.as_mut().map(|field| field as _)
12090        }
12091        ///Returns a mutable reference to `passkey`.
12092        ///If the field is unset, it is first initialized with the default value.
12093        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12094            self.passkey.get_or_insert_default()
12095        }
12096        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
12097        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12098            self.passkey.as_ref().map(|field| field as _)
12099        }
12100        ///Sets `passkey` with the provided value.
12101        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12102            self.passkey = Some(field.into().into());
12103        }
12104        ///Sets `passkey` with the provided value.
12105        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12106            mut self,
12107            field: T,
12108        ) -> Self {
12109            self.set_passkey(field.into());
12110            self
12111        }
12112    }
12113    impl super::NameRecord {
12114        pub const fn const_default() -> Self {
12115            Self {
12116                id: None,
12117                name: None,
12118                registration_nft_id: None,
12119                expiration_timestamp: None,
12120                target_address: None,
12121                data: std::collections::BTreeMap::new(),
12122            }
12123        }
12124        #[doc(hidden)]
12125        pub fn default_instance() -> &'static Self {
12126            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12127            &DEFAULT
12128        }
12129        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12130        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12131            self.id.as_mut().map(|field| field as _)
12132        }
12133        ///Returns a mutable reference to `id`.
12134        ///If the field is unset, it is first initialized with the default value.
12135        pub fn id_mut(&mut self) -> &mut String {
12136            self.id.get_or_insert_default()
12137        }
12138        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12139        pub fn id_opt(&self) -> Option<&str> {
12140            self.id.as_ref().map(|field| field as _)
12141        }
12142        ///Sets `id` with the provided value.
12143        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12144            self.id = Some(field.into().into());
12145        }
12146        ///Sets `id` with the provided value.
12147        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12148            self.set_id(field.into());
12149            self
12150        }
12151        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12152        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12153            self.name.as_mut().map(|field| field as _)
12154        }
12155        ///Returns a mutable reference to `name`.
12156        ///If the field is unset, it is first initialized with the default value.
12157        pub fn name_mut(&mut self) -> &mut String {
12158            self.name.get_or_insert_default()
12159        }
12160        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12161        pub fn name_opt(&self) -> Option<&str> {
12162            self.name.as_ref().map(|field| field as _)
12163        }
12164        ///Sets `name` with the provided value.
12165        pub fn set_name<T: Into<String>>(&mut self, field: T) {
12166            self.name = Some(field.into().into());
12167        }
12168        ///Sets `name` with the provided value.
12169        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12170            self.set_name(field.into());
12171            self
12172        }
12173        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12174        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12175            self.registration_nft_id.as_mut().map(|field| field as _)
12176        }
12177        ///Returns a mutable reference to `registration_nft_id`.
12178        ///If the field is unset, it is first initialized with the default value.
12179        pub fn registration_nft_id_mut(&mut self) -> &mut String {
12180            self.registration_nft_id.get_or_insert_default()
12181        }
12182        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12183        pub fn registration_nft_id_opt(&self) -> Option<&str> {
12184            self.registration_nft_id.as_ref().map(|field| field as _)
12185        }
12186        ///Sets `registration_nft_id` with the provided value.
12187        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12188            self.registration_nft_id = Some(field.into().into());
12189        }
12190        ///Sets `registration_nft_id` with the provided value.
12191        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12192            self.set_registration_nft_id(field.into());
12193            self
12194        }
12195        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12196        pub fn expiration_timestamp_opt_mut(
12197            &mut self,
12198        ) -> Option<&mut ::prost_types::Timestamp> {
12199            self.expiration_timestamp.as_mut().map(|field| field as _)
12200        }
12201        ///Returns a mutable reference to `expiration_timestamp`.
12202        ///If the field is unset, it is first initialized with the default value.
12203        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12204            self.expiration_timestamp.get_or_insert_default()
12205        }
12206        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
12207        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12208            self.expiration_timestamp.as_ref().map(|field| field as _)
12209        }
12210        ///Sets `expiration_timestamp` with the provided value.
12211        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12212            &mut self,
12213            field: T,
12214        ) {
12215            self.expiration_timestamp = Some(field.into().into());
12216        }
12217        ///Sets `expiration_timestamp` with the provided value.
12218        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12219            mut self,
12220            field: T,
12221        ) -> Self {
12222            self.set_expiration_timestamp(field.into());
12223            self
12224        }
12225        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12226        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12227            self.target_address.as_mut().map(|field| field as _)
12228        }
12229        ///Returns a mutable reference to `target_address`.
12230        ///If the field is unset, it is first initialized with the default value.
12231        pub fn target_address_mut(&mut self) -> &mut String {
12232            self.target_address.get_or_insert_default()
12233        }
12234        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12235        pub fn target_address_opt(&self) -> Option<&str> {
12236            self.target_address.as_ref().map(|field| field as _)
12237        }
12238        ///Sets `target_address` with the provided value.
12239        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12240            self.target_address = Some(field.into().into());
12241        }
12242        ///Sets `target_address` with the provided value.
12243        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12244            self.set_target_address(field.into());
12245            self
12246        }
12247        ///Returns the value of `data`, or the default value if `data` is unset.
12248        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12249            &self.data
12250        }
12251        ///Returns a mutable reference to `data`.
12252        ///If the field is unset, it is first initialized with the default value.
12253        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12254            &mut self.data
12255        }
12256        ///Sets `data` with the provided value.
12257        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12258            self.data = field;
12259        }
12260        ///Sets `data` with the provided value.
12261        pub fn with_data(
12262            mut self,
12263            field: ::std::collections::BTreeMap<String, String>,
12264        ) -> Self {
12265            self.set_data(field);
12266            self
12267        }
12268    }
12269    impl super::Object {
12270        pub const fn const_default() -> Self {
12271            Self {
12272                bcs: None,
12273                object_id: None,
12274                version: None,
12275                digest: None,
12276                owner: None,
12277                object_type: None,
12278                has_public_transfer: None,
12279                contents: None,
12280                package: None,
12281                previous_transaction: None,
12282                storage_rebate: None,
12283                json: None,
12284                balance: None,
12285                display: None,
12286            }
12287        }
12288        #[doc(hidden)]
12289        pub fn default_instance() -> &'static Self {
12290            static DEFAULT: super::Object = super::Object::const_default();
12291            &DEFAULT
12292        }
12293        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
12294        pub fn bcs(&self) -> &super::Bcs {
12295            self.bcs
12296                .as_ref()
12297                .map(|field| field as _)
12298                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12299        }
12300        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12301        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12302            self.bcs.as_mut().map(|field| field as _)
12303        }
12304        ///Returns a mutable reference to `bcs`.
12305        ///If the field is unset, it is first initialized with the default value.
12306        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12307            self.bcs.get_or_insert_default()
12308        }
12309        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
12310        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12311            self.bcs.as_ref().map(|field| field as _)
12312        }
12313        ///Sets `bcs` with the provided value.
12314        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12315            self.bcs = Some(field.into().into());
12316        }
12317        ///Sets `bcs` with the provided value.
12318        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12319            self.set_bcs(field.into());
12320            self
12321        }
12322        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12323        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12324            self.object_id.as_mut().map(|field| field as _)
12325        }
12326        ///Returns a mutable reference to `object_id`.
12327        ///If the field is unset, it is first initialized with the default value.
12328        pub fn object_id_mut(&mut self) -> &mut String {
12329            self.object_id.get_or_insert_default()
12330        }
12331        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12332        pub fn object_id_opt(&self) -> Option<&str> {
12333            self.object_id.as_ref().map(|field| field as _)
12334        }
12335        ///Sets `object_id` with the provided value.
12336        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12337            self.object_id = Some(field.into().into());
12338        }
12339        ///Sets `object_id` with the provided value.
12340        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12341            self.set_object_id(field.into());
12342            self
12343        }
12344        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12345        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12346            self.version.as_mut().map(|field| field as _)
12347        }
12348        ///Returns a mutable reference to `version`.
12349        ///If the field is unset, it is first initialized with the default value.
12350        pub fn version_mut(&mut self) -> &mut u64 {
12351            self.version.get_or_insert_default()
12352        }
12353        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12354        pub fn version_opt(&self) -> Option<u64> {
12355            self.version.as_ref().map(|field| *field)
12356        }
12357        ///Sets `version` with the provided value.
12358        pub fn set_version(&mut self, field: u64) {
12359            self.version = Some(field);
12360        }
12361        ///Sets `version` with the provided value.
12362        pub fn with_version(mut self, field: u64) -> Self {
12363            self.set_version(field);
12364            self
12365        }
12366        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12367        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12368            self.digest.as_mut().map(|field| field as _)
12369        }
12370        ///Returns a mutable reference to `digest`.
12371        ///If the field is unset, it is first initialized with the default value.
12372        pub fn digest_mut(&mut self) -> &mut String {
12373            self.digest.get_or_insert_default()
12374        }
12375        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12376        pub fn digest_opt(&self) -> Option<&str> {
12377            self.digest.as_ref().map(|field| field as _)
12378        }
12379        ///Sets `digest` with the provided value.
12380        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12381            self.digest = Some(field.into().into());
12382        }
12383        ///Sets `digest` with the provided value.
12384        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12385            self.set_digest(field.into());
12386            self
12387        }
12388        ///Returns the value of `owner`, or the default value if `owner` is unset.
12389        pub fn owner(&self) -> &super::Owner {
12390            self.owner
12391                .as_ref()
12392                .map(|field| field as _)
12393                .unwrap_or_else(|| super::Owner::default_instance() as _)
12394        }
12395        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12396        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12397            self.owner.as_mut().map(|field| field as _)
12398        }
12399        ///Returns a mutable reference to `owner`.
12400        ///If the field is unset, it is first initialized with the default value.
12401        pub fn owner_mut(&mut self) -> &mut super::Owner {
12402            self.owner.get_or_insert_default()
12403        }
12404        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
12405        pub fn owner_opt(&self) -> Option<&super::Owner> {
12406            self.owner.as_ref().map(|field| field as _)
12407        }
12408        ///Sets `owner` with the provided value.
12409        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12410            self.owner = Some(field.into().into());
12411        }
12412        ///Sets `owner` with the provided value.
12413        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12414            self.set_owner(field.into());
12415            self
12416        }
12417        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12418        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12419            self.object_type.as_mut().map(|field| field as _)
12420        }
12421        ///Returns a mutable reference to `object_type`.
12422        ///If the field is unset, it is first initialized with the default value.
12423        pub fn object_type_mut(&mut self) -> &mut String {
12424            self.object_type.get_or_insert_default()
12425        }
12426        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
12427        pub fn object_type_opt(&self) -> Option<&str> {
12428            self.object_type.as_ref().map(|field| field as _)
12429        }
12430        ///Sets `object_type` with the provided value.
12431        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12432            self.object_type = Some(field.into().into());
12433        }
12434        ///Sets `object_type` with the provided value.
12435        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12436            self.set_object_type(field.into());
12437            self
12438        }
12439        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12440        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12441            self.has_public_transfer.as_mut().map(|field| field as _)
12442        }
12443        ///Returns a mutable reference to `has_public_transfer`.
12444        ///If the field is unset, it is first initialized with the default value.
12445        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12446            self.has_public_transfer.get_or_insert_default()
12447        }
12448        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
12449        pub fn has_public_transfer_opt(&self) -> Option<bool> {
12450            self.has_public_transfer.as_ref().map(|field| *field)
12451        }
12452        ///Sets `has_public_transfer` with the provided value.
12453        pub fn set_has_public_transfer(&mut self, field: bool) {
12454            self.has_public_transfer = Some(field);
12455        }
12456        ///Sets `has_public_transfer` with the provided value.
12457        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12458            self.set_has_public_transfer(field);
12459            self
12460        }
12461        ///Returns the value of `contents`, or the default value if `contents` is unset.
12462        pub fn contents(&self) -> &super::Bcs {
12463            self.contents
12464                .as_ref()
12465                .map(|field| field as _)
12466                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12467        }
12468        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12469        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12470            self.contents.as_mut().map(|field| field as _)
12471        }
12472        ///Returns a mutable reference to `contents`.
12473        ///If the field is unset, it is first initialized with the default value.
12474        pub fn contents_mut(&mut self) -> &mut super::Bcs {
12475            self.contents.get_or_insert_default()
12476        }
12477        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
12478        pub fn contents_opt(&self) -> Option<&super::Bcs> {
12479            self.contents.as_ref().map(|field| field as _)
12480        }
12481        ///Sets `contents` with the provided value.
12482        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12483            self.contents = Some(field.into().into());
12484        }
12485        ///Sets `contents` with the provided value.
12486        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12487            self.set_contents(field.into());
12488            self
12489        }
12490        ///Returns the value of `package`, or the default value if `package` is unset.
12491        pub fn package(&self) -> &super::Package {
12492            self.package
12493                .as_ref()
12494                .map(|field| field as _)
12495                .unwrap_or_else(|| super::Package::default_instance() as _)
12496        }
12497        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12498        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12499            self.package.as_mut().map(|field| field as _)
12500        }
12501        ///Returns a mutable reference to `package`.
12502        ///If the field is unset, it is first initialized with the default value.
12503        pub fn package_mut(&mut self) -> &mut super::Package {
12504            self.package.get_or_insert_default()
12505        }
12506        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
12507        pub fn package_opt(&self) -> Option<&super::Package> {
12508            self.package.as_ref().map(|field| field as _)
12509        }
12510        ///Sets `package` with the provided value.
12511        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12512            self.package = Some(field.into().into());
12513        }
12514        ///Sets `package` with the provided value.
12515        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12516            self.set_package(field.into());
12517            self
12518        }
12519        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12520        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12521            self.previous_transaction.as_mut().map(|field| field as _)
12522        }
12523        ///Returns a mutable reference to `previous_transaction`.
12524        ///If the field is unset, it is first initialized with the default value.
12525        pub fn previous_transaction_mut(&mut self) -> &mut String {
12526            self.previous_transaction.get_or_insert_default()
12527        }
12528        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12529        pub fn previous_transaction_opt(&self) -> Option<&str> {
12530            self.previous_transaction.as_ref().map(|field| field as _)
12531        }
12532        ///Sets `previous_transaction` with the provided value.
12533        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12534            self.previous_transaction = Some(field.into().into());
12535        }
12536        ///Sets `previous_transaction` with the provided value.
12537        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12538            self.set_previous_transaction(field.into());
12539            self
12540        }
12541        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12542        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12543            self.storage_rebate.as_mut().map(|field| field as _)
12544        }
12545        ///Returns a mutable reference to `storage_rebate`.
12546        ///If the field is unset, it is first initialized with the default value.
12547        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12548            self.storage_rebate.get_or_insert_default()
12549        }
12550        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12551        pub fn storage_rebate_opt(&self) -> Option<u64> {
12552            self.storage_rebate.as_ref().map(|field| *field)
12553        }
12554        ///Sets `storage_rebate` with the provided value.
12555        pub fn set_storage_rebate(&mut self, field: u64) {
12556            self.storage_rebate = Some(field);
12557        }
12558        ///Sets `storage_rebate` with the provided value.
12559        pub fn with_storage_rebate(mut self, field: u64) -> Self {
12560            self.set_storage_rebate(field);
12561            self
12562        }
12563        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12564        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12565            self.json.as_mut().map(|field| field as _)
12566        }
12567        ///Returns a mutable reference to `json`.
12568        ///If the field is unset, it is first initialized with the default value.
12569        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12570            self.json.get_or_insert_default()
12571        }
12572        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
12573        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12574            self.json.as_ref().map(|field| field as _)
12575        }
12576        ///Sets `json` with the provided value.
12577        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12578            self.json = Some(field.into().into());
12579        }
12580        ///Sets `json` with the provided value.
12581        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12582            self.set_json(field.into());
12583            self
12584        }
12585        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12586        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12587            self.balance.as_mut().map(|field| field as _)
12588        }
12589        ///Returns a mutable reference to `balance`.
12590        ///If the field is unset, it is first initialized with the default value.
12591        pub fn balance_mut(&mut self) -> &mut u64 {
12592            self.balance.get_or_insert_default()
12593        }
12594        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12595        pub fn balance_opt(&self) -> Option<u64> {
12596            self.balance.as_ref().map(|field| *field)
12597        }
12598        ///Sets `balance` with the provided value.
12599        pub fn set_balance(&mut self, field: u64) {
12600            self.balance = Some(field);
12601        }
12602        ///Sets `balance` with the provided value.
12603        pub fn with_balance(mut self, field: u64) -> Self {
12604            self.set_balance(field);
12605            self
12606        }
12607        ///Returns the value of `display`, or the default value if `display` is unset.
12608        pub fn display(&self) -> &super::Display {
12609            self.display
12610                .as_ref()
12611                .map(|field| field as _)
12612                .unwrap_or_else(|| super::Display::default_instance() as _)
12613        }
12614        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12615        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12616            self.display.as_mut().map(|field| field as _)
12617        }
12618        ///Returns a mutable reference to `display`.
12619        ///If the field is unset, it is first initialized with the default value.
12620        pub fn display_mut(&mut self) -> &mut super::Display {
12621            self.display.get_or_insert_default()
12622        }
12623        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
12624        pub fn display_opt(&self) -> Option<&super::Display> {
12625            self.display.as_ref().map(|field| field as _)
12626        }
12627        ///Sets `display` with the provided value.
12628        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12629            self.display = Some(field.into().into());
12630        }
12631        ///Sets `display` with the provided value.
12632        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12633            self.set_display(field.into());
12634            self
12635        }
12636    }
12637    impl super::ObjectReference {
12638        pub const fn const_default() -> Self {
12639            Self {
12640                object_id: None,
12641                version: None,
12642                digest: None,
12643            }
12644        }
12645        #[doc(hidden)]
12646        pub fn default_instance() -> &'static Self {
12647            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12648            &DEFAULT
12649        }
12650        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12651        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12652            self.object_id.as_mut().map(|field| field as _)
12653        }
12654        ///Returns a mutable reference to `object_id`.
12655        ///If the field is unset, it is first initialized with the default value.
12656        pub fn object_id_mut(&mut self) -> &mut String {
12657            self.object_id.get_or_insert_default()
12658        }
12659        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12660        pub fn object_id_opt(&self) -> Option<&str> {
12661            self.object_id.as_ref().map(|field| field as _)
12662        }
12663        ///Sets `object_id` with the provided value.
12664        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12665            self.object_id = Some(field.into().into());
12666        }
12667        ///Sets `object_id` with the provided value.
12668        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12669            self.set_object_id(field.into());
12670            self
12671        }
12672        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12673        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12674            self.version.as_mut().map(|field| field as _)
12675        }
12676        ///Returns a mutable reference to `version`.
12677        ///If the field is unset, it is first initialized with the default value.
12678        pub fn version_mut(&mut self) -> &mut u64 {
12679            self.version.get_or_insert_default()
12680        }
12681        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12682        pub fn version_opt(&self) -> Option<u64> {
12683            self.version.as_ref().map(|field| *field)
12684        }
12685        ///Sets `version` with the provided value.
12686        pub fn set_version(&mut self, field: u64) {
12687            self.version = Some(field);
12688        }
12689        ///Sets `version` with the provided value.
12690        pub fn with_version(mut self, field: u64) -> Self {
12691            self.set_version(field);
12692            self
12693        }
12694        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12695        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12696            self.digest.as_mut().map(|field| field as _)
12697        }
12698        ///Returns a mutable reference to `digest`.
12699        ///If the field is unset, it is first initialized with the default value.
12700        pub fn digest_mut(&mut self) -> &mut String {
12701            self.digest.get_or_insert_default()
12702        }
12703        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12704        pub fn digest_opt(&self) -> Option<&str> {
12705            self.digest.as_ref().map(|field| field as _)
12706        }
12707        ///Sets `digest` with the provided value.
12708        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12709            self.digest = Some(field.into().into());
12710        }
12711        ///Sets `digest` with the provided value.
12712        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12713            self.set_digest(field.into());
12714            self
12715        }
12716    }
12717    impl super::ObjectSet {
12718        pub const fn const_default() -> Self {
12719            Self { objects: Vec::new() }
12720        }
12721        #[doc(hidden)]
12722        pub fn default_instance() -> &'static Self {
12723            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12724            &DEFAULT
12725        }
12726        ///Returns the value of `objects`, or the default value if `objects` is unset.
12727        pub fn objects(&self) -> &[super::Object] {
12728            &self.objects
12729        }
12730        ///Returns a mutable reference to `objects`.
12731        ///If the field is unset, it is first initialized with the default value.
12732        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12733            &mut self.objects
12734        }
12735        ///Sets `objects` with the provided value.
12736        pub fn set_objects(&mut self, field: Vec<super::Object>) {
12737            self.objects = field;
12738        }
12739        ///Sets `objects` with the provided value.
12740        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12741            self.set_objects(field);
12742            self
12743        }
12744    }
12745    impl super::OpenSignature {
12746        pub const fn const_default() -> Self {
12747            Self {
12748                reference: None,
12749                body: None,
12750            }
12751        }
12752        #[doc(hidden)]
12753        pub fn default_instance() -> &'static Self {
12754            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12755            &DEFAULT
12756        }
12757        ///Sets `reference` with the provided value.
12758        pub fn with_reference<T: Into<super::open_signature::Reference>>(
12759            mut self,
12760            field: T,
12761        ) -> Self {
12762            self.set_reference(field.into());
12763            self
12764        }
12765        ///Returns the value of `body`, or the default value if `body` is unset.
12766        pub fn body(&self) -> &super::OpenSignatureBody {
12767            self.body
12768                .as_ref()
12769                .map(|field| field as _)
12770                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12771        }
12772        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12773        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12774            self.body.as_mut().map(|field| field as _)
12775        }
12776        ///Returns a mutable reference to `body`.
12777        ///If the field is unset, it is first initialized with the default value.
12778        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12779            self.body.get_or_insert_default()
12780        }
12781        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
12782        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12783            self.body.as_ref().map(|field| field as _)
12784        }
12785        ///Sets `body` with the provided value.
12786        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12787            self.body = Some(field.into().into());
12788        }
12789        ///Sets `body` with the provided value.
12790        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12791            self.set_body(field.into());
12792            self
12793        }
12794    }
12795    impl super::OpenSignatureBody {
12796        pub const fn const_default() -> Self {
12797            Self {
12798                r#type: None,
12799                type_name: None,
12800                type_parameter_instantiation: Vec::new(),
12801                type_parameter: None,
12802            }
12803        }
12804        #[doc(hidden)]
12805        pub fn default_instance() -> &'static Self {
12806            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
12807            &DEFAULT
12808        }
12809        ///Sets `r#type` with the provided value.
12810        pub fn with_type<T: Into<super::open_signature_body::Type>>(
12811            mut self,
12812            field: T,
12813        ) -> Self {
12814            self.set_type(field.into());
12815            self
12816        }
12817        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12818        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
12819            self.type_name.as_mut().map(|field| field as _)
12820        }
12821        ///Returns a mutable reference to `type_name`.
12822        ///If the field is unset, it is first initialized with the default value.
12823        pub fn type_name_mut(&mut self) -> &mut String {
12824            self.type_name.get_or_insert_default()
12825        }
12826        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12827        pub fn type_name_opt(&self) -> Option<&str> {
12828            self.type_name.as_ref().map(|field| field as _)
12829        }
12830        ///Sets `type_name` with the provided value.
12831        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
12832            self.type_name = Some(field.into().into());
12833        }
12834        ///Sets `type_name` with the provided value.
12835        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
12836            self.set_type_name(field.into());
12837            self
12838        }
12839        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
12840        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
12841            &self.type_parameter_instantiation
12842        }
12843        ///Returns a mutable reference to `type_parameter_instantiation`.
12844        ///If the field is unset, it is first initialized with the default value.
12845        pub fn type_parameter_instantiation_mut(
12846            &mut self,
12847        ) -> &mut Vec<super::OpenSignatureBody> {
12848            &mut self.type_parameter_instantiation
12849        }
12850        ///Sets `type_parameter_instantiation` with the provided value.
12851        pub fn set_type_parameter_instantiation(
12852            &mut self,
12853            field: Vec<super::OpenSignatureBody>,
12854        ) {
12855            self.type_parameter_instantiation = field;
12856        }
12857        ///Sets `type_parameter_instantiation` with the provided value.
12858        pub fn with_type_parameter_instantiation(
12859            mut self,
12860            field: Vec<super::OpenSignatureBody>,
12861        ) -> Self {
12862            self.set_type_parameter_instantiation(field);
12863            self
12864        }
12865        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12866        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
12867            self.type_parameter.as_mut().map(|field| field as _)
12868        }
12869        ///Returns a mutable reference to `type_parameter`.
12870        ///If the field is unset, it is first initialized with the default value.
12871        pub fn type_parameter_mut(&mut self) -> &mut u32 {
12872            self.type_parameter.get_or_insert_default()
12873        }
12874        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12875        pub fn type_parameter_opt(&self) -> Option<u32> {
12876            self.type_parameter.as_ref().map(|field| *field)
12877        }
12878        ///Sets `type_parameter` with the provided value.
12879        pub fn set_type_parameter(&mut self, field: u32) {
12880            self.type_parameter = Some(field);
12881        }
12882        ///Sets `type_parameter` with the provided value.
12883        pub fn with_type_parameter(mut self, field: u32) -> Self {
12884            self.set_type_parameter(field);
12885            self
12886        }
12887    }
12888    impl super::Owner {
12889        pub const fn const_default() -> Self {
12890            Self {
12891                kind: None,
12892                address: None,
12893                version: None,
12894            }
12895        }
12896        #[doc(hidden)]
12897        pub fn default_instance() -> &'static Self {
12898            static DEFAULT: super::Owner = super::Owner::const_default();
12899            &DEFAULT
12900        }
12901        ///Sets `kind` with the provided value.
12902        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
12903            self.set_kind(field.into());
12904            self
12905        }
12906        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12907        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12908            self.address.as_mut().map(|field| field as _)
12909        }
12910        ///Returns a mutable reference to `address`.
12911        ///If the field is unset, it is first initialized with the default value.
12912        pub fn address_mut(&mut self) -> &mut String {
12913            self.address.get_or_insert_default()
12914        }
12915        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12916        pub fn address_opt(&self) -> Option<&str> {
12917            self.address.as_ref().map(|field| field as _)
12918        }
12919        ///Sets `address` with the provided value.
12920        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12921            self.address = Some(field.into().into());
12922        }
12923        ///Sets `address` with the provided value.
12924        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12925            self.set_address(field.into());
12926            self
12927        }
12928        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12929        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12930            self.version.as_mut().map(|field| field as _)
12931        }
12932        ///Returns a mutable reference to `version`.
12933        ///If the field is unset, it is first initialized with the default value.
12934        pub fn version_mut(&mut self) -> &mut u64 {
12935            self.version.get_or_insert_default()
12936        }
12937        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12938        pub fn version_opt(&self) -> Option<u64> {
12939            self.version.as_ref().map(|field| *field)
12940        }
12941        ///Sets `version` with the provided value.
12942        pub fn set_version(&mut self, field: u64) {
12943            self.version = Some(field);
12944        }
12945        ///Sets `version` with the provided value.
12946        pub fn with_version(mut self, field: u64) -> Self {
12947            self.set_version(field);
12948            self
12949        }
12950    }
12951    impl super::Package {
12952        pub const fn const_default() -> Self {
12953            Self {
12954                storage_id: None,
12955                original_id: None,
12956                version: None,
12957                modules: Vec::new(),
12958                type_origins: Vec::new(),
12959                linkage: Vec::new(),
12960            }
12961        }
12962        #[doc(hidden)]
12963        pub fn default_instance() -> &'static Self {
12964            static DEFAULT: super::Package = super::Package::const_default();
12965            &DEFAULT
12966        }
12967        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12968        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
12969            self.storage_id.as_mut().map(|field| field as _)
12970        }
12971        ///Returns a mutable reference to `storage_id`.
12972        ///If the field is unset, it is first initialized with the default value.
12973        pub fn storage_id_mut(&mut self) -> &mut String {
12974            self.storage_id.get_or_insert_default()
12975        }
12976        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12977        pub fn storage_id_opt(&self) -> Option<&str> {
12978            self.storage_id.as_ref().map(|field| field as _)
12979        }
12980        ///Sets `storage_id` with the provided value.
12981        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
12982            self.storage_id = Some(field.into().into());
12983        }
12984        ///Sets `storage_id` with the provided value.
12985        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
12986            self.set_storage_id(field.into());
12987            self
12988        }
12989        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12990        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
12991            self.original_id.as_mut().map(|field| field as _)
12992        }
12993        ///Returns a mutable reference to `original_id`.
12994        ///If the field is unset, it is first initialized with the default value.
12995        pub fn original_id_mut(&mut self) -> &mut String {
12996            self.original_id.get_or_insert_default()
12997        }
12998        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12999        pub fn original_id_opt(&self) -> Option<&str> {
13000            self.original_id.as_ref().map(|field| field as _)
13001        }
13002        ///Sets `original_id` with the provided value.
13003        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13004            self.original_id = Some(field.into().into());
13005        }
13006        ///Sets `original_id` with the provided value.
13007        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13008            self.set_original_id(field.into());
13009            self
13010        }
13011        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13012        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13013            self.version.as_mut().map(|field| field as _)
13014        }
13015        ///Returns a mutable reference to `version`.
13016        ///If the field is unset, it is first initialized with the default value.
13017        pub fn version_mut(&mut self) -> &mut u64 {
13018            self.version.get_or_insert_default()
13019        }
13020        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13021        pub fn version_opt(&self) -> Option<u64> {
13022            self.version.as_ref().map(|field| *field)
13023        }
13024        ///Sets `version` with the provided value.
13025        pub fn set_version(&mut self, field: u64) {
13026            self.version = Some(field);
13027        }
13028        ///Sets `version` with the provided value.
13029        pub fn with_version(mut self, field: u64) -> Self {
13030            self.set_version(field);
13031            self
13032        }
13033        ///Returns the value of `modules`, or the default value if `modules` is unset.
13034        pub fn modules(&self) -> &[super::Module] {
13035            &self.modules
13036        }
13037        ///Returns a mutable reference to `modules`.
13038        ///If the field is unset, it is first initialized with the default value.
13039        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13040            &mut self.modules
13041        }
13042        ///Sets `modules` with the provided value.
13043        pub fn set_modules(&mut self, field: Vec<super::Module>) {
13044            self.modules = field;
13045        }
13046        ///Sets `modules` with the provided value.
13047        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13048            self.set_modules(field);
13049            self
13050        }
13051        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
13052        pub fn type_origins(&self) -> &[super::TypeOrigin] {
13053            &self.type_origins
13054        }
13055        ///Returns a mutable reference to `type_origins`.
13056        ///If the field is unset, it is first initialized with the default value.
13057        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13058            &mut self.type_origins
13059        }
13060        ///Sets `type_origins` with the provided value.
13061        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13062            self.type_origins = field;
13063        }
13064        ///Sets `type_origins` with the provided value.
13065        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13066            self.set_type_origins(field);
13067            self
13068        }
13069        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
13070        pub fn linkage(&self) -> &[super::Linkage] {
13071            &self.linkage
13072        }
13073        ///Returns a mutable reference to `linkage`.
13074        ///If the field is unset, it is first initialized with the default value.
13075        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13076            &mut self.linkage
13077        }
13078        ///Sets `linkage` with the provided value.
13079        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13080            self.linkage = field;
13081        }
13082        ///Sets `linkage` with the provided value.
13083        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13084            self.set_linkage(field);
13085            self
13086        }
13087    }
13088    impl super::PackageUpgradeError {
13089        pub const fn const_default() -> Self {
13090            Self {
13091                kind: None,
13092                package_id: None,
13093                digest: None,
13094                policy: None,
13095                ticket_id: None,
13096            }
13097        }
13098        #[doc(hidden)]
13099        pub fn default_instance() -> &'static Self {
13100            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13101            &DEFAULT
13102        }
13103        ///Sets `kind` with the provided value.
13104        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13105            mut self,
13106            field: T,
13107        ) -> Self {
13108            self.set_kind(field.into());
13109            self
13110        }
13111        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13112        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13113            self.package_id.as_mut().map(|field| field as _)
13114        }
13115        ///Returns a mutable reference to `package_id`.
13116        ///If the field is unset, it is first initialized with the default value.
13117        pub fn package_id_mut(&mut self) -> &mut String {
13118            self.package_id.get_or_insert_default()
13119        }
13120        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13121        pub fn package_id_opt(&self) -> Option<&str> {
13122            self.package_id.as_ref().map(|field| field as _)
13123        }
13124        ///Sets `package_id` with the provided value.
13125        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13126            self.package_id = Some(field.into().into());
13127        }
13128        ///Sets `package_id` with the provided value.
13129        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13130            self.set_package_id(field.into());
13131            self
13132        }
13133        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13134        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13135            self.digest.as_mut().map(|field| field as _)
13136        }
13137        ///Returns a mutable reference to `digest`.
13138        ///If the field is unset, it is first initialized with the default value.
13139        pub fn digest_mut(&mut self) -> &mut String {
13140            self.digest.get_or_insert_default()
13141        }
13142        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13143        pub fn digest_opt(&self) -> Option<&str> {
13144            self.digest.as_ref().map(|field| field as _)
13145        }
13146        ///Sets `digest` with the provided value.
13147        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13148            self.digest = Some(field.into().into());
13149        }
13150        ///Sets `digest` with the provided value.
13151        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13152            self.set_digest(field.into());
13153            self
13154        }
13155        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13156        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13157            self.policy.as_mut().map(|field| field as _)
13158        }
13159        ///Returns a mutable reference to `policy`.
13160        ///If the field is unset, it is first initialized with the default value.
13161        pub fn policy_mut(&mut self) -> &mut u32 {
13162            self.policy.get_or_insert_default()
13163        }
13164        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13165        pub fn policy_opt(&self) -> Option<u32> {
13166            self.policy.as_ref().map(|field| *field)
13167        }
13168        ///Sets `policy` with the provided value.
13169        pub fn set_policy(&mut self, field: u32) {
13170            self.policy = Some(field);
13171        }
13172        ///Sets `policy` with the provided value.
13173        pub fn with_policy(mut self, field: u32) -> Self {
13174            self.set_policy(field);
13175            self
13176        }
13177        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13178        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13179            self.ticket_id.as_mut().map(|field| field as _)
13180        }
13181        ///Returns a mutable reference to `ticket_id`.
13182        ///If the field is unset, it is first initialized with the default value.
13183        pub fn ticket_id_mut(&mut self) -> &mut String {
13184            self.ticket_id.get_or_insert_default()
13185        }
13186        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13187        pub fn ticket_id_opt(&self) -> Option<&str> {
13188            self.ticket_id.as_ref().map(|field| field as _)
13189        }
13190        ///Sets `ticket_id` with the provided value.
13191        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13192            self.ticket_id = Some(field.into().into());
13193        }
13194        ///Sets `ticket_id` with the provided value.
13195        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13196            self.set_ticket_id(field.into());
13197            self
13198        }
13199    }
13200    impl super::PackageVersion {
13201        pub const fn const_default() -> Self {
13202            Self {
13203                package_id: None,
13204                version: None,
13205            }
13206        }
13207        #[doc(hidden)]
13208        pub fn default_instance() -> &'static Self {
13209            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13210            &DEFAULT
13211        }
13212        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13213        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13214            self.package_id.as_mut().map(|field| field as _)
13215        }
13216        ///Returns a mutable reference to `package_id`.
13217        ///If the field is unset, it is first initialized with the default value.
13218        pub fn package_id_mut(&mut self) -> &mut String {
13219            self.package_id.get_or_insert_default()
13220        }
13221        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13222        pub fn package_id_opt(&self) -> Option<&str> {
13223            self.package_id.as_ref().map(|field| field as _)
13224        }
13225        ///Sets `package_id` with the provided value.
13226        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13227            self.package_id = Some(field.into().into());
13228        }
13229        ///Sets `package_id` with the provided value.
13230        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13231            self.set_package_id(field.into());
13232            self
13233        }
13234        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13235        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13236            self.version.as_mut().map(|field| field as _)
13237        }
13238        ///Returns a mutable reference to `version`.
13239        ///If the field is unset, it is first initialized with the default value.
13240        pub fn version_mut(&mut self) -> &mut u64 {
13241            self.version.get_or_insert_default()
13242        }
13243        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13244        pub fn version_opt(&self) -> Option<u64> {
13245            self.version.as_ref().map(|field| *field)
13246        }
13247        ///Sets `version` with the provided value.
13248        pub fn set_version(&mut self, field: u64) {
13249            self.version = Some(field);
13250        }
13251        ///Sets `version` with the provided value.
13252        pub fn with_version(mut self, field: u64) -> Self {
13253            self.set_version(field);
13254            self
13255        }
13256    }
13257    impl super::PackageWriteFilter {
13258        pub const fn const_default() -> Self {
13259            Self {}
13260        }
13261        #[doc(hidden)]
13262        pub fn default_instance() -> &'static Self {
13263            static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13264            &DEFAULT
13265        }
13266    }
13267    impl super::PasskeyAuthenticator {
13268        pub const fn const_default() -> Self {
13269            Self {
13270                authenticator_data: None,
13271                client_data_json: None,
13272                signature: None,
13273            }
13274        }
13275        #[doc(hidden)]
13276        pub fn default_instance() -> &'static Self {
13277            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13278            &DEFAULT
13279        }
13280        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
13281        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13282            self.authenticator_data.as_ref().map(|field| field as _)
13283        }
13284        ///Sets `authenticator_data` with the provided value.
13285        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13286            &mut self,
13287            field: T,
13288        ) {
13289            self.authenticator_data = Some(field.into().into());
13290        }
13291        ///Sets `authenticator_data` with the provided value.
13292        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13293            mut self,
13294            field: T,
13295        ) -> Self {
13296            self.set_authenticator_data(field.into());
13297            self
13298        }
13299        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13300        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13301            self.client_data_json.as_mut().map(|field| field as _)
13302        }
13303        ///Returns a mutable reference to `client_data_json`.
13304        ///If the field is unset, it is first initialized with the default value.
13305        pub fn client_data_json_mut(&mut self) -> &mut String {
13306            self.client_data_json.get_or_insert_default()
13307        }
13308        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
13309        pub fn client_data_json_opt(&self) -> Option<&str> {
13310            self.client_data_json.as_ref().map(|field| field as _)
13311        }
13312        ///Sets `client_data_json` with the provided value.
13313        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13314            self.client_data_json = Some(field.into().into());
13315        }
13316        ///Sets `client_data_json` with the provided value.
13317        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13318            self.set_client_data_json(field.into());
13319            self
13320        }
13321        ///Returns the value of `signature`, or the default value if `signature` is unset.
13322        pub fn signature(&self) -> &super::SimpleSignature {
13323            self.signature
13324                .as_ref()
13325                .map(|field| field as _)
13326                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13327        }
13328        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13329        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13330            self.signature.as_mut().map(|field| field as _)
13331        }
13332        ///Returns a mutable reference to `signature`.
13333        ///If the field is unset, it is first initialized with the default value.
13334        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13335            self.signature.get_or_insert_default()
13336        }
13337        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
13338        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13339            self.signature.as_ref().map(|field| field as _)
13340        }
13341        ///Sets `signature` with the provided value.
13342        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13343            self.signature = Some(field.into().into());
13344        }
13345        ///Sets `signature` with the provided value.
13346        pub fn with_signature<T: Into<super::SimpleSignature>>(
13347            mut self,
13348            field: T,
13349        ) -> Self {
13350            self.set_signature(field.into());
13351            self
13352        }
13353    }
13354    impl super::ProgrammableTransaction {
13355        pub const fn const_default() -> Self {
13356            Self {
13357                inputs: Vec::new(),
13358                commands: Vec::new(),
13359            }
13360        }
13361        #[doc(hidden)]
13362        pub fn default_instance() -> &'static Self {
13363            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13364            &DEFAULT
13365        }
13366        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
13367        pub fn inputs(&self) -> &[super::Input] {
13368            &self.inputs
13369        }
13370        ///Returns a mutable reference to `inputs`.
13371        ///If the field is unset, it is first initialized with the default value.
13372        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13373            &mut self.inputs
13374        }
13375        ///Sets `inputs` with the provided value.
13376        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13377            self.inputs = field;
13378        }
13379        ///Sets `inputs` with the provided value.
13380        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13381            self.set_inputs(field);
13382            self
13383        }
13384        ///Returns the value of `commands`, or the default value if `commands` is unset.
13385        pub fn commands(&self) -> &[super::Command] {
13386            &self.commands
13387        }
13388        ///Returns a mutable reference to `commands`.
13389        ///If the field is unset, it is first initialized with the default value.
13390        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13391            &mut self.commands
13392        }
13393        ///Sets `commands` with the provided value.
13394        pub fn set_commands(&mut self, field: Vec<super::Command>) {
13395            self.commands = field;
13396        }
13397        ///Sets `commands` with the provided value.
13398        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13399            self.set_commands(field);
13400            self
13401        }
13402    }
13403    impl super::ProtocolConfig {
13404        pub const fn const_default() -> Self {
13405            Self {
13406                protocol_version: None,
13407                feature_flags: std::collections::BTreeMap::new(),
13408                attributes: std::collections::BTreeMap::new(),
13409                configs: std::collections::BTreeMap::new(),
13410            }
13411        }
13412        #[doc(hidden)]
13413        pub fn default_instance() -> &'static Self {
13414            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13415            &DEFAULT
13416        }
13417        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13418        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13419            self.protocol_version.as_mut().map(|field| field as _)
13420        }
13421        ///Returns a mutable reference to `protocol_version`.
13422        ///If the field is unset, it is first initialized with the default value.
13423        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13424            self.protocol_version.get_or_insert_default()
13425        }
13426        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13427        pub fn protocol_version_opt(&self) -> Option<u64> {
13428            self.protocol_version.as_ref().map(|field| *field)
13429        }
13430        ///Sets `protocol_version` with the provided value.
13431        pub fn set_protocol_version(&mut self, field: u64) {
13432            self.protocol_version = Some(field);
13433        }
13434        ///Sets `protocol_version` with the provided value.
13435        pub fn with_protocol_version(mut self, field: u64) -> Self {
13436            self.set_protocol_version(field);
13437            self
13438        }
13439        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
13440        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13441            &self.feature_flags
13442        }
13443        ///Returns a mutable reference to `feature_flags`.
13444        ///If the field is unset, it is first initialized with the default value.
13445        pub fn feature_flags_mut(
13446            &mut self,
13447        ) -> &mut ::std::collections::BTreeMap<String, bool> {
13448            &mut self.feature_flags
13449        }
13450        ///Sets `feature_flags` with the provided value.
13451        pub fn set_feature_flags(
13452            &mut self,
13453            field: ::std::collections::BTreeMap<String, bool>,
13454        ) {
13455            self.feature_flags = field;
13456        }
13457        ///Sets `feature_flags` with the provided value.
13458        pub fn with_feature_flags(
13459            mut self,
13460            field: ::std::collections::BTreeMap<String, bool>,
13461        ) -> Self {
13462            self.set_feature_flags(field);
13463            self
13464        }
13465        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
13466        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13467            &self.attributes
13468        }
13469        ///Returns a mutable reference to `attributes`.
13470        ///If the field is unset, it is first initialized with the default value.
13471        pub fn attributes_mut(
13472            &mut self,
13473        ) -> &mut ::std::collections::BTreeMap<String, String> {
13474            &mut self.attributes
13475        }
13476        ///Sets `attributes` with the provided value.
13477        pub fn set_attributes(
13478            &mut self,
13479            field: ::std::collections::BTreeMap<String, String>,
13480        ) {
13481            self.attributes = field;
13482        }
13483        ///Sets `attributes` with the provided value.
13484        pub fn with_attributes(
13485            mut self,
13486            field: ::std::collections::BTreeMap<String, String>,
13487        ) -> Self {
13488            self.set_attributes(field);
13489            self
13490        }
13491        ///Returns the value of `configs`, or the default value if `configs` is unset.
13492        pub fn configs(
13493            &self,
13494        ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13495            &self.configs
13496        }
13497        ///Returns a mutable reference to `configs`.
13498        ///If the field is unset, it is first initialized with the default value.
13499        pub fn configs_mut(
13500            &mut self,
13501        ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13502            &mut self.configs
13503        }
13504        ///Sets `configs` with the provided value.
13505        pub fn set_configs(
13506            &mut self,
13507            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13508        ) {
13509            self.configs = field;
13510        }
13511        ///Sets `configs` with the provided value.
13512        pub fn with_configs(
13513            mut self,
13514            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13515        ) -> Self {
13516            self.set_configs(field);
13517            self
13518        }
13519    }
13520    impl super::Publish {
13521        pub const fn const_default() -> Self {
13522            Self {
13523                modules: Vec::new(),
13524                dependencies: Vec::new(),
13525            }
13526        }
13527        #[doc(hidden)]
13528        pub fn default_instance() -> &'static Self {
13529            static DEFAULT: super::Publish = super::Publish::const_default();
13530            &DEFAULT
13531        }
13532        ///Returns the value of `modules`, or the default value if `modules` is unset.
13533        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13534            &self.modules
13535        }
13536        ///Returns a mutable reference to `modules`.
13537        ///If the field is unset, it is first initialized with the default value.
13538        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13539            &mut self.modules
13540        }
13541        ///Sets `modules` with the provided value.
13542        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13543            self.modules = field;
13544        }
13545        ///Sets `modules` with the provided value.
13546        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13547            self.set_modules(field);
13548            self
13549        }
13550        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13551        pub fn dependencies(&self) -> &[String] {
13552            &self.dependencies
13553        }
13554        ///Returns a mutable reference to `dependencies`.
13555        ///If the field is unset, it is first initialized with the default value.
13556        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13557            &mut self.dependencies
13558        }
13559        ///Sets `dependencies` with the provided value.
13560        pub fn set_dependencies(&mut self, field: Vec<String>) {
13561            self.dependencies = field;
13562        }
13563        ///Sets `dependencies` with the provided value.
13564        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13565            self.set_dependencies(field);
13566            self
13567        }
13568    }
13569    impl super::QueryEnd {
13570        pub const fn const_default() -> Self {
13571            Self { reason: None }
13572        }
13573        #[doc(hidden)]
13574        pub fn default_instance() -> &'static Self {
13575            static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13576            &DEFAULT
13577        }
13578        ///Sets `reason` with the provided value.
13579        pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13580            self.set_reason(field.into());
13581            self
13582        }
13583    }
13584    impl super::QueryOptions {
13585        pub const fn const_default() -> Self {
13586            Self {
13587                limit: None,
13588                after: None,
13589                before: None,
13590                ordering: None,
13591            }
13592        }
13593        #[doc(hidden)]
13594        pub fn default_instance() -> &'static Self {
13595            static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13596            &DEFAULT
13597        }
13598        ///If `limit` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13599        pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13600            self.limit.as_mut().map(|field| field as _)
13601        }
13602        ///Returns a mutable reference to `limit`.
13603        ///If the field is unset, it is first initialized with the default value.
13604        pub fn limit_mut(&mut self) -> &mut u32 {
13605            self.limit.get_or_insert_default()
13606        }
13607        ///If `limit` is set, returns [`Some`] with the value; otherwise returns [`None`].
13608        pub fn limit_opt(&self) -> Option<u32> {
13609            self.limit.as_ref().map(|field| *field)
13610        }
13611        ///Sets `limit` with the provided value.
13612        pub fn set_limit(&mut self, field: u32) {
13613            self.limit = Some(field);
13614        }
13615        ///Sets `limit` with the provided value.
13616        pub fn with_limit(mut self, field: u32) -> Self {
13617            self.set_limit(field);
13618            self
13619        }
13620        ///If `after` is set, returns [`Some`] with the value; otherwise returns [`None`].
13621        pub fn after_opt(&self) -> Option<&[u8]> {
13622            self.after.as_ref().map(|field| field as _)
13623        }
13624        ///Sets `after` with the provided value.
13625        pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13626            self.after = Some(field.into().into());
13627        }
13628        ///Sets `after` with the provided value.
13629        pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13630            self.set_after(field.into());
13631            self
13632        }
13633        ///If `before` is set, returns [`Some`] with the value; otherwise returns [`None`].
13634        pub fn before_opt(&self) -> Option<&[u8]> {
13635            self.before.as_ref().map(|field| field as _)
13636        }
13637        ///Sets `before` with the provided value.
13638        pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13639            self.before = Some(field.into().into());
13640        }
13641        ///Sets `before` with the provided value.
13642        pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13643            self.set_before(field.into());
13644            self
13645        }
13646        ///Sets `ordering` with the provided value.
13647        pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13648            self.set_ordering(field.into());
13649            self
13650        }
13651    }
13652    impl super::RandomnessStateUpdate {
13653        pub const fn const_default() -> Self {
13654            Self {
13655                epoch: None,
13656                randomness_round: None,
13657                random_bytes: None,
13658                randomness_object_initial_shared_version: None,
13659            }
13660        }
13661        #[doc(hidden)]
13662        pub fn default_instance() -> &'static Self {
13663            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13664            &DEFAULT
13665        }
13666        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13667        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13668            self.epoch.as_mut().map(|field| field as _)
13669        }
13670        ///Returns a mutable reference to `epoch`.
13671        ///If the field is unset, it is first initialized with the default value.
13672        pub fn epoch_mut(&mut self) -> &mut u64 {
13673            self.epoch.get_or_insert_default()
13674        }
13675        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13676        pub fn epoch_opt(&self) -> Option<u64> {
13677            self.epoch.as_ref().map(|field| *field)
13678        }
13679        ///Sets `epoch` with the provided value.
13680        pub fn set_epoch(&mut self, field: u64) {
13681            self.epoch = Some(field);
13682        }
13683        ///Sets `epoch` with the provided value.
13684        pub fn with_epoch(mut self, field: u64) -> Self {
13685            self.set_epoch(field);
13686            self
13687        }
13688        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13689        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13690            self.randomness_round.as_mut().map(|field| field as _)
13691        }
13692        ///Returns a mutable reference to `randomness_round`.
13693        ///If the field is unset, it is first initialized with the default value.
13694        pub fn randomness_round_mut(&mut self) -> &mut u64 {
13695            self.randomness_round.get_or_insert_default()
13696        }
13697        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
13698        pub fn randomness_round_opt(&self) -> Option<u64> {
13699            self.randomness_round.as_ref().map(|field| *field)
13700        }
13701        ///Sets `randomness_round` with the provided value.
13702        pub fn set_randomness_round(&mut self, field: u64) {
13703            self.randomness_round = Some(field);
13704        }
13705        ///Sets `randomness_round` with the provided value.
13706        pub fn with_randomness_round(mut self, field: u64) -> Self {
13707            self.set_randomness_round(field);
13708            self
13709        }
13710        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
13711        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13712            self.random_bytes.as_ref().map(|field| field as _)
13713        }
13714        ///Sets `random_bytes` with the provided value.
13715        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13716            self.random_bytes = Some(field.into().into());
13717        }
13718        ///Sets `random_bytes` with the provided value.
13719        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13720            mut self,
13721            field: T,
13722        ) -> Self {
13723            self.set_random_bytes(field.into());
13724            self
13725        }
13726        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13727        pub fn randomness_object_initial_shared_version_opt_mut(
13728            &mut self,
13729        ) -> Option<&mut u64> {
13730            self.randomness_object_initial_shared_version
13731                .as_mut()
13732                .map(|field| field as _)
13733        }
13734        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
13735        ///If the field is unset, it is first initialized with the default value.
13736        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13737            self.randomness_object_initial_shared_version.get_or_insert_default()
13738        }
13739        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13740        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13741            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13742        }
13743        ///Sets `randomness_object_initial_shared_version` with the provided value.
13744        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13745            self.randomness_object_initial_shared_version = Some(field);
13746        }
13747        ///Sets `randomness_object_initial_shared_version` with the provided value.
13748        pub fn with_randomness_object_initial_shared_version(
13749            mut self,
13750            field: u64,
13751        ) -> Self {
13752            self.set_randomness_object_initial_shared_version(field);
13753            self
13754        }
13755    }
13756    impl super::RegulatedCoinMetadata {
13757        pub const fn const_default() -> Self {
13758            Self {
13759                id: None,
13760                coin_metadata_object: None,
13761                deny_cap_object: None,
13762                allow_global_pause: None,
13763                variant: None,
13764                coin_regulated_state: None,
13765            }
13766        }
13767        #[doc(hidden)]
13768        pub fn default_instance() -> &'static Self {
13769            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13770            &DEFAULT
13771        }
13772        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13773        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13774            self.id.as_mut().map(|field| field as _)
13775        }
13776        ///Returns a mutable reference to `id`.
13777        ///If the field is unset, it is first initialized with the default value.
13778        pub fn id_mut(&mut self) -> &mut String {
13779            self.id.get_or_insert_default()
13780        }
13781        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13782        pub fn id_opt(&self) -> Option<&str> {
13783            self.id.as_ref().map(|field| field as _)
13784        }
13785        ///Sets `id` with the provided value.
13786        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13787            self.id = Some(field.into().into());
13788        }
13789        ///Sets `id` with the provided value.
13790        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13791            self.set_id(field.into());
13792            self
13793        }
13794        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13795        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
13796            self.coin_metadata_object.as_mut().map(|field| field as _)
13797        }
13798        ///Returns a mutable reference to `coin_metadata_object`.
13799        ///If the field is unset, it is first initialized with the default value.
13800        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
13801            self.coin_metadata_object.get_or_insert_default()
13802        }
13803        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13804        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
13805            self.coin_metadata_object.as_ref().map(|field| field as _)
13806        }
13807        ///Sets `coin_metadata_object` with the provided value.
13808        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
13809            self.coin_metadata_object = Some(field.into().into());
13810        }
13811        ///Sets `coin_metadata_object` with the provided value.
13812        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
13813            self.set_coin_metadata_object(field.into());
13814            self
13815        }
13816        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13817        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
13818            self.deny_cap_object.as_mut().map(|field| field as _)
13819        }
13820        ///Returns a mutable reference to `deny_cap_object`.
13821        ///If the field is unset, it is first initialized with the default value.
13822        pub fn deny_cap_object_mut(&mut self) -> &mut String {
13823            self.deny_cap_object.get_or_insert_default()
13824        }
13825        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13826        pub fn deny_cap_object_opt(&self) -> Option<&str> {
13827            self.deny_cap_object.as_ref().map(|field| field as _)
13828        }
13829        ///Sets `deny_cap_object` with the provided value.
13830        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
13831            self.deny_cap_object = Some(field.into().into());
13832        }
13833        ///Sets `deny_cap_object` with the provided value.
13834        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
13835            self.set_deny_cap_object(field.into());
13836            self
13837        }
13838        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13839        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
13840            self.allow_global_pause.as_mut().map(|field| field as _)
13841        }
13842        ///Returns a mutable reference to `allow_global_pause`.
13843        ///If the field is unset, it is first initialized with the default value.
13844        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
13845            self.allow_global_pause.get_or_insert_default()
13846        }
13847        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
13848        pub fn allow_global_pause_opt(&self) -> Option<bool> {
13849            self.allow_global_pause.as_ref().map(|field| *field)
13850        }
13851        ///Sets `allow_global_pause` with the provided value.
13852        pub fn set_allow_global_pause(&mut self, field: bool) {
13853            self.allow_global_pause = Some(field);
13854        }
13855        ///Sets `allow_global_pause` with the provided value.
13856        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
13857            self.set_allow_global_pause(field);
13858            self
13859        }
13860        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13861        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
13862            self.variant.as_mut().map(|field| field as _)
13863        }
13864        ///Returns a mutable reference to `variant`.
13865        ///If the field is unset, it is first initialized with the default value.
13866        pub fn variant_mut(&mut self) -> &mut u32 {
13867            self.variant.get_or_insert_default()
13868        }
13869        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
13870        pub fn variant_opt(&self) -> Option<u32> {
13871            self.variant.as_ref().map(|field| *field)
13872        }
13873        ///Sets `variant` with the provided value.
13874        pub fn set_variant(&mut self, field: u32) {
13875            self.variant = Some(field);
13876        }
13877        ///Sets `variant` with the provided value.
13878        pub fn with_variant(mut self, field: u32) -> Self {
13879            self.set_variant(field);
13880            self
13881        }
13882        ///Sets `coin_regulated_state` with the provided value.
13883        pub fn with_coin_regulated_state<
13884            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
13885        >(mut self, field: T) -> Self {
13886            self.set_coin_regulated_state(field.into());
13887            self
13888        }
13889    }
13890    impl super::ReverseLookupNameRequest {
13891        pub const fn const_default() -> Self {
13892            Self { address: None }
13893        }
13894        #[doc(hidden)]
13895        pub fn default_instance() -> &'static Self {
13896            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
13897            &DEFAULT
13898        }
13899        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13900        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13901            self.address.as_mut().map(|field| field as _)
13902        }
13903        ///Returns a mutable reference to `address`.
13904        ///If the field is unset, it is first initialized with the default value.
13905        pub fn address_mut(&mut self) -> &mut String {
13906            self.address.get_or_insert_default()
13907        }
13908        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
13909        pub fn address_opt(&self) -> Option<&str> {
13910            self.address.as_ref().map(|field| field as _)
13911        }
13912        ///Sets `address` with the provided value.
13913        pub fn set_address<T: Into<String>>(&mut self, field: T) {
13914            self.address = Some(field.into().into());
13915        }
13916        ///Sets `address` with the provided value.
13917        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13918            self.set_address(field.into());
13919            self
13920        }
13921    }
13922    impl super::ReverseLookupNameResponse {
13923        pub const fn const_default() -> Self {
13924            Self { record: None }
13925        }
13926        #[doc(hidden)]
13927        pub fn default_instance() -> &'static Self {
13928            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
13929            &DEFAULT
13930        }
13931        ///Returns the value of `record`, or the default value if `record` is unset.
13932        pub fn record(&self) -> &super::NameRecord {
13933            self.record
13934                .as_ref()
13935                .map(|field| field as _)
13936                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
13937        }
13938        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13939        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
13940            self.record.as_mut().map(|field| field as _)
13941        }
13942        ///Returns a mutable reference to `record`.
13943        ///If the field is unset, it is first initialized with the default value.
13944        pub fn record_mut(&mut self) -> &mut super::NameRecord {
13945            self.record.get_or_insert_default()
13946        }
13947        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
13948        pub fn record_opt(&self) -> Option<&super::NameRecord> {
13949            self.record.as_ref().map(|field| field as _)
13950        }
13951        ///Sets `record` with the provided value.
13952        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
13953            self.record = Some(field.into().into());
13954        }
13955        ///Sets `record` with the provided value.
13956        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
13957            self.set_record(field.into());
13958            self
13959        }
13960    }
13961    impl super::SenderFilter {
13962        pub const fn const_default() -> Self {
13963            Self { address: None }
13964        }
13965        #[doc(hidden)]
13966        pub fn default_instance() -> &'static Self {
13967            static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
13968            &DEFAULT
13969        }
13970        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13971        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13972            self.address.as_mut().map(|field| field as _)
13973        }
13974        ///Returns a mutable reference to `address`.
13975        ///If the field is unset, it is first initialized with the default value.
13976        pub fn address_mut(&mut self) -> &mut String {
13977            self.address.get_or_insert_default()
13978        }
13979        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
13980        pub fn address_opt(&self) -> Option<&str> {
13981            self.address.as_ref().map(|field| field as _)
13982        }
13983        ///Sets `address` with the provided value.
13984        pub fn set_address<T: Into<String>>(&mut self, field: T) {
13985            self.address = Some(field.into().into());
13986        }
13987        ///Sets `address` with the provided value.
13988        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13989            self.set_address(field.into());
13990            self
13991        }
13992    }
13993    impl super::SimpleSignature {
13994        pub const fn const_default() -> Self {
13995            Self {
13996                scheme: None,
13997                signature: None,
13998                public_key: None,
13999            }
14000        }
14001        #[doc(hidden)]
14002        pub fn default_instance() -> &'static Self {
14003            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14004            &DEFAULT
14005        }
14006        ///Sets `scheme` with the provided value.
14007        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14008            self.set_scheme(field.into());
14009            self
14010        }
14011        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
14012        pub fn signature_opt(&self) -> Option<&[u8]> {
14013            self.signature.as_ref().map(|field| field as _)
14014        }
14015        ///Sets `signature` with the provided value.
14016        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14017            self.signature = Some(field.into().into());
14018        }
14019        ///Sets `signature` with the provided value.
14020        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14021            mut self,
14022            field: T,
14023        ) -> Self {
14024            self.set_signature(field.into());
14025            self
14026        }
14027        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
14028        pub fn public_key_opt(&self) -> Option<&[u8]> {
14029            self.public_key.as_ref().map(|field| field as _)
14030        }
14031        ///Sets `public_key` with the provided value.
14032        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14033            self.public_key = Some(field.into().into());
14034        }
14035        ///Sets `public_key` with the provided value.
14036        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14037            mut self,
14038            field: T,
14039        ) -> Self {
14040            self.set_public_key(field.into());
14041            self
14042        }
14043    }
14044    impl super::SimulateTransactionRequest {
14045        pub const fn const_default() -> Self {
14046            Self {
14047                transaction: None,
14048                read_mask: None,
14049                checks: None,
14050                do_gas_selection: None,
14051            }
14052        }
14053        #[doc(hidden)]
14054        pub fn default_instance() -> &'static Self {
14055            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14056            &DEFAULT
14057        }
14058        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14059        pub fn transaction(&self) -> &super::Transaction {
14060            self.transaction
14061                .as_ref()
14062                .map(|field| field as _)
14063                .unwrap_or_else(|| super::Transaction::default_instance() as _)
14064        }
14065        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14066        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14067            self.transaction.as_mut().map(|field| field as _)
14068        }
14069        ///Returns a mutable reference to `transaction`.
14070        ///If the field is unset, it is first initialized with the default value.
14071        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14072            self.transaction.get_or_insert_default()
14073        }
14074        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14075        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14076            self.transaction.as_ref().map(|field| field as _)
14077        }
14078        ///Sets `transaction` with the provided value.
14079        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14080            self.transaction = Some(field.into().into());
14081        }
14082        ///Sets `transaction` with the provided value.
14083        pub fn with_transaction<T: Into<super::Transaction>>(
14084            mut self,
14085            field: T,
14086        ) -> Self {
14087            self.set_transaction(field.into());
14088            self
14089        }
14090        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14091        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14092            self.read_mask.as_mut().map(|field| field as _)
14093        }
14094        ///Returns a mutable reference to `read_mask`.
14095        ///If the field is unset, it is first initialized with the default value.
14096        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14097            self.read_mask.get_or_insert_default()
14098        }
14099        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14100        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14101            self.read_mask.as_ref().map(|field| field as _)
14102        }
14103        ///Sets `read_mask` with the provided value.
14104        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14105            self.read_mask = Some(field.into().into());
14106        }
14107        ///Sets `read_mask` with the provided value.
14108        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14109            mut self,
14110            field: T,
14111        ) -> Self {
14112            self.set_read_mask(field.into());
14113            self
14114        }
14115        ///Sets `checks` with the provided value.
14116        pub fn with_checks<
14117            T: Into<super::simulate_transaction_request::TransactionChecks>,
14118        >(mut self, field: T) -> Self {
14119            self.set_checks(field.into());
14120            self
14121        }
14122        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14123        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14124            self.do_gas_selection.as_mut().map(|field| field as _)
14125        }
14126        ///Returns a mutable reference to `do_gas_selection`.
14127        ///If the field is unset, it is first initialized with the default value.
14128        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14129            self.do_gas_selection.get_or_insert_default()
14130        }
14131        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
14132        pub fn do_gas_selection_opt(&self) -> Option<bool> {
14133            self.do_gas_selection.as_ref().map(|field| *field)
14134        }
14135        ///Sets `do_gas_selection` with the provided value.
14136        pub fn set_do_gas_selection(&mut self, field: bool) {
14137            self.do_gas_selection = Some(field);
14138        }
14139        ///Sets `do_gas_selection` with the provided value.
14140        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14141            self.set_do_gas_selection(field);
14142            self
14143        }
14144    }
14145    impl super::SimulateTransactionResponse {
14146        pub const fn const_default() -> Self {
14147            Self {
14148                transaction: None,
14149                command_outputs: Vec::new(),
14150                suggested_gas_price: None,
14151            }
14152        }
14153        #[doc(hidden)]
14154        pub fn default_instance() -> &'static Self {
14155            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14156            &DEFAULT
14157        }
14158        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14159        pub fn transaction(&self) -> &super::ExecutedTransaction {
14160            self.transaction
14161                .as_ref()
14162                .map(|field| field as _)
14163                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14164        }
14165        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14166        pub fn transaction_opt_mut(
14167            &mut self,
14168        ) -> Option<&mut super::ExecutedTransaction> {
14169            self.transaction.as_mut().map(|field| field as _)
14170        }
14171        ///Returns a mutable reference to `transaction`.
14172        ///If the field is unset, it is first initialized with the default value.
14173        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14174            self.transaction.get_or_insert_default()
14175        }
14176        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14177        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14178            self.transaction.as_ref().map(|field| field as _)
14179        }
14180        ///Sets `transaction` with the provided value.
14181        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14182            &mut self,
14183            field: T,
14184        ) {
14185            self.transaction = Some(field.into().into());
14186        }
14187        ///Sets `transaction` with the provided value.
14188        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14189            mut self,
14190            field: T,
14191        ) -> Self {
14192            self.set_transaction(field.into());
14193            self
14194        }
14195        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
14196        pub fn command_outputs(&self) -> &[super::CommandResult] {
14197            &self.command_outputs
14198        }
14199        ///Returns a mutable reference to `command_outputs`.
14200        ///If the field is unset, it is first initialized with the default value.
14201        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14202            &mut self.command_outputs
14203        }
14204        ///Sets `command_outputs` with the provided value.
14205        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14206            self.command_outputs = field;
14207        }
14208        ///Sets `command_outputs` with the provided value.
14209        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14210            self.set_command_outputs(field);
14211            self
14212        }
14213        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14214        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14215            self.suggested_gas_price.as_mut().map(|field| field as _)
14216        }
14217        ///Returns a mutable reference to `suggested_gas_price`.
14218        ///If the field is unset, it is first initialized with the default value.
14219        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14220            self.suggested_gas_price.get_or_insert_default()
14221        }
14222        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
14223        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14224            self.suggested_gas_price.as_ref().map(|field| *field)
14225        }
14226        ///Sets `suggested_gas_price` with the provided value.
14227        pub fn set_suggested_gas_price(&mut self, field: u64) {
14228            self.suggested_gas_price = Some(field);
14229        }
14230        ///Sets `suggested_gas_price` with the provided value.
14231        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14232            self.set_suggested_gas_price(field);
14233            self
14234        }
14235    }
14236    impl super::SizeError {
14237        pub const fn const_default() -> Self {
14238            Self { size: None, max_size: None }
14239        }
14240        #[doc(hidden)]
14241        pub fn default_instance() -> &'static Self {
14242            static DEFAULT: super::SizeError = super::SizeError::const_default();
14243            &DEFAULT
14244        }
14245        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14246        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14247            self.size.as_mut().map(|field| field as _)
14248        }
14249        ///Returns a mutable reference to `size`.
14250        ///If the field is unset, it is first initialized with the default value.
14251        pub fn size_mut(&mut self) -> &mut u64 {
14252            self.size.get_or_insert_default()
14253        }
14254        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14255        pub fn size_opt(&self) -> Option<u64> {
14256            self.size.as_ref().map(|field| *field)
14257        }
14258        ///Sets `size` with the provided value.
14259        pub fn set_size(&mut self, field: u64) {
14260            self.size = Some(field);
14261        }
14262        ///Sets `size` with the provided value.
14263        pub fn with_size(mut self, field: u64) -> Self {
14264            self.set_size(field);
14265            self
14266        }
14267        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14268        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14269            self.max_size.as_mut().map(|field| field as _)
14270        }
14271        ///Returns a mutable reference to `max_size`.
14272        ///If the field is unset, it is first initialized with the default value.
14273        pub fn max_size_mut(&mut self) -> &mut u64 {
14274            self.max_size.get_or_insert_default()
14275        }
14276        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14277        pub fn max_size_opt(&self) -> Option<u64> {
14278            self.max_size.as_ref().map(|field| *field)
14279        }
14280        ///Sets `max_size` with the provided value.
14281        pub fn set_max_size(&mut self, field: u64) {
14282            self.max_size = Some(field);
14283        }
14284        ///Sets `max_size` with the provided value.
14285        pub fn with_max_size(mut self, field: u64) -> Self {
14286            self.set_max_size(field);
14287            self
14288        }
14289    }
14290    impl super::SplitCoins {
14291        pub const fn const_default() -> Self {
14292            Self {
14293                coin: None,
14294                amounts: Vec::new(),
14295            }
14296        }
14297        #[doc(hidden)]
14298        pub fn default_instance() -> &'static Self {
14299            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14300            &DEFAULT
14301        }
14302        ///Returns the value of `coin`, or the default value if `coin` is unset.
14303        pub fn coin(&self) -> &super::Argument {
14304            self.coin
14305                .as_ref()
14306                .map(|field| field as _)
14307                .unwrap_or_else(|| super::Argument::default_instance() as _)
14308        }
14309        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14310        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14311            self.coin.as_mut().map(|field| field as _)
14312        }
14313        ///Returns a mutable reference to `coin`.
14314        ///If the field is unset, it is first initialized with the default value.
14315        pub fn coin_mut(&mut self) -> &mut super::Argument {
14316            self.coin.get_or_insert_default()
14317        }
14318        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
14319        pub fn coin_opt(&self) -> Option<&super::Argument> {
14320            self.coin.as_ref().map(|field| field as _)
14321        }
14322        ///Sets `coin` with the provided value.
14323        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14324            self.coin = Some(field.into().into());
14325        }
14326        ///Sets `coin` with the provided value.
14327        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14328            self.set_coin(field.into());
14329            self
14330        }
14331        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
14332        pub fn amounts(&self) -> &[super::Argument] {
14333            &self.amounts
14334        }
14335        ///Returns a mutable reference to `amounts`.
14336        ///If the field is unset, it is first initialized with the default value.
14337        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14338            &mut self.amounts
14339        }
14340        ///Sets `amounts` with the provided value.
14341        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14342            self.amounts = field;
14343        }
14344        ///Sets `amounts` with the provided value.
14345        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14346            self.set_amounts(field);
14347            self
14348        }
14349    }
14350    impl super::StakeSubsidy {
14351        pub const fn const_default() -> Self {
14352            Self {
14353                balance: None,
14354                distribution_counter: None,
14355                current_distribution_amount: None,
14356                stake_subsidy_period_length: None,
14357                stake_subsidy_decrease_rate: None,
14358                extra_fields: None,
14359            }
14360        }
14361        #[doc(hidden)]
14362        pub fn default_instance() -> &'static Self {
14363            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14364            &DEFAULT
14365        }
14366        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14367        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14368            self.balance.as_mut().map(|field| field as _)
14369        }
14370        ///Returns a mutable reference to `balance`.
14371        ///If the field is unset, it is first initialized with the default value.
14372        pub fn balance_mut(&mut self) -> &mut u64 {
14373            self.balance.get_or_insert_default()
14374        }
14375        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14376        pub fn balance_opt(&self) -> Option<u64> {
14377            self.balance.as_ref().map(|field| *field)
14378        }
14379        ///Sets `balance` with the provided value.
14380        pub fn set_balance(&mut self, field: u64) {
14381            self.balance = Some(field);
14382        }
14383        ///Sets `balance` with the provided value.
14384        pub fn with_balance(mut self, field: u64) -> Self {
14385            self.set_balance(field);
14386            self
14387        }
14388        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14389        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14390            self.distribution_counter.as_mut().map(|field| field as _)
14391        }
14392        ///Returns a mutable reference to `distribution_counter`.
14393        ///If the field is unset, it is first initialized with the default value.
14394        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14395            self.distribution_counter.get_or_insert_default()
14396        }
14397        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14398        pub fn distribution_counter_opt(&self) -> Option<u64> {
14399            self.distribution_counter.as_ref().map(|field| *field)
14400        }
14401        ///Sets `distribution_counter` with the provided value.
14402        pub fn set_distribution_counter(&mut self, field: u64) {
14403            self.distribution_counter = Some(field);
14404        }
14405        ///Sets `distribution_counter` with the provided value.
14406        pub fn with_distribution_counter(mut self, field: u64) -> Self {
14407            self.set_distribution_counter(field);
14408            self
14409        }
14410        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14411        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14412            self.current_distribution_amount.as_mut().map(|field| field as _)
14413        }
14414        ///Returns a mutable reference to `current_distribution_amount`.
14415        ///If the field is unset, it is first initialized with the default value.
14416        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14417            self.current_distribution_amount.get_or_insert_default()
14418        }
14419        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
14420        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14421            self.current_distribution_amount.as_ref().map(|field| *field)
14422        }
14423        ///Sets `current_distribution_amount` with the provided value.
14424        pub fn set_current_distribution_amount(&mut self, field: u64) {
14425            self.current_distribution_amount = Some(field);
14426        }
14427        ///Sets `current_distribution_amount` with the provided value.
14428        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14429            self.set_current_distribution_amount(field);
14430            self
14431        }
14432        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14433        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14434            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14435        }
14436        ///Returns a mutable reference to `stake_subsidy_period_length`.
14437        ///If the field is unset, it is first initialized with the default value.
14438        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14439            self.stake_subsidy_period_length.get_or_insert_default()
14440        }
14441        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
14442        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14443            self.stake_subsidy_period_length.as_ref().map(|field| *field)
14444        }
14445        ///Sets `stake_subsidy_period_length` with the provided value.
14446        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14447            self.stake_subsidy_period_length = Some(field);
14448        }
14449        ///Sets `stake_subsidy_period_length` with the provided value.
14450        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14451            self.set_stake_subsidy_period_length(field);
14452            self
14453        }
14454        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14455        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14456            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14457        }
14458        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
14459        ///If the field is unset, it is first initialized with the default value.
14460        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14461            self.stake_subsidy_decrease_rate.get_or_insert_default()
14462        }
14463        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
14464        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14465            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14466        }
14467        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14468        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14469            self.stake_subsidy_decrease_rate = Some(field);
14470        }
14471        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14472        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14473            self.set_stake_subsidy_decrease_rate(field);
14474            self
14475        }
14476        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14477        pub fn extra_fields(&self) -> &super::MoveTable {
14478            self.extra_fields
14479                .as_ref()
14480                .map(|field| field as _)
14481                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14482        }
14483        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14484        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14485            self.extra_fields.as_mut().map(|field| field as _)
14486        }
14487        ///Returns a mutable reference to `extra_fields`.
14488        ///If the field is unset, it is first initialized with the default value.
14489        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14490            self.extra_fields.get_or_insert_default()
14491        }
14492        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14493        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14494            self.extra_fields.as_ref().map(|field| field as _)
14495        }
14496        ///Sets `extra_fields` with the provided value.
14497        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14498            self.extra_fields = Some(field.into().into());
14499        }
14500        ///Sets `extra_fields` with the provided value.
14501        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14502            self.set_extra_fields(field.into());
14503            self
14504        }
14505    }
14506    impl super::StakingPool {
14507        pub const fn const_default() -> Self {
14508            Self {
14509                id: None,
14510                activation_epoch: None,
14511                deactivation_epoch: None,
14512                sui_balance: None,
14513                rewards_pool: None,
14514                pool_token_balance: None,
14515                exchange_rates: None,
14516                pending_stake: None,
14517                pending_total_sui_withdraw: None,
14518                pending_pool_token_withdraw: None,
14519                extra_fields: None,
14520            }
14521        }
14522        #[doc(hidden)]
14523        pub fn default_instance() -> &'static Self {
14524            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14525            &DEFAULT
14526        }
14527        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14528        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14529            self.id.as_mut().map(|field| field as _)
14530        }
14531        ///Returns a mutable reference to `id`.
14532        ///If the field is unset, it is first initialized with the default value.
14533        pub fn id_mut(&mut self) -> &mut String {
14534            self.id.get_or_insert_default()
14535        }
14536        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14537        pub fn id_opt(&self) -> Option<&str> {
14538            self.id.as_ref().map(|field| field as _)
14539        }
14540        ///Sets `id` with the provided value.
14541        pub fn set_id<T: Into<String>>(&mut self, field: T) {
14542            self.id = Some(field.into().into());
14543        }
14544        ///Sets `id` with the provided value.
14545        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14546            self.set_id(field.into());
14547            self
14548        }
14549        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14550        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14551            self.activation_epoch.as_mut().map(|field| field as _)
14552        }
14553        ///Returns a mutable reference to `activation_epoch`.
14554        ///If the field is unset, it is first initialized with the default value.
14555        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14556            self.activation_epoch.get_or_insert_default()
14557        }
14558        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14559        pub fn activation_epoch_opt(&self) -> Option<u64> {
14560            self.activation_epoch.as_ref().map(|field| *field)
14561        }
14562        ///Sets `activation_epoch` with the provided value.
14563        pub fn set_activation_epoch(&mut self, field: u64) {
14564            self.activation_epoch = Some(field);
14565        }
14566        ///Sets `activation_epoch` with the provided value.
14567        pub fn with_activation_epoch(mut self, field: u64) -> Self {
14568            self.set_activation_epoch(field);
14569            self
14570        }
14571        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14572        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14573            self.deactivation_epoch.as_mut().map(|field| field as _)
14574        }
14575        ///Returns a mutable reference to `deactivation_epoch`.
14576        ///If the field is unset, it is first initialized with the default value.
14577        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14578            self.deactivation_epoch.get_or_insert_default()
14579        }
14580        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14581        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14582            self.deactivation_epoch.as_ref().map(|field| *field)
14583        }
14584        ///Sets `deactivation_epoch` with the provided value.
14585        pub fn set_deactivation_epoch(&mut self, field: u64) {
14586            self.deactivation_epoch = Some(field);
14587        }
14588        ///Sets `deactivation_epoch` with the provided value.
14589        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14590            self.set_deactivation_epoch(field);
14591            self
14592        }
14593        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14594        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14595            self.sui_balance.as_mut().map(|field| field as _)
14596        }
14597        ///Returns a mutable reference to `sui_balance`.
14598        ///If the field is unset, it is first initialized with the default value.
14599        pub fn sui_balance_mut(&mut self) -> &mut u64 {
14600            self.sui_balance.get_or_insert_default()
14601        }
14602        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14603        pub fn sui_balance_opt(&self) -> Option<u64> {
14604            self.sui_balance.as_ref().map(|field| *field)
14605        }
14606        ///Sets `sui_balance` with the provided value.
14607        pub fn set_sui_balance(&mut self, field: u64) {
14608            self.sui_balance = Some(field);
14609        }
14610        ///Sets `sui_balance` with the provided value.
14611        pub fn with_sui_balance(mut self, field: u64) -> Self {
14612            self.set_sui_balance(field);
14613            self
14614        }
14615        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14616        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14617            self.rewards_pool.as_mut().map(|field| field as _)
14618        }
14619        ///Returns a mutable reference to `rewards_pool`.
14620        ///If the field is unset, it is first initialized with the default value.
14621        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14622            self.rewards_pool.get_or_insert_default()
14623        }
14624        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
14625        pub fn rewards_pool_opt(&self) -> Option<u64> {
14626            self.rewards_pool.as_ref().map(|field| *field)
14627        }
14628        ///Sets `rewards_pool` with the provided value.
14629        pub fn set_rewards_pool(&mut self, field: u64) {
14630            self.rewards_pool = Some(field);
14631        }
14632        ///Sets `rewards_pool` with the provided value.
14633        pub fn with_rewards_pool(mut self, field: u64) -> Self {
14634            self.set_rewards_pool(field);
14635            self
14636        }
14637        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14638        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14639            self.pool_token_balance.as_mut().map(|field| field as _)
14640        }
14641        ///Returns a mutable reference to `pool_token_balance`.
14642        ///If the field is unset, it is first initialized with the default value.
14643        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14644            self.pool_token_balance.get_or_insert_default()
14645        }
14646        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14647        pub fn pool_token_balance_opt(&self) -> Option<u64> {
14648            self.pool_token_balance.as_ref().map(|field| *field)
14649        }
14650        ///Sets `pool_token_balance` with the provided value.
14651        pub fn set_pool_token_balance(&mut self, field: u64) {
14652            self.pool_token_balance = Some(field);
14653        }
14654        ///Sets `pool_token_balance` with the provided value.
14655        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14656            self.set_pool_token_balance(field);
14657            self
14658        }
14659        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
14660        pub fn exchange_rates(&self) -> &super::MoveTable {
14661            self.exchange_rates
14662                .as_ref()
14663                .map(|field| field as _)
14664                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14665        }
14666        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14667        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14668            self.exchange_rates.as_mut().map(|field| field as _)
14669        }
14670        ///Returns a mutable reference to `exchange_rates`.
14671        ///If the field is unset, it is first initialized with the default value.
14672        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14673            self.exchange_rates.get_or_insert_default()
14674        }
14675        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14676        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14677            self.exchange_rates.as_ref().map(|field| field as _)
14678        }
14679        ///Sets `exchange_rates` with the provided value.
14680        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14681            self.exchange_rates = Some(field.into().into());
14682        }
14683        ///Sets `exchange_rates` with the provided value.
14684        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14685            mut self,
14686            field: T,
14687        ) -> Self {
14688            self.set_exchange_rates(field.into());
14689            self
14690        }
14691        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14692        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14693            self.pending_stake.as_mut().map(|field| field as _)
14694        }
14695        ///Returns a mutable reference to `pending_stake`.
14696        ///If the field is unset, it is first initialized with the default value.
14697        pub fn pending_stake_mut(&mut self) -> &mut u64 {
14698            self.pending_stake.get_or_insert_default()
14699        }
14700        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
14701        pub fn pending_stake_opt(&self) -> Option<u64> {
14702            self.pending_stake.as_ref().map(|field| *field)
14703        }
14704        ///Sets `pending_stake` with the provided value.
14705        pub fn set_pending_stake(&mut self, field: u64) {
14706            self.pending_stake = Some(field);
14707        }
14708        ///Sets `pending_stake` with the provided value.
14709        pub fn with_pending_stake(mut self, field: u64) -> Self {
14710            self.set_pending_stake(field);
14711            self
14712        }
14713        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14714        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14715            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14716        }
14717        ///Returns a mutable reference to `pending_total_sui_withdraw`.
14718        ///If the field is unset, it is first initialized with the default value.
14719        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14720            self.pending_total_sui_withdraw.get_or_insert_default()
14721        }
14722        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14723        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14724            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14725        }
14726        ///Sets `pending_total_sui_withdraw` with the provided value.
14727        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14728            self.pending_total_sui_withdraw = Some(field);
14729        }
14730        ///Sets `pending_total_sui_withdraw` with the provided value.
14731        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14732            self.set_pending_total_sui_withdraw(field);
14733            self
14734        }
14735        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14736        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14737            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14738        }
14739        ///Returns a mutable reference to `pending_pool_token_withdraw`.
14740        ///If the field is unset, it is first initialized with the default value.
14741        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14742            self.pending_pool_token_withdraw.get_or_insert_default()
14743        }
14744        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14745        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14746            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14747        }
14748        ///Sets `pending_pool_token_withdraw` with the provided value.
14749        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14750            self.pending_pool_token_withdraw = Some(field);
14751        }
14752        ///Sets `pending_pool_token_withdraw` with the provided value.
14753        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14754            self.set_pending_pool_token_withdraw(field);
14755            self
14756        }
14757        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14758        pub fn extra_fields(&self) -> &super::MoveTable {
14759            self.extra_fields
14760                .as_ref()
14761                .map(|field| field as _)
14762                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14763        }
14764        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14765        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14766            self.extra_fields.as_mut().map(|field| field as _)
14767        }
14768        ///Returns a mutable reference to `extra_fields`.
14769        ///If the field is unset, it is first initialized with the default value.
14770        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14771            self.extra_fields.get_or_insert_default()
14772        }
14773        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14774        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14775            self.extra_fields.as_ref().map(|field| field as _)
14776        }
14777        ///Sets `extra_fields` with the provided value.
14778        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14779            self.extra_fields = Some(field.into().into());
14780        }
14781        ///Sets `extra_fields` with the provided value.
14782        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14783            self.set_extra_fields(field.into());
14784            self
14785        }
14786    }
14787    impl super::StorageFund {
14788        pub const fn const_default() -> Self {
14789            Self {
14790                total_object_storage_rebates: None,
14791                non_refundable_balance: None,
14792            }
14793        }
14794        #[doc(hidden)]
14795        pub fn default_instance() -> &'static Self {
14796            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
14797            &DEFAULT
14798        }
14799        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14800        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14801            self.total_object_storage_rebates.as_mut().map(|field| field as _)
14802        }
14803        ///Returns a mutable reference to `total_object_storage_rebates`.
14804        ///If the field is unset, it is first initialized with the default value.
14805        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
14806            self.total_object_storage_rebates.get_or_insert_default()
14807        }
14808        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14809        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
14810            self.total_object_storage_rebates.as_ref().map(|field| *field)
14811        }
14812        ///Sets `total_object_storage_rebates` with the provided value.
14813        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
14814            self.total_object_storage_rebates = Some(field);
14815        }
14816        ///Sets `total_object_storage_rebates` with the provided value.
14817        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
14818            self.set_total_object_storage_rebates(field);
14819            self
14820        }
14821        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14822        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
14823            self.non_refundable_balance.as_mut().map(|field| field as _)
14824        }
14825        ///Returns a mutable reference to `non_refundable_balance`.
14826        ///If the field is unset, it is first initialized with the default value.
14827        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
14828            self.non_refundable_balance.get_or_insert_default()
14829        }
14830        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14831        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
14832            self.non_refundable_balance.as_ref().map(|field| *field)
14833        }
14834        ///Sets `non_refundable_balance` with the provided value.
14835        pub fn set_non_refundable_balance(&mut self, field: u64) {
14836            self.non_refundable_balance = Some(field);
14837        }
14838        ///Sets `non_refundable_balance` with the provided value.
14839        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
14840            self.set_non_refundable_balance(field);
14841            self
14842        }
14843    }
14844    impl super::SubscribeCheckpointsRequest {
14845        pub const fn const_default() -> Self {
14846            Self {
14847                read_mask: None,
14848                filter: None,
14849            }
14850        }
14851        #[doc(hidden)]
14852        pub fn default_instance() -> &'static Self {
14853            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
14854            &DEFAULT
14855        }
14856        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14857        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14858            self.read_mask.as_mut().map(|field| field as _)
14859        }
14860        ///Returns a mutable reference to `read_mask`.
14861        ///If the field is unset, it is first initialized with the default value.
14862        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14863            self.read_mask.get_or_insert_default()
14864        }
14865        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14866        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14867            self.read_mask.as_ref().map(|field| field as _)
14868        }
14869        ///Sets `read_mask` with the provided value.
14870        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14871            self.read_mask = Some(field.into().into());
14872        }
14873        ///Sets `read_mask` with the provided value.
14874        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14875            mut self,
14876            field: T,
14877        ) -> Self {
14878            self.set_read_mask(field.into());
14879            self
14880        }
14881        ///Returns the value of `filter`, or the default value if `filter` is unset.
14882        pub fn filter(&self) -> &super::TransactionFilter {
14883            self.filter
14884                .as_ref()
14885                .map(|field| field as _)
14886                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
14887        }
14888        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14889        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
14890            self.filter.as_mut().map(|field| field as _)
14891        }
14892        ///Returns a mutable reference to `filter`.
14893        ///If the field is unset, it is first initialized with the default value.
14894        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
14895            self.filter.get_or_insert_default()
14896        }
14897        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14898        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
14899            self.filter.as_ref().map(|field| field as _)
14900        }
14901        ///Sets `filter` with the provided value.
14902        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
14903            self.filter = Some(field.into().into());
14904        }
14905        ///Sets `filter` with the provided value.
14906        pub fn with_filter<T: Into<super::TransactionFilter>>(
14907            mut self,
14908            field: T,
14909        ) -> Self {
14910            self.set_filter(field.into());
14911            self
14912        }
14913    }
14914    impl super::SubscribeCheckpointsResponse {
14915        pub const fn const_default() -> Self {
14916            Self {
14917                cursor: None,
14918                checkpoint: None,
14919            }
14920        }
14921        #[doc(hidden)]
14922        pub fn default_instance() -> &'static Self {
14923            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
14924            &DEFAULT
14925        }
14926        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14927        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
14928            self.cursor.as_mut().map(|field| field as _)
14929        }
14930        ///Returns a mutable reference to `cursor`.
14931        ///If the field is unset, it is first initialized with the default value.
14932        pub fn cursor_mut(&mut self) -> &mut u64 {
14933            self.cursor.get_or_insert_default()
14934        }
14935        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
14936        pub fn cursor_opt(&self) -> Option<u64> {
14937            self.cursor.as_ref().map(|field| *field)
14938        }
14939        ///Sets `cursor` with the provided value.
14940        pub fn set_cursor(&mut self, field: u64) {
14941            self.cursor = Some(field);
14942        }
14943        ///Sets `cursor` with the provided value.
14944        pub fn with_cursor(mut self, field: u64) -> Self {
14945            self.set_cursor(field);
14946            self
14947        }
14948        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
14949        pub fn checkpoint(&self) -> &super::Checkpoint {
14950            self.checkpoint
14951                .as_ref()
14952                .map(|field| field as _)
14953                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
14954        }
14955        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14956        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
14957            self.checkpoint.as_mut().map(|field| field as _)
14958        }
14959        ///Returns a mutable reference to `checkpoint`.
14960        ///If the field is unset, it is first initialized with the default value.
14961        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
14962            self.checkpoint.get_or_insert_default()
14963        }
14964        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
14965        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
14966            self.checkpoint.as_ref().map(|field| field as _)
14967        }
14968        ///Sets `checkpoint` with the provided value.
14969        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
14970            self.checkpoint = Some(field.into().into());
14971        }
14972        ///Sets `checkpoint` with the provided value.
14973        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
14974            self.set_checkpoint(field.into());
14975            self
14976        }
14977    }
14978    impl super::SubscribeEventsRequest {
14979        pub const fn const_default() -> Self {
14980            Self {
14981                read_mask: None,
14982                filter: None,
14983            }
14984        }
14985        #[doc(hidden)]
14986        pub fn default_instance() -> &'static Self {
14987            static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
14988            &DEFAULT
14989        }
14990        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14991        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14992            self.read_mask.as_mut().map(|field| field as _)
14993        }
14994        ///Returns a mutable reference to `read_mask`.
14995        ///If the field is unset, it is first initialized with the default value.
14996        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14997            self.read_mask.get_or_insert_default()
14998        }
14999        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15000        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15001            self.read_mask.as_ref().map(|field| field as _)
15002        }
15003        ///Sets `read_mask` with the provided value.
15004        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15005            self.read_mask = Some(field.into().into());
15006        }
15007        ///Sets `read_mask` with the provided value.
15008        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15009            mut self,
15010            field: T,
15011        ) -> Self {
15012            self.set_read_mask(field.into());
15013            self
15014        }
15015        ///Returns the value of `filter`, or the default value if `filter` is unset.
15016        pub fn filter(&self) -> &super::EventFilter {
15017            self.filter
15018                .as_ref()
15019                .map(|field| field as _)
15020                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15021        }
15022        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15023        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15024            self.filter.as_mut().map(|field| field as _)
15025        }
15026        ///Returns a mutable reference to `filter`.
15027        ///If the field is unset, it is first initialized with the default value.
15028        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15029            self.filter.get_or_insert_default()
15030        }
15031        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15032        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15033            self.filter.as_ref().map(|field| field as _)
15034        }
15035        ///Sets `filter` with the provided value.
15036        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15037            self.filter = Some(field.into().into());
15038        }
15039        ///Sets `filter` with the provided value.
15040        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15041            self.set_filter(field.into());
15042            self
15043        }
15044    }
15045    impl super::SubscribeEventsResponse {
15046        pub const fn const_default() -> Self {
15047            Self {
15048                event: None,
15049                watermark: None,
15050            }
15051        }
15052        #[doc(hidden)]
15053        pub fn default_instance() -> &'static Self {
15054            static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15055            &DEFAULT
15056        }
15057        ///Returns the value of `event`, or the default value if `event` is unset.
15058        pub fn event(&self) -> &super::Event {
15059            self.event
15060                .as_ref()
15061                .map(|field| field as _)
15062                .unwrap_or_else(|| super::Event::default_instance() as _)
15063        }
15064        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15065        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15066            self.event.as_mut().map(|field| field as _)
15067        }
15068        ///Returns a mutable reference to `event`.
15069        ///If the field is unset, it is first initialized with the default value.
15070        pub fn event_mut(&mut self) -> &mut super::Event {
15071            self.event.get_or_insert_default()
15072        }
15073        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
15074        pub fn event_opt(&self) -> Option<&super::Event> {
15075            self.event.as_ref().map(|field| field as _)
15076        }
15077        ///Sets `event` with the provided value.
15078        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15079            self.event = Some(field.into().into());
15080        }
15081        ///Sets `event` with the provided value.
15082        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15083            self.set_event(field.into());
15084            self
15085        }
15086        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15087        pub fn watermark(&self) -> &super::Watermark {
15088            self.watermark
15089                .as_ref()
15090                .map(|field| field as _)
15091                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15092        }
15093        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15094        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15095            self.watermark.as_mut().map(|field| field as _)
15096        }
15097        ///Returns a mutable reference to `watermark`.
15098        ///If the field is unset, it is first initialized with the default value.
15099        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15100            self.watermark.get_or_insert_default()
15101        }
15102        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15103        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15104            self.watermark.as_ref().map(|field| field as _)
15105        }
15106        ///Sets `watermark` with the provided value.
15107        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15108            self.watermark = Some(field.into().into());
15109        }
15110        ///Sets `watermark` with the provided value.
15111        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15112            self.set_watermark(field.into());
15113            self
15114        }
15115    }
15116    impl super::SubscribeTransactionsRequest {
15117        pub const fn const_default() -> Self {
15118            Self {
15119                read_mask: None,
15120                filter: None,
15121            }
15122        }
15123        #[doc(hidden)]
15124        pub fn default_instance() -> &'static Self {
15125            static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15126            &DEFAULT
15127        }
15128        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15129        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15130            self.read_mask.as_mut().map(|field| field as _)
15131        }
15132        ///Returns a mutable reference to `read_mask`.
15133        ///If the field is unset, it is first initialized with the default value.
15134        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15135            self.read_mask.get_or_insert_default()
15136        }
15137        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15138        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15139            self.read_mask.as_ref().map(|field| field as _)
15140        }
15141        ///Sets `read_mask` with the provided value.
15142        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15143            self.read_mask = Some(field.into().into());
15144        }
15145        ///Sets `read_mask` with the provided value.
15146        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15147            mut self,
15148            field: T,
15149        ) -> Self {
15150            self.set_read_mask(field.into());
15151            self
15152        }
15153        ///Returns the value of `filter`, or the default value if `filter` is unset.
15154        pub fn filter(&self) -> &super::TransactionFilter {
15155            self.filter
15156                .as_ref()
15157                .map(|field| field as _)
15158                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15159        }
15160        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15161        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15162            self.filter.as_mut().map(|field| field as _)
15163        }
15164        ///Returns a mutable reference to `filter`.
15165        ///If the field is unset, it is first initialized with the default value.
15166        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15167            self.filter.get_or_insert_default()
15168        }
15169        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15170        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15171            self.filter.as_ref().map(|field| field as _)
15172        }
15173        ///Sets `filter` with the provided value.
15174        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15175            self.filter = Some(field.into().into());
15176        }
15177        ///Sets `filter` with the provided value.
15178        pub fn with_filter<T: Into<super::TransactionFilter>>(
15179            mut self,
15180            field: T,
15181        ) -> Self {
15182            self.set_filter(field.into());
15183            self
15184        }
15185    }
15186    impl super::SubscribeTransactionsResponse {
15187        pub const fn const_default() -> Self {
15188            Self {
15189                transaction: None,
15190                watermark: None,
15191            }
15192        }
15193        #[doc(hidden)]
15194        pub fn default_instance() -> &'static Self {
15195            static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15196            &DEFAULT
15197        }
15198        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
15199        pub fn transaction(&self) -> &super::ExecutedTransaction {
15200            self.transaction
15201                .as_ref()
15202                .map(|field| field as _)
15203                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15204        }
15205        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15206        pub fn transaction_opt_mut(
15207            &mut self,
15208        ) -> Option<&mut super::ExecutedTransaction> {
15209            self.transaction.as_mut().map(|field| field as _)
15210        }
15211        ///Returns a mutable reference to `transaction`.
15212        ///If the field is unset, it is first initialized with the default value.
15213        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15214            self.transaction.get_or_insert_default()
15215        }
15216        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15217        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15218            self.transaction.as_ref().map(|field| field as _)
15219        }
15220        ///Sets `transaction` with the provided value.
15221        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15222            &mut self,
15223            field: T,
15224        ) {
15225            self.transaction = Some(field.into().into());
15226        }
15227        ///Sets `transaction` with the provided value.
15228        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15229            mut self,
15230            field: T,
15231        ) -> Self {
15232            self.set_transaction(field.into());
15233            self
15234        }
15235        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15236        pub fn watermark(&self) -> &super::Watermark {
15237            self.watermark
15238                .as_ref()
15239                .map(|field| field as _)
15240                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15241        }
15242        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15243        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15244            self.watermark.as_mut().map(|field| field as _)
15245        }
15246        ///Returns a mutable reference to `watermark`.
15247        ///If the field is unset, it is first initialized with the default value.
15248        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15249            self.watermark.get_or_insert_default()
15250        }
15251        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15252        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15253            self.watermark.as_ref().map(|field| field as _)
15254        }
15255        ///Sets `watermark` with the provided value.
15256        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15257            self.watermark = Some(field.into().into());
15258        }
15259        ///Sets `watermark` with the provided value.
15260        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15261            self.set_watermark(field.into());
15262            self
15263        }
15264    }
15265    impl super::SystemPackage {
15266        pub const fn const_default() -> Self {
15267            Self {
15268                version: None,
15269                modules: Vec::new(),
15270                dependencies: Vec::new(),
15271            }
15272        }
15273        #[doc(hidden)]
15274        pub fn default_instance() -> &'static Self {
15275            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15276            &DEFAULT
15277        }
15278        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15279        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15280            self.version.as_mut().map(|field| field as _)
15281        }
15282        ///Returns a mutable reference to `version`.
15283        ///If the field is unset, it is first initialized with the default value.
15284        pub fn version_mut(&mut self) -> &mut u64 {
15285            self.version.get_or_insert_default()
15286        }
15287        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15288        pub fn version_opt(&self) -> Option<u64> {
15289            self.version.as_ref().map(|field| *field)
15290        }
15291        ///Sets `version` with the provided value.
15292        pub fn set_version(&mut self, field: u64) {
15293            self.version = Some(field);
15294        }
15295        ///Sets `version` with the provided value.
15296        pub fn with_version(mut self, field: u64) -> Self {
15297            self.set_version(field);
15298            self
15299        }
15300        ///Returns the value of `modules`, or the default value if `modules` is unset.
15301        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15302            &self.modules
15303        }
15304        ///Returns a mutable reference to `modules`.
15305        ///If the field is unset, it is first initialized with the default value.
15306        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15307            &mut self.modules
15308        }
15309        ///Sets `modules` with the provided value.
15310        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15311            self.modules = field;
15312        }
15313        ///Sets `modules` with the provided value.
15314        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15315            self.set_modules(field);
15316            self
15317        }
15318        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15319        pub fn dependencies(&self) -> &[String] {
15320            &self.dependencies
15321        }
15322        ///Returns a mutable reference to `dependencies`.
15323        ///If the field is unset, it is first initialized with the default value.
15324        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15325            &mut self.dependencies
15326        }
15327        ///Sets `dependencies` with the provided value.
15328        pub fn set_dependencies(&mut self, field: Vec<String>) {
15329            self.dependencies = field;
15330        }
15331        ///Sets `dependencies` with the provided value.
15332        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15333            self.set_dependencies(field);
15334            self
15335        }
15336    }
15337    impl super::SystemParameters {
15338        pub const fn const_default() -> Self {
15339            Self {
15340                epoch_duration_ms: None,
15341                stake_subsidy_start_epoch: None,
15342                min_validator_count: None,
15343                max_validator_count: None,
15344                min_validator_joining_stake: None,
15345                validator_low_stake_threshold: None,
15346                validator_very_low_stake_threshold: None,
15347                validator_low_stake_grace_period: None,
15348                extra_fields: None,
15349            }
15350        }
15351        #[doc(hidden)]
15352        pub fn default_instance() -> &'static Self {
15353            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15354            &DEFAULT
15355        }
15356        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15357        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15358            self.epoch_duration_ms.as_mut().map(|field| field as _)
15359        }
15360        ///Returns a mutable reference to `epoch_duration_ms`.
15361        ///If the field is unset, it is first initialized with the default value.
15362        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15363            self.epoch_duration_ms.get_or_insert_default()
15364        }
15365        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
15366        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15367            self.epoch_duration_ms.as_ref().map(|field| *field)
15368        }
15369        ///Sets `epoch_duration_ms` with the provided value.
15370        pub fn set_epoch_duration_ms(&mut self, field: u64) {
15371            self.epoch_duration_ms = Some(field);
15372        }
15373        ///Sets `epoch_duration_ms` with the provided value.
15374        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15375            self.set_epoch_duration_ms(field);
15376            self
15377        }
15378        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15379        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15380            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15381        }
15382        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
15383        ///If the field is unset, it is first initialized with the default value.
15384        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15385            self.stake_subsidy_start_epoch.get_or_insert_default()
15386        }
15387        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15388        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15389            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15390        }
15391        ///Sets `stake_subsidy_start_epoch` with the provided value.
15392        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15393            self.stake_subsidy_start_epoch = Some(field);
15394        }
15395        ///Sets `stake_subsidy_start_epoch` with the provided value.
15396        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15397            self.set_stake_subsidy_start_epoch(field);
15398            self
15399        }
15400        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15401        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15402            self.min_validator_count.as_mut().map(|field| field as _)
15403        }
15404        ///Returns a mutable reference to `min_validator_count`.
15405        ///If the field is unset, it is first initialized with the default value.
15406        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15407            self.min_validator_count.get_or_insert_default()
15408        }
15409        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15410        pub fn min_validator_count_opt(&self) -> Option<u64> {
15411            self.min_validator_count.as_ref().map(|field| *field)
15412        }
15413        ///Sets `min_validator_count` with the provided value.
15414        pub fn set_min_validator_count(&mut self, field: u64) {
15415            self.min_validator_count = Some(field);
15416        }
15417        ///Sets `min_validator_count` with the provided value.
15418        pub fn with_min_validator_count(mut self, field: u64) -> Self {
15419            self.set_min_validator_count(field);
15420            self
15421        }
15422        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15423        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15424            self.max_validator_count.as_mut().map(|field| field as _)
15425        }
15426        ///Returns a mutable reference to `max_validator_count`.
15427        ///If the field is unset, it is first initialized with the default value.
15428        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15429            self.max_validator_count.get_or_insert_default()
15430        }
15431        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15432        pub fn max_validator_count_opt(&self) -> Option<u64> {
15433            self.max_validator_count.as_ref().map(|field| *field)
15434        }
15435        ///Sets `max_validator_count` with the provided value.
15436        pub fn set_max_validator_count(&mut self, field: u64) {
15437            self.max_validator_count = Some(field);
15438        }
15439        ///Sets `max_validator_count` with the provided value.
15440        pub fn with_max_validator_count(mut self, field: u64) -> Self {
15441            self.set_max_validator_count(field);
15442            self
15443        }
15444        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15445        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15446            self.min_validator_joining_stake.as_mut().map(|field| field as _)
15447        }
15448        ///Returns a mutable reference to `min_validator_joining_stake`.
15449        ///If the field is unset, it is first initialized with the default value.
15450        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15451            self.min_validator_joining_stake.get_or_insert_default()
15452        }
15453        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
15454        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15455            self.min_validator_joining_stake.as_ref().map(|field| *field)
15456        }
15457        ///Sets `min_validator_joining_stake` with the provided value.
15458        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15459            self.min_validator_joining_stake = Some(field);
15460        }
15461        ///Sets `min_validator_joining_stake` with the provided value.
15462        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15463            self.set_min_validator_joining_stake(field);
15464            self
15465        }
15466        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15467        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15468            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15469        }
15470        ///Returns a mutable reference to `validator_low_stake_threshold`.
15471        ///If the field is unset, it is first initialized with the default value.
15472        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15473            self.validator_low_stake_threshold.get_or_insert_default()
15474        }
15475        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15476        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15477            self.validator_low_stake_threshold.as_ref().map(|field| *field)
15478        }
15479        ///Sets `validator_low_stake_threshold` with the provided value.
15480        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15481            self.validator_low_stake_threshold = Some(field);
15482        }
15483        ///Sets `validator_low_stake_threshold` with the provided value.
15484        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15485            self.set_validator_low_stake_threshold(field);
15486            self
15487        }
15488        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15489        pub fn validator_very_low_stake_threshold_opt_mut(
15490            &mut self,
15491        ) -> Option<&mut u64> {
15492            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15493        }
15494        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
15495        ///If the field is unset, it is first initialized with the default value.
15496        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15497            self.validator_very_low_stake_threshold.get_or_insert_default()
15498        }
15499        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15500        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15501            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15502        }
15503        ///Sets `validator_very_low_stake_threshold` with the provided value.
15504        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15505            self.validator_very_low_stake_threshold = Some(field);
15506        }
15507        ///Sets `validator_very_low_stake_threshold` with the provided value.
15508        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15509            self.set_validator_very_low_stake_threshold(field);
15510            self
15511        }
15512        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15513        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15514            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15515        }
15516        ///Returns a mutable reference to `validator_low_stake_grace_period`.
15517        ///If the field is unset, it is first initialized with the default value.
15518        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15519            self.validator_low_stake_grace_period.get_or_insert_default()
15520        }
15521        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
15522        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15523            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15524        }
15525        ///Sets `validator_low_stake_grace_period` with the provided value.
15526        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15527            self.validator_low_stake_grace_period = Some(field);
15528        }
15529        ///Sets `validator_low_stake_grace_period` with the provided value.
15530        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15531            self.set_validator_low_stake_grace_period(field);
15532            self
15533        }
15534        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
15535        pub fn extra_fields(&self) -> &super::MoveTable {
15536            self.extra_fields
15537                .as_ref()
15538                .map(|field| field as _)
15539                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15540        }
15541        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15542        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15543            self.extra_fields.as_mut().map(|field| field as _)
15544        }
15545        ///Returns a mutable reference to `extra_fields`.
15546        ///If the field is unset, it is first initialized with the default value.
15547        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15548            self.extra_fields.get_or_insert_default()
15549        }
15550        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15551        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15552            self.extra_fields.as_ref().map(|field| field as _)
15553        }
15554        ///Sets `extra_fields` with the provided value.
15555        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15556            self.extra_fields = Some(field.into().into());
15557        }
15558        ///Sets `extra_fields` with the provided value.
15559        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15560            self.set_extra_fields(field.into());
15561            self
15562        }
15563    }
15564    impl super::SystemState {
15565        pub const fn const_default() -> Self {
15566            Self {
15567                version: None,
15568                epoch: None,
15569                protocol_version: None,
15570                validators: None,
15571                storage_fund: None,
15572                parameters: None,
15573                reference_gas_price: None,
15574                validator_report_records: Vec::new(),
15575                stake_subsidy: None,
15576                safe_mode: None,
15577                safe_mode_storage_rewards: None,
15578                safe_mode_computation_rewards: None,
15579                safe_mode_storage_rebates: None,
15580                safe_mode_non_refundable_storage_fee: None,
15581                epoch_start_timestamp_ms: None,
15582                extra_fields: None,
15583            }
15584        }
15585        #[doc(hidden)]
15586        pub fn default_instance() -> &'static Self {
15587            static DEFAULT: super::SystemState = super::SystemState::const_default();
15588            &DEFAULT
15589        }
15590        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15591        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15592            self.version.as_mut().map(|field| field as _)
15593        }
15594        ///Returns a mutable reference to `version`.
15595        ///If the field is unset, it is first initialized with the default value.
15596        pub fn version_mut(&mut self) -> &mut u64 {
15597            self.version.get_or_insert_default()
15598        }
15599        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15600        pub fn version_opt(&self) -> Option<u64> {
15601            self.version.as_ref().map(|field| *field)
15602        }
15603        ///Sets `version` with the provided value.
15604        pub fn set_version(&mut self, field: u64) {
15605            self.version = Some(field);
15606        }
15607        ///Sets `version` with the provided value.
15608        pub fn with_version(mut self, field: u64) -> Self {
15609            self.set_version(field);
15610            self
15611        }
15612        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15613        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15614            self.epoch.as_mut().map(|field| field as _)
15615        }
15616        ///Returns a mutable reference to `epoch`.
15617        ///If the field is unset, it is first initialized with the default value.
15618        pub fn epoch_mut(&mut self) -> &mut u64 {
15619            self.epoch.get_or_insert_default()
15620        }
15621        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15622        pub fn epoch_opt(&self) -> Option<u64> {
15623            self.epoch.as_ref().map(|field| *field)
15624        }
15625        ///Sets `epoch` with the provided value.
15626        pub fn set_epoch(&mut self, field: u64) {
15627            self.epoch = Some(field);
15628        }
15629        ///Sets `epoch` with the provided value.
15630        pub fn with_epoch(mut self, field: u64) -> Self {
15631            self.set_epoch(field);
15632            self
15633        }
15634        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15635        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15636            self.protocol_version.as_mut().map(|field| field as _)
15637        }
15638        ///Returns a mutable reference to `protocol_version`.
15639        ///If the field is unset, it is first initialized with the default value.
15640        pub fn protocol_version_mut(&mut self) -> &mut u64 {
15641            self.protocol_version.get_or_insert_default()
15642        }
15643        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15644        pub fn protocol_version_opt(&self) -> Option<u64> {
15645            self.protocol_version.as_ref().map(|field| *field)
15646        }
15647        ///Sets `protocol_version` with the provided value.
15648        pub fn set_protocol_version(&mut self, field: u64) {
15649            self.protocol_version = Some(field);
15650        }
15651        ///Sets `protocol_version` with the provided value.
15652        pub fn with_protocol_version(mut self, field: u64) -> Self {
15653            self.set_protocol_version(field);
15654            self
15655        }
15656        ///Returns the value of `validators`, or the default value if `validators` is unset.
15657        pub fn validators(&self) -> &super::ValidatorSet {
15658            self.validators
15659                .as_ref()
15660                .map(|field| field as _)
15661                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15662        }
15663        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15664        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15665            self.validators.as_mut().map(|field| field as _)
15666        }
15667        ///Returns a mutable reference to `validators`.
15668        ///If the field is unset, it is first initialized with the default value.
15669        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15670            self.validators.get_or_insert_default()
15671        }
15672        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
15673        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15674            self.validators.as_ref().map(|field| field as _)
15675        }
15676        ///Sets `validators` with the provided value.
15677        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15678            self.validators = Some(field.into().into());
15679        }
15680        ///Sets `validators` with the provided value.
15681        pub fn with_validators<T: Into<super::ValidatorSet>>(
15682            mut self,
15683            field: T,
15684        ) -> Self {
15685            self.set_validators(field.into());
15686            self
15687        }
15688        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
15689        pub fn storage_fund(&self) -> &super::StorageFund {
15690            self.storage_fund
15691                .as_ref()
15692                .map(|field| field as _)
15693                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15694        }
15695        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15696        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15697            self.storage_fund.as_mut().map(|field| field as _)
15698        }
15699        ///Returns a mutable reference to `storage_fund`.
15700        ///If the field is unset, it is first initialized with the default value.
15701        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15702            self.storage_fund.get_or_insert_default()
15703        }
15704        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
15705        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15706            self.storage_fund.as_ref().map(|field| field as _)
15707        }
15708        ///Sets `storage_fund` with the provided value.
15709        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15710            self.storage_fund = Some(field.into().into());
15711        }
15712        ///Sets `storage_fund` with the provided value.
15713        pub fn with_storage_fund<T: Into<super::StorageFund>>(
15714            mut self,
15715            field: T,
15716        ) -> Self {
15717            self.set_storage_fund(field.into());
15718            self
15719        }
15720        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
15721        pub fn parameters(&self) -> &super::SystemParameters {
15722            self.parameters
15723                .as_ref()
15724                .map(|field| field as _)
15725                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15726        }
15727        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15728        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15729            self.parameters.as_mut().map(|field| field as _)
15730        }
15731        ///Returns a mutable reference to `parameters`.
15732        ///If the field is unset, it is first initialized with the default value.
15733        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15734            self.parameters.get_or_insert_default()
15735        }
15736        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
15737        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15738            self.parameters.as_ref().map(|field| field as _)
15739        }
15740        ///Sets `parameters` with the provided value.
15741        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15742            self.parameters = Some(field.into().into());
15743        }
15744        ///Sets `parameters` with the provided value.
15745        pub fn with_parameters<T: Into<super::SystemParameters>>(
15746            mut self,
15747            field: T,
15748        ) -> Self {
15749            self.set_parameters(field.into());
15750            self
15751        }
15752        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15753        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15754            self.reference_gas_price.as_mut().map(|field| field as _)
15755        }
15756        ///Returns a mutable reference to `reference_gas_price`.
15757        ///If the field is unset, it is first initialized with the default value.
15758        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15759            self.reference_gas_price.get_or_insert_default()
15760        }
15761        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
15762        pub fn reference_gas_price_opt(&self) -> Option<u64> {
15763            self.reference_gas_price.as_ref().map(|field| *field)
15764        }
15765        ///Sets `reference_gas_price` with the provided value.
15766        pub fn set_reference_gas_price(&mut self, field: u64) {
15767            self.reference_gas_price = Some(field);
15768        }
15769        ///Sets `reference_gas_price` with the provided value.
15770        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15771            self.set_reference_gas_price(field);
15772            self
15773        }
15774        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
15775        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15776            &self.validator_report_records
15777        }
15778        ///Returns a mutable reference to `validator_report_records`.
15779        ///If the field is unset, it is first initialized with the default value.
15780        pub fn validator_report_records_mut(
15781            &mut self,
15782        ) -> &mut Vec<super::ValidatorReportRecord> {
15783            &mut self.validator_report_records
15784        }
15785        ///Sets `validator_report_records` with the provided value.
15786        pub fn set_validator_report_records(
15787            &mut self,
15788            field: Vec<super::ValidatorReportRecord>,
15789        ) {
15790            self.validator_report_records = field;
15791        }
15792        ///Sets `validator_report_records` with the provided value.
15793        pub fn with_validator_report_records(
15794            mut self,
15795            field: Vec<super::ValidatorReportRecord>,
15796        ) -> Self {
15797            self.set_validator_report_records(field);
15798            self
15799        }
15800        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
15801        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
15802            self.stake_subsidy
15803                .as_ref()
15804                .map(|field| field as _)
15805                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
15806        }
15807        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15808        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
15809            self.stake_subsidy.as_mut().map(|field| field as _)
15810        }
15811        ///Returns a mutable reference to `stake_subsidy`.
15812        ///If the field is unset, it is first initialized with the default value.
15813        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
15814            self.stake_subsidy.get_or_insert_default()
15815        }
15816        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
15817        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
15818            self.stake_subsidy.as_ref().map(|field| field as _)
15819        }
15820        ///Sets `stake_subsidy` with the provided value.
15821        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
15822            self.stake_subsidy = Some(field.into().into());
15823        }
15824        ///Sets `stake_subsidy` with the provided value.
15825        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
15826            mut self,
15827            field: T,
15828        ) -> Self {
15829            self.set_stake_subsidy(field.into());
15830            self
15831        }
15832        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15833        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
15834            self.safe_mode.as_mut().map(|field| field as _)
15835        }
15836        ///Returns a mutable reference to `safe_mode`.
15837        ///If the field is unset, it is first initialized with the default value.
15838        pub fn safe_mode_mut(&mut self) -> &mut bool {
15839            self.safe_mode.get_or_insert_default()
15840        }
15841        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
15842        pub fn safe_mode_opt(&self) -> Option<bool> {
15843            self.safe_mode.as_ref().map(|field| *field)
15844        }
15845        ///Sets `safe_mode` with the provided value.
15846        pub fn set_safe_mode(&mut self, field: bool) {
15847            self.safe_mode = Some(field);
15848        }
15849        ///Sets `safe_mode` with the provided value.
15850        pub fn with_safe_mode(mut self, field: bool) -> Self {
15851            self.set_safe_mode(field);
15852            self
15853        }
15854        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15855        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15856            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
15857        }
15858        ///Returns a mutable reference to `safe_mode_storage_rewards`.
15859        ///If the field is unset, it is first initialized with the default value.
15860        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
15861            self.safe_mode_storage_rewards.get_or_insert_default()
15862        }
15863        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
15864        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
15865            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
15866        }
15867        ///Sets `safe_mode_storage_rewards` with the provided value.
15868        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
15869            self.safe_mode_storage_rewards = Some(field);
15870        }
15871        ///Sets `safe_mode_storage_rewards` with the provided value.
15872        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
15873            self.set_safe_mode_storage_rewards(field);
15874            self
15875        }
15876        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15877        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15878            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
15879        }
15880        ///Returns a mutable reference to `safe_mode_computation_rewards`.
15881        ///If the field is unset, it is first initialized with the default value.
15882        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
15883            self.safe_mode_computation_rewards.get_or_insert_default()
15884        }
15885        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
15886        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
15887            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
15888        }
15889        ///Sets `safe_mode_computation_rewards` with the provided value.
15890        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
15891            self.safe_mode_computation_rewards = Some(field);
15892        }
15893        ///Sets `safe_mode_computation_rewards` with the provided value.
15894        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
15895            self.set_safe_mode_computation_rewards(field);
15896            self
15897        }
15898        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15899        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15900            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
15901        }
15902        ///Returns a mutable reference to `safe_mode_storage_rebates`.
15903        ///If the field is unset, it is first initialized with the default value.
15904        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
15905            self.safe_mode_storage_rebates.get_or_insert_default()
15906        }
15907        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
15908        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
15909            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
15910        }
15911        ///Sets `safe_mode_storage_rebates` with the provided value.
15912        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
15913            self.safe_mode_storage_rebates = Some(field);
15914        }
15915        ///Sets `safe_mode_storage_rebates` with the provided value.
15916        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
15917            self.set_safe_mode_storage_rebates(field);
15918            self
15919        }
15920        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15921        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
15922            &mut self,
15923        ) -> Option<&mut u64> {
15924            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
15925        }
15926        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
15927        ///If the field is unset, it is first initialized with the default value.
15928        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
15929            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
15930        }
15931        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
15932        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
15933            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
15934        }
15935        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
15936        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
15937            self.safe_mode_non_refundable_storage_fee = Some(field);
15938        }
15939        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
15940        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
15941            self.set_safe_mode_non_refundable_storage_fee(field);
15942            self
15943        }
15944        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15945        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
15946            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
15947        }
15948        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
15949        ///If the field is unset, it is first initialized with the default value.
15950        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
15951            self.epoch_start_timestamp_ms.get_or_insert_default()
15952        }
15953        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
15954        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
15955            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
15956        }
15957        ///Sets `epoch_start_timestamp_ms` with the provided value.
15958        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
15959            self.epoch_start_timestamp_ms = Some(field);
15960        }
15961        ///Sets `epoch_start_timestamp_ms` with the provided value.
15962        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
15963            self.set_epoch_start_timestamp_ms(field);
15964            self
15965        }
15966        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
15967        pub fn extra_fields(&self) -> &super::MoveTable {
15968            self.extra_fields
15969                .as_ref()
15970                .map(|field| field as _)
15971                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15972        }
15973        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15974        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15975            self.extra_fields.as_mut().map(|field| field as _)
15976        }
15977        ///Returns a mutable reference to `extra_fields`.
15978        ///If the field is unset, it is first initialized with the default value.
15979        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15980            self.extra_fields.get_or_insert_default()
15981        }
15982        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15983        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15984            self.extra_fields.as_ref().map(|field| field as _)
15985        }
15986        ///Sets `extra_fields` with the provided value.
15987        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15988            self.extra_fields = Some(field.into().into());
15989        }
15990        ///Sets `extra_fields` with the provided value.
15991        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15992            self.set_extra_fields(field.into());
15993            self
15994        }
15995    }
15996    impl super::Transaction {
15997        pub const fn const_default() -> Self {
15998            Self {
15999                bcs: None,
16000                digest: None,
16001                version: None,
16002                kind: None,
16003                sender: None,
16004                gas_payment: None,
16005                expiration: None,
16006            }
16007        }
16008        #[doc(hidden)]
16009        pub fn default_instance() -> &'static Self {
16010            static DEFAULT: super::Transaction = super::Transaction::const_default();
16011            &DEFAULT
16012        }
16013        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16014        pub fn bcs(&self) -> &super::Bcs {
16015            self.bcs
16016                .as_ref()
16017                .map(|field| field as _)
16018                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16019        }
16020        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16021        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16022            self.bcs.as_mut().map(|field| field as _)
16023        }
16024        ///Returns a mutable reference to `bcs`.
16025        ///If the field is unset, it is first initialized with the default value.
16026        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16027            self.bcs.get_or_insert_default()
16028        }
16029        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16030        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16031            self.bcs.as_ref().map(|field| field as _)
16032        }
16033        ///Sets `bcs` with the provided value.
16034        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16035            self.bcs = Some(field.into().into());
16036        }
16037        ///Sets `bcs` with the provided value.
16038        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16039            self.set_bcs(field.into());
16040            self
16041        }
16042        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16043        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16044            self.digest.as_mut().map(|field| field as _)
16045        }
16046        ///Returns a mutable reference to `digest`.
16047        ///If the field is unset, it is first initialized with the default value.
16048        pub fn digest_mut(&mut self) -> &mut String {
16049            self.digest.get_or_insert_default()
16050        }
16051        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16052        pub fn digest_opt(&self) -> Option<&str> {
16053            self.digest.as_ref().map(|field| field as _)
16054        }
16055        ///Sets `digest` with the provided value.
16056        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16057            self.digest = Some(field.into().into());
16058        }
16059        ///Sets `digest` with the provided value.
16060        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16061            self.set_digest(field.into());
16062            self
16063        }
16064        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16065        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16066            self.version.as_mut().map(|field| field as _)
16067        }
16068        ///Returns a mutable reference to `version`.
16069        ///If the field is unset, it is first initialized with the default value.
16070        pub fn version_mut(&mut self) -> &mut i32 {
16071            self.version.get_or_insert_default()
16072        }
16073        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16074        pub fn version_opt(&self) -> Option<i32> {
16075            self.version.as_ref().map(|field| *field)
16076        }
16077        ///Sets `version` with the provided value.
16078        pub fn set_version(&mut self, field: i32) {
16079            self.version = Some(field);
16080        }
16081        ///Sets `version` with the provided value.
16082        pub fn with_version(mut self, field: i32) -> Self {
16083            self.set_version(field);
16084            self
16085        }
16086        ///Returns the value of `kind`, or the default value if `kind` is unset.
16087        pub fn kind(&self) -> &super::TransactionKind {
16088            self.kind
16089                .as_ref()
16090                .map(|field| field as _)
16091                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16092        }
16093        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16094        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16095            self.kind.as_mut().map(|field| field as _)
16096        }
16097        ///Returns a mutable reference to `kind`.
16098        ///If the field is unset, it is first initialized with the default value.
16099        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16100            self.kind.get_or_insert_default()
16101        }
16102        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
16103        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16104            self.kind.as_ref().map(|field| field as _)
16105        }
16106        ///Sets `kind` with the provided value.
16107        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16108            self.kind = Some(field.into().into());
16109        }
16110        ///Sets `kind` with the provided value.
16111        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16112            self.set_kind(field.into());
16113            self
16114        }
16115        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16116        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16117            self.sender.as_mut().map(|field| field as _)
16118        }
16119        ///Returns a mutable reference to `sender`.
16120        ///If the field is unset, it is first initialized with the default value.
16121        pub fn sender_mut(&mut self) -> &mut String {
16122            self.sender.get_or_insert_default()
16123        }
16124        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
16125        pub fn sender_opt(&self) -> Option<&str> {
16126            self.sender.as_ref().map(|field| field as _)
16127        }
16128        ///Sets `sender` with the provided value.
16129        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16130            self.sender = Some(field.into().into());
16131        }
16132        ///Sets `sender` with the provided value.
16133        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16134            self.set_sender(field.into());
16135            self
16136        }
16137        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
16138        pub fn gas_payment(&self) -> &super::GasPayment {
16139            self.gas_payment
16140                .as_ref()
16141                .map(|field| field as _)
16142                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16143        }
16144        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16145        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16146            self.gas_payment.as_mut().map(|field| field as _)
16147        }
16148        ///Returns a mutable reference to `gas_payment`.
16149        ///If the field is unset, it is first initialized with the default value.
16150        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16151            self.gas_payment.get_or_insert_default()
16152        }
16153        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
16154        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16155            self.gas_payment.as_ref().map(|field| field as _)
16156        }
16157        ///Sets `gas_payment` with the provided value.
16158        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16159            self.gas_payment = Some(field.into().into());
16160        }
16161        ///Sets `gas_payment` with the provided value.
16162        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16163            self.set_gas_payment(field.into());
16164            self
16165        }
16166        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
16167        pub fn expiration(&self) -> &super::TransactionExpiration {
16168            self.expiration
16169                .as_ref()
16170                .map(|field| field as _)
16171                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16172        }
16173        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16174        pub fn expiration_opt_mut(
16175            &mut self,
16176        ) -> Option<&mut super::TransactionExpiration> {
16177            self.expiration.as_mut().map(|field| field as _)
16178        }
16179        ///Returns a mutable reference to `expiration`.
16180        ///If the field is unset, it is first initialized with the default value.
16181        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16182            self.expiration.get_or_insert_default()
16183        }
16184        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16185        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16186            self.expiration.as_ref().map(|field| field as _)
16187        }
16188        ///Sets `expiration` with the provided value.
16189        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16190            &mut self,
16191            field: T,
16192        ) {
16193            self.expiration = Some(field.into().into());
16194        }
16195        ///Sets `expiration` with the provided value.
16196        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16197            mut self,
16198            field: T,
16199        ) -> Self {
16200            self.set_expiration(field.into());
16201            self
16202        }
16203    }
16204    impl super::TransactionEffects {
16205        pub const fn const_default() -> Self {
16206            Self {
16207                bcs: None,
16208                digest: None,
16209                version: None,
16210                status: None,
16211                epoch: None,
16212                gas_used: None,
16213                transaction_digest: None,
16214                gas_object: None,
16215                events_digest: None,
16216                dependencies: Vec::new(),
16217                lamport_version: None,
16218                changed_objects: Vec::new(),
16219                unchanged_consensus_objects: Vec::new(),
16220                auxiliary_data_digest: None,
16221                unchanged_loaded_runtime_objects: Vec::new(),
16222            }
16223        }
16224        #[doc(hidden)]
16225        pub fn default_instance() -> &'static Self {
16226            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16227            &DEFAULT
16228        }
16229        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16230        pub fn bcs(&self) -> &super::Bcs {
16231            self.bcs
16232                .as_ref()
16233                .map(|field| field as _)
16234                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16235        }
16236        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16237        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16238            self.bcs.as_mut().map(|field| field as _)
16239        }
16240        ///Returns a mutable reference to `bcs`.
16241        ///If the field is unset, it is first initialized with the default value.
16242        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16243            self.bcs.get_or_insert_default()
16244        }
16245        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16246        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16247            self.bcs.as_ref().map(|field| field as _)
16248        }
16249        ///Sets `bcs` with the provided value.
16250        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16251            self.bcs = Some(field.into().into());
16252        }
16253        ///Sets `bcs` with the provided value.
16254        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16255            self.set_bcs(field.into());
16256            self
16257        }
16258        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16259        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16260            self.digest.as_mut().map(|field| field as _)
16261        }
16262        ///Returns a mutable reference to `digest`.
16263        ///If the field is unset, it is first initialized with the default value.
16264        pub fn digest_mut(&mut self) -> &mut String {
16265            self.digest.get_or_insert_default()
16266        }
16267        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16268        pub fn digest_opt(&self) -> Option<&str> {
16269            self.digest.as_ref().map(|field| field as _)
16270        }
16271        ///Sets `digest` with the provided value.
16272        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16273            self.digest = Some(field.into().into());
16274        }
16275        ///Sets `digest` with the provided value.
16276        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16277            self.set_digest(field.into());
16278            self
16279        }
16280        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16281        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16282            self.version.as_mut().map(|field| field as _)
16283        }
16284        ///Returns a mutable reference to `version`.
16285        ///If the field is unset, it is first initialized with the default value.
16286        pub fn version_mut(&mut self) -> &mut i32 {
16287            self.version.get_or_insert_default()
16288        }
16289        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16290        pub fn version_opt(&self) -> Option<i32> {
16291            self.version.as_ref().map(|field| *field)
16292        }
16293        ///Sets `version` with the provided value.
16294        pub fn set_version(&mut self, field: i32) {
16295            self.version = Some(field);
16296        }
16297        ///Sets `version` with the provided value.
16298        pub fn with_version(mut self, field: i32) -> Self {
16299            self.set_version(field);
16300            self
16301        }
16302        ///Returns the value of `status`, or the default value if `status` is unset.
16303        pub fn status(&self) -> &super::ExecutionStatus {
16304            self.status
16305                .as_ref()
16306                .map(|field| field as _)
16307                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16308        }
16309        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16310        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16311            self.status.as_mut().map(|field| field as _)
16312        }
16313        ///Returns a mutable reference to `status`.
16314        ///If the field is unset, it is first initialized with the default value.
16315        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16316            self.status.get_or_insert_default()
16317        }
16318        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
16319        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16320            self.status.as_ref().map(|field| field as _)
16321        }
16322        ///Sets `status` with the provided value.
16323        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16324            self.status = Some(field.into().into());
16325        }
16326        ///Sets `status` with the provided value.
16327        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16328            self.set_status(field.into());
16329            self
16330        }
16331        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16332        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16333            self.epoch.as_mut().map(|field| field as _)
16334        }
16335        ///Returns a mutable reference to `epoch`.
16336        ///If the field is unset, it is first initialized with the default value.
16337        pub fn epoch_mut(&mut self) -> &mut u64 {
16338            self.epoch.get_or_insert_default()
16339        }
16340        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16341        pub fn epoch_opt(&self) -> Option<u64> {
16342            self.epoch.as_ref().map(|field| *field)
16343        }
16344        ///Sets `epoch` with the provided value.
16345        pub fn set_epoch(&mut self, field: u64) {
16346            self.epoch = Some(field);
16347        }
16348        ///Sets `epoch` with the provided value.
16349        pub fn with_epoch(mut self, field: u64) -> Self {
16350            self.set_epoch(field);
16351            self
16352        }
16353        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
16354        pub fn gas_used(&self) -> &super::GasCostSummary {
16355            self.gas_used
16356                .as_ref()
16357                .map(|field| field as _)
16358                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16359        }
16360        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16361        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16362            self.gas_used.as_mut().map(|field| field as _)
16363        }
16364        ///Returns a mutable reference to `gas_used`.
16365        ///If the field is unset, it is first initialized with the default value.
16366        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16367            self.gas_used.get_or_insert_default()
16368        }
16369        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
16370        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16371            self.gas_used.as_ref().map(|field| field as _)
16372        }
16373        ///Sets `gas_used` with the provided value.
16374        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16375            self.gas_used = Some(field.into().into());
16376        }
16377        ///Sets `gas_used` with the provided value.
16378        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16379            mut self,
16380            field: T,
16381        ) -> Self {
16382            self.set_gas_used(field.into());
16383            self
16384        }
16385        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16386        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16387            self.transaction_digest.as_mut().map(|field| field as _)
16388        }
16389        ///Returns a mutable reference to `transaction_digest`.
16390        ///If the field is unset, it is first initialized with the default value.
16391        pub fn transaction_digest_mut(&mut self) -> &mut String {
16392            self.transaction_digest.get_or_insert_default()
16393        }
16394        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16395        pub fn transaction_digest_opt(&self) -> Option<&str> {
16396            self.transaction_digest.as_ref().map(|field| field as _)
16397        }
16398        ///Sets `transaction_digest` with the provided value.
16399        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16400            self.transaction_digest = Some(field.into().into());
16401        }
16402        ///Sets `transaction_digest` with the provided value.
16403        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16404            self.set_transaction_digest(field.into());
16405            self
16406        }
16407        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
16408        pub fn gas_object(&self) -> &super::ChangedObject {
16409            self.gas_object
16410                .as_ref()
16411                .map(|field| field as _)
16412                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16413        }
16414        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16415        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16416            self.gas_object.as_mut().map(|field| field as _)
16417        }
16418        ///Returns a mutable reference to `gas_object`.
16419        ///If the field is unset, it is first initialized with the default value.
16420        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16421            self.gas_object.get_or_insert_default()
16422        }
16423        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
16424        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16425            self.gas_object.as_ref().map(|field| field as _)
16426        }
16427        ///Sets `gas_object` with the provided value.
16428        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16429            self.gas_object = Some(field.into().into());
16430        }
16431        ///Sets `gas_object` with the provided value.
16432        pub fn with_gas_object<T: Into<super::ChangedObject>>(
16433            mut self,
16434            field: T,
16435        ) -> Self {
16436            self.set_gas_object(field.into());
16437            self
16438        }
16439        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16440        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16441            self.events_digest.as_mut().map(|field| field as _)
16442        }
16443        ///Returns a mutable reference to `events_digest`.
16444        ///If the field is unset, it is first initialized with the default value.
16445        pub fn events_digest_mut(&mut self) -> &mut String {
16446            self.events_digest.get_or_insert_default()
16447        }
16448        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16449        pub fn events_digest_opt(&self) -> Option<&str> {
16450            self.events_digest.as_ref().map(|field| field as _)
16451        }
16452        ///Sets `events_digest` with the provided value.
16453        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16454            self.events_digest = Some(field.into().into());
16455        }
16456        ///Sets `events_digest` with the provided value.
16457        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16458            self.set_events_digest(field.into());
16459            self
16460        }
16461        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
16462        pub fn dependencies(&self) -> &[String] {
16463            &self.dependencies
16464        }
16465        ///Returns a mutable reference to `dependencies`.
16466        ///If the field is unset, it is first initialized with the default value.
16467        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16468            &mut self.dependencies
16469        }
16470        ///Sets `dependencies` with the provided value.
16471        pub fn set_dependencies(&mut self, field: Vec<String>) {
16472            self.dependencies = field;
16473        }
16474        ///Sets `dependencies` with the provided value.
16475        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16476            self.set_dependencies(field);
16477            self
16478        }
16479        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16480        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16481            self.lamport_version.as_mut().map(|field| field as _)
16482        }
16483        ///Returns a mutable reference to `lamport_version`.
16484        ///If the field is unset, it is first initialized with the default value.
16485        pub fn lamport_version_mut(&mut self) -> &mut u64 {
16486            self.lamport_version.get_or_insert_default()
16487        }
16488        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16489        pub fn lamport_version_opt(&self) -> Option<u64> {
16490            self.lamport_version.as_ref().map(|field| *field)
16491        }
16492        ///Sets `lamport_version` with the provided value.
16493        pub fn set_lamport_version(&mut self, field: u64) {
16494            self.lamport_version = Some(field);
16495        }
16496        ///Sets `lamport_version` with the provided value.
16497        pub fn with_lamport_version(mut self, field: u64) -> Self {
16498            self.set_lamport_version(field);
16499            self
16500        }
16501        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
16502        pub fn changed_objects(&self) -> &[super::ChangedObject] {
16503            &self.changed_objects
16504        }
16505        ///Returns a mutable reference to `changed_objects`.
16506        ///If the field is unset, it is first initialized with the default value.
16507        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16508            &mut self.changed_objects
16509        }
16510        ///Sets `changed_objects` with the provided value.
16511        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16512            self.changed_objects = field;
16513        }
16514        ///Sets `changed_objects` with the provided value.
16515        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16516            self.set_changed_objects(field);
16517            self
16518        }
16519        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
16520        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16521            &self.unchanged_consensus_objects
16522        }
16523        ///Returns a mutable reference to `unchanged_consensus_objects`.
16524        ///If the field is unset, it is first initialized with the default value.
16525        pub fn unchanged_consensus_objects_mut(
16526            &mut self,
16527        ) -> &mut Vec<super::UnchangedConsensusObject> {
16528            &mut self.unchanged_consensus_objects
16529        }
16530        ///Sets `unchanged_consensus_objects` with the provided value.
16531        pub fn set_unchanged_consensus_objects(
16532            &mut self,
16533            field: Vec<super::UnchangedConsensusObject>,
16534        ) {
16535            self.unchanged_consensus_objects = field;
16536        }
16537        ///Sets `unchanged_consensus_objects` with the provided value.
16538        pub fn with_unchanged_consensus_objects(
16539            mut self,
16540            field: Vec<super::UnchangedConsensusObject>,
16541        ) -> Self {
16542            self.set_unchanged_consensus_objects(field);
16543            self
16544        }
16545        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16546        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16547            self.auxiliary_data_digest.as_mut().map(|field| field as _)
16548        }
16549        ///Returns a mutable reference to `auxiliary_data_digest`.
16550        ///If the field is unset, it is first initialized with the default value.
16551        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16552            self.auxiliary_data_digest.get_or_insert_default()
16553        }
16554        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16555        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16556            self.auxiliary_data_digest.as_ref().map(|field| field as _)
16557        }
16558        ///Sets `auxiliary_data_digest` with the provided value.
16559        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16560            self.auxiliary_data_digest = Some(field.into().into());
16561        }
16562        ///Sets `auxiliary_data_digest` with the provided value.
16563        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16564            self.set_auxiliary_data_digest(field.into());
16565            self
16566        }
16567        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
16568        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16569            &self.unchanged_loaded_runtime_objects
16570        }
16571        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
16572        ///If the field is unset, it is first initialized with the default value.
16573        pub fn unchanged_loaded_runtime_objects_mut(
16574            &mut self,
16575        ) -> &mut Vec<super::ObjectReference> {
16576            &mut self.unchanged_loaded_runtime_objects
16577        }
16578        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16579        pub fn set_unchanged_loaded_runtime_objects(
16580            &mut self,
16581            field: Vec<super::ObjectReference>,
16582        ) {
16583            self.unchanged_loaded_runtime_objects = field;
16584        }
16585        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16586        pub fn with_unchanged_loaded_runtime_objects(
16587            mut self,
16588            field: Vec<super::ObjectReference>,
16589        ) -> Self {
16590            self.set_unchanged_loaded_runtime_objects(field);
16591            self
16592        }
16593    }
16594    impl super::TransactionEvents {
16595        pub const fn const_default() -> Self {
16596            Self {
16597                bcs: None,
16598                digest: None,
16599                events: Vec::new(),
16600            }
16601        }
16602        #[doc(hidden)]
16603        pub fn default_instance() -> &'static Self {
16604            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16605            &DEFAULT
16606        }
16607        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16608        pub fn bcs(&self) -> &super::Bcs {
16609            self.bcs
16610                .as_ref()
16611                .map(|field| field as _)
16612                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16613        }
16614        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16615        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16616            self.bcs.as_mut().map(|field| field as _)
16617        }
16618        ///Returns a mutable reference to `bcs`.
16619        ///If the field is unset, it is first initialized with the default value.
16620        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16621            self.bcs.get_or_insert_default()
16622        }
16623        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16624        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16625            self.bcs.as_ref().map(|field| field as _)
16626        }
16627        ///Sets `bcs` with the provided value.
16628        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16629            self.bcs = Some(field.into().into());
16630        }
16631        ///Sets `bcs` with the provided value.
16632        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16633            self.set_bcs(field.into());
16634            self
16635        }
16636        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16637        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16638            self.digest.as_mut().map(|field| field as _)
16639        }
16640        ///Returns a mutable reference to `digest`.
16641        ///If the field is unset, it is first initialized with the default value.
16642        pub fn digest_mut(&mut self) -> &mut String {
16643            self.digest.get_or_insert_default()
16644        }
16645        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16646        pub fn digest_opt(&self) -> Option<&str> {
16647            self.digest.as_ref().map(|field| field as _)
16648        }
16649        ///Sets `digest` with the provided value.
16650        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16651            self.digest = Some(field.into().into());
16652        }
16653        ///Sets `digest` with the provided value.
16654        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16655            self.set_digest(field.into());
16656            self
16657        }
16658        ///Returns the value of `events`, or the default value if `events` is unset.
16659        pub fn events(&self) -> &[super::Event] {
16660            &self.events
16661        }
16662        ///Returns a mutable reference to `events`.
16663        ///If the field is unset, it is first initialized with the default value.
16664        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16665            &mut self.events
16666        }
16667        ///Sets `events` with the provided value.
16668        pub fn set_events(&mut self, field: Vec<super::Event>) {
16669            self.events = field;
16670        }
16671        ///Sets `events` with the provided value.
16672        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16673            self.set_events(field);
16674            self
16675        }
16676    }
16677    impl super::TransactionExpiration {
16678        pub const fn const_default() -> Self {
16679            Self {
16680                kind: None,
16681                epoch: None,
16682                min_epoch: None,
16683                min_timestamp: None,
16684                max_timestamp: None,
16685                chain: None,
16686                nonce: None,
16687            }
16688        }
16689        #[doc(hidden)]
16690        pub fn default_instance() -> &'static Self {
16691            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16692            &DEFAULT
16693        }
16694        ///Sets `kind` with the provided value.
16695        pub fn with_kind<
16696            T: Into<super::transaction_expiration::TransactionExpirationKind>,
16697        >(mut self, field: T) -> Self {
16698            self.set_kind(field.into());
16699            self
16700        }
16701        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16702        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16703            self.epoch.as_mut().map(|field| field as _)
16704        }
16705        ///Returns a mutable reference to `epoch`.
16706        ///If the field is unset, it is first initialized with the default value.
16707        pub fn epoch_mut(&mut self) -> &mut u64 {
16708            self.epoch.get_or_insert_default()
16709        }
16710        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16711        pub fn epoch_opt(&self) -> Option<u64> {
16712            self.epoch.as_ref().map(|field| *field)
16713        }
16714        ///Sets `epoch` with the provided value.
16715        pub fn set_epoch(&mut self, field: u64) {
16716            self.epoch = Some(field);
16717        }
16718        ///Sets `epoch` with the provided value.
16719        pub fn with_epoch(mut self, field: u64) -> Self {
16720            self.set_epoch(field);
16721            self
16722        }
16723        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16724        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16725            self.min_epoch.as_mut().map(|field| field as _)
16726        }
16727        ///Returns a mutable reference to `min_epoch`.
16728        ///If the field is unset, it is first initialized with the default value.
16729        pub fn min_epoch_mut(&mut self) -> &mut u64 {
16730            self.min_epoch.get_or_insert_default()
16731        }
16732        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16733        pub fn min_epoch_opt(&self) -> Option<u64> {
16734            self.min_epoch.as_ref().map(|field| *field)
16735        }
16736        ///Sets `min_epoch` with the provided value.
16737        pub fn set_min_epoch(&mut self, field: u64) {
16738            self.min_epoch = Some(field);
16739        }
16740        ///Sets `min_epoch` with the provided value.
16741        pub fn with_min_epoch(mut self, field: u64) -> Self {
16742            self.set_min_epoch(field);
16743            self
16744        }
16745        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16746        pub fn min_timestamp_opt_mut(
16747            &mut self,
16748        ) -> Option<&mut ::prost_types::Timestamp> {
16749            self.min_timestamp.as_mut().map(|field| field as _)
16750        }
16751        ///Returns a mutable reference to `min_timestamp`.
16752        ///If the field is unset, it is first initialized with the default value.
16753        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16754            self.min_timestamp.get_or_insert_default()
16755        }
16756        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16757        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16758            self.min_timestamp.as_ref().map(|field| field as _)
16759        }
16760        ///Sets `min_timestamp` with the provided value.
16761        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16762            &mut self,
16763            field: T,
16764        ) {
16765            self.min_timestamp = Some(field.into().into());
16766        }
16767        ///Sets `min_timestamp` with the provided value.
16768        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16769            mut self,
16770            field: T,
16771        ) -> Self {
16772            self.set_min_timestamp(field.into());
16773            self
16774        }
16775        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16776        pub fn max_timestamp_opt_mut(
16777            &mut self,
16778        ) -> Option<&mut ::prost_types::Timestamp> {
16779            self.max_timestamp.as_mut().map(|field| field as _)
16780        }
16781        ///Returns a mutable reference to `max_timestamp`.
16782        ///If the field is unset, it is first initialized with the default value.
16783        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16784            self.max_timestamp.get_or_insert_default()
16785        }
16786        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16787        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16788            self.max_timestamp.as_ref().map(|field| field as _)
16789        }
16790        ///Sets `max_timestamp` with the provided value.
16791        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
16792            &mut self,
16793            field: T,
16794        ) {
16795            self.max_timestamp = Some(field.into().into());
16796        }
16797        ///Sets `max_timestamp` with the provided value.
16798        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
16799            mut self,
16800            field: T,
16801        ) -> Self {
16802            self.set_max_timestamp(field.into());
16803            self
16804        }
16805        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16806        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
16807            self.chain.as_mut().map(|field| field as _)
16808        }
16809        ///Returns a mutable reference to `chain`.
16810        ///If the field is unset, it is first initialized with the default value.
16811        pub fn chain_mut(&mut self) -> &mut String {
16812            self.chain.get_or_insert_default()
16813        }
16814        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
16815        pub fn chain_opt(&self) -> Option<&str> {
16816            self.chain.as_ref().map(|field| field as _)
16817        }
16818        ///Sets `chain` with the provided value.
16819        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
16820            self.chain = Some(field.into().into());
16821        }
16822        ///Sets `chain` with the provided value.
16823        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
16824            self.set_chain(field.into());
16825            self
16826        }
16827        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16828        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
16829            self.nonce.as_mut().map(|field| field as _)
16830        }
16831        ///Returns a mutable reference to `nonce`.
16832        ///If the field is unset, it is first initialized with the default value.
16833        pub fn nonce_mut(&mut self) -> &mut u32 {
16834            self.nonce.get_or_insert_default()
16835        }
16836        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
16837        pub fn nonce_opt(&self) -> Option<u32> {
16838            self.nonce.as_ref().map(|field| *field)
16839        }
16840        ///Sets `nonce` with the provided value.
16841        pub fn set_nonce(&mut self, field: u32) {
16842            self.nonce = Some(field);
16843        }
16844        ///Sets `nonce` with the provided value.
16845        pub fn with_nonce(mut self, field: u32) -> Self {
16846            self.set_nonce(field);
16847            self
16848        }
16849    }
16850    impl super::TransactionFilter {
16851        pub const fn const_default() -> Self {
16852            Self { terms: Vec::new() }
16853        }
16854        #[doc(hidden)]
16855        pub fn default_instance() -> &'static Self {
16856            static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
16857            &DEFAULT
16858        }
16859        ///Returns the value of `terms`, or the default value if `terms` is unset.
16860        pub fn terms(&self) -> &[super::TransactionTerm] {
16861            &self.terms
16862        }
16863        ///Returns a mutable reference to `terms`.
16864        ///If the field is unset, it is first initialized with the default value.
16865        pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
16866            &mut self.terms
16867        }
16868        ///Sets `terms` with the provided value.
16869        pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
16870            self.terms = field;
16871        }
16872        ///Sets `terms` with the provided value.
16873        pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
16874            self.set_terms(field);
16875            self
16876        }
16877    }
16878    impl super::TransactionKind {
16879        pub const fn const_default() -> Self {
16880            Self { kind: None, data: None }
16881        }
16882        #[doc(hidden)]
16883        pub fn default_instance() -> &'static Self {
16884            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
16885            &DEFAULT
16886        }
16887        ///Sets `kind` with the provided value.
16888        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
16889            mut self,
16890            field: T,
16891        ) -> Self {
16892            self.set_kind(field.into());
16893            self
16894        }
16895        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
16896        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
16897            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16898                .data
16899            {
16900                field as _
16901            } else {
16902                super::ProgrammableTransaction::default_instance() as _
16903            }
16904        }
16905        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
16906        pub fn programmable_transaction_opt(
16907            &self,
16908        ) -> Option<&super::ProgrammableTransaction> {
16909            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16910                .data
16911            {
16912                Some(field as _)
16913            } else {
16914                None
16915            }
16916        }
16917        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16918        pub fn programmable_transaction_opt_mut(
16919            &mut self,
16920        ) -> Option<&mut super::ProgrammableTransaction> {
16921            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
16922                .data
16923            {
16924                Some(field as _)
16925            } else {
16926                None
16927            }
16928        }
16929        ///Returns a mutable reference to `programmable_transaction`.
16930        ///If the field is unset, it is first initialized with the default value.
16931        ///If any other oneof field in the same oneof is set, it will be cleared.
16932        pub fn programmable_transaction_mut(
16933            &mut self,
16934        ) -> &mut super::ProgrammableTransaction {
16935            if self.programmable_transaction_opt_mut().is_none() {
16936                self.data = Some(
16937                    super::transaction_kind::Data::ProgrammableTransaction(
16938                        super::ProgrammableTransaction::default(),
16939                    ),
16940                );
16941            }
16942            self.programmable_transaction_opt_mut().unwrap()
16943        }
16944        ///Sets `programmable_transaction` with the provided value.
16945        ///If any other oneof field in the same oneof is set, it will be cleared.
16946        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
16947            &mut self,
16948            field: T,
16949        ) {
16950            self.data = Some(
16951                super::transaction_kind::Data::ProgrammableTransaction(
16952                    field.into().into(),
16953                ),
16954            );
16955        }
16956        ///Sets `programmable_transaction` with the provided value.
16957        ///If any other oneof field in the same oneof is set, it will be cleared.
16958        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
16959            mut self,
16960            field: T,
16961        ) -> Self {
16962            self.set_programmable_transaction(field.into());
16963            self
16964        }
16965        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
16966        pub fn change_epoch(&self) -> &super::ChangeEpoch {
16967            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
16968                field as _
16969            } else {
16970                super::ChangeEpoch::default_instance() as _
16971            }
16972        }
16973        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16974        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
16975            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
16976                Some(field as _)
16977            } else {
16978                None
16979            }
16980        }
16981        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16982        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
16983            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
16984                .data
16985            {
16986                Some(field as _)
16987            } else {
16988                None
16989            }
16990        }
16991        ///Returns a mutable reference to `change_epoch`.
16992        ///If the field is unset, it is first initialized with the default value.
16993        ///If any other oneof field in the same oneof is set, it will be cleared.
16994        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
16995            if self.change_epoch_opt_mut().is_none() {
16996                self.data = Some(
16997                    super::transaction_kind::Data::ChangeEpoch(
16998                        super::ChangeEpoch::default(),
16999                    ),
17000                );
17001            }
17002            self.change_epoch_opt_mut().unwrap()
17003        }
17004        ///Sets `change_epoch` with the provided value.
17005        ///If any other oneof field in the same oneof is set, it will be cleared.
17006        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17007            self.data = Some(
17008                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17009            );
17010        }
17011        ///Sets `change_epoch` with the provided value.
17012        ///If any other oneof field in the same oneof is set, it will be cleared.
17013        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17014            mut self,
17015            field: T,
17016        ) -> Self {
17017            self.set_change_epoch(field.into());
17018            self
17019        }
17020        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
17021        pub fn genesis(&self) -> &super::GenesisTransaction {
17022            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17023                field as _
17024            } else {
17025                super::GenesisTransaction::default_instance() as _
17026            }
17027        }
17028        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
17029        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17030            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17031                Some(field as _)
17032            } else {
17033                None
17034            }
17035        }
17036        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17037        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17038            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17039                Some(field as _)
17040            } else {
17041                None
17042            }
17043        }
17044        ///Returns a mutable reference to `genesis`.
17045        ///If the field is unset, it is first initialized with the default value.
17046        ///If any other oneof field in the same oneof is set, it will be cleared.
17047        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17048            if self.genesis_opt_mut().is_none() {
17049                self.data = Some(
17050                    super::transaction_kind::Data::Genesis(
17051                        super::GenesisTransaction::default(),
17052                    ),
17053                );
17054            }
17055            self.genesis_opt_mut().unwrap()
17056        }
17057        ///Sets `genesis` with the provided value.
17058        ///If any other oneof field in the same oneof is set, it will be cleared.
17059        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17060            self.data = Some(
17061                super::transaction_kind::Data::Genesis(field.into().into()),
17062            );
17063        }
17064        ///Sets `genesis` with the provided value.
17065        ///If any other oneof field in the same oneof is set, it will be cleared.
17066        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17067            mut self,
17068            field: T,
17069        ) -> Self {
17070            self.set_genesis(field.into());
17071            self
17072        }
17073        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
17074        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17075            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17076                .data
17077            {
17078                field as _
17079            } else {
17080                super::ConsensusCommitPrologue::default_instance() as _
17081            }
17082        }
17083        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
17084        pub fn consensus_commit_prologue_opt(
17085            &self,
17086        ) -> Option<&super::ConsensusCommitPrologue> {
17087            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17088                .data
17089            {
17090                Some(field as _)
17091            } else {
17092                None
17093            }
17094        }
17095        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17096        pub fn consensus_commit_prologue_opt_mut(
17097            &mut self,
17098        ) -> Option<&mut super::ConsensusCommitPrologue> {
17099            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17100                .data
17101            {
17102                Some(field as _)
17103            } else {
17104                None
17105            }
17106        }
17107        ///Returns a mutable reference to `consensus_commit_prologue`.
17108        ///If the field is unset, it is first initialized with the default value.
17109        ///If any other oneof field in the same oneof is set, it will be cleared.
17110        pub fn consensus_commit_prologue_mut(
17111            &mut self,
17112        ) -> &mut super::ConsensusCommitPrologue {
17113            if self.consensus_commit_prologue_opt_mut().is_none() {
17114                self.data = Some(
17115                    super::transaction_kind::Data::ConsensusCommitPrologue(
17116                        super::ConsensusCommitPrologue::default(),
17117                    ),
17118                );
17119            }
17120            self.consensus_commit_prologue_opt_mut().unwrap()
17121        }
17122        ///Sets `consensus_commit_prologue` with the provided value.
17123        ///If any other oneof field in the same oneof is set, it will be cleared.
17124        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17125            &mut self,
17126            field: T,
17127        ) {
17128            self.data = Some(
17129                super::transaction_kind::Data::ConsensusCommitPrologue(
17130                    field.into().into(),
17131                ),
17132            );
17133        }
17134        ///Sets `consensus_commit_prologue` with the provided value.
17135        ///If any other oneof field in the same oneof is set, it will be cleared.
17136        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17137            mut self,
17138            field: T,
17139        ) -> Self {
17140            self.set_consensus_commit_prologue(field.into());
17141            self
17142        }
17143        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
17144        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17145            if let Some(
17146                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17147            ) = &self.data
17148            {
17149                field as _
17150            } else {
17151                super::AuthenticatorStateUpdate::default_instance() as _
17152            }
17153        }
17154        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17155        pub fn authenticator_state_update_opt(
17156            &self,
17157        ) -> Option<&super::AuthenticatorStateUpdate> {
17158            if let Some(
17159                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17160            ) = &self.data
17161            {
17162                Some(field as _)
17163            } else {
17164                None
17165            }
17166        }
17167        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17168        pub fn authenticator_state_update_opt_mut(
17169            &mut self,
17170        ) -> Option<&mut super::AuthenticatorStateUpdate> {
17171            if let Some(
17172                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17173            ) = &mut self.data
17174            {
17175                Some(field as _)
17176            } else {
17177                None
17178            }
17179        }
17180        ///Returns a mutable reference to `authenticator_state_update`.
17181        ///If the field is unset, it is first initialized with the default value.
17182        ///If any other oneof field in the same oneof is set, it will be cleared.
17183        pub fn authenticator_state_update_mut(
17184            &mut self,
17185        ) -> &mut super::AuthenticatorStateUpdate {
17186            if self.authenticator_state_update_opt_mut().is_none() {
17187                self.data = Some(
17188                    super::transaction_kind::Data::AuthenticatorStateUpdate(
17189                        super::AuthenticatorStateUpdate::default(),
17190                    ),
17191                );
17192            }
17193            self.authenticator_state_update_opt_mut().unwrap()
17194        }
17195        ///Sets `authenticator_state_update` with the provided value.
17196        ///If any other oneof field in the same oneof is set, it will be cleared.
17197        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17198            &mut self,
17199            field: T,
17200        ) {
17201            self.data = Some(
17202                super::transaction_kind::Data::AuthenticatorStateUpdate(
17203                    field.into().into(),
17204                ),
17205            );
17206        }
17207        ///Sets `authenticator_state_update` with the provided value.
17208        ///If any other oneof field in the same oneof is set, it will be cleared.
17209        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17210            mut self,
17211            field: T,
17212        ) -> Self {
17213            self.set_authenticator_state_update(field.into());
17214            self
17215        }
17216        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
17217        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17218            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17219                field as _
17220            } else {
17221                super::EndOfEpochTransaction::default_instance() as _
17222            }
17223        }
17224        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17225        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17226            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17227                Some(field as _)
17228            } else {
17229                None
17230            }
17231        }
17232        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17233        pub fn end_of_epoch_opt_mut(
17234            &mut self,
17235        ) -> Option<&mut super::EndOfEpochTransaction> {
17236            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17237                .data
17238            {
17239                Some(field as _)
17240            } else {
17241                None
17242            }
17243        }
17244        ///Returns a mutable reference to `end_of_epoch`.
17245        ///If the field is unset, it is first initialized with the default value.
17246        ///If any other oneof field in the same oneof is set, it will be cleared.
17247        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17248            if self.end_of_epoch_opt_mut().is_none() {
17249                self.data = Some(
17250                    super::transaction_kind::Data::EndOfEpoch(
17251                        super::EndOfEpochTransaction::default(),
17252                    ),
17253                );
17254            }
17255            self.end_of_epoch_opt_mut().unwrap()
17256        }
17257        ///Sets `end_of_epoch` with the provided value.
17258        ///If any other oneof field in the same oneof is set, it will be cleared.
17259        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17260            &mut self,
17261            field: T,
17262        ) {
17263            self.data = Some(
17264                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17265            );
17266        }
17267        ///Sets `end_of_epoch` with the provided value.
17268        ///If any other oneof field in the same oneof is set, it will be cleared.
17269        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17270            mut self,
17271            field: T,
17272        ) -> Self {
17273            self.set_end_of_epoch(field.into());
17274            self
17275        }
17276        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
17277        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17278            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17279                .data
17280            {
17281                field as _
17282            } else {
17283                super::RandomnessStateUpdate::default_instance() as _
17284            }
17285        }
17286        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17287        pub fn randomness_state_update_opt(
17288            &self,
17289        ) -> Option<&super::RandomnessStateUpdate> {
17290            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17291                .data
17292            {
17293                Some(field as _)
17294            } else {
17295                None
17296            }
17297        }
17298        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17299        pub fn randomness_state_update_opt_mut(
17300            &mut self,
17301        ) -> Option<&mut super::RandomnessStateUpdate> {
17302            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17303                .data
17304            {
17305                Some(field as _)
17306            } else {
17307                None
17308            }
17309        }
17310        ///Returns a mutable reference to `randomness_state_update`.
17311        ///If the field is unset, it is first initialized with the default value.
17312        ///If any other oneof field in the same oneof is set, it will be cleared.
17313        pub fn randomness_state_update_mut(
17314            &mut self,
17315        ) -> &mut super::RandomnessStateUpdate {
17316            if self.randomness_state_update_opt_mut().is_none() {
17317                self.data = Some(
17318                    super::transaction_kind::Data::RandomnessStateUpdate(
17319                        super::RandomnessStateUpdate::default(),
17320                    ),
17321                );
17322            }
17323            self.randomness_state_update_opt_mut().unwrap()
17324        }
17325        ///Sets `randomness_state_update` with the provided value.
17326        ///If any other oneof field in the same oneof is set, it will be cleared.
17327        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17328            &mut self,
17329            field: T,
17330        ) {
17331            self.data = Some(
17332                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17333            );
17334        }
17335        ///Sets `randomness_state_update` with the provided value.
17336        ///If any other oneof field in the same oneof is set, it will be cleared.
17337        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17338            mut self,
17339            field: T,
17340        ) -> Self {
17341            self.set_randomness_state_update(field.into());
17342            self
17343        }
17344    }
17345    impl super::TransactionLiteral {
17346        pub const fn const_default() -> Self {
17347            Self {
17348                negated: false,
17349                predicate: None,
17350            }
17351        }
17352        #[doc(hidden)]
17353        pub fn default_instance() -> &'static Self {
17354            static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17355            &DEFAULT
17356        }
17357        ///Returns a mutable reference to `negated`.
17358        ///If the field is unset, it is first initialized with the default value.
17359        pub fn negated_mut(&mut self) -> &mut bool {
17360            &mut self.negated
17361        }
17362        ///Sets `negated` with the provided value.
17363        pub fn set_negated(&mut self, field: bool) {
17364            self.negated = field;
17365        }
17366        ///Sets `negated` with the provided value.
17367        pub fn with_negated(mut self, field: bool) -> Self {
17368            self.set_negated(field);
17369            self
17370        }
17371        ///Returns the value of `sender`, or the default value if `sender` is unset.
17372        pub fn sender(&self) -> &super::SenderFilter {
17373            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17374                .predicate
17375            {
17376                field as _
17377            } else {
17378                super::SenderFilter::default_instance() as _
17379            }
17380        }
17381        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
17382        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17383            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17384                .predicate
17385            {
17386                Some(field as _)
17387            } else {
17388                None
17389            }
17390        }
17391        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17392        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17393            if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17394                .predicate
17395            {
17396                Some(field as _)
17397            } else {
17398                None
17399            }
17400        }
17401        ///Returns a mutable reference to `sender`.
17402        ///If the field is unset, it is first initialized with the default value.
17403        ///If any other oneof field in the same oneof is set, it will be cleared.
17404        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17405            if self.sender_opt_mut().is_none() {
17406                self.predicate = Some(
17407                    super::transaction_literal::Predicate::Sender(
17408                        super::SenderFilter::default(),
17409                    ),
17410                );
17411            }
17412            self.sender_opt_mut().unwrap()
17413        }
17414        ///Sets `sender` with the provided value.
17415        ///If any other oneof field in the same oneof is set, it will be cleared.
17416        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17417            self.predicate = Some(
17418                super::transaction_literal::Predicate::Sender(field.into().into()),
17419            );
17420        }
17421        ///Sets `sender` with the provided value.
17422        ///If any other oneof field in the same oneof is set, it will be cleared.
17423        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17424            self.set_sender(field.into());
17425            self
17426        }
17427        ///Returns the value of `affected_address`, or the default value if `affected_address` is unset.
17428        pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17429            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17430                .predicate
17431            {
17432                field as _
17433            } else {
17434                super::AffectedAddressFilter::default_instance() as _
17435            }
17436        }
17437        ///If `affected_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17438        pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17439            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17440                .predicate
17441            {
17442                Some(field as _)
17443            } else {
17444                None
17445            }
17446        }
17447        ///If `affected_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17448        pub fn affected_address_opt_mut(
17449            &mut self,
17450        ) -> Option<&mut super::AffectedAddressFilter> {
17451            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17452                .predicate
17453            {
17454                Some(field as _)
17455            } else {
17456                None
17457            }
17458        }
17459        ///Returns a mutable reference to `affected_address`.
17460        ///If the field is unset, it is first initialized with the default value.
17461        ///If any other oneof field in the same oneof is set, it will be cleared.
17462        pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17463            if self.affected_address_opt_mut().is_none() {
17464                self.predicate = Some(
17465                    super::transaction_literal::Predicate::AffectedAddress(
17466                        super::AffectedAddressFilter::default(),
17467                    ),
17468                );
17469            }
17470            self.affected_address_opt_mut().unwrap()
17471        }
17472        ///Sets `affected_address` with the provided value.
17473        ///If any other oneof field in the same oneof is set, it will be cleared.
17474        pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17475            &mut self,
17476            field: T,
17477        ) {
17478            self.predicate = Some(
17479                super::transaction_literal::Predicate::AffectedAddress(
17480                    field.into().into(),
17481                ),
17482            );
17483        }
17484        ///Sets `affected_address` with the provided value.
17485        ///If any other oneof field in the same oneof is set, it will be cleared.
17486        pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17487            mut self,
17488            field: T,
17489        ) -> Self {
17490            self.set_affected_address(field.into());
17491            self
17492        }
17493        ///Returns the value of `affected_object`, or the default value if `affected_object` is unset.
17494        pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17495            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17496                .predicate
17497            {
17498                field as _
17499            } else {
17500                super::AffectedObjectFilter::default_instance() as _
17501            }
17502        }
17503        ///If `affected_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
17504        pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17505            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17506                .predicate
17507            {
17508                Some(field as _)
17509            } else {
17510                None
17511            }
17512        }
17513        ///If `affected_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17514        pub fn affected_object_opt_mut(
17515            &mut self,
17516        ) -> Option<&mut super::AffectedObjectFilter> {
17517            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17518                .predicate
17519            {
17520                Some(field as _)
17521            } else {
17522                None
17523            }
17524        }
17525        ///Returns a mutable reference to `affected_object`.
17526        ///If the field is unset, it is first initialized with the default value.
17527        ///If any other oneof field in the same oneof is set, it will be cleared.
17528        pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17529            if self.affected_object_opt_mut().is_none() {
17530                self.predicate = Some(
17531                    super::transaction_literal::Predicate::AffectedObject(
17532                        super::AffectedObjectFilter::default(),
17533                    ),
17534                );
17535            }
17536            self.affected_object_opt_mut().unwrap()
17537        }
17538        ///Sets `affected_object` with the provided value.
17539        ///If any other oneof field in the same oneof is set, it will be cleared.
17540        pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17541            &mut self,
17542            field: T,
17543        ) {
17544            self.predicate = Some(
17545                super::transaction_literal::Predicate::AffectedObject(
17546                    field.into().into(),
17547                ),
17548            );
17549        }
17550        ///Sets `affected_object` with the provided value.
17551        ///If any other oneof field in the same oneof is set, it will be cleared.
17552        pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17553            mut self,
17554            field: T,
17555        ) -> Self {
17556            self.set_affected_object(field.into());
17557            self
17558        }
17559        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
17560        pub fn move_call(&self) -> &super::MoveCallFilter {
17561            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17562                .predicate
17563            {
17564                field as _
17565            } else {
17566                super::MoveCallFilter::default_instance() as _
17567            }
17568        }
17569        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
17570        pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17571            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17572                .predicate
17573            {
17574                Some(field as _)
17575            } else {
17576                None
17577            }
17578        }
17579        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17580        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17581            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17582                .predicate
17583            {
17584                Some(field as _)
17585            } else {
17586                None
17587            }
17588        }
17589        ///Returns a mutable reference to `move_call`.
17590        ///If the field is unset, it is first initialized with the default value.
17591        ///If any other oneof field in the same oneof is set, it will be cleared.
17592        pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17593            if self.move_call_opt_mut().is_none() {
17594                self.predicate = Some(
17595                    super::transaction_literal::Predicate::MoveCall(
17596                        super::MoveCallFilter::default(),
17597                    ),
17598                );
17599            }
17600            self.move_call_opt_mut().unwrap()
17601        }
17602        ///Sets `move_call` with the provided value.
17603        ///If any other oneof field in the same oneof is set, it will be cleared.
17604        pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17605            self.predicate = Some(
17606                super::transaction_literal::Predicate::MoveCall(field.into().into()),
17607            );
17608        }
17609        ///Sets `move_call` with the provided value.
17610        ///If any other oneof field in the same oneof is set, it will be cleared.
17611        pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17612            mut self,
17613            field: T,
17614        ) -> Self {
17615            self.set_move_call(field.into());
17616            self
17617        }
17618        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
17619        pub fn emit_module(&self) -> &super::EmitModuleFilter {
17620            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17621                .predicate
17622            {
17623                field as _
17624            } else {
17625                super::EmitModuleFilter::default_instance() as _
17626            }
17627        }
17628        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
17629        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17630            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17631                .predicate
17632            {
17633                Some(field as _)
17634            } else {
17635                None
17636            }
17637        }
17638        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17639        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17640            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17641                .predicate
17642            {
17643                Some(field as _)
17644            } else {
17645                None
17646            }
17647        }
17648        ///Returns a mutable reference to `emit_module`.
17649        ///If the field is unset, it is first initialized with the default value.
17650        ///If any other oneof field in the same oneof is set, it will be cleared.
17651        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17652            if self.emit_module_opt_mut().is_none() {
17653                self.predicate = Some(
17654                    super::transaction_literal::Predicate::EmitModule(
17655                        super::EmitModuleFilter::default(),
17656                    ),
17657                );
17658            }
17659            self.emit_module_opt_mut().unwrap()
17660        }
17661        ///Sets `emit_module` with the provided value.
17662        ///If any other oneof field in the same oneof is set, it will be cleared.
17663        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17664            self.predicate = Some(
17665                super::transaction_literal::Predicate::EmitModule(field.into().into()),
17666            );
17667        }
17668        ///Sets `emit_module` with the provided value.
17669        ///If any other oneof field in the same oneof is set, it will be cleared.
17670        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17671            mut self,
17672            field: T,
17673        ) -> Self {
17674            self.set_emit_module(field.into());
17675            self
17676        }
17677        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
17678        pub fn event_type(&self) -> &super::EventTypeFilter {
17679            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17680                .predicate
17681            {
17682                field as _
17683            } else {
17684                super::EventTypeFilter::default_instance() as _
17685            }
17686        }
17687        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
17688        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17689            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17690                .predicate
17691            {
17692                Some(field as _)
17693            } else {
17694                None
17695            }
17696        }
17697        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17698        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17699            if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17700                .predicate
17701            {
17702                Some(field as _)
17703            } else {
17704                None
17705            }
17706        }
17707        ///Returns a mutable reference to `event_type`.
17708        ///If the field is unset, it is first initialized with the default value.
17709        ///If any other oneof field in the same oneof is set, it will be cleared.
17710        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17711            if self.event_type_opt_mut().is_none() {
17712                self.predicate = Some(
17713                    super::transaction_literal::Predicate::EventType(
17714                        super::EventTypeFilter::default(),
17715                    ),
17716                );
17717            }
17718            self.event_type_opt_mut().unwrap()
17719        }
17720        ///Sets `event_type` with the provided value.
17721        ///If any other oneof field in the same oneof is set, it will be cleared.
17722        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17723            self.predicate = Some(
17724                super::transaction_literal::Predicate::EventType(field.into().into()),
17725            );
17726        }
17727        ///Sets `event_type` with the provided value.
17728        ///If any other oneof field in the same oneof is set, it will be cleared.
17729        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17730            mut self,
17731            field: T,
17732        ) -> Self {
17733            self.set_event_type(field.into());
17734            self
17735        }
17736        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
17737        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17738            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17739                .predicate
17740            {
17741                field as _
17742            } else {
17743                super::EventStreamHeadFilter::default_instance() as _
17744            }
17745        }
17746        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
17747        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17748            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17749                .predicate
17750            {
17751                Some(field as _)
17752            } else {
17753                None
17754            }
17755        }
17756        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17757        pub fn event_stream_head_opt_mut(
17758            &mut self,
17759        ) -> Option<&mut super::EventStreamHeadFilter> {
17760            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
17761                .predicate
17762            {
17763                Some(field as _)
17764            } else {
17765                None
17766            }
17767        }
17768        ///Returns a mutable reference to `event_stream_head`.
17769        ///If the field is unset, it is first initialized with the default value.
17770        ///If any other oneof field in the same oneof is set, it will be cleared.
17771        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
17772            if self.event_stream_head_opt_mut().is_none() {
17773                self.predicate = Some(
17774                    super::transaction_literal::Predicate::EventStreamHead(
17775                        super::EventStreamHeadFilter::default(),
17776                    ),
17777                );
17778            }
17779            self.event_stream_head_opt_mut().unwrap()
17780        }
17781        ///Sets `event_stream_head` with the provided value.
17782        ///If any other oneof field in the same oneof is set, it will be cleared.
17783        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17784            &mut self,
17785            field: T,
17786        ) {
17787            self.predicate = Some(
17788                super::transaction_literal::Predicate::EventStreamHead(
17789                    field.into().into(),
17790                ),
17791            );
17792        }
17793        ///Sets `event_stream_head` with the provided value.
17794        ///If any other oneof field in the same oneof is set, it will be cleared.
17795        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17796            mut self,
17797            field: T,
17798        ) -> Self {
17799            self.set_event_stream_head(field.into());
17800            self
17801        }
17802        ///Returns the value of `package_write`, or the default value if `package_write` is unset.
17803        pub fn package_write(&self) -> &super::PackageWriteFilter {
17804            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17805                .predicate
17806            {
17807                field as _
17808            } else {
17809                super::PackageWriteFilter::default_instance() as _
17810            }
17811        }
17812        ///If `package_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
17813        pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
17814            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17815                .predicate
17816            {
17817                Some(field as _)
17818            } else {
17819                None
17820            }
17821        }
17822        ///If `package_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17823        pub fn package_write_opt_mut(
17824            &mut self,
17825        ) -> Option<&mut super::PackageWriteFilter> {
17826            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
17827                .predicate
17828            {
17829                Some(field as _)
17830            } else {
17831                None
17832            }
17833        }
17834        ///Returns a mutable reference to `package_write`.
17835        ///If the field is unset, it is first initialized with the default value.
17836        ///If any other oneof field in the same oneof is set, it will be cleared.
17837        pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
17838            if self.package_write_opt_mut().is_none() {
17839                self.predicate = Some(
17840                    super::transaction_literal::Predicate::PackageWrite(
17841                        super::PackageWriteFilter::default(),
17842                    ),
17843                );
17844            }
17845            self.package_write_opt_mut().unwrap()
17846        }
17847        ///Sets `package_write` with the provided value.
17848        ///If any other oneof field in the same oneof is set, it will be cleared.
17849        pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
17850            &mut self,
17851            field: T,
17852        ) {
17853            self.predicate = Some(
17854                super::transaction_literal::Predicate::PackageWrite(field.into().into()),
17855            );
17856        }
17857        ///Sets `package_write` with the provided value.
17858        ///If any other oneof field in the same oneof is set, it will be cleared.
17859        pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
17860            mut self,
17861            field: T,
17862        ) -> Self {
17863            self.set_package_write(field.into());
17864            self
17865        }
17866    }
17867    impl super::TransactionTerm {
17868        pub const fn const_default() -> Self {
17869            Self { literals: Vec::new() }
17870        }
17871        #[doc(hidden)]
17872        pub fn default_instance() -> &'static Self {
17873            static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
17874            &DEFAULT
17875        }
17876        ///Returns the value of `literals`, or the default value if `literals` is unset.
17877        pub fn literals(&self) -> &[super::TransactionLiteral] {
17878            &self.literals
17879        }
17880        ///Returns a mutable reference to `literals`.
17881        ///If the field is unset, it is first initialized with the default value.
17882        pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
17883            &mut self.literals
17884        }
17885        ///Sets `literals` with the provided value.
17886        pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
17887            self.literals = field;
17888        }
17889        ///Sets `literals` with the provided value.
17890        pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
17891            self.set_literals(field);
17892            self
17893        }
17894    }
17895    impl super::TransferObjects {
17896        pub const fn const_default() -> Self {
17897            Self {
17898                objects: Vec::new(),
17899                address: None,
17900            }
17901        }
17902        #[doc(hidden)]
17903        pub fn default_instance() -> &'static Self {
17904            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
17905            &DEFAULT
17906        }
17907        ///Returns the value of `objects`, or the default value if `objects` is unset.
17908        pub fn objects(&self) -> &[super::Argument] {
17909            &self.objects
17910        }
17911        ///Returns a mutable reference to `objects`.
17912        ///If the field is unset, it is first initialized with the default value.
17913        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
17914            &mut self.objects
17915        }
17916        ///Sets `objects` with the provided value.
17917        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
17918            self.objects = field;
17919        }
17920        ///Sets `objects` with the provided value.
17921        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
17922            self.set_objects(field);
17923            self
17924        }
17925        ///Returns the value of `address`, or the default value if `address` is unset.
17926        pub fn address(&self) -> &super::Argument {
17927            self.address
17928                .as_ref()
17929                .map(|field| field as _)
17930                .unwrap_or_else(|| super::Argument::default_instance() as _)
17931        }
17932        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17933        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
17934            self.address.as_mut().map(|field| field as _)
17935        }
17936        ///Returns a mutable reference to `address`.
17937        ///If the field is unset, it is first initialized with the default value.
17938        pub fn address_mut(&mut self) -> &mut super::Argument {
17939            self.address.get_or_insert_default()
17940        }
17941        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17942        pub fn address_opt(&self) -> Option<&super::Argument> {
17943            self.address.as_ref().map(|field| field as _)
17944        }
17945        ///Sets `address` with the provided value.
17946        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
17947            self.address = Some(field.into().into());
17948        }
17949        ///Sets `address` with the provided value.
17950        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
17951            self.set_address(field.into());
17952            self
17953        }
17954    }
17955    impl super::TypeArgumentError {
17956        pub const fn const_default() -> Self {
17957            Self {
17958                type_argument: None,
17959                kind: None,
17960            }
17961        }
17962        #[doc(hidden)]
17963        pub fn default_instance() -> &'static Self {
17964            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
17965            &DEFAULT
17966        }
17967        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17968        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
17969            self.type_argument.as_mut().map(|field| field as _)
17970        }
17971        ///Returns a mutable reference to `type_argument`.
17972        ///If the field is unset, it is first initialized with the default value.
17973        pub fn type_argument_mut(&mut self) -> &mut u32 {
17974            self.type_argument.get_or_insert_default()
17975        }
17976        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
17977        pub fn type_argument_opt(&self) -> Option<u32> {
17978            self.type_argument.as_ref().map(|field| *field)
17979        }
17980        ///Sets `type_argument` with the provided value.
17981        pub fn set_type_argument(&mut self, field: u32) {
17982            self.type_argument = Some(field);
17983        }
17984        ///Sets `type_argument` with the provided value.
17985        pub fn with_type_argument(mut self, field: u32) -> Self {
17986            self.set_type_argument(field);
17987            self
17988        }
17989        ///Sets `kind` with the provided value.
17990        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
17991            mut self,
17992            field: T,
17993        ) -> Self {
17994            self.set_kind(field.into());
17995            self
17996        }
17997    }
17998    impl super::TypeOrigin {
17999        pub const fn const_default() -> Self {
18000            Self {
18001                module_name: None,
18002                datatype_name: None,
18003                package_id: None,
18004            }
18005        }
18006        #[doc(hidden)]
18007        pub fn default_instance() -> &'static Self {
18008            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18009            &DEFAULT
18010        }
18011        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18012        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18013            self.module_name.as_mut().map(|field| field as _)
18014        }
18015        ///Returns a mutable reference to `module_name`.
18016        ///If the field is unset, it is first initialized with the default value.
18017        pub fn module_name_mut(&mut self) -> &mut String {
18018            self.module_name.get_or_insert_default()
18019        }
18020        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18021        pub fn module_name_opt(&self) -> Option<&str> {
18022            self.module_name.as_ref().map(|field| field as _)
18023        }
18024        ///Sets `module_name` with the provided value.
18025        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18026            self.module_name = Some(field.into().into());
18027        }
18028        ///Sets `module_name` with the provided value.
18029        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18030            self.set_module_name(field.into());
18031            self
18032        }
18033        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18034        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18035            self.datatype_name.as_mut().map(|field| field as _)
18036        }
18037        ///Returns a mutable reference to `datatype_name`.
18038        ///If the field is unset, it is first initialized with the default value.
18039        pub fn datatype_name_mut(&mut self) -> &mut String {
18040            self.datatype_name.get_or_insert_default()
18041        }
18042        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18043        pub fn datatype_name_opt(&self) -> Option<&str> {
18044            self.datatype_name.as_ref().map(|field| field as _)
18045        }
18046        ///Sets `datatype_name` with the provided value.
18047        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18048            self.datatype_name = Some(field.into().into());
18049        }
18050        ///Sets `datatype_name` with the provided value.
18051        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18052            self.set_datatype_name(field.into());
18053            self
18054        }
18055        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18056        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18057            self.package_id.as_mut().map(|field| field as _)
18058        }
18059        ///Returns a mutable reference to `package_id`.
18060        ///If the field is unset, it is first initialized with the default value.
18061        pub fn package_id_mut(&mut self) -> &mut String {
18062            self.package_id.get_or_insert_default()
18063        }
18064        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18065        pub fn package_id_opt(&self) -> Option<&str> {
18066            self.package_id.as_ref().map(|field| field as _)
18067        }
18068        ///Sets `package_id` with the provided value.
18069        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18070            self.package_id = Some(field.into().into());
18071        }
18072        ///Sets `package_id` with the provided value.
18073        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18074            self.set_package_id(field.into());
18075            self
18076        }
18077    }
18078    impl super::TypeParameter {
18079        pub const fn const_default() -> Self {
18080            Self {
18081                constraints: Vec::new(),
18082                is_phantom: None,
18083            }
18084        }
18085        #[doc(hidden)]
18086        pub fn default_instance() -> &'static Self {
18087            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18088            &DEFAULT
18089        }
18090        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18091        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18092            self.is_phantom.as_mut().map(|field| field as _)
18093        }
18094        ///Returns a mutable reference to `is_phantom`.
18095        ///If the field is unset, it is first initialized with the default value.
18096        pub fn is_phantom_mut(&mut self) -> &mut bool {
18097            self.is_phantom.get_or_insert_default()
18098        }
18099        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
18100        pub fn is_phantom_opt(&self) -> Option<bool> {
18101            self.is_phantom.as_ref().map(|field| *field)
18102        }
18103        ///Sets `is_phantom` with the provided value.
18104        pub fn set_is_phantom(&mut self, field: bool) {
18105            self.is_phantom = Some(field);
18106        }
18107        ///Sets `is_phantom` with the provided value.
18108        pub fn with_is_phantom(mut self, field: bool) -> Self {
18109            self.set_is_phantom(field);
18110            self
18111        }
18112    }
18113    impl super::UnchangedConsensusObject {
18114        pub const fn const_default() -> Self {
18115            Self {
18116                kind: None,
18117                object_id: None,
18118                version: None,
18119                digest: None,
18120                object_type: None,
18121            }
18122        }
18123        #[doc(hidden)]
18124        pub fn default_instance() -> &'static Self {
18125            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18126            &DEFAULT
18127        }
18128        ///Sets `kind` with the provided value.
18129        pub fn with_kind<
18130            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18131        >(mut self, field: T) -> Self {
18132            self.set_kind(field.into());
18133            self
18134        }
18135        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18136        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18137            self.object_id.as_mut().map(|field| field as _)
18138        }
18139        ///Returns a mutable reference to `object_id`.
18140        ///If the field is unset, it is first initialized with the default value.
18141        pub fn object_id_mut(&mut self) -> &mut String {
18142            self.object_id.get_or_insert_default()
18143        }
18144        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18145        pub fn object_id_opt(&self) -> Option<&str> {
18146            self.object_id.as_ref().map(|field| field as _)
18147        }
18148        ///Sets `object_id` with the provided value.
18149        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18150            self.object_id = Some(field.into().into());
18151        }
18152        ///Sets `object_id` with the provided value.
18153        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18154            self.set_object_id(field.into());
18155            self
18156        }
18157        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18158        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18159            self.version.as_mut().map(|field| field as _)
18160        }
18161        ///Returns a mutable reference to `version`.
18162        ///If the field is unset, it is first initialized with the default value.
18163        pub fn version_mut(&mut self) -> &mut u64 {
18164            self.version.get_or_insert_default()
18165        }
18166        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
18167        pub fn version_opt(&self) -> Option<u64> {
18168            self.version.as_ref().map(|field| *field)
18169        }
18170        ///Sets `version` with the provided value.
18171        pub fn set_version(&mut self, field: u64) {
18172            self.version = Some(field);
18173        }
18174        ///Sets `version` with the provided value.
18175        pub fn with_version(mut self, field: u64) -> Self {
18176            self.set_version(field);
18177            self
18178        }
18179        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18180        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18181            self.digest.as_mut().map(|field| field as _)
18182        }
18183        ///Returns a mutable reference to `digest`.
18184        ///If the field is unset, it is first initialized with the default value.
18185        pub fn digest_mut(&mut self) -> &mut String {
18186            self.digest.get_or_insert_default()
18187        }
18188        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18189        pub fn digest_opt(&self) -> Option<&str> {
18190            self.digest.as_ref().map(|field| field as _)
18191        }
18192        ///Sets `digest` with the provided value.
18193        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18194            self.digest = Some(field.into().into());
18195        }
18196        ///Sets `digest` with the provided value.
18197        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18198            self.set_digest(field.into());
18199            self
18200        }
18201        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18202        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18203            self.object_type.as_mut().map(|field| field as _)
18204        }
18205        ///Returns a mutable reference to `object_type`.
18206        ///If the field is unset, it is first initialized with the default value.
18207        pub fn object_type_mut(&mut self) -> &mut String {
18208            self.object_type.get_or_insert_default()
18209        }
18210        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
18211        pub fn object_type_opt(&self) -> Option<&str> {
18212            self.object_type.as_ref().map(|field| field as _)
18213        }
18214        ///Sets `object_type` with the provided value.
18215        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18216            self.object_type = Some(field.into().into());
18217        }
18218        ///Sets `object_type` with the provided value.
18219        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18220            self.set_object_type(field.into());
18221            self
18222        }
18223    }
18224    impl super::Upgrade {
18225        pub const fn const_default() -> Self {
18226            Self {
18227                modules: Vec::new(),
18228                dependencies: Vec::new(),
18229                package: None,
18230                ticket: None,
18231            }
18232        }
18233        #[doc(hidden)]
18234        pub fn default_instance() -> &'static Self {
18235            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18236            &DEFAULT
18237        }
18238        ///Returns the value of `modules`, or the default value if `modules` is unset.
18239        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18240            &self.modules
18241        }
18242        ///Returns a mutable reference to `modules`.
18243        ///If the field is unset, it is first initialized with the default value.
18244        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18245            &mut self.modules
18246        }
18247        ///Sets `modules` with the provided value.
18248        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18249            self.modules = field;
18250        }
18251        ///Sets `modules` with the provided value.
18252        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18253            self.set_modules(field);
18254            self
18255        }
18256        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
18257        pub fn dependencies(&self) -> &[String] {
18258            &self.dependencies
18259        }
18260        ///Returns a mutable reference to `dependencies`.
18261        ///If the field is unset, it is first initialized with the default value.
18262        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18263            &mut self.dependencies
18264        }
18265        ///Sets `dependencies` with the provided value.
18266        pub fn set_dependencies(&mut self, field: Vec<String>) {
18267            self.dependencies = field;
18268        }
18269        ///Sets `dependencies` with the provided value.
18270        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18271            self.set_dependencies(field);
18272            self
18273        }
18274        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18275        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18276            self.package.as_mut().map(|field| field as _)
18277        }
18278        ///Returns a mutable reference to `package`.
18279        ///If the field is unset, it is first initialized with the default value.
18280        pub fn package_mut(&mut self) -> &mut String {
18281            self.package.get_or_insert_default()
18282        }
18283        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
18284        pub fn package_opt(&self) -> Option<&str> {
18285            self.package.as_ref().map(|field| field as _)
18286        }
18287        ///Sets `package` with the provided value.
18288        pub fn set_package<T: Into<String>>(&mut self, field: T) {
18289            self.package = Some(field.into().into());
18290        }
18291        ///Sets `package` with the provided value.
18292        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18293            self.set_package(field.into());
18294            self
18295        }
18296        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
18297        pub fn ticket(&self) -> &super::Argument {
18298            self.ticket
18299                .as_ref()
18300                .map(|field| field as _)
18301                .unwrap_or_else(|| super::Argument::default_instance() as _)
18302        }
18303        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18304        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18305            self.ticket.as_mut().map(|field| field as _)
18306        }
18307        ///Returns a mutable reference to `ticket`.
18308        ///If the field is unset, it is first initialized with the default value.
18309        pub fn ticket_mut(&mut self) -> &mut super::Argument {
18310            self.ticket.get_or_insert_default()
18311        }
18312        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
18313        pub fn ticket_opt(&self) -> Option<&super::Argument> {
18314            self.ticket.as_ref().map(|field| field as _)
18315        }
18316        ///Sets `ticket` with the provided value.
18317        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18318            self.ticket = Some(field.into().into());
18319        }
18320        ///Sets `ticket` with the provided value.
18321        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18322            self.set_ticket(field.into());
18323            self
18324        }
18325    }
18326    impl super::UserSignature {
18327        pub const fn const_default() -> Self {
18328            Self {
18329                bcs: None,
18330                scheme: None,
18331                signature: None,
18332            }
18333        }
18334        #[doc(hidden)]
18335        pub fn default_instance() -> &'static Self {
18336            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18337            &DEFAULT
18338        }
18339        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
18340        pub fn bcs(&self) -> &super::Bcs {
18341            self.bcs
18342                .as_ref()
18343                .map(|field| field as _)
18344                .unwrap_or_else(|| super::Bcs::default_instance() as _)
18345        }
18346        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18347        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18348            self.bcs.as_mut().map(|field| field as _)
18349        }
18350        ///Returns a mutable reference to `bcs`.
18351        ///If the field is unset, it is first initialized with the default value.
18352        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18353            self.bcs.get_or_insert_default()
18354        }
18355        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
18356        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18357            self.bcs.as_ref().map(|field| field as _)
18358        }
18359        ///Sets `bcs` with the provided value.
18360        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18361            self.bcs = Some(field.into().into());
18362        }
18363        ///Sets `bcs` with the provided value.
18364        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18365            self.set_bcs(field.into());
18366            self
18367        }
18368        ///Sets `scheme` with the provided value.
18369        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18370            self.set_scheme(field.into());
18371            self
18372        }
18373        ///Returns the value of `simple`, or the default value if `simple` is unset.
18374        pub fn simple(&self) -> &super::SimpleSignature {
18375            if let Some(super::user_signature::Signature::Simple(field)) = &self
18376                .signature
18377            {
18378                field as _
18379            } else {
18380                super::SimpleSignature::default_instance() as _
18381            }
18382        }
18383        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
18384        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18385            if let Some(super::user_signature::Signature::Simple(field)) = &self
18386                .signature
18387            {
18388                Some(field as _)
18389            } else {
18390                None
18391            }
18392        }
18393        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18394        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18395            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18396                .signature
18397            {
18398                Some(field as _)
18399            } else {
18400                None
18401            }
18402        }
18403        ///Returns a mutable reference to `simple`.
18404        ///If the field is unset, it is first initialized with the default value.
18405        ///If any other oneof field in the same oneof is set, it will be cleared.
18406        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18407            if self.simple_opt_mut().is_none() {
18408                self.signature = Some(
18409                    super::user_signature::Signature::Simple(
18410                        super::SimpleSignature::default(),
18411                    ),
18412                );
18413            }
18414            self.simple_opt_mut().unwrap()
18415        }
18416        ///Sets `simple` with the provided value.
18417        ///If any other oneof field in the same oneof is set, it will be cleared.
18418        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18419            self.signature = Some(
18420                super::user_signature::Signature::Simple(field.into().into()),
18421            );
18422        }
18423        ///Sets `simple` with the provided value.
18424        ///If any other oneof field in the same oneof is set, it will be cleared.
18425        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18426            self.set_simple(field.into());
18427            self
18428        }
18429        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
18430        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18431            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18432                .signature
18433            {
18434                field as _
18435            } else {
18436                super::MultisigAggregatedSignature::default_instance() as _
18437            }
18438        }
18439        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
18440        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18441            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18442                .signature
18443            {
18444                Some(field as _)
18445            } else {
18446                None
18447            }
18448        }
18449        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18450        pub fn multisig_opt_mut(
18451            &mut self,
18452        ) -> Option<&mut super::MultisigAggregatedSignature> {
18453            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18454                .signature
18455            {
18456                Some(field as _)
18457            } else {
18458                None
18459            }
18460        }
18461        ///Returns a mutable reference to `multisig`.
18462        ///If the field is unset, it is first initialized with the default value.
18463        ///If any other oneof field in the same oneof is set, it will be cleared.
18464        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18465            if self.multisig_opt_mut().is_none() {
18466                self.signature = Some(
18467                    super::user_signature::Signature::Multisig(
18468                        super::MultisigAggregatedSignature::default(),
18469                    ),
18470                );
18471            }
18472            self.multisig_opt_mut().unwrap()
18473        }
18474        ///Sets `multisig` with the provided value.
18475        ///If any other oneof field in the same oneof is set, it will be cleared.
18476        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18477            &mut self,
18478            field: T,
18479        ) {
18480            self.signature = Some(
18481                super::user_signature::Signature::Multisig(field.into().into()),
18482            );
18483        }
18484        ///Sets `multisig` with the provided value.
18485        ///If any other oneof field in the same oneof is set, it will be cleared.
18486        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18487            mut self,
18488            field: T,
18489        ) -> Self {
18490            self.set_multisig(field.into());
18491            self
18492        }
18493        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
18494        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18495            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18496                .signature
18497            {
18498                field as _
18499            } else {
18500                super::ZkLoginAuthenticator::default_instance() as _
18501            }
18502        }
18503        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
18504        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18505            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18506                .signature
18507            {
18508                Some(field as _)
18509            } else {
18510                None
18511            }
18512        }
18513        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18514        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18515            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18516                .signature
18517            {
18518                Some(field as _)
18519            } else {
18520                None
18521            }
18522        }
18523        ///Returns a mutable reference to `zklogin`.
18524        ///If the field is unset, it is first initialized with the default value.
18525        ///If any other oneof field in the same oneof is set, it will be cleared.
18526        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18527            if self.zklogin_opt_mut().is_none() {
18528                self.signature = Some(
18529                    super::user_signature::Signature::Zklogin(
18530                        super::ZkLoginAuthenticator::default(),
18531                    ),
18532                );
18533            }
18534            self.zklogin_opt_mut().unwrap()
18535        }
18536        ///Sets `zklogin` with the provided value.
18537        ///If any other oneof field in the same oneof is set, it will be cleared.
18538        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18539            self.signature = Some(
18540                super::user_signature::Signature::Zklogin(field.into().into()),
18541            );
18542        }
18543        ///Sets `zklogin` with the provided value.
18544        ///If any other oneof field in the same oneof is set, it will be cleared.
18545        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18546            mut self,
18547            field: T,
18548        ) -> Self {
18549            self.set_zklogin(field.into());
18550            self
18551        }
18552        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
18553        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18554            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18555                .signature
18556            {
18557                field as _
18558            } else {
18559                super::PasskeyAuthenticator::default_instance() as _
18560            }
18561        }
18562        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
18563        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18564            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18565                .signature
18566            {
18567                Some(field as _)
18568            } else {
18569                None
18570            }
18571        }
18572        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18573        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18574            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18575                .signature
18576            {
18577                Some(field as _)
18578            } else {
18579                None
18580            }
18581        }
18582        ///Returns a mutable reference to `passkey`.
18583        ///If the field is unset, it is first initialized with the default value.
18584        ///If any other oneof field in the same oneof is set, it will be cleared.
18585        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18586            if self.passkey_opt_mut().is_none() {
18587                self.signature = Some(
18588                    super::user_signature::Signature::Passkey(
18589                        super::PasskeyAuthenticator::default(),
18590                    ),
18591                );
18592            }
18593            self.passkey_opt_mut().unwrap()
18594        }
18595        ///Sets `passkey` with the provided value.
18596        ///If any other oneof field in the same oneof is set, it will be cleared.
18597        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18598            self.signature = Some(
18599                super::user_signature::Signature::Passkey(field.into().into()),
18600            );
18601        }
18602        ///Sets `passkey` with the provided value.
18603        ///If any other oneof field in the same oneof is set, it will be cleared.
18604        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18605            mut self,
18606            field: T,
18607        ) -> Self {
18608            self.set_passkey(field.into());
18609            self
18610        }
18611    }
18612    impl super::Validator {
18613        pub const fn const_default() -> Self {
18614            Self {
18615                name: None,
18616                address: None,
18617                description: None,
18618                image_url: None,
18619                project_url: None,
18620                protocol_public_key: None,
18621                proof_of_possession: None,
18622                network_public_key: None,
18623                worker_public_key: None,
18624                network_address: None,
18625                p2p_address: None,
18626                primary_address: None,
18627                worker_address: None,
18628                next_epoch_protocol_public_key: None,
18629                next_epoch_proof_of_possession: None,
18630                next_epoch_network_public_key: None,
18631                next_epoch_worker_public_key: None,
18632                next_epoch_network_address: None,
18633                next_epoch_p2p_address: None,
18634                next_epoch_primary_address: None,
18635                next_epoch_worker_address: None,
18636                metadata_extra_fields: None,
18637                voting_power: None,
18638                operation_cap_id: None,
18639                gas_price: None,
18640                staking_pool: None,
18641                commission_rate: None,
18642                next_epoch_stake: None,
18643                next_epoch_gas_price: None,
18644                next_epoch_commission_rate: None,
18645                extra_fields: None,
18646            }
18647        }
18648        #[doc(hidden)]
18649        pub fn default_instance() -> &'static Self {
18650            static DEFAULT: super::Validator = super::Validator::const_default();
18651            &DEFAULT
18652        }
18653        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18654        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18655            self.name.as_mut().map(|field| field as _)
18656        }
18657        ///Returns a mutable reference to `name`.
18658        ///If the field is unset, it is first initialized with the default value.
18659        pub fn name_mut(&mut self) -> &mut String {
18660            self.name.get_or_insert_default()
18661        }
18662        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18663        pub fn name_opt(&self) -> Option<&str> {
18664            self.name.as_ref().map(|field| field as _)
18665        }
18666        ///Sets `name` with the provided value.
18667        pub fn set_name<T: Into<String>>(&mut self, field: T) {
18668            self.name = Some(field.into().into());
18669        }
18670        ///Sets `name` with the provided value.
18671        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18672            self.set_name(field.into());
18673            self
18674        }
18675        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18676        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18677            self.address.as_mut().map(|field| field as _)
18678        }
18679        ///Returns a mutable reference to `address`.
18680        ///If the field is unset, it is first initialized with the default value.
18681        pub fn address_mut(&mut self) -> &mut String {
18682            self.address.get_or_insert_default()
18683        }
18684        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18685        pub fn address_opt(&self) -> Option<&str> {
18686            self.address.as_ref().map(|field| field as _)
18687        }
18688        ///Sets `address` with the provided value.
18689        pub fn set_address<T: Into<String>>(&mut self, field: T) {
18690            self.address = Some(field.into().into());
18691        }
18692        ///Sets `address` with the provided value.
18693        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18694            self.set_address(field.into());
18695            self
18696        }
18697        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18698        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18699            self.description.as_mut().map(|field| field as _)
18700        }
18701        ///Returns a mutable reference to `description`.
18702        ///If the field is unset, it is first initialized with the default value.
18703        pub fn description_mut(&mut self) -> &mut String {
18704            self.description.get_or_insert_default()
18705        }
18706        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
18707        pub fn description_opt(&self) -> Option<&str> {
18708            self.description.as_ref().map(|field| field as _)
18709        }
18710        ///Sets `description` with the provided value.
18711        pub fn set_description<T: Into<String>>(&mut self, field: T) {
18712            self.description = Some(field.into().into());
18713        }
18714        ///Sets `description` with the provided value.
18715        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18716            self.set_description(field.into());
18717            self
18718        }
18719        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18720        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18721            self.image_url.as_mut().map(|field| field as _)
18722        }
18723        ///Returns a mutable reference to `image_url`.
18724        ///If the field is unset, it is first initialized with the default value.
18725        pub fn image_url_mut(&mut self) -> &mut String {
18726            self.image_url.get_or_insert_default()
18727        }
18728        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18729        pub fn image_url_opt(&self) -> Option<&str> {
18730            self.image_url.as_ref().map(|field| field as _)
18731        }
18732        ///Sets `image_url` with the provided value.
18733        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18734            self.image_url = Some(field.into().into());
18735        }
18736        ///Sets `image_url` with the provided value.
18737        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18738            self.set_image_url(field.into());
18739            self
18740        }
18741        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18742        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18743            self.project_url.as_mut().map(|field| field as _)
18744        }
18745        ///Returns a mutable reference to `project_url`.
18746        ///If the field is unset, it is first initialized with the default value.
18747        pub fn project_url_mut(&mut self) -> &mut String {
18748            self.project_url.get_or_insert_default()
18749        }
18750        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18751        pub fn project_url_opt(&self) -> Option<&str> {
18752            self.project_url.as_ref().map(|field| field as _)
18753        }
18754        ///Sets `project_url` with the provided value.
18755        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
18756            self.project_url = Some(field.into().into());
18757        }
18758        ///Sets `project_url` with the provided value.
18759        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
18760            self.set_project_url(field.into());
18761            self
18762        }
18763        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18764        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
18765            self.protocol_public_key.as_ref().map(|field| field as _)
18766        }
18767        ///Sets `protocol_public_key` with the provided value.
18768        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18769            &mut self,
18770            field: T,
18771        ) {
18772            self.protocol_public_key = Some(field.into().into());
18773        }
18774        ///Sets `protocol_public_key` with the provided value.
18775        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18776            mut self,
18777            field: T,
18778        ) -> Self {
18779            self.set_protocol_public_key(field.into());
18780            self
18781        }
18782        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
18783        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
18784            self.proof_of_possession.as_ref().map(|field| field as _)
18785        }
18786        ///Sets `proof_of_possession` with the provided value.
18787        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18788            &mut self,
18789            field: T,
18790        ) {
18791            self.proof_of_possession = Some(field.into().into());
18792        }
18793        ///Sets `proof_of_possession` with the provided value.
18794        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18795            mut self,
18796            field: T,
18797        ) -> Self {
18798            self.set_proof_of_possession(field.into());
18799            self
18800        }
18801        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18802        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
18803            self.network_public_key.as_ref().map(|field| field as _)
18804        }
18805        ///Sets `network_public_key` with the provided value.
18806        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
18807            &mut self,
18808            field: T,
18809        ) {
18810            self.network_public_key = Some(field.into().into());
18811        }
18812        ///Sets `network_public_key` with the provided value.
18813        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
18814            mut self,
18815            field: T,
18816        ) -> Self {
18817            self.set_network_public_key(field.into());
18818            self
18819        }
18820        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18821        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
18822            self.worker_public_key.as_ref().map(|field| field as _)
18823        }
18824        ///Sets `worker_public_key` with the provided value.
18825        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18826            &mut self,
18827            field: T,
18828        ) {
18829            self.worker_public_key = Some(field.into().into());
18830        }
18831        ///Sets `worker_public_key` with the provided value.
18832        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18833            mut self,
18834            field: T,
18835        ) -> Self {
18836            self.set_worker_public_key(field.into());
18837            self
18838        }
18839        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18840        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
18841            self.network_address.as_mut().map(|field| field as _)
18842        }
18843        ///Returns a mutable reference to `network_address`.
18844        ///If the field is unset, it is first initialized with the default value.
18845        pub fn network_address_mut(&mut self) -> &mut String {
18846            self.network_address.get_or_insert_default()
18847        }
18848        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18849        pub fn network_address_opt(&self) -> Option<&str> {
18850            self.network_address.as_ref().map(|field| field as _)
18851        }
18852        ///Sets `network_address` with the provided value.
18853        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
18854            self.network_address = Some(field.into().into());
18855        }
18856        ///Sets `network_address` with the provided value.
18857        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
18858            self.set_network_address(field.into());
18859            self
18860        }
18861        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18862        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
18863            self.p2p_address.as_mut().map(|field| field as _)
18864        }
18865        ///Returns a mutable reference to `p2p_address`.
18866        ///If the field is unset, it is first initialized with the default value.
18867        pub fn p2p_address_mut(&mut self) -> &mut String {
18868            self.p2p_address.get_or_insert_default()
18869        }
18870        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18871        pub fn p2p_address_opt(&self) -> Option<&str> {
18872            self.p2p_address.as_ref().map(|field| field as _)
18873        }
18874        ///Sets `p2p_address` with the provided value.
18875        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
18876            self.p2p_address = Some(field.into().into());
18877        }
18878        ///Sets `p2p_address` with the provided value.
18879        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
18880            self.set_p2p_address(field.into());
18881            self
18882        }
18883        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18884        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
18885            self.primary_address.as_mut().map(|field| field as _)
18886        }
18887        ///Returns a mutable reference to `primary_address`.
18888        ///If the field is unset, it is first initialized with the default value.
18889        pub fn primary_address_mut(&mut self) -> &mut String {
18890            self.primary_address.get_or_insert_default()
18891        }
18892        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18893        pub fn primary_address_opt(&self) -> Option<&str> {
18894            self.primary_address.as_ref().map(|field| field as _)
18895        }
18896        ///Sets `primary_address` with the provided value.
18897        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
18898            self.primary_address = Some(field.into().into());
18899        }
18900        ///Sets `primary_address` with the provided value.
18901        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
18902            self.set_primary_address(field.into());
18903            self
18904        }
18905        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18906        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
18907            self.worker_address.as_mut().map(|field| field as _)
18908        }
18909        ///Returns a mutable reference to `worker_address`.
18910        ///If the field is unset, it is first initialized with the default value.
18911        pub fn worker_address_mut(&mut self) -> &mut String {
18912            self.worker_address.get_or_insert_default()
18913        }
18914        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18915        pub fn worker_address_opt(&self) -> Option<&str> {
18916            self.worker_address.as_ref().map(|field| field as _)
18917        }
18918        ///Sets `worker_address` with the provided value.
18919        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
18920            self.worker_address = Some(field.into().into());
18921        }
18922        ///Sets `worker_address` with the provided value.
18923        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
18924            self.set_worker_address(field.into());
18925            self
18926        }
18927        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18928        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
18929            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
18930        }
18931        ///Sets `next_epoch_protocol_public_key` with the provided value.
18932        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18933            &mut self,
18934            field: T,
18935        ) {
18936            self.next_epoch_protocol_public_key = Some(field.into().into());
18937        }
18938        ///Sets `next_epoch_protocol_public_key` with the provided value.
18939        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18940            mut self,
18941            field: T,
18942        ) -> Self {
18943            self.set_next_epoch_protocol_public_key(field.into());
18944            self
18945        }
18946        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
18947        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
18948            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
18949        }
18950        ///Sets `next_epoch_proof_of_possession` with the provided value.
18951        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18952            &mut self,
18953            field: T,
18954        ) {
18955            self.next_epoch_proof_of_possession = Some(field.into().into());
18956        }
18957        ///Sets `next_epoch_proof_of_possession` with the provided value.
18958        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18959            mut self,
18960            field: T,
18961        ) -> Self {
18962            self.set_next_epoch_proof_of_possession(field.into());
18963            self
18964        }
18965        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18966        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
18967            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
18968        }
18969        ///Sets `next_epoch_network_public_key` with the provided value.
18970        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
18971            &mut self,
18972            field: T,
18973        ) {
18974            self.next_epoch_network_public_key = Some(field.into().into());
18975        }
18976        ///Sets `next_epoch_network_public_key` with the provided value.
18977        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
18978            mut self,
18979            field: T,
18980        ) -> Self {
18981            self.set_next_epoch_network_public_key(field.into());
18982            self
18983        }
18984        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18985        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
18986            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
18987        }
18988        ///Sets `next_epoch_worker_public_key` with the provided value.
18989        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18990            &mut self,
18991            field: T,
18992        ) {
18993            self.next_epoch_worker_public_key = Some(field.into().into());
18994        }
18995        ///Sets `next_epoch_worker_public_key` with the provided value.
18996        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18997            mut self,
18998            field: T,
18999        ) -> Self {
19000            self.set_next_epoch_worker_public_key(field.into());
19001            self
19002        }
19003        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19004        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19005            self.next_epoch_network_address.as_mut().map(|field| field as _)
19006        }
19007        ///Returns a mutable reference to `next_epoch_network_address`.
19008        ///If the field is unset, it is first initialized with the default value.
19009        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19010            self.next_epoch_network_address.get_or_insert_default()
19011        }
19012        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19013        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19014            self.next_epoch_network_address.as_ref().map(|field| field as _)
19015        }
19016        ///Sets `next_epoch_network_address` with the provided value.
19017        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19018            self.next_epoch_network_address = Some(field.into().into());
19019        }
19020        ///Sets `next_epoch_network_address` with the provided value.
19021        pub fn with_next_epoch_network_address<T: Into<String>>(
19022            mut self,
19023            field: T,
19024        ) -> Self {
19025            self.set_next_epoch_network_address(field.into());
19026            self
19027        }
19028        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19029        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19030            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19031        }
19032        ///Returns a mutable reference to `next_epoch_p2p_address`.
19033        ///If the field is unset, it is first initialized with the default value.
19034        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19035            self.next_epoch_p2p_address.get_or_insert_default()
19036        }
19037        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19038        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19039            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19040        }
19041        ///Sets `next_epoch_p2p_address` with the provided value.
19042        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19043            self.next_epoch_p2p_address = Some(field.into().into());
19044        }
19045        ///Sets `next_epoch_p2p_address` with the provided value.
19046        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19047            self.set_next_epoch_p2p_address(field.into());
19048            self
19049        }
19050        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19051        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19052            self.next_epoch_primary_address.as_mut().map(|field| field as _)
19053        }
19054        ///Returns a mutable reference to `next_epoch_primary_address`.
19055        ///If the field is unset, it is first initialized with the default value.
19056        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19057            self.next_epoch_primary_address.get_or_insert_default()
19058        }
19059        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19060        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19061            self.next_epoch_primary_address.as_ref().map(|field| field as _)
19062        }
19063        ///Sets `next_epoch_primary_address` with the provided value.
19064        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19065            self.next_epoch_primary_address = Some(field.into().into());
19066        }
19067        ///Sets `next_epoch_primary_address` with the provided value.
19068        pub fn with_next_epoch_primary_address<T: Into<String>>(
19069            mut self,
19070            field: T,
19071        ) -> Self {
19072            self.set_next_epoch_primary_address(field.into());
19073            self
19074        }
19075        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19076        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19077            self.next_epoch_worker_address.as_mut().map(|field| field as _)
19078        }
19079        ///Returns a mutable reference to `next_epoch_worker_address`.
19080        ///If the field is unset, it is first initialized with the default value.
19081        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19082            self.next_epoch_worker_address.get_or_insert_default()
19083        }
19084        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19085        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19086            self.next_epoch_worker_address.as_ref().map(|field| field as _)
19087        }
19088        ///Sets `next_epoch_worker_address` with the provided value.
19089        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19090            self.next_epoch_worker_address = Some(field.into().into());
19091        }
19092        ///Sets `next_epoch_worker_address` with the provided value.
19093        pub fn with_next_epoch_worker_address<T: Into<String>>(
19094            mut self,
19095            field: T,
19096        ) -> Self {
19097            self.set_next_epoch_worker_address(field.into());
19098            self
19099        }
19100        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
19101        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19102            self.metadata_extra_fields
19103                .as_ref()
19104                .map(|field| field as _)
19105                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19106        }
19107        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19108        pub fn metadata_extra_fields_opt_mut(
19109            &mut self,
19110        ) -> Option<&mut super::MoveTable> {
19111            self.metadata_extra_fields.as_mut().map(|field| field as _)
19112        }
19113        ///Returns a mutable reference to `metadata_extra_fields`.
19114        ///If the field is unset, it is first initialized with the default value.
19115        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19116            self.metadata_extra_fields.get_or_insert_default()
19117        }
19118        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19119        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19120            self.metadata_extra_fields.as_ref().map(|field| field as _)
19121        }
19122        ///Sets `metadata_extra_fields` with the provided value.
19123        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19124            &mut self,
19125            field: T,
19126        ) {
19127            self.metadata_extra_fields = Some(field.into().into());
19128        }
19129        ///Sets `metadata_extra_fields` with the provided value.
19130        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19131            mut self,
19132            field: T,
19133        ) -> Self {
19134            self.set_metadata_extra_fields(field.into());
19135            self
19136        }
19137        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19138        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19139            self.voting_power.as_mut().map(|field| field as _)
19140        }
19141        ///Returns a mutable reference to `voting_power`.
19142        ///If the field is unset, it is first initialized with the default value.
19143        pub fn voting_power_mut(&mut self) -> &mut u64 {
19144            self.voting_power.get_or_insert_default()
19145        }
19146        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
19147        pub fn voting_power_opt(&self) -> Option<u64> {
19148            self.voting_power.as_ref().map(|field| *field)
19149        }
19150        ///Sets `voting_power` with the provided value.
19151        pub fn set_voting_power(&mut self, field: u64) {
19152            self.voting_power = Some(field);
19153        }
19154        ///Sets `voting_power` with the provided value.
19155        pub fn with_voting_power(mut self, field: u64) -> Self {
19156            self.set_voting_power(field);
19157            self
19158        }
19159        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19160        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19161            self.operation_cap_id.as_mut().map(|field| field as _)
19162        }
19163        ///Returns a mutable reference to `operation_cap_id`.
19164        ///If the field is unset, it is first initialized with the default value.
19165        pub fn operation_cap_id_mut(&mut self) -> &mut String {
19166            self.operation_cap_id.get_or_insert_default()
19167        }
19168        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
19169        pub fn operation_cap_id_opt(&self) -> Option<&str> {
19170            self.operation_cap_id.as_ref().map(|field| field as _)
19171        }
19172        ///Sets `operation_cap_id` with the provided value.
19173        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19174            self.operation_cap_id = Some(field.into().into());
19175        }
19176        ///Sets `operation_cap_id` with the provided value.
19177        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19178            self.set_operation_cap_id(field.into());
19179            self
19180        }
19181        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19182        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19183            self.gas_price.as_mut().map(|field| field as _)
19184        }
19185        ///Returns a mutable reference to `gas_price`.
19186        ///If the field is unset, it is first initialized with the default value.
19187        pub fn gas_price_mut(&mut self) -> &mut u64 {
19188            self.gas_price.get_or_insert_default()
19189        }
19190        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19191        pub fn gas_price_opt(&self) -> Option<u64> {
19192            self.gas_price.as_ref().map(|field| *field)
19193        }
19194        ///Sets `gas_price` with the provided value.
19195        pub fn set_gas_price(&mut self, field: u64) {
19196            self.gas_price = Some(field);
19197        }
19198        ///Sets `gas_price` with the provided value.
19199        pub fn with_gas_price(mut self, field: u64) -> Self {
19200            self.set_gas_price(field);
19201            self
19202        }
19203        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
19204        pub fn staking_pool(&self) -> &super::StakingPool {
19205            self.staking_pool
19206                .as_ref()
19207                .map(|field| field as _)
19208                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19209        }
19210        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19211        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19212            self.staking_pool.as_mut().map(|field| field as _)
19213        }
19214        ///Returns a mutable reference to `staking_pool`.
19215        ///If the field is unset, it is first initialized with the default value.
19216        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19217            self.staking_pool.get_or_insert_default()
19218        }
19219        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
19220        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19221            self.staking_pool.as_ref().map(|field| field as _)
19222        }
19223        ///Sets `staking_pool` with the provided value.
19224        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19225            self.staking_pool = Some(field.into().into());
19226        }
19227        ///Sets `staking_pool` with the provided value.
19228        pub fn with_staking_pool<T: Into<super::StakingPool>>(
19229            mut self,
19230            field: T,
19231        ) -> Self {
19232            self.set_staking_pool(field.into());
19233            self
19234        }
19235        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19236        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19237            self.commission_rate.as_mut().map(|field| field as _)
19238        }
19239        ///Returns a mutable reference to `commission_rate`.
19240        ///If the field is unset, it is first initialized with the default value.
19241        pub fn commission_rate_mut(&mut self) -> &mut u64 {
19242            self.commission_rate.get_or_insert_default()
19243        }
19244        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19245        pub fn commission_rate_opt(&self) -> Option<u64> {
19246            self.commission_rate.as_ref().map(|field| *field)
19247        }
19248        ///Sets `commission_rate` with the provided value.
19249        pub fn set_commission_rate(&mut self, field: u64) {
19250            self.commission_rate = Some(field);
19251        }
19252        ///Sets `commission_rate` with the provided value.
19253        pub fn with_commission_rate(mut self, field: u64) -> Self {
19254            self.set_commission_rate(field);
19255            self
19256        }
19257        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19258        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19259            self.next_epoch_stake.as_mut().map(|field| field as _)
19260        }
19261        ///Returns a mutable reference to `next_epoch_stake`.
19262        ///If the field is unset, it is first initialized with the default value.
19263        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19264            self.next_epoch_stake.get_or_insert_default()
19265        }
19266        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19267        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19268            self.next_epoch_stake.as_ref().map(|field| *field)
19269        }
19270        ///Sets `next_epoch_stake` with the provided value.
19271        pub fn set_next_epoch_stake(&mut self, field: u64) {
19272            self.next_epoch_stake = Some(field);
19273        }
19274        ///Sets `next_epoch_stake` with the provided value.
19275        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19276            self.set_next_epoch_stake(field);
19277            self
19278        }
19279        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19280        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19281            self.next_epoch_gas_price.as_mut().map(|field| field as _)
19282        }
19283        ///Returns a mutable reference to `next_epoch_gas_price`.
19284        ///If the field is unset, it is first initialized with the default value.
19285        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19286            self.next_epoch_gas_price.get_or_insert_default()
19287        }
19288        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19289        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19290            self.next_epoch_gas_price.as_ref().map(|field| *field)
19291        }
19292        ///Sets `next_epoch_gas_price` with the provided value.
19293        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19294            self.next_epoch_gas_price = Some(field);
19295        }
19296        ///Sets `next_epoch_gas_price` with the provided value.
19297        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19298            self.set_next_epoch_gas_price(field);
19299            self
19300        }
19301        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19302        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19303            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19304        }
19305        ///Returns a mutable reference to `next_epoch_commission_rate`.
19306        ///If the field is unset, it is first initialized with the default value.
19307        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19308            self.next_epoch_commission_rate.get_or_insert_default()
19309        }
19310        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19311        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19312            self.next_epoch_commission_rate.as_ref().map(|field| *field)
19313        }
19314        ///Sets `next_epoch_commission_rate` with the provided value.
19315        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19316            self.next_epoch_commission_rate = Some(field);
19317        }
19318        ///Sets `next_epoch_commission_rate` with the provided value.
19319        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19320            self.set_next_epoch_commission_rate(field);
19321            self
19322        }
19323        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
19324        pub fn extra_fields(&self) -> &super::MoveTable {
19325            self.extra_fields
19326                .as_ref()
19327                .map(|field| field as _)
19328                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19329        }
19330        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19331        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19332            self.extra_fields.as_mut().map(|field| field as _)
19333        }
19334        ///Returns a mutable reference to `extra_fields`.
19335        ///If the field is unset, it is first initialized with the default value.
19336        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19337            self.extra_fields.get_or_insert_default()
19338        }
19339        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19340        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19341            self.extra_fields.as_ref().map(|field| field as _)
19342        }
19343        ///Sets `extra_fields` with the provided value.
19344        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19345            self.extra_fields = Some(field.into().into());
19346        }
19347        ///Sets `extra_fields` with the provided value.
19348        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19349            self.set_extra_fields(field.into());
19350            self
19351        }
19352    }
19353    impl super::ValidatorAggregatedSignature {
19354        pub const fn const_default() -> Self {
19355            Self {
19356                epoch: None,
19357                signature: None,
19358                bitmap: None,
19359            }
19360        }
19361        #[doc(hidden)]
19362        pub fn default_instance() -> &'static Self {
19363            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19364            &DEFAULT
19365        }
19366        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19367        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19368            self.epoch.as_mut().map(|field| field as _)
19369        }
19370        ///Returns a mutable reference to `epoch`.
19371        ///If the field is unset, it is first initialized with the default value.
19372        pub fn epoch_mut(&mut self) -> &mut u64 {
19373            self.epoch.get_or_insert_default()
19374        }
19375        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19376        pub fn epoch_opt(&self) -> Option<u64> {
19377            self.epoch.as_ref().map(|field| *field)
19378        }
19379        ///Sets `epoch` with the provided value.
19380        pub fn set_epoch(&mut self, field: u64) {
19381            self.epoch = Some(field);
19382        }
19383        ///Sets `epoch` with the provided value.
19384        pub fn with_epoch(mut self, field: u64) -> Self {
19385            self.set_epoch(field);
19386            self
19387        }
19388        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
19389        pub fn signature_opt(&self) -> Option<&[u8]> {
19390            self.signature.as_ref().map(|field| field as _)
19391        }
19392        ///Sets `signature` with the provided value.
19393        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19394            self.signature = Some(field.into().into());
19395        }
19396        ///Sets `signature` with the provided value.
19397        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19398            mut self,
19399            field: T,
19400        ) -> Self {
19401            self.set_signature(field.into());
19402            self
19403        }
19404        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
19405        pub fn bitmap_opt(&self) -> Option<&[u8]> {
19406            self.bitmap.as_ref().map(|field| field as _)
19407        }
19408        ///Sets `bitmap` with the provided value.
19409        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19410            self.bitmap = Some(field.into().into());
19411        }
19412        ///Sets `bitmap` with the provided value.
19413        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19414            self.set_bitmap(field.into());
19415            self
19416        }
19417    }
19418    impl super::ValidatorCommittee {
19419        pub const fn const_default() -> Self {
19420            Self {
19421                epoch: None,
19422                members: Vec::new(),
19423            }
19424        }
19425        #[doc(hidden)]
19426        pub fn default_instance() -> &'static Self {
19427            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19428            &DEFAULT
19429        }
19430        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19431        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19432            self.epoch.as_mut().map(|field| field as _)
19433        }
19434        ///Returns a mutable reference to `epoch`.
19435        ///If the field is unset, it is first initialized with the default value.
19436        pub fn epoch_mut(&mut self) -> &mut u64 {
19437            self.epoch.get_or_insert_default()
19438        }
19439        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19440        pub fn epoch_opt(&self) -> Option<u64> {
19441            self.epoch.as_ref().map(|field| *field)
19442        }
19443        ///Sets `epoch` with the provided value.
19444        pub fn set_epoch(&mut self, field: u64) {
19445            self.epoch = Some(field);
19446        }
19447        ///Sets `epoch` with the provided value.
19448        pub fn with_epoch(mut self, field: u64) -> Self {
19449            self.set_epoch(field);
19450            self
19451        }
19452        ///Returns the value of `members`, or the default value if `members` is unset.
19453        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19454            &self.members
19455        }
19456        ///Returns a mutable reference to `members`.
19457        ///If the field is unset, it is first initialized with the default value.
19458        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19459            &mut self.members
19460        }
19461        ///Sets `members` with the provided value.
19462        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19463            self.members = field;
19464        }
19465        ///Sets `members` with the provided value.
19466        pub fn with_members(
19467            mut self,
19468            field: Vec<super::ValidatorCommitteeMember>,
19469        ) -> Self {
19470            self.set_members(field);
19471            self
19472        }
19473    }
19474    impl super::ValidatorCommitteeMember {
19475        pub const fn const_default() -> Self {
19476            Self {
19477                public_key: None,
19478                weight: None,
19479            }
19480        }
19481        #[doc(hidden)]
19482        pub fn default_instance() -> &'static Self {
19483            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19484            &DEFAULT
19485        }
19486        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19487        pub fn public_key_opt(&self) -> Option<&[u8]> {
19488            self.public_key.as_ref().map(|field| field as _)
19489        }
19490        ///Sets `public_key` with the provided value.
19491        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19492            self.public_key = Some(field.into().into());
19493        }
19494        ///Sets `public_key` with the provided value.
19495        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19496            mut self,
19497            field: T,
19498        ) -> Self {
19499            self.set_public_key(field.into());
19500            self
19501        }
19502        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19503        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19504            self.weight.as_mut().map(|field| field as _)
19505        }
19506        ///Returns a mutable reference to `weight`.
19507        ///If the field is unset, it is first initialized with the default value.
19508        pub fn weight_mut(&mut self) -> &mut u64 {
19509            self.weight.get_or_insert_default()
19510        }
19511        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
19512        pub fn weight_opt(&self) -> Option<u64> {
19513            self.weight.as_ref().map(|field| *field)
19514        }
19515        ///Sets `weight` with the provided value.
19516        pub fn set_weight(&mut self, field: u64) {
19517            self.weight = Some(field);
19518        }
19519        ///Sets `weight` with the provided value.
19520        pub fn with_weight(mut self, field: u64) -> Self {
19521            self.set_weight(field);
19522            self
19523        }
19524    }
19525    impl super::ValidatorExecutionTimeObservation {
19526        pub const fn const_default() -> Self {
19527            Self {
19528                validator: None,
19529                duration: None,
19530            }
19531        }
19532        #[doc(hidden)]
19533        pub fn default_instance() -> &'static Self {
19534            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19535            &DEFAULT
19536        }
19537        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
19538        pub fn validator_opt(&self) -> Option<&[u8]> {
19539            self.validator.as_ref().map(|field| field as _)
19540        }
19541        ///Sets `validator` with the provided value.
19542        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19543            self.validator = Some(field.into().into());
19544        }
19545        ///Sets `validator` with the provided value.
19546        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19547            mut self,
19548            field: T,
19549        ) -> Self {
19550            self.set_validator(field.into());
19551            self
19552        }
19553        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19554        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19555            self.duration.as_mut().map(|field| field as _)
19556        }
19557        ///Returns a mutable reference to `duration`.
19558        ///If the field is unset, it is first initialized with the default value.
19559        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19560            self.duration.get_or_insert_default()
19561        }
19562        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
19563        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19564            self.duration.as_ref().map(|field| field as _)
19565        }
19566        ///Sets `duration` with the provided value.
19567        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19568            self.duration = Some(field.into().into());
19569        }
19570        ///Sets `duration` with the provided value.
19571        pub fn with_duration<T: Into<::prost_types::Duration>>(
19572            mut self,
19573            field: T,
19574        ) -> Self {
19575            self.set_duration(field.into());
19576            self
19577        }
19578    }
19579    impl super::ValidatorReportRecord {
19580        pub const fn const_default() -> Self {
19581            Self {
19582                reported: None,
19583                reporters: Vec::new(),
19584            }
19585        }
19586        #[doc(hidden)]
19587        pub fn default_instance() -> &'static Self {
19588            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19589            &DEFAULT
19590        }
19591        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19592        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19593            self.reported.as_mut().map(|field| field as _)
19594        }
19595        ///Returns a mutable reference to `reported`.
19596        ///If the field is unset, it is first initialized with the default value.
19597        pub fn reported_mut(&mut self) -> &mut String {
19598            self.reported.get_or_insert_default()
19599        }
19600        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
19601        pub fn reported_opt(&self) -> Option<&str> {
19602            self.reported.as_ref().map(|field| field as _)
19603        }
19604        ///Sets `reported` with the provided value.
19605        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19606            self.reported = Some(field.into().into());
19607        }
19608        ///Sets `reported` with the provided value.
19609        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19610            self.set_reported(field.into());
19611            self
19612        }
19613        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
19614        pub fn reporters(&self) -> &[String] {
19615            &self.reporters
19616        }
19617        ///Returns a mutable reference to `reporters`.
19618        ///If the field is unset, it is first initialized with the default value.
19619        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19620            &mut self.reporters
19621        }
19622        ///Sets `reporters` with the provided value.
19623        pub fn set_reporters(&mut self, field: Vec<String>) {
19624            self.reporters = field;
19625        }
19626        ///Sets `reporters` with the provided value.
19627        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19628            self.set_reporters(field);
19629            self
19630        }
19631    }
19632    impl super::ValidatorSet {
19633        pub const fn const_default() -> Self {
19634            Self {
19635                total_stake: None,
19636                active_validators: Vec::new(),
19637                pending_active_validators: None,
19638                pending_removals: Vec::new(),
19639                staking_pool_mappings: None,
19640                inactive_validators: None,
19641                validator_candidates: None,
19642                at_risk_validators: std::collections::BTreeMap::new(),
19643                extra_fields: None,
19644            }
19645        }
19646        #[doc(hidden)]
19647        pub fn default_instance() -> &'static Self {
19648            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19649            &DEFAULT
19650        }
19651        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19652        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19653            self.total_stake.as_mut().map(|field| field as _)
19654        }
19655        ///Returns a mutable reference to `total_stake`.
19656        ///If the field is unset, it is first initialized with the default value.
19657        pub fn total_stake_mut(&mut self) -> &mut u64 {
19658            self.total_stake.get_or_insert_default()
19659        }
19660        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19661        pub fn total_stake_opt(&self) -> Option<u64> {
19662            self.total_stake.as_ref().map(|field| *field)
19663        }
19664        ///Sets `total_stake` with the provided value.
19665        pub fn set_total_stake(&mut self, field: u64) {
19666            self.total_stake = Some(field);
19667        }
19668        ///Sets `total_stake` with the provided value.
19669        pub fn with_total_stake(mut self, field: u64) -> Self {
19670            self.set_total_stake(field);
19671            self
19672        }
19673        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
19674        pub fn active_validators(&self) -> &[super::Validator] {
19675            &self.active_validators
19676        }
19677        ///Returns a mutable reference to `active_validators`.
19678        ///If the field is unset, it is first initialized with the default value.
19679        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19680            &mut self.active_validators
19681        }
19682        ///Sets `active_validators` with the provided value.
19683        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19684            self.active_validators = field;
19685        }
19686        ///Sets `active_validators` with the provided value.
19687        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19688            self.set_active_validators(field);
19689            self
19690        }
19691        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
19692        pub fn pending_active_validators(&self) -> &super::MoveTable {
19693            self.pending_active_validators
19694                .as_ref()
19695                .map(|field| field as _)
19696                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19697        }
19698        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19699        pub fn pending_active_validators_opt_mut(
19700            &mut self,
19701        ) -> Option<&mut super::MoveTable> {
19702            self.pending_active_validators.as_mut().map(|field| field as _)
19703        }
19704        ///Returns a mutable reference to `pending_active_validators`.
19705        ///If the field is unset, it is first initialized with the default value.
19706        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19707            self.pending_active_validators.get_or_insert_default()
19708        }
19709        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19710        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19711            self.pending_active_validators.as_ref().map(|field| field as _)
19712        }
19713        ///Sets `pending_active_validators` with the provided value.
19714        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19715            &mut self,
19716            field: T,
19717        ) {
19718            self.pending_active_validators = Some(field.into().into());
19719        }
19720        ///Sets `pending_active_validators` with the provided value.
19721        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19722            mut self,
19723            field: T,
19724        ) -> Self {
19725            self.set_pending_active_validators(field.into());
19726            self
19727        }
19728        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
19729        pub fn pending_removals(&self) -> &[u64] {
19730            &self.pending_removals
19731        }
19732        ///Returns a mutable reference to `pending_removals`.
19733        ///If the field is unset, it is first initialized with the default value.
19734        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19735            &mut self.pending_removals
19736        }
19737        ///Sets `pending_removals` with the provided value.
19738        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19739            self.pending_removals = field;
19740        }
19741        ///Sets `pending_removals` with the provided value.
19742        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19743            self.set_pending_removals(field);
19744            self
19745        }
19746        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
19747        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19748            self.staking_pool_mappings
19749                .as_ref()
19750                .map(|field| field as _)
19751                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19752        }
19753        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19754        pub fn staking_pool_mappings_opt_mut(
19755            &mut self,
19756        ) -> Option<&mut super::MoveTable> {
19757            self.staking_pool_mappings.as_mut().map(|field| field as _)
19758        }
19759        ///Returns a mutable reference to `staking_pool_mappings`.
19760        ///If the field is unset, it is first initialized with the default value.
19761        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
19762            self.staking_pool_mappings.get_or_insert_default()
19763        }
19764        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
19765        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
19766            self.staking_pool_mappings.as_ref().map(|field| field as _)
19767        }
19768        ///Sets `staking_pool_mappings` with the provided value.
19769        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
19770            &mut self,
19771            field: T,
19772        ) {
19773            self.staking_pool_mappings = Some(field.into().into());
19774        }
19775        ///Sets `staking_pool_mappings` with the provided value.
19776        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
19777            mut self,
19778            field: T,
19779        ) -> Self {
19780            self.set_staking_pool_mappings(field.into());
19781            self
19782        }
19783        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
19784        pub fn inactive_validators(&self) -> &super::MoveTable {
19785            self.inactive_validators
19786                .as_ref()
19787                .map(|field| field as _)
19788                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19789        }
19790        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19791        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19792            self.inactive_validators.as_mut().map(|field| field as _)
19793        }
19794        ///Returns a mutable reference to `inactive_validators`.
19795        ///If the field is unset, it is first initialized with the default value.
19796        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
19797            self.inactive_validators.get_or_insert_default()
19798        }
19799        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19800        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
19801            self.inactive_validators.as_ref().map(|field| field as _)
19802        }
19803        ///Sets `inactive_validators` with the provided value.
19804        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
19805            self.inactive_validators = Some(field.into().into());
19806        }
19807        ///Sets `inactive_validators` with the provided value.
19808        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
19809            mut self,
19810            field: T,
19811        ) -> Self {
19812            self.set_inactive_validators(field.into());
19813            self
19814        }
19815        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
19816        pub fn validator_candidates(&self) -> &super::MoveTable {
19817            self.validator_candidates
19818                .as_ref()
19819                .map(|field| field as _)
19820                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19821        }
19822        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19823        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19824            self.validator_candidates.as_mut().map(|field| field as _)
19825        }
19826        ///Returns a mutable reference to `validator_candidates`.
19827        ///If the field is unset, it is first initialized with the default value.
19828        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
19829            self.validator_candidates.get_or_insert_default()
19830        }
19831        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
19832        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
19833            self.validator_candidates.as_ref().map(|field| field as _)
19834        }
19835        ///Sets `validator_candidates` with the provided value.
19836        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
19837            self.validator_candidates = Some(field.into().into());
19838        }
19839        ///Sets `validator_candidates` with the provided value.
19840        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
19841            mut self,
19842            field: T,
19843        ) -> Self {
19844            self.set_validator_candidates(field.into());
19845            self
19846        }
19847        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
19848        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
19849            &self.at_risk_validators
19850        }
19851        ///Returns a mutable reference to `at_risk_validators`.
19852        ///If the field is unset, it is first initialized with the default value.
19853        pub fn at_risk_validators_mut(
19854            &mut self,
19855        ) -> &mut ::std::collections::BTreeMap<String, u64> {
19856            &mut self.at_risk_validators
19857        }
19858        ///Sets `at_risk_validators` with the provided value.
19859        pub fn set_at_risk_validators(
19860            &mut self,
19861            field: ::std::collections::BTreeMap<String, u64>,
19862        ) {
19863            self.at_risk_validators = field;
19864        }
19865        ///Sets `at_risk_validators` with the provided value.
19866        pub fn with_at_risk_validators(
19867            mut self,
19868            field: ::std::collections::BTreeMap<String, u64>,
19869        ) -> Self {
19870            self.set_at_risk_validators(field);
19871            self
19872        }
19873        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
19874        pub fn extra_fields(&self) -> &super::MoveTable {
19875            self.extra_fields
19876                .as_ref()
19877                .map(|field| field as _)
19878                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19879        }
19880        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19881        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19882            self.extra_fields.as_mut().map(|field| field as _)
19883        }
19884        ///Returns a mutable reference to `extra_fields`.
19885        ///If the field is unset, it is first initialized with the default value.
19886        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19887            self.extra_fields.get_or_insert_default()
19888        }
19889        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19890        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19891            self.extra_fields.as_ref().map(|field| field as _)
19892        }
19893        ///Sets `extra_fields` with the provided value.
19894        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19895            self.extra_fields = Some(field.into().into());
19896        }
19897        ///Sets `extra_fields` with the provided value.
19898        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19899            self.set_extra_fields(field.into());
19900            self
19901        }
19902    }
19903    impl super::VariantDescriptor {
19904        pub const fn const_default() -> Self {
19905            Self {
19906                name: None,
19907                position: None,
19908                fields: Vec::new(),
19909            }
19910        }
19911        #[doc(hidden)]
19912        pub fn default_instance() -> &'static Self {
19913            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
19914            &DEFAULT
19915        }
19916        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19917        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
19918            self.name.as_mut().map(|field| field as _)
19919        }
19920        ///Returns a mutable reference to `name`.
19921        ///If the field is unset, it is first initialized with the default value.
19922        pub fn name_mut(&mut self) -> &mut String {
19923            self.name.get_or_insert_default()
19924        }
19925        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
19926        pub fn name_opt(&self) -> Option<&str> {
19927            self.name.as_ref().map(|field| field as _)
19928        }
19929        ///Sets `name` with the provided value.
19930        pub fn set_name<T: Into<String>>(&mut self, field: T) {
19931            self.name = Some(field.into().into());
19932        }
19933        ///Sets `name` with the provided value.
19934        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
19935            self.set_name(field.into());
19936            self
19937        }
19938        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19939        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
19940            self.position.as_mut().map(|field| field as _)
19941        }
19942        ///Returns a mutable reference to `position`.
19943        ///If the field is unset, it is first initialized with the default value.
19944        pub fn position_mut(&mut self) -> &mut u32 {
19945            self.position.get_or_insert_default()
19946        }
19947        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
19948        pub fn position_opt(&self) -> Option<u32> {
19949            self.position.as_ref().map(|field| *field)
19950        }
19951        ///Sets `position` with the provided value.
19952        pub fn set_position(&mut self, field: u32) {
19953            self.position = Some(field);
19954        }
19955        ///Sets `position` with the provided value.
19956        pub fn with_position(mut self, field: u32) -> Self {
19957            self.set_position(field);
19958            self
19959        }
19960        ///Returns the value of `fields`, or the default value if `fields` is unset.
19961        pub fn fields(&self) -> &[super::FieldDescriptor] {
19962            &self.fields
19963        }
19964        ///Returns a mutable reference to `fields`.
19965        ///If the field is unset, it is first initialized with the default value.
19966        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
19967            &mut self.fields
19968        }
19969        ///Sets `fields` with the provided value.
19970        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
19971            self.fields = field;
19972        }
19973        ///Sets `fields` with the provided value.
19974        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
19975            self.set_fields(field);
19976            self
19977        }
19978    }
19979    impl super::VerifySignatureRequest {
19980        pub const fn const_default() -> Self {
19981            Self {
19982                message: None,
19983                signature: None,
19984                address: None,
19985                jwks: Vec::new(),
19986            }
19987        }
19988        #[doc(hidden)]
19989        pub fn default_instance() -> &'static Self {
19990            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
19991            &DEFAULT
19992        }
19993        ///Returns the value of `message`, or the default value if `message` is unset.
19994        pub fn message(&self) -> &super::Bcs {
19995            self.message
19996                .as_ref()
19997                .map(|field| field as _)
19998                .unwrap_or_else(|| super::Bcs::default_instance() as _)
19999        }
20000        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20001        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20002            self.message.as_mut().map(|field| field as _)
20003        }
20004        ///Returns a mutable reference to `message`.
20005        ///If the field is unset, it is first initialized with the default value.
20006        pub fn message_mut(&mut self) -> &mut super::Bcs {
20007            self.message.get_or_insert_default()
20008        }
20009        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
20010        pub fn message_opt(&self) -> Option<&super::Bcs> {
20011            self.message.as_ref().map(|field| field as _)
20012        }
20013        ///Sets `message` with the provided value.
20014        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20015            self.message = Some(field.into().into());
20016        }
20017        ///Sets `message` with the provided value.
20018        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20019            self.set_message(field.into());
20020            self
20021        }
20022        ///Returns the value of `signature`, or the default value if `signature` is unset.
20023        pub fn signature(&self) -> &super::UserSignature {
20024            self.signature
20025                .as_ref()
20026                .map(|field| field as _)
20027                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20028        }
20029        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20030        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20031            self.signature.as_mut().map(|field| field as _)
20032        }
20033        ///Returns a mutable reference to `signature`.
20034        ///If the field is unset, it is first initialized with the default value.
20035        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20036            self.signature.get_or_insert_default()
20037        }
20038        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20039        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20040            self.signature.as_ref().map(|field| field as _)
20041        }
20042        ///Sets `signature` with the provided value.
20043        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20044            self.signature = Some(field.into().into());
20045        }
20046        ///Sets `signature` with the provided value.
20047        pub fn with_signature<T: Into<super::UserSignature>>(
20048            mut self,
20049            field: T,
20050        ) -> Self {
20051            self.set_signature(field.into());
20052            self
20053        }
20054        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20055        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20056            self.address.as_mut().map(|field| field as _)
20057        }
20058        ///Returns a mutable reference to `address`.
20059        ///If the field is unset, it is first initialized with the default value.
20060        pub fn address_mut(&mut self) -> &mut String {
20061            self.address.get_or_insert_default()
20062        }
20063        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20064        pub fn address_opt(&self) -> Option<&str> {
20065            self.address.as_ref().map(|field| field as _)
20066        }
20067        ///Sets `address` with the provided value.
20068        pub fn set_address<T: Into<String>>(&mut self, field: T) {
20069            self.address = Some(field.into().into());
20070        }
20071        ///Sets `address` with the provided value.
20072        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20073            self.set_address(field.into());
20074            self
20075        }
20076        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
20077        pub fn jwks(&self) -> &[super::ActiveJwk] {
20078            &self.jwks
20079        }
20080        ///Returns a mutable reference to `jwks`.
20081        ///If the field is unset, it is first initialized with the default value.
20082        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20083            &mut self.jwks
20084        }
20085        ///Sets `jwks` with the provided value.
20086        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20087            self.jwks = field;
20088        }
20089        ///Sets `jwks` with the provided value.
20090        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20091            self.set_jwks(field);
20092            self
20093        }
20094    }
20095    impl super::VerifySignatureResponse {
20096        pub const fn const_default() -> Self {
20097            Self {
20098                is_valid: None,
20099                reason: None,
20100            }
20101        }
20102        #[doc(hidden)]
20103        pub fn default_instance() -> &'static Self {
20104            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20105            &DEFAULT
20106        }
20107        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20108        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20109            self.is_valid.as_mut().map(|field| field as _)
20110        }
20111        ///Returns a mutable reference to `is_valid`.
20112        ///If the field is unset, it is first initialized with the default value.
20113        pub fn is_valid_mut(&mut self) -> &mut bool {
20114            self.is_valid.get_or_insert_default()
20115        }
20116        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
20117        pub fn is_valid_opt(&self) -> Option<bool> {
20118            self.is_valid.as_ref().map(|field| *field)
20119        }
20120        ///Sets `is_valid` with the provided value.
20121        pub fn set_is_valid(&mut self, field: bool) {
20122            self.is_valid = Some(field);
20123        }
20124        ///Sets `is_valid` with the provided value.
20125        pub fn with_is_valid(mut self, field: bool) -> Self {
20126            self.set_is_valid(field);
20127            self
20128        }
20129        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20130        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20131            self.reason.as_mut().map(|field| field as _)
20132        }
20133        ///Returns a mutable reference to `reason`.
20134        ///If the field is unset, it is first initialized with the default value.
20135        pub fn reason_mut(&mut self) -> &mut String {
20136            self.reason.get_or_insert_default()
20137        }
20138        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
20139        pub fn reason_opt(&self) -> Option<&str> {
20140            self.reason.as_ref().map(|field| field as _)
20141        }
20142        ///Sets `reason` with the provided value.
20143        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20144            self.reason = Some(field.into().into());
20145        }
20146        ///Sets `reason` with the provided value.
20147        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20148            self.set_reason(field.into());
20149            self
20150        }
20151    }
20152    impl super::VersionAssignment {
20153        pub const fn const_default() -> Self {
20154            Self {
20155                object_id: None,
20156                start_version: None,
20157                version: None,
20158            }
20159        }
20160        #[doc(hidden)]
20161        pub fn default_instance() -> &'static Self {
20162            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20163            &DEFAULT
20164        }
20165        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20166        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20167            self.object_id.as_mut().map(|field| field as _)
20168        }
20169        ///Returns a mutable reference to `object_id`.
20170        ///If the field is unset, it is first initialized with the default value.
20171        pub fn object_id_mut(&mut self) -> &mut String {
20172            self.object_id.get_or_insert_default()
20173        }
20174        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20175        pub fn object_id_opt(&self) -> Option<&str> {
20176            self.object_id.as_ref().map(|field| field as _)
20177        }
20178        ///Sets `object_id` with the provided value.
20179        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20180            self.object_id = Some(field.into().into());
20181        }
20182        ///Sets `object_id` with the provided value.
20183        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20184            self.set_object_id(field.into());
20185            self
20186        }
20187        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20188        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20189            self.start_version.as_mut().map(|field| field as _)
20190        }
20191        ///Returns a mutable reference to `start_version`.
20192        ///If the field is unset, it is first initialized with the default value.
20193        pub fn start_version_mut(&mut self) -> &mut u64 {
20194            self.start_version.get_or_insert_default()
20195        }
20196        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20197        pub fn start_version_opt(&self) -> Option<u64> {
20198            self.start_version.as_ref().map(|field| *field)
20199        }
20200        ///Sets `start_version` with the provided value.
20201        pub fn set_start_version(&mut self, field: u64) {
20202            self.start_version = Some(field);
20203        }
20204        ///Sets `start_version` with the provided value.
20205        pub fn with_start_version(mut self, field: u64) -> Self {
20206            self.set_start_version(field);
20207            self
20208        }
20209        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20210        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20211            self.version.as_mut().map(|field| field as _)
20212        }
20213        ///Returns a mutable reference to `version`.
20214        ///If the field is unset, it is first initialized with the default value.
20215        pub fn version_mut(&mut self) -> &mut u64 {
20216            self.version.get_or_insert_default()
20217        }
20218        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20219        pub fn version_opt(&self) -> Option<u64> {
20220            self.version.as_ref().map(|field| *field)
20221        }
20222        ///Sets `version` with the provided value.
20223        pub fn set_version(&mut self, field: u64) {
20224            self.version = Some(field);
20225        }
20226        ///Sets `version` with the provided value.
20227        pub fn with_version(mut self, field: u64) -> Self {
20228            self.set_version(field);
20229            self
20230        }
20231    }
20232    impl super::Watermark {
20233        pub const fn const_default() -> Self {
20234            Self {
20235                cursor: None,
20236                checkpoint: None,
20237            }
20238        }
20239        #[doc(hidden)]
20240        pub fn default_instance() -> &'static Self {
20241            static DEFAULT: super::Watermark = super::Watermark::const_default();
20242            &DEFAULT
20243        }
20244        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
20245        pub fn cursor_opt(&self) -> Option<&[u8]> {
20246            self.cursor.as_ref().map(|field| field as _)
20247        }
20248        ///Sets `cursor` with the provided value.
20249        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20250            self.cursor = Some(field.into().into());
20251        }
20252        ///Sets `cursor` with the provided value.
20253        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20254            self.set_cursor(field.into());
20255            self
20256        }
20257        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20258        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20259            self.checkpoint.as_mut().map(|field| field as _)
20260        }
20261        ///Returns a mutable reference to `checkpoint`.
20262        ///If the field is unset, it is first initialized with the default value.
20263        pub fn checkpoint_mut(&mut self) -> &mut u64 {
20264            self.checkpoint.get_or_insert_default()
20265        }
20266        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
20267        pub fn checkpoint_opt(&self) -> Option<u64> {
20268            self.checkpoint.as_ref().map(|field| *field)
20269        }
20270        ///Sets `checkpoint` with the provided value.
20271        pub fn set_checkpoint(&mut self, field: u64) {
20272            self.checkpoint = Some(field);
20273        }
20274        ///Sets `checkpoint` with the provided value.
20275        pub fn with_checkpoint(mut self, field: u64) -> Self {
20276            self.set_checkpoint(field);
20277            self
20278        }
20279    }
20280    impl super::ZkLoginAuthenticator {
20281        pub const fn const_default() -> Self {
20282            Self {
20283                inputs: None,
20284                max_epoch: None,
20285                signature: None,
20286                public_identifier: None,
20287                jwk_id: None,
20288            }
20289        }
20290        #[doc(hidden)]
20291        pub fn default_instance() -> &'static Self {
20292            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20293            &DEFAULT
20294        }
20295        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
20296        pub fn inputs(&self) -> &super::ZkLoginInputs {
20297            self.inputs
20298                .as_ref()
20299                .map(|field| field as _)
20300                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20301        }
20302        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20303        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20304            self.inputs.as_mut().map(|field| field as _)
20305        }
20306        ///Returns a mutable reference to `inputs`.
20307        ///If the field is unset, it is first initialized with the default value.
20308        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20309            self.inputs.get_or_insert_default()
20310        }
20311        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
20312        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20313            self.inputs.as_ref().map(|field| field as _)
20314        }
20315        ///Sets `inputs` with the provided value.
20316        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20317            self.inputs = Some(field.into().into());
20318        }
20319        ///Sets `inputs` with the provided value.
20320        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20321            self.set_inputs(field.into());
20322            self
20323        }
20324        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20325        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20326            self.max_epoch.as_mut().map(|field| field as _)
20327        }
20328        ///Returns a mutable reference to `max_epoch`.
20329        ///If the field is unset, it is first initialized with the default value.
20330        pub fn max_epoch_mut(&mut self) -> &mut u64 {
20331            self.max_epoch.get_or_insert_default()
20332        }
20333        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
20334        pub fn max_epoch_opt(&self) -> Option<u64> {
20335            self.max_epoch.as_ref().map(|field| *field)
20336        }
20337        ///Sets `max_epoch` with the provided value.
20338        pub fn set_max_epoch(&mut self, field: u64) {
20339            self.max_epoch = Some(field);
20340        }
20341        ///Sets `max_epoch` with the provided value.
20342        pub fn with_max_epoch(mut self, field: u64) -> Self {
20343            self.set_max_epoch(field);
20344            self
20345        }
20346        ///Returns the value of `signature`, or the default value if `signature` is unset.
20347        pub fn signature(&self) -> &super::SimpleSignature {
20348            self.signature
20349                .as_ref()
20350                .map(|field| field as _)
20351                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20352        }
20353        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20354        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20355            self.signature.as_mut().map(|field| field as _)
20356        }
20357        ///Returns a mutable reference to `signature`.
20358        ///If the field is unset, it is first initialized with the default value.
20359        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20360            self.signature.get_or_insert_default()
20361        }
20362        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20363        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20364            self.signature.as_ref().map(|field| field as _)
20365        }
20366        ///Sets `signature` with the provided value.
20367        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20368            self.signature = Some(field.into().into());
20369        }
20370        ///Sets `signature` with the provided value.
20371        pub fn with_signature<T: Into<super::SimpleSignature>>(
20372            mut self,
20373            field: T,
20374        ) -> Self {
20375            self.set_signature(field.into());
20376            self
20377        }
20378        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
20379        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20380            self.public_identifier
20381                .as_ref()
20382                .map(|field| field as _)
20383                .unwrap_or_else(|| {
20384                    super::ZkLoginPublicIdentifier::default_instance() as _
20385                })
20386        }
20387        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20388        pub fn public_identifier_opt_mut(
20389            &mut self,
20390        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20391            self.public_identifier.as_mut().map(|field| field as _)
20392        }
20393        ///Returns a mutable reference to `public_identifier`.
20394        ///If the field is unset, it is first initialized with the default value.
20395        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20396            self.public_identifier.get_or_insert_default()
20397        }
20398        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
20399        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20400            self.public_identifier.as_ref().map(|field| field as _)
20401        }
20402        ///Sets `public_identifier` with the provided value.
20403        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20404            &mut self,
20405            field: T,
20406        ) {
20407            self.public_identifier = Some(field.into().into());
20408        }
20409        ///Sets `public_identifier` with the provided value.
20410        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20411            mut self,
20412            field: T,
20413        ) -> Self {
20414            self.set_public_identifier(field.into());
20415            self
20416        }
20417        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
20418        pub fn jwk_id(&self) -> &super::JwkId {
20419            self.jwk_id
20420                .as_ref()
20421                .map(|field| field as _)
20422                .unwrap_or_else(|| super::JwkId::default_instance() as _)
20423        }
20424        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20425        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20426            self.jwk_id.as_mut().map(|field| field as _)
20427        }
20428        ///Returns a mutable reference to `jwk_id`.
20429        ///If the field is unset, it is first initialized with the default value.
20430        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20431            self.jwk_id.get_or_insert_default()
20432        }
20433        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20434        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20435            self.jwk_id.as_ref().map(|field| field as _)
20436        }
20437        ///Sets `jwk_id` with the provided value.
20438        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20439            self.jwk_id = Some(field.into().into());
20440        }
20441        ///Sets `jwk_id` with the provided value.
20442        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20443            self.set_jwk_id(field.into());
20444            self
20445        }
20446    }
20447    impl super::ZkLoginClaim {
20448        pub const fn const_default() -> Self {
20449            Self {
20450                value: None,
20451                index_mod_4: None,
20452            }
20453        }
20454        #[doc(hidden)]
20455        pub fn default_instance() -> &'static Self {
20456            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20457            &DEFAULT
20458        }
20459        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20460        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20461            self.value.as_mut().map(|field| field as _)
20462        }
20463        ///Returns a mutable reference to `value`.
20464        ///If the field is unset, it is first initialized with the default value.
20465        pub fn value_mut(&mut self) -> &mut String {
20466            self.value.get_or_insert_default()
20467        }
20468        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
20469        pub fn value_opt(&self) -> Option<&str> {
20470            self.value.as_ref().map(|field| field as _)
20471        }
20472        ///Sets `value` with the provided value.
20473        pub fn set_value<T: Into<String>>(&mut self, field: T) {
20474            self.value = Some(field.into().into());
20475        }
20476        ///Sets `value` with the provided value.
20477        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20478            self.set_value(field.into());
20479            self
20480        }
20481        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20482        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20483            self.index_mod_4.as_mut().map(|field| field as _)
20484        }
20485        ///Returns a mutable reference to `index_mod_4`.
20486        ///If the field is unset, it is first initialized with the default value.
20487        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20488            self.index_mod_4.get_or_insert_default()
20489        }
20490        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
20491        pub fn index_mod_4_opt(&self) -> Option<u32> {
20492            self.index_mod_4.as_ref().map(|field| *field)
20493        }
20494        ///Sets `index_mod_4` with the provided value.
20495        pub fn set_index_mod_4(&mut self, field: u32) {
20496            self.index_mod_4 = Some(field);
20497        }
20498        ///Sets `index_mod_4` with the provided value.
20499        pub fn with_index_mod_4(mut self, field: u32) -> Self {
20500            self.set_index_mod_4(field);
20501            self
20502        }
20503    }
20504    impl super::ZkLoginInputs {
20505        pub const fn const_default() -> Self {
20506            Self {
20507                proof_points: None,
20508                iss_base64_details: None,
20509                header_base64: None,
20510                address_seed: None,
20511            }
20512        }
20513        #[doc(hidden)]
20514        pub fn default_instance() -> &'static Self {
20515            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20516            &DEFAULT
20517        }
20518        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
20519        pub fn proof_points(&self) -> &super::ZkLoginProof {
20520            self.proof_points
20521                .as_ref()
20522                .map(|field| field as _)
20523                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20524        }
20525        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20526        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20527            self.proof_points.as_mut().map(|field| field as _)
20528        }
20529        ///Returns a mutable reference to `proof_points`.
20530        ///If the field is unset, it is first initialized with the default value.
20531        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20532            self.proof_points.get_or_insert_default()
20533        }
20534        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
20535        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20536            self.proof_points.as_ref().map(|field| field as _)
20537        }
20538        ///Sets `proof_points` with the provided value.
20539        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20540            self.proof_points = Some(field.into().into());
20541        }
20542        ///Sets `proof_points` with the provided value.
20543        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20544            mut self,
20545            field: T,
20546        ) -> Self {
20547            self.set_proof_points(field.into());
20548            self
20549        }
20550        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
20551        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20552            self.iss_base64_details
20553                .as_ref()
20554                .map(|field| field as _)
20555                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20556        }
20557        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20558        pub fn iss_base64_details_opt_mut(
20559            &mut self,
20560        ) -> Option<&mut super::ZkLoginClaim> {
20561            self.iss_base64_details.as_mut().map(|field| field as _)
20562        }
20563        ///Returns a mutable reference to `iss_base64_details`.
20564        ///If the field is unset, it is first initialized with the default value.
20565        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20566            self.iss_base64_details.get_or_insert_default()
20567        }
20568        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
20569        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20570            self.iss_base64_details.as_ref().map(|field| field as _)
20571        }
20572        ///Sets `iss_base64_details` with the provided value.
20573        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20574            &mut self,
20575            field: T,
20576        ) {
20577            self.iss_base64_details = Some(field.into().into());
20578        }
20579        ///Sets `iss_base64_details` with the provided value.
20580        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20581            mut self,
20582            field: T,
20583        ) -> Self {
20584            self.set_iss_base64_details(field.into());
20585            self
20586        }
20587        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20588        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20589            self.header_base64.as_mut().map(|field| field as _)
20590        }
20591        ///Returns a mutable reference to `header_base64`.
20592        ///If the field is unset, it is first initialized with the default value.
20593        pub fn header_base64_mut(&mut self) -> &mut String {
20594            self.header_base64.get_or_insert_default()
20595        }
20596        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
20597        pub fn header_base64_opt(&self) -> Option<&str> {
20598            self.header_base64.as_ref().map(|field| field as _)
20599        }
20600        ///Sets `header_base64` with the provided value.
20601        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20602            self.header_base64 = Some(field.into().into());
20603        }
20604        ///Sets `header_base64` with the provided value.
20605        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20606            self.set_header_base64(field.into());
20607            self
20608        }
20609        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20610        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20611            self.address_seed.as_mut().map(|field| field as _)
20612        }
20613        ///Returns a mutable reference to `address_seed`.
20614        ///If the field is unset, it is first initialized with the default value.
20615        pub fn address_seed_mut(&mut self) -> &mut String {
20616            self.address_seed.get_or_insert_default()
20617        }
20618        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20619        pub fn address_seed_opt(&self) -> Option<&str> {
20620            self.address_seed.as_ref().map(|field| field as _)
20621        }
20622        ///Sets `address_seed` with the provided value.
20623        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20624            self.address_seed = Some(field.into().into());
20625        }
20626        ///Sets `address_seed` with the provided value.
20627        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20628            self.set_address_seed(field.into());
20629            self
20630        }
20631    }
20632    impl super::ZkLoginProof {
20633        pub const fn const_default() -> Self {
20634            Self { a: None, b: None, c: None }
20635        }
20636        #[doc(hidden)]
20637        pub fn default_instance() -> &'static Self {
20638            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20639            &DEFAULT
20640        }
20641        ///Returns the value of `a`, or the default value if `a` is unset.
20642        pub fn a(&self) -> &super::CircomG1 {
20643            self.a
20644                .as_ref()
20645                .map(|field| field as _)
20646                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20647        }
20648        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20649        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20650            self.a.as_mut().map(|field| field as _)
20651        }
20652        ///Returns a mutable reference to `a`.
20653        ///If the field is unset, it is first initialized with the default value.
20654        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20655            self.a.get_or_insert_default()
20656        }
20657        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
20658        pub fn a_opt(&self) -> Option<&super::CircomG1> {
20659            self.a.as_ref().map(|field| field as _)
20660        }
20661        ///Sets `a` with the provided value.
20662        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20663            self.a = Some(field.into().into());
20664        }
20665        ///Sets `a` with the provided value.
20666        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20667            self.set_a(field.into());
20668            self
20669        }
20670        ///Returns the value of `b`, or the default value if `b` is unset.
20671        pub fn b(&self) -> &super::CircomG2 {
20672            self.b
20673                .as_ref()
20674                .map(|field| field as _)
20675                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20676        }
20677        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20678        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20679            self.b.as_mut().map(|field| field as _)
20680        }
20681        ///Returns a mutable reference to `b`.
20682        ///If the field is unset, it is first initialized with the default value.
20683        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20684            self.b.get_or_insert_default()
20685        }
20686        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
20687        pub fn b_opt(&self) -> Option<&super::CircomG2> {
20688            self.b.as_ref().map(|field| field as _)
20689        }
20690        ///Sets `b` with the provided value.
20691        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20692            self.b = Some(field.into().into());
20693        }
20694        ///Sets `b` with the provided value.
20695        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20696            self.set_b(field.into());
20697            self
20698        }
20699        ///Returns the value of `c`, or the default value if `c` is unset.
20700        pub fn c(&self) -> &super::CircomG1 {
20701            self.c
20702                .as_ref()
20703                .map(|field| field as _)
20704                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20705        }
20706        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20707        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20708            self.c.as_mut().map(|field| field as _)
20709        }
20710        ///Returns a mutable reference to `c`.
20711        ///If the field is unset, it is first initialized with the default value.
20712        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20713            self.c.get_or_insert_default()
20714        }
20715        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
20716        pub fn c_opt(&self) -> Option<&super::CircomG1> {
20717            self.c.as_ref().map(|field| field as _)
20718        }
20719        ///Sets `c` with the provided value.
20720        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20721            self.c = Some(field.into().into());
20722        }
20723        ///Sets `c` with the provided value.
20724        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20725            self.set_c(field.into());
20726            self
20727        }
20728    }
20729    impl super::ZkLoginPublicIdentifier {
20730        pub const fn const_default() -> Self {
20731            Self {
20732                iss: None,
20733                address_seed: None,
20734            }
20735        }
20736        #[doc(hidden)]
20737        pub fn default_instance() -> &'static Self {
20738            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20739            &DEFAULT
20740        }
20741        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20742        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20743            self.iss.as_mut().map(|field| field as _)
20744        }
20745        ///Returns a mutable reference to `iss`.
20746        ///If the field is unset, it is first initialized with the default value.
20747        pub fn iss_mut(&mut self) -> &mut String {
20748            self.iss.get_or_insert_default()
20749        }
20750        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
20751        pub fn iss_opt(&self) -> Option<&str> {
20752            self.iss.as_ref().map(|field| field as _)
20753        }
20754        ///Sets `iss` with the provided value.
20755        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
20756            self.iss = Some(field.into().into());
20757        }
20758        ///Sets `iss` with the provided value.
20759        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
20760            self.set_iss(field.into());
20761            self
20762        }
20763        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20764        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20765            self.address_seed.as_mut().map(|field| field as _)
20766        }
20767        ///Returns a mutable reference to `address_seed`.
20768        ///If the field is unset, it is first initialized with the default value.
20769        pub fn address_seed_mut(&mut self) -> &mut String {
20770            self.address_seed.get_or_insert_default()
20771        }
20772        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20773        pub fn address_seed_opt(&self) -> Option<&str> {
20774            self.address_seed.as_ref().map(|field| field as _)
20775        }
20776        ///Sets `address_seed` with the provided value.
20777        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20778            self.address_seed = Some(field.into().into());
20779        }
20780        ///Sets `address_seed` with the provided value.
20781        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20782            self.set_address_seed(field.into());
20783            self
20784        }
20785    }
20786}