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

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::ActiveJwk {
4        pub const fn const_default() -> Self {
5            Self {
6                id: None,
7                jwk: None,
8                epoch: None,
9            }
10        }
11        #[doc(hidden)]
12        pub fn default_instance() -> &'static Self {
13            static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
14            &DEFAULT
15        }
16        ///Returns the value of `id`, or the default value if `id` is unset.
17        pub fn id(&self) -> &super::JwkId {
18            self.id
19                .as_ref()
20                .map(|field| field as _)
21                .unwrap_or_else(|| super::JwkId::default_instance() as _)
22        }
23        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
24        pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
25            self.id.as_mut().map(|field| field as _)
26        }
27        ///Returns a mutable reference to `id`.
28        ///If the field is unset, it is first initialized with the default value.
29        pub fn id_mut(&mut self) -> &mut super::JwkId {
30            self.id.get_or_insert_default()
31        }
32        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
33        pub fn id_opt(&self) -> Option<&super::JwkId> {
34            self.id.as_ref().map(|field| field as _)
35        }
36        ///Sets `id` with the provided value.
37        pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
38            self.id = Some(field.into().into());
39        }
40        ///Sets `id` with the provided value.
41        pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
42            self.set_id(field.into());
43            self
44        }
45        ///Returns the value of `jwk`, or the default value if `jwk` is unset.
46        pub fn jwk(&self) -> &super::Jwk {
47            self.jwk
48                .as_ref()
49                .map(|field| field as _)
50                .unwrap_or_else(|| super::Jwk::default_instance() as _)
51        }
52        ///If `jwk` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
53        pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
54            self.jwk.as_mut().map(|field| field as _)
55        }
56        ///Returns a mutable reference to `jwk`.
57        ///If the field is unset, it is first initialized with the default value.
58        pub fn jwk_mut(&mut self) -> &mut super::Jwk {
59            self.jwk.get_or_insert_default()
60        }
61        ///If `jwk` is set, returns [`Some`] with the value; otherwise returns [`None`].
62        pub fn jwk_opt(&self) -> Option<&super::Jwk> {
63            self.jwk.as_ref().map(|field| field as _)
64        }
65        ///Sets `jwk` with the provided value.
66        pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
67            self.jwk = Some(field.into().into());
68        }
69        ///Sets `jwk` with the provided value.
70        pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
71            self.set_jwk(field.into());
72            self
73        }
74        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
75        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
76            self.epoch.as_mut().map(|field| field as _)
77        }
78        ///Returns a mutable reference to `epoch`.
79        ///If the field is unset, it is first initialized with the default value.
80        pub fn epoch_mut(&mut self) -> &mut u64 {
81            self.epoch.get_or_insert_default()
82        }
83        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
84        pub fn epoch_opt(&self) -> Option<u64> {
85            self.epoch.as_ref().map(|field| *field)
86        }
87        ///Sets `epoch` with the provided value.
88        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
89            self.epoch = Some(field.into().into());
90        }
91        ///Sets `epoch` with the provided value.
92        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
93            self.set_epoch(field.into());
94            self
95        }
96    }
97    impl super::Argument {
98        pub const fn const_default() -> Self {
99            Self {
100                kind: None,
101                input: None,
102                result: None,
103                subresult: None,
104            }
105        }
106        #[doc(hidden)]
107        pub fn default_instance() -> &'static Self {
108            static DEFAULT: super::Argument = super::Argument::const_default();
109            &DEFAULT
110        }
111        ///Sets `kind` with the provided value.
112        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
113            mut self,
114            field: T,
115        ) -> Self {
116            self.set_kind(field.into());
117            self
118        }
119        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
120        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
121            self.input.as_mut().map(|field| field as _)
122        }
123        ///Returns a mutable reference to `input`.
124        ///If the field is unset, it is first initialized with the default value.
125        pub fn input_mut(&mut self) -> &mut u32 {
126            self.input.get_or_insert_default()
127        }
128        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
129        pub fn input_opt(&self) -> Option<u32> {
130            self.input.as_ref().map(|field| *field)
131        }
132        ///Sets `input` with the provided value.
133        pub fn set_input<T: Into<u32>>(&mut self, field: T) {
134            self.input = Some(field.into().into());
135        }
136        ///Sets `input` with the provided value.
137        pub fn with_input<T: Into<u32>>(mut self, field: T) -> Self {
138            self.set_input(field.into());
139            self
140        }
141        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
142        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
143            self.result.as_mut().map(|field| field as _)
144        }
145        ///Returns a mutable reference to `result`.
146        ///If the field is unset, it is first initialized with the default value.
147        pub fn result_mut(&mut self) -> &mut u32 {
148            self.result.get_or_insert_default()
149        }
150        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
151        pub fn result_opt(&self) -> Option<u32> {
152            self.result.as_ref().map(|field| *field)
153        }
154        ///Sets `result` with the provided value.
155        pub fn set_result<T: Into<u32>>(&mut self, field: T) {
156            self.result = Some(field.into().into());
157        }
158        ///Sets `result` with the provided value.
159        pub fn with_result<T: Into<u32>>(mut self, field: T) -> Self {
160            self.set_result(field.into());
161            self
162        }
163        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
164        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
165            self.subresult.as_mut().map(|field| field as _)
166        }
167        ///Returns a mutable reference to `subresult`.
168        ///If the field is unset, it is first initialized with the default value.
169        pub fn subresult_mut(&mut self) -> &mut u32 {
170            self.subresult.get_or_insert_default()
171        }
172        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
173        pub fn subresult_opt(&self) -> Option<u32> {
174            self.subresult.as_ref().map(|field| *field)
175        }
176        ///Sets `subresult` with the provided value.
177        pub fn set_subresult<T: Into<u32>>(&mut self, field: T) {
178            self.subresult = Some(field.into().into());
179        }
180        ///Sets `subresult` with the provided value.
181        pub fn with_subresult<T: Into<u32>>(mut self, field: T) -> Self {
182            self.set_subresult(field.into());
183            self
184        }
185    }
186    impl super::AuthenticatorStateExpire {
187        pub const fn const_default() -> Self {
188            Self {
189                min_epoch: None,
190                authenticator_object_initial_shared_version: None,
191            }
192        }
193        #[doc(hidden)]
194        pub fn default_instance() -> &'static Self {
195            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
196            &DEFAULT
197        }
198        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
199        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
200            self.min_epoch.as_mut().map(|field| field as _)
201        }
202        ///Returns a mutable reference to `min_epoch`.
203        ///If the field is unset, it is first initialized with the default value.
204        pub fn min_epoch_mut(&mut self) -> &mut u64 {
205            self.min_epoch.get_or_insert_default()
206        }
207        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
208        pub fn min_epoch_opt(&self) -> Option<u64> {
209            self.min_epoch.as_ref().map(|field| *field)
210        }
211        ///Sets `min_epoch` with the provided value.
212        pub fn set_min_epoch<T: Into<u64>>(&mut self, field: T) {
213            self.min_epoch = Some(field.into().into());
214        }
215        ///Sets `min_epoch` with the provided value.
216        pub fn with_min_epoch<T: Into<u64>>(mut self, field: T) -> Self {
217            self.set_min_epoch(field.into());
218            self
219        }
220        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
221        pub fn authenticator_object_initial_shared_version_opt_mut(
222            &mut self,
223        ) -> Option<&mut u64> {
224            self.authenticator_object_initial_shared_version
225                .as_mut()
226                .map(|field| field as _)
227        }
228        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
229        ///If the field is unset, it is first initialized with the default value.
230        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
231            self.authenticator_object_initial_shared_version.get_or_insert_default()
232        }
233        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
234        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
235            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
236        }
237        ///Sets `authenticator_object_initial_shared_version` with the provided value.
238        pub fn set_authenticator_object_initial_shared_version<T: Into<u64>>(
239            &mut self,
240            field: T,
241        ) {
242            self.authenticator_object_initial_shared_version = Some(field.into().into());
243        }
244        ///Sets `authenticator_object_initial_shared_version` with the provided value.
245        pub fn with_authenticator_object_initial_shared_version<T: Into<u64>>(
246            mut self,
247            field: T,
248        ) -> Self {
249            self.set_authenticator_object_initial_shared_version(field.into());
250            self
251        }
252    }
253    impl super::AuthenticatorStateUpdate {
254        pub const fn const_default() -> Self {
255            Self {
256                epoch: None,
257                round: None,
258                new_active_jwks: Vec::new(),
259                authenticator_object_initial_shared_version: None,
260            }
261        }
262        #[doc(hidden)]
263        pub fn default_instance() -> &'static Self {
264            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
265            &DEFAULT
266        }
267        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
268        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
269            self.epoch.as_mut().map(|field| field as _)
270        }
271        ///Returns a mutable reference to `epoch`.
272        ///If the field is unset, it is first initialized with the default value.
273        pub fn epoch_mut(&mut self) -> &mut u64 {
274            self.epoch.get_or_insert_default()
275        }
276        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
277        pub fn epoch_opt(&self) -> Option<u64> {
278            self.epoch.as_ref().map(|field| *field)
279        }
280        ///Sets `epoch` with the provided value.
281        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
282            self.epoch = Some(field.into().into());
283        }
284        ///Sets `epoch` with the provided value.
285        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
286            self.set_epoch(field.into());
287            self
288        }
289        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
290        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
291            self.round.as_mut().map(|field| field as _)
292        }
293        ///Returns a mutable reference to `round`.
294        ///If the field is unset, it is first initialized with the default value.
295        pub fn round_mut(&mut self) -> &mut u64 {
296            self.round.get_or_insert_default()
297        }
298        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
299        pub fn round_opt(&self) -> Option<u64> {
300            self.round.as_ref().map(|field| *field)
301        }
302        ///Sets `round` with the provided value.
303        pub fn set_round<T: Into<u64>>(&mut self, field: T) {
304            self.round = Some(field.into().into());
305        }
306        ///Sets `round` with the provided value.
307        pub fn with_round<T: Into<u64>>(mut self, field: T) -> Self {
308            self.set_round(field.into());
309            self
310        }
311        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
312        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
313            &self.new_active_jwks
314        }
315        ///Returns a mutable reference to `new_active_jwks`.
316        ///If the field is unset, it is first initialized with the default value.
317        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
318            &mut self.new_active_jwks
319        }
320        ///Sets `new_active_jwks` with the provided value.
321        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
322            self.new_active_jwks = field;
323        }
324        ///Sets `new_active_jwks` with the provided value.
325        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
326            self.set_new_active_jwks(field);
327            self
328        }
329        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
330        pub fn authenticator_object_initial_shared_version_opt_mut(
331            &mut self,
332        ) -> Option<&mut u64> {
333            self.authenticator_object_initial_shared_version
334                .as_mut()
335                .map(|field| field as _)
336        }
337        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
338        ///If the field is unset, it is first initialized with the default value.
339        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
340            self.authenticator_object_initial_shared_version.get_or_insert_default()
341        }
342        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
343        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
344            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
345        }
346        ///Sets `authenticator_object_initial_shared_version` with the provided value.
347        pub fn set_authenticator_object_initial_shared_version<T: Into<u64>>(
348            &mut self,
349            field: T,
350        ) {
351            self.authenticator_object_initial_shared_version = Some(field.into().into());
352        }
353        ///Sets `authenticator_object_initial_shared_version` with the provided value.
354        pub fn with_authenticator_object_initial_shared_version<T: Into<u64>>(
355            mut self,
356            field: T,
357        ) -> Self {
358            self.set_authenticator_object_initial_shared_version(field.into());
359            self
360        }
361    }
362    impl super::Balance {
363        pub const fn const_default() -> Self {
364            Self {
365                coin_type: None,
366                balance: None,
367            }
368        }
369        #[doc(hidden)]
370        pub fn default_instance() -> &'static Self {
371            static DEFAULT: super::Balance = super::Balance::const_default();
372            &DEFAULT
373        }
374        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
375        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
376            self.coin_type.as_mut().map(|field| field as _)
377        }
378        ///Returns a mutable reference to `coin_type`.
379        ///If the field is unset, it is first initialized with the default value.
380        pub fn coin_type_mut(&mut self) -> &mut String {
381            self.coin_type.get_or_insert_default()
382        }
383        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
384        pub fn coin_type_opt(&self) -> Option<&str> {
385            self.coin_type.as_ref().map(|field| field as _)
386        }
387        ///Sets `coin_type` with the provided value.
388        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
389            self.coin_type = Some(field.into().into());
390        }
391        ///Sets `coin_type` with the provided value.
392        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
393            self.set_coin_type(field.into());
394            self
395        }
396        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
397        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
398            self.balance.as_mut().map(|field| field as _)
399        }
400        ///Returns a mutable reference to `balance`.
401        ///If the field is unset, it is first initialized with the default value.
402        pub fn balance_mut(&mut self) -> &mut u64 {
403            self.balance.get_or_insert_default()
404        }
405        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
406        pub fn balance_opt(&self) -> Option<u64> {
407            self.balance.as_ref().map(|field| *field)
408        }
409        ///Sets `balance` with the provided value.
410        pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
411            self.balance = Some(field.into().into());
412        }
413        ///Sets `balance` with the provided value.
414        pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
415            self.set_balance(field.into());
416            self
417        }
418    }
419    impl super::BalanceChange {
420        pub const fn const_default() -> Self {
421            Self {
422                address: None,
423                coin_type: None,
424                amount: None,
425            }
426        }
427        #[doc(hidden)]
428        pub fn default_instance() -> &'static Self {
429            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
430            &DEFAULT
431        }
432        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
433        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
434            self.address.as_mut().map(|field| field as _)
435        }
436        ///Returns a mutable reference to `address`.
437        ///If the field is unset, it is first initialized with the default value.
438        pub fn address_mut(&mut self) -> &mut String {
439            self.address.get_or_insert_default()
440        }
441        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
442        pub fn address_opt(&self) -> Option<&str> {
443            self.address.as_ref().map(|field| field as _)
444        }
445        ///Sets `address` with the provided value.
446        pub fn set_address<T: Into<String>>(&mut self, field: T) {
447            self.address = Some(field.into().into());
448        }
449        ///Sets `address` with the provided value.
450        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
451            self.set_address(field.into());
452            self
453        }
454        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
455        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
456            self.coin_type.as_mut().map(|field| field as _)
457        }
458        ///Returns a mutable reference to `coin_type`.
459        ///If the field is unset, it is first initialized with the default value.
460        pub fn coin_type_mut(&mut self) -> &mut String {
461            self.coin_type.get_or_insert_default()
462        }
463        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
464        pub fn coin_type_opt(&self) -> Option<&str> {
465            self.coin_type.as_ref().map(|field| field as _)
466        }
467        ///Sets `coin_type` with the provided value.
468        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
469            self.coin_type = Some(field.into().into());
470        }
471        ///Sets `coin_type` with the provided value.
472        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
473            self.set_coin_type(field.into());
474            self
475        }
476        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
477        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
478            self.amount.as_mut().map(|field| field as _)
479        }
480        ///Returns a mutable reference to `amount`.
481        ///If the field is unset, it is first initialized with the default value.
482        pub fn amount_mut(&mut self) -> &mut String {
483            self.amount.get_or_insert_default()
484        }
485        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
486        pub fn amount_opt(&self) -> Option<&str> {
487            self.amount.as_ref().map(|field| field as _)
488        }
489        ///Sets `amount` with the provided value.
490        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
491            self.amount = Some(field.into().into());
492        }
493        ///Sets `amount` with the provided value.
494        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
495            self.set_amount(field.into());
496            self
497        }
498    }
499    impl super::BatchGetObjectsRequest {
500        pub const fn const_default() -> Self {
501            Self {
502                requests: Vec::new(),
503                read_mask: None,
504            }
505        }
506        #[doc(hidden)]
507        pub fn default_instance() -> &'static Self {
508            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
509            &DEFAULT
510        }
511        ///Returns the value of `requests`, or the default value if `requests` is unset.
512        pub fn requests(&self) -> &[super::GetObjectRequest] {
513            &self.requests
514        }
515        ///Returns a mutable reference to `requests`.
516        ///If the field is unset, it is first initialized with the default value.
517        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
518            &mut self.requests
519        }
520        ///Sets `requests` with the provided value.
521        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
522            self.requests = field;
523        }
524        ///Sets `requests` with the provided value.
525        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
526            self.set_requests(field);
527            self
528        }
529        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
530        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
531            self.read_mask.as_mut().map(|field| field as _)
532        }
533        ///Returns a mutable reference to `read_mask`.
534        ///If the field is unset, it is first initialized with the default value.
535        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
536            self.read_mask.get_or_insert_default()
537        }
538        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
539        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
540            self.read_mask.as_ref().map(|field| field as _)
541        }
542        ///Sets `read_mask` with the provided value.
543        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
544            self.read_mask = Some(field.into().into());
545        }
546        ///Sets `read_mask` with the provided value.
547        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
548            mut self,
549            field: T,
550        ) -> Self {
551            self.set_read_mask(field.into());
552            self
553        }
554    }
555    impl super::BatchGetObjectsResponse {
556        pub const fn const_default() -> Self {
557            Self { objects: Vec::new() }
558        }
559        #[doc(hidden)]
560        pub fn default_instance() -> &'static Self {
561            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
562            &DEFAULT
563        }
564        ///Returns the value of `objects`, or the default value if `objects` is unset.
565        pub fn objects(&self) -> &[super::GetObjectResult] {
566            &self.objects
567        }
568        ///Returns a mutable reference to `objects`.
569        ///If the field is unset, it is first initialized with the default value.
570        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
571            &mut self.objects
572        }
573        ///Sets `objects` with the provided value.
574        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
575            self.objects = field;
576        }
577        ///Sets `objects` with the provided value.
578        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
579            self.set_objects(field);
580            self
581        }
582    }
583    impl super::BatchGetTransactionsRequest {
584        pub const fn const_default() -> Self {
585            Self {
586                digests: Vec::new(),
587                read_mask: None,
588            }
589        }
590        #[doc(hidden)]
591        pub fn default_instance() -> &'static Self {
592            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
593            &DEFAULT
594        }
595        ///Returns the value of `digests`, or the default value if `digests` is unset.
596        pub fn digests(&self) -> &[String] {
597            &self.digests
598        }
599        ///Returns a mutable reference to `digests`.
600        ///If the field is unset, it is first initialized with the default value.
601        pub fn digests_mut(&mut self) -> &mut Vec<String> {
602            &mut self.digests
603        }
604        ///Sets `digests` with the provided value.
605        pub fn set_digests(&mut self, field: Vec<String>) {
606            self.digests = field;
607        }
608        ///Sets `digests` with the provided value.
609        pub fn with_digests(mut self, field: Vec<String>) -> Self {
610            self.set_digests(field);
611            self
612        }
613        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
614        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
615            self.read_mask.as_mut().map(|field| field as _)
616        }
617        ///Returns a mutable reference to `read_mask`.
618        ///If the field is unset, it is first initialized with the default value.
619        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
620            self.read_mask.get_or_insert_default()
621        }
622        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
623        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
624            self.read_mask.as_ref().map(|field| field as _)
625        }
626        ///Sets `read_mask` with the provided value.
627        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
628            self.read_mask = Some(field.into().into());
629        }
630        ///Sets `read_mask` with the provided value.
631        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
632            mut self,
633            field: T,
634        ) -> Self {
635            self.set_read_mask(field.into());
636            self
637        }
638    }
639    impl super::BatchGetTransactionsResponse {
640        pub const fn const_default() -> Self {
641            Self { transactions: Vec::new() }
642        }
643        #[doc(hidden)]
644        pub fn default_instance() -> &'static Self {
645            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
646            &DEFAULT
647        }
648        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
649        pub fn transactions(&self) -> &[super::GetTransactionResult] {
650            &self.transactions
651        }
652        ///Returns a mutable reference to `transactions`.
653        ///If the field is unset, it is first initialized with the default value.
654        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
655            &mut self.transactions
656        }
657        ///Sets `transactions` with the provided value.
658        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
659            self.transactions = field;
660        }
661        ///Sets `transactions` with the provided value.
662        pub fn with_transactions(
663            mut self,
664            field: Vec<super::GetTransactionResult>,
665        ) -> Self {
666            self.set_transactions(field);
667            self
668        }
669    }
670    impl super::Bcs {
671        pub const fn const_default() -> Self {
672            Self { name: None, value: None }
673        }
674        #[doc(hidden)]
675        pub fn default_instance() -> &'static Self {
676            static DEFAULT: super::Bcs = super::Bcs::const_default();
677            &DEFAULT
678        }
679        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
680        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
681            self.name.as_mut().map(|field| field as _)
682        }
683        ///Returns a mutable reference to `name`.
684        ///If the field is unset, it is first initialized with the default value.
685        pub fn name_mut(&mut self) -> &mut String {
686            self.name.get_or_insert_default()
687        }
688        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
689        pub fn name_opt(&self) -> Option<&str> {
690            self.name.as_ref().map(|field| field as _)
691        }
692        ///Sets `name` with the provided value.
693        pub fn set_name<T: Into<String>>(&mut self, field: T) {
694            self.name = Some(field.into().into());
695        }
696        ///Sets `name` with the provided value.
697        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
698            self.set_name(field.into());
699            self
700        }
701        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
702        pub fn value_opt(&self) -> Option<&[u8]> {
703            self.value.as_ref().map(|field| field as _)
704        }
705        ///Sets `value` with the provided value.
706        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
707            self.value = Some(field.into().into());
708        }
709        ///Sets `value` with the provided value.
710        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
711            self.set_value(field.into());
712            self
713        }
714    }
715    impl super::CanceledTransaction {
716        pub const fn const_default() -> Self {
717            Self {
718                digest: None,
719                version_assignments: Vec::new(),
720            }
721        }
722        #[doc(hidden)]
723        pub fn default_instance() -> &'static Self {
724            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
725            &DEFAULT
726        }
727        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
728        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
729            self.digest.as_mut().map(|field| field as _)
730        }
731        ///Returns a mutable reference to `digest`.
732        ///If the field is unset, it is first initialized with the default value.
733        pub fn digest_mut(&mut self) -> &mut String {
734            self.digest.get_or_insert_default()
735        }
736        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
737        pub fn digest_opt(&self) -> Option<&str> {
738            self.digest.as_ref().map(|field| field as _)
739        }
740        ///Sets `digest` with the provided value.
741        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
742            self.digest = Some(field.into().into());
743        }
744        ///Sets `digest` with the provided value.
745        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
746            self.set_digest(field.into());
747            self
748        }
749        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
750        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
751            &self.version_assignments
752        }
753        ///Returns a mutable reference to `version_assignments`.
754        ///If the field is unset, it is first initialized with the default value.
755        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
756            &mut self.version_assignments
757        }
758        ///Sets `version_assignments` with the provided value.
759        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
760            self.version_assignments = field;
761        }
762        ///Sets `version_assignments` with the provided value.
763        pub fn with_version_assignments(
764            mut self,
765            field: Vec<super::VersionAssignment>,
766        ) -> Self {
767            self.set_version_assignments(field);
768            self
769        }
770    }
771    impl super::ChangeEpoch {
772        pub const fn const_default() -> Self {
773            Self {
774                epoch: None,
775                protocol_version: None,
776                storage_charge: None,
777                computation_charge: None,
778                storage_rebate: None,
779                non_refundable_storage_fee: None,
780                epoch_start_timestamp: None,
781                system_packages: Vec::new(),
782            }
783        }
784        #[doc(hidden)]
785        pub fn default_instance() -> &'static Self {
786            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
787            &DEFAULT
788        }
789        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
790        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
791            self.epoch.as_mut().map(|field| field as _)
792        }
793        ///Returns a mutable reference to `epoch`.
794        ///If the field is unset, it is first initialized with the default value.
795        pub fn epoch_mut(&mut self) -> &mut u64 {
796            self.epoch.get_or_insert_default()
797        }
798        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
799        pub fn epoch_opt(&self) -> Option<u64> {
800            self.epoch.as_ref().map(|field| *field)
801        }
802        ///Sets `epoch` with the provided value.
803        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
804            self.epoch = Some(field.into().into());
805        }
806        ///Sets `epoch` with the provided value.
807        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
808            self.set_epoch(field.into());
809            self
810        }
811        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
812        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
813            self.protocol_version.as_mut().map(|field| field as _)
814        }
815        ///Returns a mutable reference to `protocol_version`.
816        ///If the field is unset, it is first initialized with the default value.
817        pub fn protocol_version_mut(&mut self) -> &mut u64 {
818            self.protocol_version.get_or_insert_default()
819        }
820        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
821        pub fn protocol_version_opt(&self) -> Option<u64> {
822            self.protocol_version.as_ref().map(|field| *field)
823        }
824        ///Sets `protocol_version` with the provided value.
825        pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
826            self.protocol_version = Some(field.into().into());
827        }
828        ///Sets `protocol_version` with the provided value.
829        pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
830            self.set_protocol_version(field.into());
831            self
832        }
833        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
834        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
835            self.storage_charge.as_mut().map(|field| field as _)
836        }
837        ///Returns a mutable reference to `storage_charge`.
838        ///If the field is unset, it is first initialized with the default value.
839        pub fn storage_charge_mut(&mut self) -> &mut u64 {
840            self.storage_charge.get_or_insert_default()
841        }
842        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
843        pub fn storage_charge_opt(&self) -> Option<u64> {
844            self.storage_charge.as_ref().map(|field| *field)
845        }
846        ///Sets `storage_charge` with the provided value.
847        pub fn set_storage_charge<T: Into<u64>>(&mut self, field: T) {
848            self.storage_charge = Some(field.into().into());
849        }
850        ///Sets `storage_charge` with the provided value.
851        pub fn with_storage_charge<T: Into<u64>>(mut self, field: T) -> Self {
852            self.set_storage_charge(field.into());
853            self
854        }
855        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
856        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
857            self.computation_charge.as_mut().map(|field| field as _)
858        }
859        ///Returns a mutable reference to `computation_charge`.
860        ///If the field is unset, it is first initialized with the default value.
861        pub fn computation_charge_mut(&mut self) -> &mut u64 {
862            self.computation_charge.get_or_insert_default()
863        }
864        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
865        pub fn computation_charge_opt(&self) -> Option<u64> {
866            self.computation_charge.as_ref().map(|field| *field)
867        }
868        ///Sets `computation_charge` with the provided value.
869        pub fn set_computation_charge<T: Into<u64>>(&mut self, field: T) {
870            self.computation_charge = Some(field.into().into());
871        }
872        ///Sets `computation_charge` with the provided value.
873        pub fn with_computation_charge<T: Into<u64>>(mut self, field: T) -> Self {
874            self.set_computation_charge(field.into());
875            self
876        }
877        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
878        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
879            self.storage_rebate.as_mut().map(|field| field as _)
880        }
881        ///Returns a mutable reference to `storage_rebate`.
882        ///If the field is unset, it is first initialized with the default value.
883        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
884            self.storage_rebate.get_or_insert_default()
885        }
886        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
887        pub fn storage_rebate_opt(&self) -> Option<u64> {
888            self.storage_rebate.as_ref().map(|field| *field)
889        }
890        ///Sets `storage_rebate` with the provided value.
891        pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
892            self.storage_rebate = Some(field.into().into());
893        }
894        ///Sets `storage_rebate` with the provided value.
895        pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
896            self.set_storage_rebate(field.into());
897            self
898        }
899        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
900        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
901            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
902        }
903        ///Returns a mutable reference to `non_refundable_storage_fee`.
904        ///If the field is unset, it is first initialized with the default value.
905        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
906            self.non_refundable_storage_fee.get_or_insert_default()
907        }
908        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
909        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
910            self.non_refundable_storage_fee.as_ref().map(|field| *field)
911        }
912        ///Sets `non_refundable_storage_fee` with the provided value.
913        pub fn set_non_refundable_storage_fee<T: Into<u64>>(&mut self, field: T) {
914            self.non_refundable_storage_fee = Some(field.into().into());
915        }
916        ///Sets `non_refundable_storage_fee` with the provided value.
917        pub fn with_non_refundable_storage_fee<T: Into<u64>>(
918            mut self,
919            field: T,
920        ) -> Self {
921            self.set_non_refundable_storage_fee(field.into());
922            self
923        }
924        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
925        pub fn epoch_start_timestamp_opt_mut(
926            &mut self,
927        ) -> Option<&mut ::prost_types::Timestamp> {
928            self.epoch_start_timestamp.as_mut().map(|field| field as _)
929        }
930        ///Returns a mutable reference to `epoch_start_timestamp`.
931        ///If the field is unset, it is first initialized with the default value.
932        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
933            self.epoch_start_timestamp.get_or_insert_default()
934        }
935        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
936        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
937            self.epoch_start_timestamp.as_ref().map(|field| field as _)
938        }
939        ///Sets `epoch_start_timestamp` with the provided value.
940        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
941            &mut self,
942            field: T,
943        ) {
944            self.epoch_start_timestamp = Some(field.into().into());
945        }
946        ///Sets `epoch_start_timestamp` with the provided value.
947        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
948            mut self,
949            field: T,
950        ) -> Self {
951            self.set_epoch_start_timestamp(field.into());
952            self
953        }
954        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
955        pub fn system_packages(&self) -> &[super::SystemPackage] {
956            &self.system_packages
957        }
958        ///Returns a mutable reference to `system_packages`.
959        ///If the field is unset, it is first initialized with the default value.
960        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
961            &mut self.system_packages
962        }
963        ///Sets `system_packages` with the provided value.
964        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
965            self.system_packages = field;
966        }
967        ///Sets `system_packages` with the provided value.
968        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
969            self.set_system_packages(field);
970            self
971        }
972    }
973    impl super::ChangedObject {
974        pub const fn const_default() -> Self {
975            Self {
976                object_id: None,
977                input_state: None,
978                input_version: None,
979                input_digest: None,
980                input_owner: None,
981                output_state: None,
982                output_version: None,
983                output_digest: None,
984                output_owner: None,
985                id_operation: None,
986                object_type: None,
987            }
988        }
989        #[doc(hidden)]
990        pub fn default_instance() -> &'static Self {
991            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
992            &DEFAULT
993        }
994        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
995        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
996            self.object_id.as_mut().map(|field| field as _)
997        }
998        ///Returns a mutable reference to `object_id`.
999        ///If the field is unset, it is first initialized with the default value.
1000        pub fn object_id_mut(&mut self) -> &mut String {
1001            self.object_id.get_or_insert_default()
1002        }
1003        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1004        pub fn object_id_opt(&self) -> Option<&str> {
1005            self.object_id.as_ref().map(|field| field as _)
1006        }
1007        ///Sets `object_id` with the provided value.
1008        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1009            self.object_id = Some(field.into().into());
1010        }
1011        ///Sets `object_id` with the provided value.
1012        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1013            self.set_object_id(field.into());
1014            self
1015        }
1016        ///Sets `input_state` with the provided value.
1017        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1018            mut self,
1019            field: T,
1020        ) -> Self {
1021            self.set_input_state(field.into());
1022            self
1023        }
1024        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1025        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1026            self.input_version.as_mut().map(|field| field as _)
1027        }
1028        ///Returns a mutable reference to `input_version`.
1029        ///If the field is unset, it is first initialized with the default value.
1030        pub fn input_version_mut(&mut self) -> &mut u64 {
1031            self.input_version.get_or_insert_default()
1032        }
1033        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1034        pub fn input_version_opt(&self) -> Option<u64> {
1035            self.input_version.as_ref().map(|field| *field)
1036        }
1037        ///Sets `input_version` with the provided value.
1038        pub fn set_input_version<T: Into<u64>>(&mut self, field: T) {
1039            self.input_version = Some(field.into().into());
1040        }
1041        ///Sets `input_version` with the provided value.
1042        pub fn with_input_version<T: Into<u64>>(mut self, field: T) -> Self {
1043            self.set_input_version(field.into());
1044            self
1045        }
1046        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1047        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1048            self.input_digest.as_mut().map(|field| field as _)
1049        }
1050        ///Returns a mutable reference to `input_digest`.
1051        ///If the field is unset, it is first initialized with the default value.
1052        pub fn input_digest_mut(&mut self) -> &mut String {
1053            self.input_digest.get_or_insert_default()
1054        }
1055        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1056        pub fn input_digest_opt(&self) -> Option<&str> {
1057            self.input_digest.as_ref().map(|field| field as _)
1058        }
1059        ///Sets `input_digest` with the provided value.
1060        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1061            self.input_digest = Some(field.into().into());
1062        }
1063        ///Sets `input_digest` with the provided value.
1064        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1065            self.set_input_digest(field.into());
1066            self
1067        }
1068        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1069        pub fn input_owner(&self) -> &super::Owner {
1070            self.input_owner
1071                .as_ref()
1072                .map(|field| field as _)
1073                .unwrap_or_else(|| super::Owner::default_instance() as _)
1074        }
1075        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1076        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1077            self.input_owner.as_mut().map(|field| field as _)
1078        }
1079        ///Returns a mutable reference to `input_owner`.
1080        ///If the field is unset, it is first initialized with the default value.
1081        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1082            self.input_owner.get_or_insert_default()
1083        }
1084        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1085        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1086            self.input_owner.as_ref().map(|field| field as _)
1087        }
1088        ///Sets `input_owner` with the provided value.
1089        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1090            self.input_owner = Some(field.into().into());
1091        }
1092        ///Sets `input_owner` with the provided value.
1093        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1094            self.set_input_owner(field.into());
1095            self
1096        }
1097        ///Sets `output_state` with the provided value.
1098        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1099            mut self,
1100            field: T,
1101        ) -> Self {
1102            self.set_output_state(field.into());
1103            self
1104        }
1105        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1106        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1107            self.output_version.as_mut().map(|field| field as _)
1108        }
1109        ///Returns a mutable reference to `output_version`.
1110        ///If the field is unset, it is first initialized with the default value.
1111        pub fn output_version_mut(&mut self) -> &mut u64 {
1112            self.output_version.get_or_insert_default()
1113        }
1114        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1115        pub fn output_version_opt(&self) -> Option<u64> {
1116            self.output_version.as_ref().map(|field| *field)
1117        }
1118        ///Sets `output_version` with the provided value.
1119        pub fn set_output_version<T: Into<u64>>(&mut self, field: T) {
1120            self.output_version = Some(field.into().into());
1121        }
1122        ///Sets `output_version` with the provided value.
1123        pub fn with_output_version<T: Into<u64>>(mut self, field: T) -> Self {
1124            self.set_output_version(field.into());
1125            self
1126        }
1127        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1128        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1129            self.output_digest.as_mut().map(|field| field as _)
1130        }
1131        ///Returns a mutable reference to `output_digest`.
1132        ///If the field is unset, it is first initialized with the default value.
1133        pub fn output_digest_mut(&mut self) -> &mut String {
1134            self.output_digest.get_or_insert_default()
1135        }
1136        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1137        pub fn output_digest_opt(&self) -> Option<&str> {
1138            self.output_digest.as_ref().map(|field| field as _)
1139        }
1140        ///Sets `output_digest` with the provided value.
1141        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1142            self.output_digest = Some(field.into().into());
1143        }
1144        ///Sets `output_digest` with the provided value.
1145        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1146            self.set_output_digest(field.into());
1147            self
1148        }
1149        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1150        pub fn output_owner(&self) -> &super::Owner {
1151            self.output_owner
1152                .as_ref()
1153                .map(|field| field as _)
1154                .unwrap_or_else(|| super::Owner::default_instance() as _)
1155        }
1156        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1157        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1158            self.output_owner.as_mut().map(|field| field as _)
1159        }
1160        ///Returns a mutable reference to `output_owner`.
1161        ///If the field is unset, it is first initialized with the default value.
1162        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1163            self.output_owner.get_or_insert_default()
1164        }
1165        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1166        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1167            self.output_owner.as_ref().map(|field| field as _)
1168        }
1169        ///Sets `output_owner` with the provided value.
1170        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1171            self.output_owner = Some(field.into().into());
1172        }
1173        ///Sets `output_owner` with the provided value.
1174        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1175            self.set_output_owner(field.into());
1176            self
1177        }
1178        ///Sets `id_operation` with the provided value.
1179        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1180            mut self,
1181            field: T,
1182        ) -> Self {
1183            self.set_id_operation(field.into());
1184            self
1185        }
1186        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1187        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1188            self.object_type.as_mut().map(|field| field as _)
1189        }
1190        ///Returns a mutable reference to `object_type`.
1191        ///If the field is unset, it is first initialized with the default value.
1192        pub fn object_type_mut(&mut self) -> &mut String {
1193            self.object_type.get_or_insert_default()
1194        }
1195        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1196        pub fn object_type_opt(&self) -> Option<&str> {
1197            self.object_type.as_ref().map(|field| field as _)
1198        }
1199        ///Sets `object_type` with the provided value.
1200        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1201            self.object_type = Some(field.into().into());
1202        }
1203        ///Sets `object_type` with the provided value.
1204        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1205            self.set_object_type(field.into());
1206            self
1207        }
1208    }
1209    impl super::Checkpoint {
1210        pub const fn const_default() -> Self {
1211            Self {
1212                sequence_number: None,
1213                digest: None,
1214                summary: None,
1215                signature: None,
1216                contents: None,
1217                transactions: Vec::new(),
1218            }
1219        }
1220        #[doc(hidden)]
1221        pub fn default_instance() -> &'static Self {
1222            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1223            &DEFAULT
1224        }
1225        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1226        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1227            self.sequence_number.as_mut().map(|field| field as _)
1228        }
1229        ///Returns a mutable reference to `sequence_number`.
1230        ///If the field is unset, it is first initialized with the default value.
1231        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1232            self.sequence_number.get_or_insert_default()
1233        }
1234        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1235        pub fn sequence_number_opt(&self) -> Option<u64> {
1236            self.sequence_number.as_ref().map(|field| *field)
1237        }
1238        ///Sets `sequence_number` with the provided value.
1239        pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
1240            self.sequence_number = Some(field.into().into());
1241        }
1242        ///Sets `sequence_number` with the provided value.
1243        pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
1244            self.set_sequence_number(field.into());
1245            self
1246        }
1247        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1248        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1249            self.digest.as_mut().map(|field| field as _)
1250        }
1251        ///Returns a mutable reference to `digest`.
1252        ///If the field is unset, it is first initialized with the default value.
1253        pub fn digest_mut(&mut self) -> &mut String {
1254            self.digest.get_or_insert_default()
1255        }
1256        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1257        pub fn digest_opt(&self) -> Option<&str> {
1258            self.digest.as_ref().map(|field| field as _)
1259        }
1260        ///Sets `digest` with the provided value.
1261        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1262            self.digest = Some(field.into().into());
1263        }
1264        ///Sets `digest` with the provided value.
1265        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1266            self.set_digest(field.into());
1267            self
1268        }
1269        ///Returns the value of `summary`, or the default value if `summary` is unset.
1270        pub fn summary(&self) -> &super::CheckpointSummary {
1271            self.summary
1272                .as_ref()
1273                .map(|field| field as _)
1274                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1275        }
1276        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1277        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1278            self.summary.as_mut().map(|field| field as _)
1279        }
1280        ///Returns a mutable reference to `summary`.
1281        ///If the field is unset, it is first initialized with the default value.
1282        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1283            self.summary.get_or_insert_default()
1284        }
1285        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1286        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1287            self.summary.as_ref().map(|field| field as _)
1288        }
1289        ///Sets `summary` with the provided value.
1290        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1291            self.summary = Some(field.into().into());
1292        }
1293        ///Sets `summary` with the provided value.
1294        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1295            mut self,
1296            field: T,
1297        ) -> Self {
1298            self.set_summary(field.into());
1299            self
1300        }
1301        ///Returns the value of `signature`, or the default value if `signature` is unset.
1302        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1303            self.signature
1304                .as_ref()
1305                .map(|field| field as _)
1306                .unwrap_or_else(|| {
1307                    super::ValidatorAggregatedSignature::default_instance() as _
1308                })
1309        }
1310        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1311        pub fn signature_opt_mut(
1312            &mut self,
1313        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1314            self.signature.as_mut().map(|field| field as _)
1315        }
1316        ///Returns a mutable reference to `signature`.
1317        ///If the field is unset, it is first initialized with the default value.
1318        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1319            self.signature.get_or_insert_default()
1320        }
1321        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1322        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1323            self.signature.as_ref().map(|field| field as _)
1324        }
1325        ///Sets `signature` with the provided value.
1326        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1327            &mut self,
1328            field: T,
1329        ) {
1330            self.signature = Some(field.into().into());
1331        }
1332        ///Sets `signature` with the provided value.
1333        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1334            mut self,
1335            field: T,
1336        ) -> Self {
1337            self.set_signature(field.into());
1338            self
1339        }
1340        ///Returns the value of `contents`, or the default value if `contents` is unset.
1341        pub fn contents(&self) -> &super::CheckpointContents {
1342            self.contents
1343                .as_ref()
1344                .map(|field| field as _)
1345                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1346        }
1347        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1348        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1349            self.contents.as_mut().map(|field| field as _)
1350        }
1351        ///Returns a mutable reference to `contents`.
1352        ///If the field is unset, it is first initialized with the default value.
1353        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1354            self.contents.get_or_insert_default()
1355        }
1356        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1357        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1358            self.contents.as_ref().map(|field| field as _)
1359        }
1360        ///Sets `contents` with the provided value.
1361        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1362            self.contents = Some(field.into().into());
1363        }
1364        ///Sets `contents` with the provided value.
1365        pub fn with_contents<T: Into<super::CheckpointContents>>(
1366            mut self,
1367            field: T,
1368        ) -> Self {
1369            self.set_contents(field.into());
1370            self
1371        }
1372        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1373        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1374            &self.transactions
1375        }
1376        ///Returns a mutable reference to `transactions`.
1377        ///If the field is unset, it is first initialized with the default value.
1378        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1379            &mut self.transactions
1380        }
1381        ///Sets `transactions` with the provided value.
1382        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1383            self.transactions = field;
1384        }
1385        ///Sets `transactions` with the provided value.
1386        pub fn with_transactions(
1387            mut self,
1388            field: Vec<super::ExecutedTransaction>,
1389        ) -> Self {
1390            self.set_transactions(field);
1391            self
1392        }
1393    }
1394    impl super::CheckpointCommitment {
1395        pub const fn const_default() -> Self {
1396            Self { kind: None, digest: None }
1397        }
1398        #[doc(hidden)]
1399        pub fn default_instance() -> &'static Self {
1400            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1401            &DEFAULT
1402        }
1403        ///Sets `kind` with the provided value.
1404        pub fn with_kind<
1405            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1406        >(mut self, field: T) -> Self {
1407            self.set_kind(field.into());
1408            self
1409        }
1410        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1411        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1412            self.digest.as_mut().map(|field| field as _)
1413        }
1414        ///Returns a mutable reference to `digest`.
1415        ///If the field is unset, it is first initialized with the default value.
1416        pub fn digest_mut(&mut self) -> &mut String {
1417            self.digest.get_or_insert_default()
1418        }
1419        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1420        pub fn digest_opt(&self) -> Option<&str> {
1421            self.digest.as_ref().map(|field| field as _)
1422        }
1423        ///Sets `digest` with the provided value.
1424        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1425            self.digest = Some(field.into().into());
1426        }
1427        ///Sets `digest` with the provided value.
1428        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1429            self.set_digest(field.into());
1430            self
1431        }
1432    }
1433    impl super::CheckpointContents {
1434        pub const fn const_default() -> Self {
1435            Self {
1436                bcs: None,
1437                digest: None,
1438                version: None,
1439                transactions: Vec::new(),
1440            }
1441        }
1442        #[doc(hidden)]
1443        pub fn default_instance() -> &'static Self {
1444            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1445            &DEFAULT
1446        }
1447        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1448        pub fn bcs(&self) -> &super::Bcs {
1449            self.bcs
1450                .as_ref()
1451                .map(|field| field as _)
1452                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1453        }
1454        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1455        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1456            self.bcs.as_mut().map(|field| field as _)
1457        }
1458        ///Returns a mutable reference to `bcs`.
1459        ///If the field is unset, it is first initialized with the default value.
1460        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1461            self.bcs.get_or_insert_default()
1462        }
1463        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1464        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1465            self.bcs.as_ref().map(|field| field as _)
1466        }
1467        ///Sets `bcs` with the provided value.
1468        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1469            self.bcs = Some(field.into().into());
1470        }
1471        ///Sets `bcs` with the provided value.
1472        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1473            self.set_bcs(field.into());
1474            self
1475        }
1476        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1477        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1478            self.digest.as_mut().map(|field| field as _)
1479        }
1480        ///Returns a mutable reference to `digest`.
1481        ///If the field is unset, it is first initialized with the default value.
1482        pub fn digest_mut(&mut self) -> &mut String {
1483            self.digest.get_or_insert_default()
1484        }
1485        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1486        pub fn digest_opt(&self) -> Option<&str> {
1487            self.digest.as_ref().map(|field| field as _)
1488        }
1489        ///Sets `digest` with the provided value.
1490        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1491            self.digest = Some(field.into().into());
1492        }
1493        ///Sets `digest` with the provided value.
1494        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1495            self.set_digest(field.into());
1496            self
1497        }
1498        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1499        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1500            self.version.as_mut().map(|field| field as _)
1501        }
1502        ///Returns a mutable reference to `version`.
1503        ///If the field is unset, it is first initialized with the default value.
1504        pub fn version_mut(&mut self) -> &mut i32 {
1505            self.version.get_or_insert_default()
1506        }
1507        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1508        pub fn version_opt(&self) -> Option<i32> {
1509            self.version.as_ref().map(|field| *field)
1510        }
1511        ///Sets `version` with the provided value.
1512        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
1513            self.version = Some(field.into().into());
1514        }
1515        ///Sets `version` with the provided value.
1516        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
1517            self.set_version(field.into());
1518            self
1519        }
1520        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1521        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1522            &self.transactions
1523        }
1524        ///Returns a mutable reference to `transactions`.
1525        ///If the field is unset, it is first initialized with the default value.
1526        pub fn transactions_mut(
1527            &mut self,
1528        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1529            &mut self.transactions
1530        }
1531        ///Sets `transactions` with the provided value.
1532        pub fn set_transactions(
1533            &mut self,
1534            field: Vec<super::CheckpointedTransactionInfo>,
1535        ) {
1536            self.transactions = field;
1537        }
1538        ///Sets `transactions` with the provided value.
1539        pub fn with_transactions(
1540            mut self,
1541            field: Vec<super::CheckpointedTransactionInfo>,
1542        ) -> Self {
1543            self.set_transactions(field);
1544            self
1545        }
1546    }
1547    impl super::CheckpointSummary {
1548        pub const fn const_default() -> Self {
1549            Self {
1550                bcs: None,
1551                digest: None,
1552                epoch: None,
1553                sequence_number: None,
1554                total_network_transactions: None,
1555                content_digest: None,
1556                previous_digest: None,
1557                epoch_rolling_gas_cost_summary: None,
1558                timestamp: None,
1559                commitments: Vec::new(),
1560                end_of_epoch_data: None,
1561                version_specific_data: None,
1562            }
1563        }
1564        #[doc(hidden)]
1565        pub fn default_instance() -> &'static Self {
1566            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1567            &DEFAULT
1568        }
1569        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1570        pub fn bcs(&self) -> &super::Bcs {
1571            self.bcs
1572                .as_ref()
1573                .map(|field| field as _)
1574                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1575        }
1576        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1577        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1578            self.bcs.as_mut().map(|field| field as _)
1579        }
1580        ///Returns a mutable reference to `bcs`.
1581        ///If the field is unset, it is first initialized with the default value.
1582        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1583            self.bcs.get_or_insert_default()
1584        }
1585        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1586        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1587            self.bcs.as_ref().map(|field| field as _)
1588        }
1589        ///Sets `bcs` with the provided value.
1590        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1591            self.bcs = Some(field.into().into());
1592        }
1593        ///Sets `bcs` with the provided value.
1594        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1595            self.set_bcs(field.into());
1596            self
1597        }
1598        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1599        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1600            self.digest.as_mut().map(|field| field as _)
1601        }
1602        ///Returns a mutable reference to `digest`.
1603        ///If the field is unset, it is first initialized with the default value.
1604        pub fn digest_mut(&mut self) -> &mut String {
1605            self.digest.get_or_insert_default()
1606        }
1607        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1608        pub fn digest_opt(&self) -> Option<&str> {
1609            self.digest.as_ref().map(|field| field as _)
1610        }
1611        ///Sets `digest` with the provided value.
1612        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1613            self.digest = Some(field.into().into());
1614        }
1615        ///Sets `digest` with the provided value.
1616        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1617            self.set_digest(field.into());
1618            self
1619        }
1620        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1621        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1622            self.epoch.as_mut().map(|field| field as _)
1623        }
1624        ///Returns a mutable reference to `epoch`.
1625        ///If the field is unset, it is first initialized with the default value.
1626        pub fn epoch_mut(&mut self) -> &mut u64 {
1627            self.epoch.get_or_insert_default()
1628        }
1629        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1630        pub fn epoch_opt(&self) -> Option<u64> {
1631            self.epoch.as_ref().map(|field| *field)
1632        }
1633        ///Sets `epoch` with the provided value.
1634        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
1635            self.epoch = Some(field.into().into());
1636        }
1637        ///Sets `epoch` with the provided value.
1638        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
1639            self.set_epoch(field.into());
1640            self
1641        }
1642        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1643        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1644            self.sequence_number.as_mut().map(|field| field as _)
1645        }
1646        ///Returns a mutable reference to `sequence_number`.
1647        ///If the field is unset, it is first initialized with the default value.
1648        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1649            self.sequence_number.get_or_insert_default()
1650        }
1651        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1652        pub fn sequence_number_opt(&self) -> Option<u64> {
1653            self.sequence_number.as_ref().map(|field| *field)
1654        }
1655        ///Sets `sequence_number` with the provided value.
1656        pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
1657            self.sequence_number = Some(field.into().into());
1658        }
1659        ///Sets `sequence_number` with the provided value.
1660        pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
1661            self.set_sequence_number(field.into());
1662            self
1663        }
1664        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1665        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1666            self.total_network_transactions.as_mut().map(|field| field as _)
1667        }
1668        ///Returns a mutable reference to `total_network_transactions`.
1669        ///If the field is unset, it is first initialized with the default value.
1670        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1671            self.total_network_transactions.get_or_insert_default()
1672        }
1673        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1674        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1675            self.total_network_transactions.as_ref().map(|field| *field)
1676        }
1677        ///Sets `total_network_transactions` with the provided value.
1678        pub fn set_total_network_transactions<T: Into<u64>>(&mut self, field: T) {
1679            self.total_network_transactions = Some(field.into().into());
1680        }
1681        ///Sets `total_network_transactions` with the provided value.
1682        pub fn with_total_network_transactions<T: Into<u64>>(
1683            mut self,
1684            field: T,
1685        ) -> Self {
1686            self.set_total_network_transactions(field.into());
1687            self
1688        }
1689        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1690        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1691            self.content_digest.as_mut().map(|field| field as _)
1692        }
1693        ///Returns a mutable reference to `content_digest`.
1694        ///If the field is unset, it is first initialized with the default value.
1695        pub fn content_digest_mut(&mut self) -> &mut String {
1696            self.content_digest.get_or_insert_default()
1697        }
1698        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1699        pub fn content_digest_opt(&self) -> Option<&str> {
1700            self.content_digest.as_ref().map(|field| field as _)
1701        }
1702        ///Sets `content_digest` with the provided value.
1703        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1704            self.content_digest = Some(field.into().into());
1705        }
1706        ///Sets `content_digest` with the provided value.
1707        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1708            self.set_content_digest(field.into());
1709            self
1710        }
1711        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1712        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1713            self.previous_digest.as_mut().map(|field| field as _)
1714        }
1715        ///Returns a mutable reference to `previous_digest`.
1716        ///If the field is unset, it is first initialized with the default value.
1717        pub fn previous_digest_mut(&mut self) -> &mut String {
1718            self.previous_digest.get_or_insert_default()
1719        }
1720        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1721        pub fn previous_digest_opt(&self) -> Option<&str> {
1722            self.previous_digest.as_ref().map(|field| field as _)
1723        }
1724        ///Sets `previous_digest` with the provided value.
1725        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1726            self.previous_digest = Some(field.into().into());
1727        }
1728        ///Sets `previous_digest` with the provided value.
1729        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1730            self.set_previous_digest(field.into());
1731            self
1732        }
1733        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
1734        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1735            self.epoch_rolling_gas_cost_summary
1736                .as_ref()
1737                .map(|field| field as _)
1738                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1739        }
1740        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1741        pub fn epoch_rolling_gas_cost_summary_opt_mut(
1742            &mut self,
1743        ) -> Option<&mut super::GasCostSummary> {
1744            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1745        }
1746        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
1747        ///If the field is unset, it is first initialized with the default value.
1748        pub fn epoch_rolling_gas_cost_summary_mut(
1749            &mut self,
1750        ) -> &mut super::GasCostSummary {
1751            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1752        }
1753        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1754        pub fn epoch_rolling_gas_cost_summary_opt(
1755            &self,
1756        ) -> Option<&super::GasCostSummary> {
1757            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1758        }
1759        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1760        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1761            &mut self,
1762            field: T,
1763        ) {
1764            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1765        }
1766        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1767        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1768            mut self,
1769            field: T,
1770        ) -> Self {
1771            self.set_epoch_rolling_gas_cost_summary(field.into());
1772            self
1773        }
1774        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1775        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1776            self.timestamp.as_mut().map(|field| field as _)
1777        }
1778        ///Returns a mutable reference to `timestamp`.
1779        ///If the field is unset, it is first initialized with the default value.
1780        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1781            self.timestamp.get_or_insert_default()
1782        }
1783        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1784        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1785            self.timestamp.as_ref().map(|field| field as _)
1786        }
1787        ///Sets `timestamp` with the provided value.
1788        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1789            self.timestamp = Some(field.into().into());
1790        }
1791        ///Sets `timestamp` with the provided value.
1792        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1793            mut self,
1794            field: T,
1795        ) -> Self {
1796            self.set_timestamp(field.into());
1797            self
1798        }
1799        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
1800        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1801            &self.commitments
1802        }
1803        ///Returns a mutable reference to `commitments`.
1804        ///If the field is unset, it is first initialized with the default value.
1805        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1806            &mut self.commitments
1807        }
1808        ///Sets `commitments` with the provided value.
1809        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1810            self.commitments = field;
1811        }
1812        ///Sets `commitments` with the provided value.
1813        pub fn with_commitments(
1814            mut self,
1815            field: Vec<super::CheckpointCommitment>,
1816        ) -> Self {
1817            self.set_commitments(field);
1818            self
1819        }
1820        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
1821        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1822            self.end_of_epoch_data
1823                .as_ref()
1824                .map(|field| field as _)
1825                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
1826        }
1827        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1828        pub fn end_of_epoch_data_opt_mut(
1829            &mut self,
1830        ) -> Option<&mut super::EndOfEpochData> {
1831            self.end_of_epoch_data.as_mut().map(|field| field as _)
1832        }
1833        ///Returns a mutable reference to `end_of_epoch_data`.
1834        ///If the field is unset, it is first initialized with the default value.
1835        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
1836            self.end_of_epoch_data.get_or_insert_default()
1837        }
1838        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
1839        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
1840            self.end_of_epoch_data.as_ref().map(|field| field as _)
1841        }
1842        ///Sets `end_of_epoch_data` with the provided value.
1843        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1844            &mut self,
1845            field: T,
1846        ) {
1847            self.end_of_epoch_data = Some(field.into().into());
1848        }
1849        ///Sets `end_of_epoch_data` with the provided value.
1850        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1851            mut self,
1852            field: T,
1853        ) -> Self {
1854            self.set_end_of_epoch_data(field.into());
1855            self
1856        }
1857        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
1858        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
1859            self.version_specific_data.as_ref().map(|field| field as _)
1860        }
1861        ///Sets `version_specific_data` with the provided value.
1862        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1863            &mut self,
1864            field: T,
1865        ) {
1866            self.version_specific_data = Some(field.into().into());
1867        }
1868        ///Sets `version_specific_data` with the provided value.
1869        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1870            mut self,
1871            field: T,
1872        ) -> Self {
1873            self.set_version_specific_data(field.into());
1874            self
1875        }
1876    }
1877    impl super::CheckpointedTransactionInfo {
1878        pub const fn const_default() -> Self {
1879            Self {
1880                transaction: None,
1881                effects: None,
1882                signatures: Vec::new(),
1883            }
1884        }
1885        #[doc(hidden)]
1886        pub fn default_instance() -> &'static Self {
1887            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
1888            &DEFAULT
1889        }
1890        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1891        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
1892            self.transaction.as_mut().map(|field| field as _)
1893        }
1894        ///Returns a mutable reference to `transaction`.
1895        ///If the field is unset, it is first initialized with the default value.
1896        pub fn transaction_mut(&mut self) -> &mut String {
1897            self.transaction.get_or_insert_default()
1898        }
1899        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
1900        pub fn transaction_opt(&self) -> Option<&str> {
1901            self.transaction.as_ref().map(|field| field as _)
1902        }
1903        ///Sets `transaction` with the provided value.
1904        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
1905            self.transaction = Some(field.into().into());
1906        }
1907        ///Sets `transaction` with the provided value.
1908        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
1909            self.set_transaction(field.into());
1910            self
1911        }
1912        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1913        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
1914            self.effects.as_mut().map(|field| field as _)
1915        }
1916        ///Returns a mutable reference to `effects`.
1917        ///If the field is unset, it is first initialized with the default value.
1918        pub fn effects_mut(&mut self) -> &mut String {
1919            self.effects.get_or_insert_default()
1920        }
1921        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1922        pub fn effects_opt(&self) -> Option<&str> {
1923            self.effects.as_ref().map(|field| field as _)
1924        }
1925        ///Sets `effects` with the provided value.
1926        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
1927            self.effects = Some(field.into().into());
1928        }
1929        ///Sets `effects` with the provided value.
1930        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
1931            self.set_effects(field.into());
1932            self
1933        }
1934        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
1935        pub fn signatures(&self) -> &[super::UserSignature] {
1936            &self.signatures
1937        }
1938        ///Returns a mutable reference to `signatures`.
1939        ///If the field is unset, it is first initialized with the default value.
1940        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
1941            &mut self.signatures
1942        }
1943        ///Sets `signatures` with the provided value.
1944        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
1945            self.signatures = field;
1946        }
1947        ///Sets `signatures` with the provided value.
1948        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
1949            self.set_signatures(field);
1950            self
1951        }
1952    }
1953    impl super::CircomG1 {
1954        pub const fn const_default() -> Self {
1955            Self {
1956                e0: None,
1957                e1: None,
1958                e2: None,
1959            }
1960        }
1961        #[doc(hidden)]
1962        pub fn default_instance() -> &'static Self {
1963            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
1964            &DEFAULT
1965        }
1966        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1967        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
1968            self.e0.as_mut().map(|field| field as _)
1969        }
1970        ///Returns a mutable reference to `e0`.
1971        ///If the field is unset, it is first initialized with the default value.
1972        pub fn e0_mut(&mut self) -> &mut String {
1973            self.e0.get_or_insert_default()
1974        }
1975        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
1976        pub fn e0_opt(&self) -> Option<&str> {
1977            self.e0.as_ref().map(|field| field as _)
1978        }
1979        ///Sets `e0` with the provided value.
1980        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
1981            self.e0 = Some(field.into().into());
1982        }
1983        ///Sets `e0` with the provided value.
1984        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
1985            self.set_e0(field.into());
1986            self
1987        }
1988        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1989        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
1990            self.e1.as_mut().map(|field| field as _)
1991        }
1992        ///Returns a mutable reference to `e1`.
1993        ///If the field is unset, it is first initialized with the default value.
1994        pub fn e1_mut(&mut self) -> &mut String {
1995            self.e1.get_or_insert_default()
1996        }
1997        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
1998        pub fn e1_opt(&self) -> Option<&str> {
1999            self.e1.as_ref().map(|field| field as _)
2000        }
2001        ///Sets `e1` with the provided value.
2002        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2003            self.e1 = Some(field.into().into());
2004        }
2005        ///Sets `e1` with the provided value.
2006        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2007            self.set_e1(field.into());
2008            self
2009        }
2010        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2011        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2012            self.e2.as_mut().map(|field| field as _)
2013        }
2014        ///Returns a mutable reference to `e2`.
2015        ///If the field is unset, it is first initialized with the default value.
2016        pub fn e2_mut(&mut self) -> &mut String {
2017            self.e2.get_or_insert_default()
2018        }
2019        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2020        pub fn e2_opt(&self) -> Option<&str> {
2021            self.e2.as_ref().map(|field| field as _)
2022        }
2023        ///Sets `e2` with the provided value.
2024        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2025            self.e2 = Some(field.into().into());
2026        }
2027        ///Sets `e2` with the provided value.
2028        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2029            self.set_e2(field.into());
2030            self
2031        }
2032    }
2033    impl super::CircomG2 {
2034        pub const fn const_default() -> Self {
2035            Self {
2036                e00: None,
2037                e01: None,
2038                e10: None,
2039                e11: None,
2040                e20: None,
2041                e21: None,
2042            }
2043        }
2044        #[doc(hidden)]
2045        pub fn default_instance() -> &'static Self {
2046            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2047            &DEFAULT
2048        }
2049        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2050        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2051            self.e00.as_mut().map(|field| field as _)
2052        }
2053        ///Returns a mutable reference to `e00`.
2054        ///If the field is unset, it is first initialized with the default value.
2055        pub fn e00_mut(&mut self) -> &mut String {
2056            self.e00.get_or_insert_default()
2057        }
2058        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2059        pub fn e00_opt(&self) -> Option<&str> {
2060            self.e00.as_ref().map(|field| field as _)
2061        }
2062        ///Sets `e00` with the provided value.
2063        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2064            self.e00 = Some(field.into().into());
2065        }
2066        ///Sets `e00` with the provided value.
2067        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2068            self.set_e00(field.into());
2069            self
2070        }
2071        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2072        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2073            self.e01.as_mut().map(|field| field as _)
2074        }
2075        ///Returns a mutable reference to `e01`.
2076        ///If the field is unset, it is first initialized with the default value.
2077        pub fn e01_mut(&mut self) -> &mut String {
2078            self.e01.get_or_insert_default()
2079        }
2080        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2081        pub fn e01_opt(&self) -> Option<&str> {
2082            self.e01.as_ref().map(|field| field as _)
2083        }
2084        ///Sets `e01` with the provided value.
2085        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2086            self.e01 = Some(field.into().into());
2087        }
2088        ///Sets `e01` with the provided value.
2089        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2090            self.set_e01(field.into());
2091            self
2092        }
2093        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2094        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2095            self.e10.as_mut().map(|field| field as _)
2096        }
2097        ///Returns a mutable reference to `e10`.
2098        ///If the field is unset, it is first initialized with the default value.
2099        pub fn e10_mut(&mut self) -> &mut String {
2100            self.e10.get_or_insert_default()
2101        }
2102        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2103        pub fn e10_opt(&self) -> Option<&str> {
2104            self.e10.as_ref().map(|field| field as _)
2105        }
2106        ///Sets `e10` with the provided value.
2107        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2108            self.e10 = Some(field.into().into());
2109        }
2110        ///Sets `e10` with the provided value.
2111        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2112            self.set_e10(field.into());
2113            self
2114        }
2115        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2116        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2117            self.e11.as_mut().map(|field| field as _)
2118        }
2119        ///Returns a mutable reference to `e11`.
2120        ///If the field is unset, it is first initialized with the default value.
2121        pub fn e11_mut(&mut self) -> &mut String {
2122            self.e11.get_or_insert_default()
2123        }
2124        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2125        pub fn e11_opt(&self) -> Option<&str> {
2126            self.e11.as_ref().map(|field| field as _)
2127        }
2128        ///Sets `e11` with the provided value.
2129        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2130            self.e11 = Some(field.into().into());
2131        }
2132        ///Sets `e11` with the provided value.
2133        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2134            self.set_e11(field.into());
2135            self
2136        }
2137        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2138        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2139            self.e20.as_mut().map(|field| field as _)
2140        }
2141        ///Returns a mutable reference to `e20`.
2142        ///If the field is unset, it is first initialized with the default value.
2143        pub fn e20_mut(&mut self) -> &mut String {
2144            self.e20.get_or_insert_default()
2145        }
2146        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2147        pub fn e20_opt(&self) -> Option<&str> {
2148            self.e20.as_ref().map(|field| field as _)
2149        }
2150        ///Sets `e20` with the provided value.
2151        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2152            self.e20 = Some(field.into().into());
2153        }
2154        ///Sets `e20` with the provided value.
2155        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2156            self.set_e20(field.into());
2157            self
2158        }
2159        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2160        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2161            self.e21.as_mut().map(|field| field as _)
2162        }
2163        ///Returns a mutable reference to `e21`.
2164        ///If the field is unset, it is first initialized with the default value.
2165        pub fn e21_mut(&mut self) -> &mut String {
2166            self.e21.get_or_insert_default()
2167        }
2168        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2169        pub fn e21_opt(&self) -> Option<&str> {
2170            self.e21.as_ref().map(|field| field as _)
2171        }
2172        ///Sets `e21` with the provided value.
2173        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2174            self.e21 = Some(field.into().into());
2175        }
2176        ///Sets `e21` with the provided value.
2177        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2178            self.set_e21(field.into());
2179            self
2180        }
2181    }
2182    impl super::CleverError {
2183        pub const fn const_default() -> Self {
2184            Self {
2185                error_code: None,
2186                line_number: None,
2187                constant_name: None,
2188                constant_type: None,
2189                value: None,
2190            }
2191        }
2192        #[doc(hidden)]
2193        pub fn default_instance() -> &'static Self {
2194            static DEFAULT: super::CleverError = super::CleverError::const_default();
2195            &DEFAULT
2196        }
2197        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2198        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2199            self.error_code.as_mut().map(|field| field as _)
2200        }
2201        ///Returns a mutable reference to `error_code`.
2202        ///If the field is unset, it is first initialized with the default value.
2203        pub fn error_code_mut(&mut self) -> &mut u64 {
2204            self.error_code.get_or_insert_default()
2205        }
2206        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2207        pub fn error_code_opt(&self) -> Option<u64> {
2208            self.error_code.as_ref().map(|field| *field)
2209        }
2210        ///Sets `error_code` with the provided value.
2211        pub fn set_error_code<T: Into<u64>>(&mut self, field: T) {
2212            self.error_code = Some(field.into().into());
2213        }
2214        ///Sets `error_code` with the provided value.
2215        pub fn with_error_code<T: Into<u64>>(mut self, field: T) -> Self {
2216            self.set_error_code(field.into());
2217            self
2218        }
2219        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2220        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2221            self.line_number.as_mut().map(|field| field as _)
2222        }
2223        ///Returns a mutable reference to `line_number`.
2224        ///If the field is unset, it is first initialized with the default value.
2225        pub fn line_number_mut(&mut self) -> &mut u64 {
2226            self.line_number.get_or_insert_default()
2227        }
2228        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2229        pub fn line_number_opt(&self) -> Option<u64> {
2230            self.line_number.as_ref().map(|field| *field)
2231        }
2232        ///Sets `line_number` with the provided value.
2233        pub fn set_line_number<T: Into<u64>>(&mut self, field: T) {
2234            self.line_number = Some(field.into().into());
2235        }
2236        ///Sets `line_number` with the provided value.
2237        pub fn with_line_number<T: Into<u64>>(mut self, field: T) -> Self {
2238            self.set_line_number(field.into());
2239            self
2240        }
2241        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2242        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2243            self.constant_name.as_mut().map(|field| field as _)
2244        }
2245        ///Returns a mutable reference to `constant_name`.
2246        ///If the field is unset, it is first initialized with the default value.
2247        pub fn constant_name_mut(&mut self) -> &mut String {
2248            self.constant_name.get_or_insert_default()
2249        }
2250        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2251        pub fn constant_name_opt(&self) -> Option<&str> {
2252            self.constant_name.as_ref().map(|field| field as _)
2253        }
2254        ///Sets `constant_name` with the provided value.
2255        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2256            self.constant_name = Some(field.into().into());
2257        }
2258        ///Sets `constant_name` with the provided value.
2259        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2260            self.set_constant_name(field.into());
2261            self
2262        }
2263        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2264        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2265            self.constant_type.as_mut().map(|field| field as _)
2266        }
2267        ///Returns a mutable reference to `constant_type`.
2268        ///If the field is unset, it is first initialized with the default value.
2269        pub fn constant_type_mut(&mut self) -> &mut String {
2270            self.constant_type.get_or_insert_default()
2271        }
2272        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2273        pub fn constant_type_opt(&self) -> Option<&str> {
2274            self.constant_type.as_ref().map(|field| field as _)
2275        }
2276        ///Sets `constant_type` with the provided value.
2277        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2278            self.constant_type = Some(field.into().into());
2279        }
2280        ///Sets `constant_type` with the provided value.
2281        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2282            self.set_constant_type(field.into());
2283            self
2284        }
2285        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2286        pub fn rendered(&self) -> &str {
2287            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2288                field as _
2289            } else {
2290                ""
2291            }
2292        }
2293        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2294        pub fn rendered_opt(&self) -> Option<&str> {
2295            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2296                Some(field as _)
2297            } else {
2298                None
2299            }
2300        }
2301        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2302        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2303            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2304                Some(field as _)
2305            } else {
2306                None
2307            }
2308        }
2309        ///Returns a mutable reference to `rendered`.
2310        ///If the field is unset, it is first initialized with the default value.
2311        ///If any other oneof field in the same oneof is set, it will be cleared.
2312        pub fn rendered_mut(&mut self) -> &mut String {
2313            if self.rendered_opt_mut().is_none() {
2314                self.value = Some(
2315                    super::clever_error::Value::Rendered(String::default()),
2316                );
2317            }
2318            self.rendered_opt_mut().unwrap()
2319        }
2320        ///Sets `rendered` with the provided value.
2321        ///If any other oneof field in the same oneof is set, it will be cleared.
2322        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2323            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2324        }
2325        ///Sets `rendered` with the provided value.
2326        ///If any other oneof field in the same oneof is set, it will be cleared.
2327        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2328            self.set_rendered(field.into());
2329            self
2330        }
2331        ///Returns the value of `raw`, or the default value if `raw` is unset.
2332        pub fn raw(&self) -> &[u8] {
2333            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2334                field as _
2335            } else {
2336                &[]
2337            }
2338        }
2339        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2340        pub fn raw_opt(&self) -> Option<&[u8]> {
2341            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2342                Some(field as _)
2343            } else {
2344                None
2345            }
2346        }
2347        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2348        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2349            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2350                Some(field as _)
2351            } else {
2352                None
2353            }
2354        }
2355        ///Returns a mutable reference to `raw`.
2356        ///If the field is unset, it is first initialized with the default value.
2357        ///If any other oneof field in the same oneof is set, it will be cleared.
2358        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2359            if self.raw_opt_mut().is_none() {
2360                self.value = Some(
2361                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2362                );
2363            }
2364            self.raw_opt_mut().unwrap()
2365        }
2366        ///Sets `raw` with the provided value.
2367        ///If any other oneof field in the same oneof is set, it will be cleared.
2368        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2369            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2370        }
2371        ///Sets `raw` with the provided value.
2372        ///If any other oneof field in the same oneof is set, it will be cleared.
2373        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2374            self.set_raw(field.into());
2375            self
2376        }
2377    }
2378    impl super::CoinDenyListError {
2379        pub const fn const_default() -> Self {
2380            Self {
2381                address: None,
2382                coin_type: None,
2383            }
2384        }
2385        #[doc(hidden)]
2386        pub fn default_instance() -> &'static Self {
2387            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2388            &DEFAULT
2389        }
2390        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2391        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2392            self.address.as_mut().map(|field| field as _)
2393        }
2394        ///Returns a mutable reference to `address`.
2395        ///If the field is unset, it is first initialized with the default value.
2396        pub fn address_mut(&mut self) -> &mut String {
2397            self.address.get_or_insert_default()
2398        }
2399        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2400        pub fn address_opt(&self) -> Option<&str> {
2401            self.address.as_ref().map(|field| field as _)
2402        }
2403        ///Sets `address` with the provided value.
2404        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2405            self.address = Some(field.into().into());
2406        }
2407        ///Sets `address` with the provided value.
2408        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2409            self.set_address(field.into());
2410            self
2411        }
2412        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2413        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2414            self.coin_type.as_mut().map(|field| field as _)
2415        }
2416        ///Returns a mutable reference to `coin_type`.
2417        ///If the field is unset, it is first initialized with the default value.
2418        pub fn coin_type_mut(&mut self) -> &mut String {
2419            self.coin_type.get_or_insert_default()
2420        }
2421        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2422        pub fn coin_type_opt(&self) -> Option<&str> {
2423            self.coin_type.as_ref().map(|field| field as _)
2424        }
2425        ///Sets `coin_type` with the provided value.
2426        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2427            self.coin_type = Some(field.into().into());
2428        }
2429        ///Sets `coin_type` with the provided value.
2430        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2431            self.set_coin_type(field.into());
2432            self
2433        }
2434    }
2435    impl super::CoinMetadata {
2436        pub const fn const_default() -> Self {
2437            Self {
2438                id: None,
2439                decimals: None,
2440                name: None,
2441                symbol: None,
2442                description: None,
2443                icon_url: None,
2444                metadata_cap_id: None,
2445                metadata_cap_state: None,
2446            }
2447        }
2448        #[doc(hidden)]
2449        pub fn default_instance() -> &'static Self {
2450            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2451            &DEFAULT
2452        }
2453        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2454        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2455            self.id.as_mut().map(|field| field as _)
2456        }
2457        ///Returns a mutable reference to `id`.
2458        ///If the field is unset, it is first initialized with the default value.
2459        pub fn id_mut(&mut self) -> &mut String {
2460            self.id.get_or_insert_default()
2461        }
2462        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2463        pub fn id_opt(&self) -> Option<&str> {
2464            self.id.as_ref().map(|field| field as _)
2465        }
2466        ///Sets `id` with the provided value.
2467        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2468            self.id = Some(field.into().into());
2469        }
2470        ///Sets `id` with the provided value.
2471        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2472            self.set_id(field.into());
2473            self
2474        }
2475        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2476        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2477            self.decimals.as_mut().map(|field| field as _)
2478        }
2479        ///Returns a mutable reference to `decimals`.
2480        ///If the field is unset, it is first initialized with the default value.
2481        pub fn decimals_mut(&mut self) -> &mut u32 {
2482            self.decimals.get_or_insert_default()
2483        }
2484        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2485        pub fn decimals_opt(&self) -> Option<u32> {
2486            self.decimals.as_ref().map(|field| *field)
2487        }
2488        ///Sets `decimals` with the provided value.
2489        pub fn set_decimals<T: Into<u32>>(&mut self, field: T) {
2490            self.decimals = Some(field.into().into());
2491        }
2492        ///Sets `decimals` with the provided value.
2493        pub fn with_decimals<T: Into<u32>>(mut self, field: T) -> Self {
2494            self.set_decimals(field.into());
2495            self
2496        }
2497        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2498        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2499            self.name.as_mut().map(|field| field as _)
2500        }
2501        ///Returns a mutable reference to `name`.
2502        ///If the field is unset, it is first initialized with the default value.
2503        pub fn name_mut(&mut self) -> &mut String {
2504            self.name.get_or_insert_default()
2505        }
2506        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2507        pub fn name_opt(&self) -> Option<&str> {
2508            self.name.as_ref().map(|field| field as _)
2509        }
2510        ///Sets `name` with the provided value.
2511        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2512            self.name = Some(field.into().into());
2513        }
2514        ///Sets `name` with the provided value.
2515        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2516            self.set_name(field.into());
2517            self
2518        }
2519        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2520        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2521            self.symbol.as_mut().map(|field| field as _)
2522        }
2523        ///Returns a mutable reference to `symbol`.
2524        ///If the field is unset, it is first initialized with the default value.
2525        pub fn symbol_mut(&mut self) -> &mut String {
2526            self.symbol.get_or_insert_default()
2527        }
2528        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2529        pub fn symbol_opt(&self) -> Option<&str> {
2530            self.symbol.as_ref().map(|field| field as _)
2531        }
2532        ///Sets `symbol` with the provided value.
2533        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2534            self.symbol = Some(field.into().into());
2535        }
2536        ///Sets `symbol` with the provided value.
2537        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2538            self.set_symbol(field.into());
2539            self
2540        }
2541        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2542        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2543            self.description.as_mut().map(|field| field as _)
2544        }
2545        ///Returns a mutable reference to `description`.
2546        ///If the field is unset, it is first initialized with the default value.
2547        pub fn description_mut(&mut self) -> &mut String {
2548            self.description.get_or_insert_default()
2549        }
2550        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2551        pub fn description_opt(&self) -> Option<&str> {
2552            self.description.as_ref().map(|field| field as _)
2553        }
2554        ///Sets `description` with the provided value.
2555        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2556            self.description = Some(field.into().into());
2557        }
2558        ///Sets `description` with the provided value.
2559        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2560            self.set_description(field.into());
2561            self
2562        }
2563        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2564        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2565            self.icon_url.as_mut().map(|field| field as _)
2566        }
2567        ///Returns a mutable reference to `icon_url`.
2568        ///If the field is unset, it is first initialized with the default value.
2569        pub fn icon_url_mut(&mut self) -> &mut String {
2570            self.icon_url.get_or_insert_default()
2571        }
2572        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2573        pub fn icon_url_opt(&self) -> Option<&str> {
2574            self.icon_url.as_ref().map(|field| field as _)
2575        }
2576        ///Sets `icon_url` with the provided value.
2577        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2578            self.icon_url = Some(field.into().into());
2579        }
2580        ///Sets `icon_url` with the provided value.
2581        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2582            self.set_icon_url(field.into());
2583            self
2584        }
2585        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2586        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2587            self.metadata_cap_id.as_mut().map(|field| field as _)
2588        }
2589        ///Returns a mutable reference to `metadata_cap_id`.
2590        ///If the field is unset, it is first initialized with the default value.
2591        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2592            self.metadata_cap_id.get_or_insert_default()
2593        }
2594        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2595        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2596            self.metadata_cap_id.as_ref().map(|field| field as _)
2597        }
2598        ///Sets `metadata_cap_id` with the provided value.
2599        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2600            self.metadata_cap_id = Some(field.into().into());
2601        }
2602        ///Sets `metadata_cap_id` with the provided value.
2603        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2604            self.set_metadata_cap_id(field.into());
2605            self
2606        }
2607        ///Sets `metadata_cap_state` with the provided value.
2608        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2609            mut self,
2610            field: T,
2611        ) -> Self {
2612            self.set_metadata_cap_state(field.into());
2613            self
2614        }
2615    }
2616    impl super::CoinTreasury {
2617        pub const fn const_default() -> Self {
2618            Self {
2619                id: None,
2620                total_supply: None,
2621                supply_state: None,
2622            }
2623        }
2624        #[doc(hidden)]
2625        pub fn default_instance() -> &'static Self {
2626            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2627            &DEFAULT
2628        }
2629        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2630        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2631            self.id.as_mut().map(|field| field as _)
2632        }
2633        ///Returns a mutable reference to `id`.
2634        ///If the field is unset, it is first initialized with the default value.
2635        pub fn id_mut(&mut self) -> &mut String {
2636            self.id.get_or_insert_default()
2637        }
2638        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2639        pub fn id_opt(&self) -> Option<&str> {
2640            self.id.as_ref().map(|field| field as _)
2641        }
2642        ///Sets `id` with the provided value.
2643        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2644            self.id = Some(field.into().into());
2645        }
2646        ///Sets `id` with the provided value.
2647        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2648            self.set_id(field.into());
2649            self
2650        }
2651        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2652        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2653            self.total_supply.as_mut().map(|field| field as _)
2654        }
2655        ///Returns a mutable reference to `total_supply`.
2656        ///If the field is unset, it is first initialized with the default value.
2657        pub fn total_supply_mut(&mut self) -> &mut u64 {
2658            self.total_supply.get_or_insert_default()
2659        }
2660        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2661        pub fn total_supply_opt(&self) -> Option<u64> {
2662            self.total_supply.as_ref().map(|field| *field)
2663        }
2664        ///Sets `total_supply` with the provided value.
2665        pub fn set_total_supply<T: Into<u64>>(&mut self, field: T) {
2666            self.total_supply = Some(field.into().into());
2667        }
2668        ///Sets `total_supply` with the provided value.
2669        pub fn with_total_supply<T: Into<u64>>(mut self, field: T) -> Self {
2670            self.set_total_supply(field.into());
2671            self
2672        }
2673        ///Sets `supply_state` with the provided value.
2674        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2675            mut self,
2676            field: T,
2677        ) -> Self {
2678            self.set_supply_state(field.into());
2679            self
2680        }
2681    }
2682    impl super::Command {
2683        pub const fn const_default() -> Self {
2684            Self { command: None }
2685        }
2686        #[doc(hidden)]
2687        pub fn default_instance() -> &'static Self {
2688            static DEFAULT: super::Command = super::Command::const_default();
2689            &DEFAULT
2690        }
2691        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2692        pub fn move_call(&self) -> &super::MoveCall {
2693            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2694                field as _
2695            } else {
2696                super::MoveCall::default_instance() as _
2697            }
2698        }
2699        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
2700        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2701            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2702                Some(field as _)
2703            } else {
2704                None
2705            }
2706        }
2707        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2708        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2709            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2710                Some(field as _)
2711            } else {
2712                None
2713            }
2714        }
2715        ///Returns a mutable reference to `move_call`.
2716        ///If the field is unset, it is first initialized with the default value.
2717        ///If any other oneof field in the same oneof is set, it will be cleared.
2718        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2719            if self.move_call_opt_mut().is_none() {
2720                self.command = Some(
2721                    super::command::Command::MoveCall(super::MoveCall::default()),
2722                );
2723            }
2724            self.move_call_opt_mut().unwrap()
2725        }
2726        ///Sets `move_call` with the provided value.
2727        ///If any other oneof field in the same oneof is set, it will be cleared.
2728        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2729            self.command = Some(super::command::Command::MoveCall(field.into().into()));
2730        }
2731        ///Sets `move_call` with the provided value.
2732        ///If any other oneof field in the same oneof is set, it will be cleared.
2733        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2734            self.set_move_call(field.into());
2735            self
2736        }
2737        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
2738        pub fn transfer_objects(&self) -> &super::TransferObjects {
2739            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2740            {
2741                field as _
2742            } else {
2743                super::TransferObjects::default_instance() as _
2744            }
2745        }
2746        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2747        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2748            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2749            {
2750                Some(field as _)
2751            } else {
2752                None
2753            }
2754        }
2755        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2756        pub fn transfer_objects_opt_mut(
2757            &mut self,
2758        ) -> Option<&mut super::TransferObjects> {
2759            if let Some(super::command::Command::TransferObjects(field)) = &mut self
2760                .command
2761            {
2762                Some(field as _)
2763            } else {
2764                None
2765            }
2766        }
2767        ///Returns a mutable reference to `transfer_objects`.
2768        ///If the field is unset, it is first initialized with the default value.
2769        ///If any other oneof field in the same oneof is set, it will be cleared.
2770        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2771            if self.transfer_objects_opt_mut().is_none() {
2772                self.command = Some(
2773                    super::command::Command::TransferObjects(
2774                        super::TransferObjects::default(),
2775                    ),
2776                );
2777            }
2778            self.transfer_objects_opt_mut().unwrap()
2779        }
2780        ///Sets `transfer_objects` with the provided value.
2781        ///If any other oneof field in the same oneof is set, it will be cleared.
2782        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2783            &mut self,
2784            field: T,
2785        ) {
2786            self.command = Some(
2787                super::command::Command::TransferObjects(field.into().into()),
2788            );
2789        }
2790        ///Sets `transfer_objects` with the provided value.
2791        ///If any other oneof field in the same oneof is set, it will be cleared.
2792        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2793            mut self,
2794            field: T,
2795        ) -> Self {
2796            self.set_transfer_objects(field.into());
2797            self
2798        }
2799        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
2800        pub fn split_coins(&self) -> &super::SplitCoins {
2801            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2802                field as _
2803            } else {
2804                super::SplitCoins::default_instance() as _
2805            }
2806        }
2807        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
2808        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
2809            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2810                Some(field as _)
2811            } else {
2812                None
2813            }
2814        }
2815        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2816        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
2817            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
2818                Some(field as _)
2819            } else {
2820                None
2821            }
2822        }
2823        ///Returns a mutable reference to `split_coins`.
2824        ///If the field is unset, it is first initialized with the default value.
2825        ///If any other oneof field in the same oneof is set, it will be cleared.
2826        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
2827            if self.split_coins_opt_mut().is_none() {
2828                self.command = Some(
2829                    super::command::Command::SplitCoins(super::SplitCoins::default()),
2830                );
2831            }
2832            self.split_coins_opt_mut().unwrap()
2833        }
2834        ///Sets `split_coins` with the provided value.
2835        ///If any other oneof field in the same oneof is set, it will be cleared.
2836        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
2837            self.command = Some(
2838                super::command::Command::SplitCoins(field.into().into()),
2839            );
2840        }
2841        ///Sets `split_coins` with the provided value.
2842        ///If any other oneof field in the same oneof is set, it will be cleared.
2843        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
2844            self.set_split_coins(field.into());
2845            self
2846        }
2847        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
2848        pub fn merge_coins(&self) -> &super::MergeCoins {
2849            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2850                field as _
2851            } else {
2852                super::MergeCoins::default_instance() as _
2853            }
2854        }
2855        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
2856        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
2857            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2858                Some(field as _)
2859            } else {
2860                None
2861            }
2862        }
2863        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2864        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
2865            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
2866                Some(field as _)
2867            } else {
2868                None
2869            }
2870        }
2871        ///Returns a mutable reference to `merge_coins`.
2872        ///If the field is unset, it is first initialized with the default value.
2873        ///If any other oneof field in the same oneof is set, it will be cleared.
2874        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
2875            if self.merge_coins_opt_mut().is_none() {
2876                self.command = Some(
2877                    super::command::Command::MergeCoins(super::MergeCoins::default()),
2878                );
2879            }
2880            self.merge_coins_opt_mut().unwrap()
2881        }
2882        ///Sets `merge_coins` with the provided value.
2883        ///If any other oneof field in the same oneof is set, it will be cleared.
2884        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
2885            self.command = Some(
2886                super::command::Command::MergeCoins(field.into().into()),
2887            );
2888        }
2889        ///Sets `merge_coins` with the provided value.
2890        ///If any other oneof field in the same oneof is set, it will be cleared.
2891        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
2892            self.set_merge_coins(field.into());
2893            self
2894        }
2895        ///Returns the value of `publish`, or the default value if `publish` is unset.
2896        pub fn publish(&self) -> &super::Publish {
2897            if let Some(super::command::Command::Publish(field)) = &self.command {
2898                field as _
2899            } else {
2900                super::Publish::default_instance() as _
2901            }
2902        }
2903        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
2904        pub fn publish_opt(&self) -> Option<&super::Publish> {
2905            if let Some(super::command::Command::Publish(field)) = &self.command {
2906                Some(field as _)
2907            } else {
2908                None
2909            }
2910        }
2911        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2912        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
2913            if let Some(super::command::Command::Publish(field)) = &mut self.command {
2914                Some(field as _)
2915            } else {
2916                None
2917            }
2918        }
2919        ///Returns a mutable reference to `publish`.
2920        ///If the field is unset, it is first initialized with the default value.
2921        ///If any other oneof field in the same oneof is set, it will be cleared.
2922        pub fn publish_mut(&mut self) -> &mut super::Publish {
2923            if self.publish_opt_mut().is_none() {
2924                self.command = Some(
2925                    super::command::Command::Publish(super::Publish::default()),
2926                );
2927            }
2928            self.publish_opt_mut().unwrap()
2929        }
2930        ///Sets `publish` with the provided value.
2931        ///If any other oneof field in the same oneof is set, it will be cleared.
2932        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
2933            self.command = Some(super::command::Command::Publish(field.into().into()));
2934        }
2935        ///Sets `publish` with the provided value.
2936        ///If any other oneof field in the same oneof is set, it will be cleared.
2937        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
2938            self.set_publish(field.into());
2939            self
2940        }
2941        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
2942        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
2943            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2944                field as _
2945            } else {
2946                super::MakeMoveVector::default_instance() as _
2947            }
2948        }
2949        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
2950        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
2951            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2952                Some(field as _)
2953            } else {
2954                None
2955            }
2956        }
2957        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2958        pub fn make_move_vector_opt_mut(
2959            &mut self,
2960        ) -> Option<&mut super::MakeMoveVector> {
2961            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
2962                .command
2963            {
2964                Some(field as _)
2965            } else {
2966                None
2967            }
2968        }
2969        ///Returns a mutable reference to `make_move_vector`.
2970        ///If the field is unset, it is first initialized with the default value.
2971        ///If any other oneof field in the same oneof is set, it will be cleared.
2972        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
2973            if self.make_move_vector_opt_mut().is_none() {
2974                self.command = Some(
2975                    super::command::Command::MakeMoveVector(
2976                        super::MakeMoveVector::default(),
2977                    ),
2978                );
2979            }
2980            self.make_move_vector_opt_mut().unwrap()
2981        }
2982        ///Sets `make_move_vector` with the provided value.
2983        ///If any other oneof field in the same oneof is set, it will be cleared.
2984        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
2985            &mut self,
2986            field: T,
2987        ) {
2988            self.command = Some(
2989                super::command::Command::MakeMoveVector(field.into().into()),
2990            );
2991        }
2992        ///Sets `make_move_vector` with the provided value.
2993        ///If any other oneof field in the same oneof is set, it will be cleared.
2994        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
2995            mut self,
2996            field: T,
2997        ) -> Self {
2998            self.set_make_move_vector(field.into());
2999            self
3000        }
3001        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3002        pub fn upgrade(&self) -> &super::Upgrade {
3003            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3004                field as _
3005            } else {
3006                super::Upgrade::default_instance() as _
3007            }
3008        }
3009        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3010        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3011            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3012                Some(field as _)
3013            } else {
3014                None
3015            }
3016        }
3017        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3018        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3019            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3020                Some(field as _)
3021            } else {
3022                None
3023            }
3024        }
3025        ///Returns a mutable reference to `upgrade`.
3026        ///If the field is unset, it is first initialized with the default value.
3027        ///If any other oneof field in the same oneof is set, it will be cleared.
3028        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3029            if self.upgrade_opt_mut().is_none() {
3030                self.command = Some(
3031                    super::command::Command::Upgrade(super::Upgrade::default()),
3032                );
3033            }
3034            self.upgrade_opt_mut().unwrap()
3035        }
3036        ///Sets `upgrade` with the provided value.
3037        ///If any other oneof field in the same oneof is set, it will be cleared.
3038        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3039            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3040        }
3041        ///Sets `upgrade` with the provided value.
3042        ///If any other oneof field in the same oneof is set, it will be cleared.
3043        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3044            self.set_upgrade(field.into());
3045            self
3046        }
3047    }
3048    impl super::CommandArgumentError {
3049        pub const fn const_default() -> Self {
3050            Self {
3051                argument: None,
3052                kind: None,
3053                index_error: None,
3054            }
3055        }
3056        #[doc(hidden)]
3057        pub fn default_instance() -> &'static Self {
3058            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3059            &DEFAULT
3060        }
3061        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3062        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3063            self.argument.as_mut().map(|field| field as _)
3064        }
3065        ///Returns a mutable reference to `argument`.
3066        ///If the field is unset, it is first initialized with the default value.
3067        pub fn argument_mut(&mut self) -> &mut u32 {
3068            self.argument.get_or_insert_default()
3069        }
3070        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3071        pub fn argument_opt(&self) -> Option<u32> {
3072            self.argument.as_ref().map(|field| *field)
3073        }
3074        ///Sets `argument` with the provided value.
3075        pub fn set_argument<T: Into<u32>>(&mut self, field: T) {
3076            self.argument = Some(field.into().into());
3077        }
3078        ///Sets `argument` with the provided value.
3079        pub fn with_argument<T: Into<u32>>(mut self, field: T) -> Self {
3080            self.set_argument(field.into());
3081            self
3082        }
3083        ///Sets `kind` with the provided value.
3084        pub fn with_kind<
3085            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3086        >(mut self, field: T) -> Self {
3087            self.set_kind(field.into());
3088            self
3089        }
3090        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3091        pub fn index_error(&self) -> &super::IndexError {
3092            self.index_error
3093                .as_ref()
3094                .map(|field| field as _)
3095                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3096        }
3097        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3098        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3099            self.index_error.as_mut().map(|field| field as _)
3100        }
3101        ///Returns a mutable reference to `index_error`.
3102        ///If the field is unset, it is first initialized with the default value.
3103        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3104            self.index_error.get_or_insert_default()
3105        }
3106        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3107        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3108            self.index_error.as_ref().map(|field| field as _)
3109        }
3110        ///Sets `index_error` with the provided value.
3111        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3112            self.index_error = Some(field.into().into());
3113        }
3114        ///Sets `index_error` with the provided value.
3115        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3116            self.set_index_error(field.into());
3117            self
3118        }
3119    }
3120    impl super::CommandOutput {
3121        pub const fn const_default() -> Self {
3122            Self {
3123                argument: None,
3124                value: None,
3125                json: None,
3126            }
3127        }
3128        #[doc(hidden)]
3129        pub fn default_instance() -> &'static Self {
3130            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3131            &DEFAULT
3132        }
3133        ///Returns the value of `argument`, or the default value if `argument` is unset.
3134        pub fn argument(&self) -> &super::Argument {
3135            self.argument
3136                .as_ref()
3137                .map(|field| field as _)
3138                .unwrap_or_else(|| super::Argument::default_instance() as _)
3139        }
3140        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3141        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3142            self.argument.as_mut().map(|field| field as _)
3143        }
3144        ///Returns a mutable reference to `argument`.
3145        ///If the field is unset, it is first initialized with the default value.
3146        pub fn argument_mut(&mut self) -> &mut super::Argument {
3147            self.argument.get_or_insert_default()
3148        }
3149        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3150        pub fn argument_opt(&self) -> Option<&super::Argument> {
3151            self.argument.as_ref().map(|field| field as _)
3152        }
3153        ///Sets `argument` with the provided value.
3154        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3155            self.argument = Some(field.into().into());
3156        }
3157        ///Sets `argument` with the provided value.
3158        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3159            self.set_argument(field.into());
3160            self
3161        }
3162        ///Returns the value of `value`, or the default value if `value` is unset.
3163        pub fn value(&self) -> &super::Bcs {
3164            self.value
3165                .as_ref()
3166                .map(|field| field as _)
3167                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3168        }
3169        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3170        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3171            self.value.as_mut().map(|field| field as _)
3172        }
3173        ///Returns a mutable reference to `value`.
3174        ///If the field is unset, it is first initialized with the default value.
3175        pub fn value_mut(&mut self) -> &mut super::Bcs {
3176            self.value.get_or_insert_default()
3177        }
3178        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3179        pub fn value_opt(&self) -> Option<&super::Bcs> {
3180            self.value.as_ref().map(|field| field as _)
3181        }
3182        ///Sets `value` with the provided value.
3183        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3184            self.value = Some(field.into().into());
3185        }
3186        ///Sets `value` with the provided value.
3187        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3188            self.set_value(field.into());
3189            self
3190        }
3191        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3192        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3193            self.json.as_mut().map(|field| field as _)
3194        }
3195        ///Returns a mutable reference to `json`.
3196        ///If the field is unset, it is first initialized with the default value.
3197        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3198            self.json.get_or_insert_default()
3199        }
3200        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3201        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3202            self.json.as_ref().map(|field| field as _)
3203        }
3204        ///Sets `json` with the provided value.
3205        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3206            self.json = Some(field.into().into());
3207        }
3208        ///Sets `json` with the provided value.
3209        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3210            self.set_json(field.into());
3211            self
3212        }
3213    }
3214    impl super::CommandResult {
3215        pub const fn const_default() -> Self {
3216            Self {
3217                return_values: Vec::new(),
3218                mutated_by_ref: Vec::new(),
3219            }
3220        }
3221        #[doc(hidden)]
3222        pub fn default_instance() -> &'static Self {
3223            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3224            &DEFAULT
3225        }
3226        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3227        pub fn return_values(&self) -> &[super::CommandOutput] {
3228            &self.return_values
3229        }
3230        ///Returns a mutable reference to `return_values`.
3231        ///If the field is unset, it is first initialized with the default value.
3232        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3233            &mut self.return_values
3234        }
3235        ///Sets `return_values` with the provided value.
3236        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3237            self.return_values = field;
3238        }
3239        ///Sets `return_values` with the provided value.
3240        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3241            self.set_return_values(field);
3242            self
3243        }
3244        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3245        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3246            &self.mutated_by_ref
3247        }
3248        ///Returns a mutable reference to `mutated_by_ref`.
3249        ///If the field is unset, it is first initialized with the default value.
3250        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3251            &mut self.mutated_by_ref
3252        }
3253        ///Sets `mutated_by_ref` with the provided value.
3254        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3255            self.mutated_by_ref = field;
3256        }
3257        ///Sets `mutated_by_ref` with the provided value.
3258        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3259            self.set_mutated_by_ref(field);
3260            self
3261        }
3262    }
3263    impl super::CongestedObjects {
3264        pub const fn const_default() -> Self {
3265            Self { objects: Vec::new() }
3266        }
3267        #[doc(hidden)]
3268        pub fn default_instance() -> &'static Self {
3269            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3270            &DEFAULT
3271        }
3272        ///Returns the value of `objects`, or the default value if `objects` is unset.
3273        pub fn objects(&self) -> &[String] {
3274            &self.objects
3275        }
3276        ///Returns a mutable reference to `objects`.
3277        ///If the field is unset, it is first initialized with the default value.
3278        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3279            &mut self.objects
3280        }
3281        ///Sets `objects` with the provided value.
3282        pub fn set_objects(&mut self, field: Vec<String>) {
3283            self.objects = field;
3284        }
3285        ///Sets `objects` with the provided value.
3286        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3287            self.set_objects(field);
3288            self
3289        }
3290    }
3291    impl super::ConsensusCommitPrologue {
3292        pub const fn const_default() -> Self {
3293            Self {
3294                epoch: None,
3295                round: None,
3296                commit_timestamp: None,
3297                consensus_commit_digest: None,
3298                sub_dag_index: None,
3299                consensus_determined_version_assignments: None,
3300                additional_state_digest: None,
3301            }
3302        }
3303        #[doc(hidden)]
3304        pub fn default_instance() -> &'static Self {
3305            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3306            &DEFAULT
3307        }
3308        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3309        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3310            self.epoch.as_mut().map(|field| field as _)
3311        }
3312        ///Returns a mutable reference to `epoch`.
3313        ///If the field is unset, it is first initialized with the default value.
3314        pub fn epoch_mut(&mut self) -> &mut u64 {
3315            self.epoch.get_or_insert_default()
3316        }
3317        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3318        pub fn epoch_opt(&self) -> Option<u64> {
3319            self.epoch.as_ref().map(|field| *field)
3320        }
3321        ///Sets `epoch` with the provided value.
3322        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
3323            self.epoch = Some(field.into().into());
3324        }
3325        ///Sets `epoch` with the provided value.
3326        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
3327            self.set_epoch(field.into());
3328            self
3329        }
3330        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3331        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3332            self.round.as_mut().map(|field| field as _)
3333        }
3334        ///Returns a mutable reference to `round`.
3335        ///If the field is unset, it is first initialized with the default value.
3336        pub fn round_mut(&mut self) -> &mut u64 {
3337            self.round.get_or_insert_default()
3338        }
3339        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3340        pub fn round_opt(&self) -> Option<u64> {
3341            self.round.as_ref().map(|field| *field)
3342        }
3343        ///Sets `round` with the provided value.
3344        pub fn set_round<T: Into<u64>>(&mut self, field: T) {
3345            self.round = Some(field.into().into());
3346        }
3347        ///Sets `round` with the provided value.
3348        pub fn with_round<T: Into<u64>>(mut self, field: T) -> Self {
3349            self.set_round(field.into());
3350            self
3351        }
3352        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3353        pub fn commit_timestamp_opt_mut(
3354            &mut self,
3355        ) -> Option<&mut ::prost_types::Timestamp> {
3356            self.commit_timestamp.as_mut().map(|field| field as _)
3357        }
3358        ///Returns a mutable reference to `commit_timestamp`.
3359        ///If the field is unset, it is first initialized with the default value.
3360        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3361            self.commit_timestamp.get_or_insert_default()
3362        }
3363        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3364        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3365            self.commit_timestamp.as_ref().map(|field| field as _)
3366        }
3367        ///Sets `commit_timestamp` with the provided value.
3368        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3369            &mut self,
3370            field: T,
3371        ) {
3372            self.commit_timestamp = Some(field.into().into());
3373        }
3374        ///Sets `commit_timestamp` with the provided value.
3375        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3376            mut self,
3377            field: T,
3378        ) -> Self {
3379            self.set_commit_timestamp(field.into());
3380            self
3381        }
3382        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3383        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3384            self.consensus_commit_digest.as_mut().map(|field| field as _)
3385        }
3386        ///Returns a mutable reference to `consensus_commit_digest`.
3387        ///If the field is unset, it is first initialized with the default value.
3388        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3389            self.consensus_commit_digest.get_or_insert_default()
3390        }
3391        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3392        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3393            self.consensus_commit_digest.as_ref().map(|field| field as _)
3394        }
3395        ///Sets `consensus_commit_digest` with the provided value.
3396        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3397            self.consensus_commit_digest = Some(field.into().into());
3398        }
3399        ///Sets `consensus_commit_digest` with the provided value.
3400        pub fn with_consensus_commit_digest<T: Into<String>>(
3401            mut self,
3402            field: T,
3403        ) -> Self {
3404            self.set_consensus_commit_digest(field.into());
3405            self
3406        }
3407        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3408        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3409            self.sub_dag_index.as_mut().map(|field| field as _)
3410        }
3411        ///Returns a mutable reference to `sub_dag_index`.
3412        ///If the field is unset, it is first initialized with the default value.
3413        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3414            self.sub_dag_index.get_or_insert_default()
3415        }
3416        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3417        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3418            self.sub_dag_index.as_ref().map(|field| *field)
3419        }
3420        ///Sets `sub_dag_index` with the provided value.
3421        pub fn set_sub_dag_index<T: Into<u64>>(&mut self, field: T) {
3422            self.sub_dag_index = Some(field.into().into());
3423        }
3424        ///Sets `sub_dag_index` with the provided value.
3425        pub fn with_sub_dag_index<T: Into<u64>>(mut self, field: T) -> Self {
3426            self.set_sub_dag_index(field.into());
3427            self
3428        }
3429        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3430        pub fn consensus_determined_version_assignments(
3431            &self,
3432        ) -> &super::ConsensusDeterminedVersionAssignments {
3433            self.consensus_determined_version_assignments
3434                .as_ref()
3435                .map(|field| field as _)
3436                .unwrap_or_else(|| {
3437                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3438                })
3439        }
3440        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3441        pub fn consensus_determined_version_assignments_opt_mut(
3442            &mut self,
3443        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3444            self.consensus_determined_version_assignments
3445                .as_mut()
3446                .map(|field| field as _)
3447        }
3448        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3449        ///If the field is unset, it is first initialized with the default value.
3450        pub fn consensus_determined_version_assignments_mut(
3451            &mut self,
3452        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3453            self.consensus_determined_version_assignments.get_or_insert_default()
3454        }
3455        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3456        pub fn consensus_determined_version_assignments_opt(
3457            &self,
3458        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3459            self.consensus_determined_version_assignments
3460                .as_ref()
3461                .map(|field| field as _)
3462        }
3463        ///Sets `consensus_determined_version_assignments` with the provided value.
3464        pub fn set_consensus_determined_version_assignments<
3465            T: Into<super::ConsensusDeterminedVersionAssignments>,
3466        >(&mut self, field: T) {
3467            self.consensus_determined_version_assignments = Some(field.into().into());
3468        }
3469        ///Sets `consensus_determined_version_assignments` with the provided value.
3470        pub fn with_consensus_determined_version_assignments<
3471            T: Into<super::ConsensusDeterminedVersionAssignments>,
3472        >(mut self, field: T) -> Self {
3473            self.set_consensus_determined_version_assignments(field.into());
3474            self
3475        }
3476        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3477        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3478            self.additional_state_digest.as_mut().map(|field| field as _)
3479        }
3480        ///Returns a mutable reference to `additional_state_digest`.
3481        ///If the field is unset, it is first initialized with the default value.
3482        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3483            self.additional_state_digest.get_or_insert_default()
3484        }
3485        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3486        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3487            self.additional_state_digest.as_ref().map(|field| field as _)
3488        }
3489        ///Sets `additional_state_digest` with the provided value.
3490        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3491            self.additional_state_digest = Some(field.into().into());
3492        }
3493        ///Sets `additional_state_digest` with the provided value.
3494        pub fn with_additional_state_digest<T: Into<String>>(
3495            mut self,
3496            field: T,
3497        ) -> Self {
3498            self.set_additional_state_digest(field.into());
3499            self
3500        }
3501    }
3502    impl super::ConsensusDeterminedVersionAssignments {
3503        pub const fn const_default() -> Self {
3504            Self {
3505                version: None,
3506                canceled_transactions: Vec::new(),
3507            }
3508        }
3509        #[doc(hidden)]
3510        pub fn default_instance() -> &'static Self {
3511            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3512            &DEFAULT
3513        }
3514        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3515        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3516            self.version.as_mut().map(|field| field as _)
3517        }
3518        ///Returns a mutable reference to `version`.
3519        ///If the field is unset, it is first initialized with the default value.
3520        pub fn version_mut(&mut self) -> &mut i32 {
3521            self.version.get_or_insert_default()
3522        }
3523        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3524        pub fn version_opt(&self) -> Option<i32> {
3525            self.version.as_ref().map(|field| *field)
3526        }
3527        ///Sets `version` with the provided value.
3528        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
3529            self.version = Some(field.into().into());
3530        }
3531        ///Sets `version` with the provided value.
3532        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
3533            self.set_version(field.into());
3534            self
3535        }
3536        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3537        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3538            &self.canceled_transactions
3539        }
3540        ///Returns a mutable reference to `canceled_transactions`.
3541        ///If the field is unset, it is first initialized with the default value.
3542        pub fn canceled_transactions_mut(
3543            &mut self,
3544        ) -> &mut Vec<super::CanceledTransaction> {
3545            &mut self.canceled_transactions
3546        }
3547        ///Sets `canceled_transactions` with the provided value.
3548        pub fn set_canceled_transactions(
3549            &mut self,
3550            field: Vec<super::CanceledTransaction>,
3551        ) {
3552            self.canceled_transactions = field;
3553        }
3554        ///Sets `canceled_transactions` with the provided value.
3555        pub fn with_canceled_transactions(
3556            mut self,
3557            field: Vec<super::CanceledTransaction>,
3558        ) -> Self {
3559            self.set_canceled_transactions(field);
3560            self
3561        }
3562    }
3563    impl super::DatatypeDescriptor {
3564        pub const fn const_default() -> Self {
3565            Self {
3566                type_name: None,
3567                defining_id: None,
3568                module: None,
3569                name: None,
3570                abilities: Vec::new(),
3571                type_parameters: Vec::new(),
3572                kind: None,
3573                fields: Vec::new(),
3574                variants: Vec::new(),
3575            }
3576        }
3577        #[doc(hidden)]
3578        pub fn default_instance() -> &'static Self {
3579            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3580            &DEFAULT
3581        }
3582        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3583        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3584            self.type_name.as_mut().map(|field| field as _)
3585        }
3586        ///Returns a mutable reference to `type_name`.
3587        ///If the field is unset, it is first initialized with the default value.
3588        pub fn type_name_mut(&mut self) -> &mut String {
3589            self.type_name.get_or_insert_default()
3590        }
3591        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3592        pub fn type_name_opt(&self) -> Option<&str> {
3593            self.type_name.as_ref().map(|field| field as _)
3594        }
3595        ///Sets `type_name` with the provided value.
3596        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3597            self.type_name = Some(field.into().into());
3598        }
3599        ///Sets `type_name` with the provided value.
3600        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3601            self.set_type_name(field.into());
3602            self
3603        }
3604        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3605        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3606            self.defining_id.as_mut().map(|field| field as _)
3607        }
3608        ///Returns a mutable reference to `defining_id`.
3609        ///If the field is unset, it is first initialized with the default value.
3610        pub fn defining_id_mut(&mut self) -> &mut String {
3611            self.defining_id.get_or_insert_default()
3612        }
3613        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3614        pub fn defining_id_opt(&self) -> Option<&str> {
3615            self.defining_id.as_ref().map(|field| field as _)
3616        }
3617        ///Sets `defining_id` with the provided value.
3618        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3619            self.defining_id = Some(field.into().into());
3620        }
3621        ///Sets `defining_id` with the provided value.
3622        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3623            self.set_defining_id(field.into());
3624            self
3625        }
3626        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3627        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3628            self.module.as_mut().map(|field| field as _)
3629        }
3630        ///Returns a mutable reference to `module`.
3631        ///If the field is unset, it is first initialized with the default value.
3632        pub fn module_mut(&mut self) -> &mut String {
3633            self.module.get_or_insert_default()
3634        }
3635        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3636        pub fn module_opt(&self) -> Option<&str> {
3637            self.module.as_ref().map(|field| field as _)
3638        }
3639        ///Sets `module` with the provided value.
3640        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3641            self.module = Some(field.into().into());
3642        }
3643        ///Sets `module` with the provided value.
3644        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3645            self.set_module(field.into());
3646            self
3647        }
3648        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3649        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3650            self.name.as_mut().map(|field| field as _)
3651        }
3652        ///Returns a mutable reference to `name`.
3653        ///If the field is unset, it is first initialized with the default value.
3654        pub fn name_mut(&mut self) -> &mut String {
3655            self.name.get_or_insert_default()
3656        }
3657        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3658        pub fn name_opt(&self) -> Option<&str> {
3659            self.name.as_ref().map(|field| field as _)
3660        }
3661        ///Sets `name` with the provided value.
3662        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3663            self.name = Some(field.into().into());
3664        }
3665        ///Sets `name` with the provided value.
3666        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3667            self.set_name(field.into());
3668            self
3669        }
3670        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3671        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3672            &self.type_parameters
3673        }
3674        ///Returns a mutable reference to `type_parameters`.
3675        ///If the field is unset, it is first initialized with the default value.
3676        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3677            &mut self.type_parameters
3678        }
3679        ///Sets `type_parameters` with the provided value.
3680        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3681            self.type_parameters = field;
3682        }
3683        ///Sets `type_parameters` with the provided value.
3684        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3685            self.set_type_parameters(field);
3686            self
3687        }
3688        ///Sets `kind` with the provided value.
3689        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3690            mut self,
3691            field: T,
3692        ) -> Self {
3693            self.set_kind(field.into());
3694            self
3695        }
3696        ///Returns the value of `fields`, or the default value if `fields` is unset.
3697        pub fn fields(&self) -> &[super::FieldDescriptor] {
3698            &self.fields
3699        }
3700        ///Returns a mutable reference to `fields`.
3701        ///If the field is unset, it is first initialized with the default value.
3702        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3703            &mut self.fields
3704        }
3705        ///Sets `fields` with the provided value.
3706        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3707            self.fields = field;
3708        }
3709        ///Sets `fields` with the provided value.
3710        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3711            self.set_fields(field);
3712            self
3713        }
3714        ///Returns the value of `variants`, or the default value if `variants` is unset.
3715        pub fn variants(&self) -> &[super::VariantDescriptor] {
3716            &self.variants
3717        }
3718        ///Returns a mutable reference to `variants`.
3719        ///If the field is unset, it is first initialized with the default value.
3720        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3721            &mut self.variants
3722        }
3723        ///Sets `variants` with the provided value.
3724        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3725            self.variants = field;
3726        }
3727        ///Sets `variants` with the provided value.
3728        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3729            self.set_variants(field);
3730            self
3731        }
3732    }
3733    impl super::DynamicField {
3734        pub const fn const_default() -> Self {
3735            Self {
3736                kind: None,
3737                parent: None,
3738                field_id: None,
3739                name_type: None,
3740                name_value: None,
3741                value_type: None,
3742                dynamic_object_id: None,
3743                object: None,
3744            }
3745        }
3746        #[doc(hidden)]
3747        pub fn default_instance() -> &'static Self {
3748            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3749            &DEFAULT
3750        }
3751        ///Sets `kind` with the provided value.
3752        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3753            mut self,
3754            field: T,
3755        ) -> Self {
3756            self.set_kind(field.into());
3757            self
3758        }
3759        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3760        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3761            self.parent.as_mut().map(|field| field as _)
3762        }
3763        ///Returns a mutable reference to `parent`.
3764        ///If the field is unset, it is first initialized with the default value.
3765        pub fn parent_mut(&mut self) -> &mut String {
3766            self.parent.get_or_insert_default()
3767        }
3768        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
3769        pub fn parent_opt(&self) -> Option<&str> {
3770            self.parent.as_ref().map(|field| field as _)
3771        }
3772        ///Sets `parent` with the provided value.
3773        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3774            self.parent = Some(field.into().into());
3775        }
3776        ///Sets `parent` with the provided value.
3777        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3778            self.set_parent(field.into());
3779            self
3780        }
3781        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3782        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3783            self.field_id.as_mut().map(|field| field as _)
3784        }
3785        ///Returns a mutable reference to `field_id`.
3786        ///If the field is unset, it is first initialized with the default value.
3787        pub fn field_id_mut(&mut self) -> &mut String {
3788            self.field_id.get_or_insert_default()
3789        }
3790        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3791        pub fn field_id_opt(&self) -> Option<&str> {
3792            self.field_id.as_ref().map(|field| field as _)
3793        }
3794        ///Sets `field_id` with the provided value.
3795        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
3796            self.field_id = Some(field.into().into());
3797        }
3798        ///Sets `field_id` with the provided value.
3799        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
3800            self.set_field_id(field.into());
3801            self
3802        }
3803        ///If `name_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3804        pub fn name_type_opt_mut(&mut self) -> Option<&mut String> {
3805            self.name_type.as_mut().map(|field| field as _)
3806        }
3807        ///Returns a mutable reference to `name_type`.
3808        ///If the field is unset, it is first initialized with the default value.
3809        pub fn name_type_mut(&mut self) -> &mut String {
3810            self.name_type.get_or_insert_default()
3811        }
3812        ///If `name_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
3813        pub fn name_type_opt(&self) -> Option<&str> {
3814            self.name_type.as_ref().map(|field| field as _)
3815        }
3816        ///Sets `name_type` with the provided value.
3817        pub fn set_name_type<T: Into<String>>(&mut self, field: T) {
3818            self.name_type = Some(field.into().into());
3819        }
3820        ///Sets `name_type` with the provided value.
3821        pub fn with_name_type<T: Into<String>>(mut self, field: T) -> Self {
3822            self.set_name_type(field.into());
3823            self
3824        }
3825        ///If `name_value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3826        pub fn name_value_opt(&self) -> Option<&[u8]> {
3827            self.name_value.as_ref().map(|field| field as _)
3828        }
3829        ///Sets `name_value` with the provided value.
3830        pub fn set_name_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
3831            self.name_value = Some(field.into().into());
3832        }
3833        ///Sets `name_value` with the provided value.
3834        pub fn with_name_value<T: Into<::prost::bytes::Bytes>>(
3835            mut self,
3836            field: T,
3837        ) -> Self {
3838            self.set_name_value(field.into());
3839            self
3840        }
3841        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3842        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
3843            self.value_type.as_mut().map(|field| field as _)
3844        }
3845        ///Returns a mutable reference to `value_type`.
3846        ///If the field is unset, it is first initialized with the default value.
3847        pub fn value_type_mut(&mut self) -> &mut String {
3848            self.value_type.get_or_insert_default()
3849        }
3850        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
3851        pub fn value_type_opt(&self) -> Option<&str> {
3852            self.value_type.as_ref().map(|field| field as _)
3853        }
3854        ///Sets `value_type` with the provided value.
3855        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
3856            self.value_type = Some(field.into().into());
3857        }
3858        ///Sets `value_type` with the provided value.
3859        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
3860            self.set_value_type(field.into());
3861            self
3862        }
3863        ///If `dynamic_object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3864        pub fn dynamic_object_id_opt_mut(&mut self) -> Option<&mut String> {
3865            self.dynamic_object_id.as_mut().map(|field| field as _)
3866        }
3867        ///Returns a mutable reference to `dynamic_object_id`.
3868        ///If the field is unset, it is first initialized with the default value.
3869        pub fn dynamic_object_id_mut(&mut self) -> &mut String {
3870            self.dynamic_object_id.get_or_insert_default()
3871        }
3872        ///If `dynamic_object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3873        pub fn dynamic_object_id_opt(&self) -> Option<&str> {
3874            self.dynamic_object_id.as_ref().map(|field| field as _)
3875        }
3876        ///Sets `dynamic_object_id` with the provided value.
3877        pub fn set_dynamic_object_id<T: Into<String>>(&mut self, field: T) {
3878            self.dynamic_object_id = Some(field.into().into());
3879        }
3880        ///Sets `dynamic_object_id` with the provided value.
3881        pub fn with_dynamic_object_id<T: Into<String>>(mut self, field: T) -> Self {
3882            self.set_dynamic_object_id(field.into());
3883            self
3884        }
3885        ///Returns the value of `object`, or the default value if `object` is unset.
3886        pub fn object(&self) -> &super::Object {
3887            self.object
3888                .as_ref()
3889                .map(|field| field as _)
3890                .unwrap_or_else(|| super::Object::default_instance() as _)
3891        }
3892        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3893        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
3894            self.object.as_mut().map(|field| field as _)
3895        }
3896        ///Returns a mutable reference to `object`.
3897        ///If the field is unset, it is first initialized with the default value.
3898        pub fn object_mut(&mut self) -> &mut super::Object {
3899            self.object.get_or_insert_default()
3900        }
3901        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
3902        pub fn object_opt(&self) -> Option<&super::Object> {
3903            self.object.as_ref().map(|field| field as _)
3904        }
3905        ///Sets `object` with the provided value.
3906        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
3907            self.object = Some(field.into().into());
3908        }
3909        ///Sets `object` with the provided value.
3910        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3911            self.set_object(field.into());
3912            self
3913        }
3914    }
3915    impl super::EndOfEpochData {
3916        pub const fn const_default() -> Self {
3917            Self {
3918                next_epoch_committee: Vec::new(),
3919                next_epoch_protocol_version: None,
3920                epoch_commitments: Vec::new(),
3921            }
3922        }
3923        #[doc(hidden)]
3924        pub fn default_instance() -> &'static Self {
3925            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
3926            &DEFAULT
3927        }
3928        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
3929        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
3930            &self.next_epoch_committee
3931        }
3932        ///Returns a mutable reference to `next_epoch_committee`.
3933        ///If the field is unset, it is first initialized with the default value.
3934        pub fn next_epoch_committee_mut(
3935            &mut self,
3936        ) -> &mut Vec<super::ValidatorCommitteeMember> {
3937            &mut self.next_epoch_committee
3938        }
3939        ///Sets `next_epoch_committee` with the provided value.
3940        pub fn set_next_epoch_committee(
3941            &mut self,
3942            field: Vec<super::ValidatorCommitteeMember>,
3943        ) {
3944            self.next_epoch_committee = field;
3945        }
3946        ///Sets `next_epoch_committee` with the provided value.
3947        pub fn with_next_epoch_committee(
3948            mut self,
3949            field: Vec<super::ValidatorCommitteeMember>,
3950        ) -> Self {
3951            self.set_next_epoch_committee(field);
3952            self
3953        }
3954        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3955        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
3956            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
3957        }
3958        ///Returns a mutable reference to `next_epoch_protocol_version`.
3959        ///If the field is unset, it is first initialized with the default value.
3960        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
3961            self.next_epoch_protocol_version.get_or_insert_default()
3962        }
3963        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3964        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
3965            self.next_epoch_protocol_version.as_ref().map(|field| *field)
3966        }
3967        ///Sets `next_epoch_protocol_version` with the provided value.
3968        pub fn set_next_epoch_protocol_version<T: Into<u64>>(&mut self, field: T) {
3969            self.next_epoch_protocol_version = Some(field.into().into());
3970        }
3971        ///Sets `next_epoch_protocol_version` with the provided value.
3972        pub fn with_next_epoch_protocol_version<T: Into<u64>>(
3973            mut self,
3974            field: T,
3975        ) -> Self {
3976            self.set_next_epoch_protocol_version(field.into());
3977            self
3978        }
3979        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
3980        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
3981            &self.epoch_commitments
3982        }
3983        ///Returns a mutable reference to `epoch_commitments`.
3984        ///If the field is unset, it is first initialized with the default value.
3985        pub fn epoch_commitments_mut(
3986            &mut self,
3987        ) -> &mut Vec<super::CheckpointCommitment> {
3988            &mut self.epoch_commitments
3989        }
3990        ///Sets `epoch_commitments` with the provided value.
3991        pub fn set_epoch_commitments(
3992            &mut self,
3993            field: Vec<super::CheckpointCommitment>,
3994        ) {
3995            self.epoch_commitments = field;
3996        }
3997        ///Sets `epoch_commitments` with the provided value.
3998        pub fn with_epoch_commitments(
3999            mut self,
4000            field: Vec<super::CheckpointCommitment>,
4001        ) -> Self {
4002            self.set_epoch_commitments(field);
4003            self
4004        }
4005    }
4006    impl super::EndOfEpochTransaction {
4007        pub const fn const_default() -> Self {
4008            Self { transactions: Vec::new() }
4009        }
4010        #[doc(hidden)]
4011        pub fn default_instance() -> &'static Self {
4012            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4013            &DEFAULT
4014        }
4015        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4016        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4017            &self.transactions
4018        }
4019        ///Returns a mutable reference to `transactions`.
4020        ///If the field is unset, it is first initialized with the default value.
4021        pub fn transactions_mut(
4022            &mut self,
4023        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4024            &mut self.transactions
4025        }
4026        ///Sets `transactions` with the provided value.
4027        pub fn set_transactions(
4028            &mut self,
4029            field: Vec<super::EndOfEpochTransactionKind>,
4030        ) {
4031            self.transactions = field;
4032        }
4033        ///Sets `transactions` with the provided value.
4034        pub fn with_transactions(
4035            mut self,
4036            field: Vec<super::EndOfEpochTransactionKind>,
4037        ) -> Self {
4038            self.set_transactions(field);
4039            self
4040        }
4041    }
4042    impl super::EndOfEpochTransactionKind {
4043        pub const fn const_default() -> Self {
4044            Self { kind: None }
4045        }
4046        #[doc(hidden)]
4047        pub fn default_instance() -> &'static Self {
4048            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4049            &DEFAULT
4050        }
4051        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4052        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4053            if let Some(
4054                super::end_of_epoch_transaction_kind::Kind::ChangeEpoch(field),
4055            ) = &self.kind
4056            {
4057                field as _
4058            } else {
4059                super::ChangeEpoch::default_instance() as _
4060            }
4061        }
4062        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4063        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4064            if let Some(
4065                super::end_of_epoch_transaction_kind::Kind::ChangeEpoch(field),
4066            ) = &self.kind
4067            {
4068                Some(field as _)
4069            } else {
4070                None
4071            }
4072        }
4073        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4074        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4075            if let Some(
4076                super::end_of_epoch_transaction_kind::Kind::ChangeEpoch(field),
4077            ) = &mut self.kind
4078            {
4079                Some(field as _)
4080            } else {
4081                None
4082            }
4083        }
4084        ///Returns a mutable reference to `change_epoch`.
4085        ///If the field is unset, it is first initialized with the default value.
4086        ///If any other oneof field in the same oneof is set, it will be cleared.
4087        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4088            if self.change_epoch_opt_mut().is_none() {
4089                self.kind = Some(
4090                    super::end_of_epoch_transaction_kind::Kind::ChangeEpoch(
4091                        super::ChangeEpoch::default(),
4092                    ),
4093                );
4094            }
4095            self.change_epoch_opt_mut().unwrap()
4096        }
4097        ///Sets `change_epoch` with the provided value.
4098        ///If any other oneof field in the same oneof is set, it will be cleared.
4099        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4100            self.kind = Some(
4101                super::end_of_epoch_transaction_kind::Kind::ChangeEpoch(
4102                    field.into().into(),
4103                ),
4104            );
4105        }
4106        ///Sets `change_epoch` with the provided value.
4107        ///If any other oneof field in the same oneof is set, it will be cleared.
4108        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4109            mut self,
4110            field: T,
4111        ) -> Self {
4112            self.set_change_epoch(field.into());
4113            self
4114        }
4115        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4116        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4117            if let Some(
4118                super::end_of_epoch_transaction_kind::Kind::AuthenticatorStateExpire(
4119                    field,
4120                ),
4121            ) = &self.kind
4122            {
4123                field as _
4124            } else {
4125                super::AuthenticatorStateExpire::default_instance() as _
4126            }
4127        }
4128        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4129        pub fn authenticator_state_expire_opt(
4130            &self,
4131        ) -> Option<&super::AuthenticatorStateExpire> {
4132            if let Some(
4133                super::end_of_epoch_transaction_kind::Kind::AuthenticatorStateExpire(
4134                    field,
4135                ),
4136            ) = &self.kind
4137            {
4138                Some(field as _)
4139            } else {
4140                None
4141            }
4142        }
4143        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4144        pub fn authenticator_state_expire_opt_mut(
4145            &mut self,
4146        ) -> Option<&mut super::AuthenticatorStateExpire> {
4147            if let Some(
4148                super::end_of_epoch_transaction_kind::Kind::AuthenticatorStateExpire(
4149                    field,
4150                ),
4151            ) = &mut self.kind
4152            {
4153                Some(field as _)
4154            } else {
4155                None
4156            }
4157        }
4158        ///Returns a mutable reference to `authenticator_state_expire`.
4159        ///If the field is unset, it is first initialized with the default value.
4160        ///If any other oneof field in the same oneof is set, it will be cleared.
4161        pub fn authenticator_state_expire_mut(
4162            &mut self,
4163        ) -> &mut super::AuthenticatorStateExpire {
4164            if self.authenticator_state_expire_opt_mut().is_none() {
4165                self.kind = Some(
4166                    super::end_of_epoch_transaction_kind::Kind::AuthenticatorStateExpire(
4167                        super::AuthenticatorStateExpire::default(),
4168                    ),
4169                );
4170            }
4171            self.authenticator_state_expire_opt_mut().unwrap()
4172        }
4173        ///Sets `authenticator_state_expire` with the provided value.
4174        ///If any other oneof field in the same oneof is set, it will be cleared.
4175        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4176            &mut self,
4177            field: T,
4178        ) {
4179            self.kind = Some(
4180                super::end_of_epoch_transaction_kind::Kind::AuthenticatorStateExpire(
4181                    field.into().into(),
4182                ),
4183            );
4184        }
4185        ///Sets `authenticator_state_expire` with the provided value.
4186        ///If any other oneof field in the same oneof is set, it will be cleared.
4187        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4188            mut self,
4189            field: T,
4190        ) -> Self {
4191            self.set_authenticator_state_expire(field.into());
4192            self
4193        }
4194        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4195        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4196            if let Some(
4197                super::end_of_epoch_transaction_kind::Kind::ExecutionTimeObservations(
4198                    field,
4199                ),
4200            ) = &self.kind
4201            {
4202                field as _
4203            } else {
4204                super::ExecutionTimeObservations::default_instance() as _
4205            }
4206        }
4207        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4208        pub fn execution_time_observations_opt(
4209            &self,
4210        ) -> Option<&super::ExecutionTimeObservations> {
4211            if let Some(
4212                super::end_of_epoch_transaction_kind::Kind::ExecutionTimeObservations(
4213                    field,
4214                ),
4215            ) = &self.kind
4216            {
4217                Some(field as _)
4218            } else {
4219                None
4220            }
4221        }
4222        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4223        pub fn execution_time_observations_opt_mut(
4224            &mut self,
4225        ) -> Option<&mut super::ExecutionTimeObservations> {
4226            if let Some(
4227                super::end_of_epoch_transaction_kind::Kind::ExecutionTimeObservations(
4228                    field,
4229                ),
4230            ) = &mut self.kind
4231            {
4232                Some(field as _)
4233            } else {
4234                None
4235            }
4236        }
4237        ///Returns a mutable reference to `execution_time_observations`.
4238        ///If the field is unset, it is first initialized with the default value.
4239        ///If any other oneof field in the same oneof is set, it will be cleared.
4240        pub fn execution_time_observations_mut(
4241            &mut self,
4242        ) -> &mut super::ExecutionTimeObservations {
4243            if self.execution_time_observations_opt_mut().is_none() {
4244                self.kind = Some(
4245                    super::end_of_epoch_transaction_kind::Kind::ExecutionTimeObservations(
4246                        super::ExecutionTimeObservations::default(),
4247                    ),
4248                );
4249            }
4250            self.execution_time_observations_opt_mut().unwrap()
4251        }
4252        ///Sets `execution_time_observations` with the provided value.
4253        ///If any other oneof field in the same oneof is set, it will be cleared.
4254        pub fn set_execution_time_observations<
4255            T: Into<super::ExecutionTimeObservations>,
4256        >(&mut self, field: T) {
4257            self.kind = Some(
4258                super::end_of_epoch_transaction_kind::Kind::ExecutionTimeObservations(
4259                    field.into().into(),
4260                ),
4261            );
4262        }
4263        ///Sets `execution_time_observations` with the provided value.
4264        ///If any other oneof field in the same oneof is set, it will be cleared.
4265        pub fn with_execution_time_observations<
4266            T: Into<super::ExecutionTimeObservations>,
4267        >(mut self, field: T) -> Self {
4268            self.set_execution_time_observations(field.into());
4269            self
4270        }
4271        ///Returns the value of `bridge_state_create`, or the default value if `bridge_state_create` is unset.
4272        pub fn bridge_state_create(&self) -> &str {
4273            if let Some(
4274                super::end_of_epoch_transaction_kind::Kind::BridgeStateCreate(field),
4275            ) = &self.kind
4276            {
4277                field as _
4278            } else {
4279                ""
4280            }
4281        }
4282        ///If `bridge_state_create` is set, returns [`Some`] with the value; otherwise returns [`None`].
4283        pub fn bridge_state_create_opt(&self) -> Option<&str> {
4284            if let Some(
4285                super::end_of_epoch_transaction_kind::Kind::BridgeStateCreate(field),
4286            ) = &self.kind
4287            {
4288                Some(field as _)
4289            } else {
4290                None
4291            }
4292        }
4293        ///If `bridge_state_create` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4294        pub fn bridge_state_create_opt_mut(&mut self) -> Option<&mut String> {
4295            if let Some(
4296                super::end_of_epoch_transaction_kind::Kind::BridgeStateCreate(field),
4297            ) = &mut self.kind
4298            {
4299                Some(field as _)
4300            } else {
4301                None
4302            }
4303        }
4304        ///Returns a mutable reference to `bridge_state_create`.
4305        ///If the field is unset, it is first initialized with the default value.
4306        ///If any other oneof field in the same oneof is set, it will be cleared.
4307        pub fn bridge_state_create_mut(&mut self) -> &mut String {
4308            if self.bridge_state_create_opt_mut().is_none() {
4309                self.kind = Some(
4310                    super::end_of_epoch_transaction_kind::Kind::BridgeStateCreate(
4311                        String::default(),
4312                    ),
4313                );
4314            }
4315            self.bridge_state_create_opt_mut().unwrap()
4316        }
4317        ///Sets `bridge_state_create` with the provided value.
4318        ///If any other oneof field in the same oneof is set, it will be cleared.
4319        pub fn set_bridge_state_create<T: Into<String>>(&mut self, field: T) {
4320            self.kind = Some(
4321                super::end_of_epoch_transaction_kind::Kind::BridgeStateCreate(
4322                    field.into().into(),
4323                ),
4324            );
4325        }
4326        ///Sets `bridge_state_create` with the provided value.
4327        ///If any other oneof field in the same oneof is set, it will be cleared.
4328        pub fn with_bridge_state_create<T: Into<String>>(mut self, field: T) -> Self {
4329            self.set_bridge_state_create(field.into());
4330            self
4331        }
4332        ///Returns the value of `bridge_committee_init`, or the default value if `bridge_committee_init` is unset.
4333        pub fn bridge_committee_init(&self) -> u64 {
4334            if let Some(
4335                super::end_of_epoch_transaction_kind::Kind::BridgeCommitteeInit(field),
4336            ) = &self.kind
4337            {
4338                *field
4339            } else {
4340                0u64
4341            }
4342        }
4343        ///If `bridge_committee_init` is set, returns [`Some`] with the value; otherwise returns [`None`].
4344        pub fn bridge_committee_init_opt(&self) -> Option<u64> {
4345            if let Some(
4346                super::end_of_epoch_transaction_kind::Kind::BridgeCommitteeInit(field),
4347            ) = &self.kind
4348            {
4349                Some(*field)
4350            } else {
4351                None
4352            }
4353        }
4354        ///If `bridge_committee_init` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4355        pub fn bridge_committee_init_opt_mut(&mut self) -> Option<&mut u64> {
4356            if let Some(
4357                super::end_of_epoch_transaction_kind::Kind::BridgeCommitteeInit(field),
4358            ) = &mut self.kind
4359            {
4360                Some(field as _)
4361            } else {
4362                None
4363            }
4364        }
4365        ///Returns a mutable reference to `bridge_committee_init`.
4366        ///If the field is unset, it is first initialized with the default value.
4367        ///If any other oneof field in the same oneof is set, it will be cleared.
4368        pub fn bridge_committee_init_mut(&mut self) -> &mut u64 {
4369            if self.bridge_committee_init_opt_mut().is_none() {
4370                self.kind = Some(
4371                    super::end_of_epoch_transaction_kind::Kind::BridgeCommitteeInit(
4372                        u64::default(),
4373                    ),
4374                );
4375            }
4376            self.bridge_committee_init_opt_mut().unwrap()
4377        }
4378        ///Sets `bridge_committee_init` with the provided value.
4379        ///If any other oneof field in the same oneof is set, it will be cleared.
4380        pub fn set_bridge_committee_init<T: Into<u64>>(&mut self, field: T) {
4381            self.kind = Some(
4382                super::end_of_epoch_transaction_kind::Kind::BridgeCommitteeInit(
4383                    field.into().into(),
4384                ),
4385            );
4386        }
4387        ///Sets `bridge_committee_init` with the provided value.
4388        ///If any other oneof field in the same oneof is set, it will be cleared.
4389        pub fn with_bridge_committee_init<T: Into<u64>>(mut self, field: T) -> Self {
4390            self.set_bridge_committee_init(field.into());
4391            self
4392        }
4393    }
4394    impl super::Epoch {
4395        pub const fn const_default() -> Self {
4396            Self {
4397                epoch: None,
4398                committee: None,
4399                system_state: None,
4400                first_checkpoint: None,
4401                last_checkpoint: None,
4402                start: None,
4403                end: None,
4404                reference_gas_price: None,
4405                protocol_config: None,
4406            }
4407        }
4408        #[doc(hidden)]
4409        pub fn default_instance() -> &'static Self {
4410            static DEFAULT: super::Epoch = super::Epoch::const_default();
4411            &DEFAULT
4412        }
4413        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4414        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4415            self.epoch.as_mut().map(|field| field as _)
4416        }
4417        ///Returns a mutable reference to `epoch`.
4418        ///If the field is unset, it is first initialized with the default value.
4419        pub fn epoch_mut(&mut self) -> &mut u64 {
4420            self.epoch.get_or_insert_default()
4421        }
4422        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4423        pub fn epoch_opt(&self) -> Option<u64> {
4424            self.epoch.as_ref().map(|field| *field)
4425        }
4426        ///Sets `epoch` with the provided value.
4427        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
4428            self.epoch = Some(field.into().into());
4429        }
4430        ///Sets `epoch` with the provided value.
4431        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
4432            self.set_epoch(field.into());
4433            self
4434        }
4435        ///Returns the value of `committee`, or the default value if `committee` is unset.
4436        pub fn committee(&self) -> &super::ValidatorCommittee {
4437            self.committee
4438                .as_ref()
4439                .map(|field| field as _)
4440                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4441        }
4442        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4443        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4444            self.committee.as_mut().map(|field| field as _)
4445        }
4446        ///Returns a mutable reference to `committee`.
4447        ///If the field is unset, it is first initialized with the default value.
4448        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4449            self.committee.get_or_insert_default()
4450        }
4451        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4452        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4453            self.committee.as_ref().map(|field| field as _)
4454        }
4455        ///Sets `committee` with the provided value.
4456        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4457            self.committee = Some(field.into().into());
4458        }
4459        ///Sets `committee` with the provided value.
4460        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4461            mut self,
4462            field: T,
4463        ) -> Self {
4464            self.set_committee(field.into());
4465            self
4466        }
4467        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4468        pub fn system_state(&self) -> &super::SystemState {
4469            self.system_state
4470                .as_ref()
4471                .map(|field| field as _)
4472                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4473        }
4474        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4475        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4476            self.system_state.as_mut().map(|field| field as _)
4477        }
4478        ///Returns a mutable reference to `system_state`.
4479        ///If the field is unset, it is first initialized with the default value.
4480        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4481            self.system_state.get_or_insert_default()
4482        }
4483        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4484        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4485            self.system_state.as_ref().map(|field| field as _)
4486        }
4487        ///Sets `system_state` with the provided value.
4488        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4489            self.system_state = Some(field.into().into());
4490        }
4491        ///Sets `system_state` with the provided value.
4492        pub fn with_system_state<T: Into<super::SystemState>>(
4493            mut self,
4494            field: T,
4495        ) -> Self {
4496            self.set_system_state(field.into());
4497            self
4498        }
4499        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4500        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4501            self.first_checkpoint.as_mut().map(|field| field as _)
4502        }
4503        ///Returns a mutable reference to `first_checkpoint`.
4504        ///If the field is unset, it is first initialized with the default value.
4505        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4506            self.first_checkpoint.get_or_insert_default()
4507        }
4508        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4509        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4510            self.first_checkpoint.as_ref().map(|field| *field)
4511        }
4512        ///Sets `first_checkpoint` with the provided value.
4513        pub fn set_first_checkpoint<T: Into<u64>>(&mut self, field: T) {
4514            self.first_checkpoint = Some(field.into().into());
4515        }
4516        ///Sets `first_checkpoint` with the provided value.
4517        pub fn with_first_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
4518            self.set_first_checkpoint(field.into());
4519            self
4520        }
4521        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4522        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4523            self.last_checkpoint.as_mut().map(|field| field as _)
4524        }
4525        ///Returns a mutable reference to `last_checkpoint`.
4526        ///If the field is unset, it is first initialized with the default value.
4527        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4528            self.last_checkpoint.get_or_insert_default()
4529        }
4530        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4531        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4532            self.last_checkpoint.as_ref().map(|field| *field)
4533        }
4534        ///Sets `last_checkpoint` with the provided value.
4535        pub fn set_last_checkpoint<T: Into<u64>>(&mut self, field: T) {
4536            self.last_checkpoint = Some(field.into().into());
4537        }
4538        ///Sets `last_checkpoint` with the provided value.
4539        pub fn with_last_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
4540            self.set_last_checkpoint(field.into());
4541            self
4542        }
4543        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4544        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4545            self.start.as_mut().map(|field| field as _)
4546        }
4547        ///Returns a mutable reference to `start`.
4548        ///If the field is unset, it is first initialized with the default value.
4549        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4550            self.start.get_or_insert_default()
4551        }
4552        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4553        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4554            self.start.as_ref().map(|field| field as _)
4555        }
4556        ///Sets `start` with the provided value.
4557        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4558            self.start = Some(field.into().into());
4559        }
4560        ///Sets `start` with the provided value.
4561        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4562            mut self,
4563            field: T,
4564        ) -> Self {
4565            self.set_start(field.into());
4566            self
4567        }
4568        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4569        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4570            self.end.as_mut().map(|field| field as _)
4571        }
4572        ///Returns a mutable reference to `end`.
4573        ///If the field is unset, it is first initialized with the default value.
4574        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4575            self.end.get_or_insert_default()
4576        }
4577        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4578        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4579            self.end.as_ref().map(|field| field as _)
4580        }
4581        ///Sets `end` with the provided value.
4582        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4583            self.end = Some(field.into().into());
4584        }
4585        ///Sets `end` with the provided value.
4586        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4587            self.set_end(field.into());
4588            self
4589        }
4590        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4591        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4592            self.reference_gas_price.as_mut().map(|field| field as _)
4593        }
4594        ///Returns a mutable reference to `reference_gas_price`.
4595        ///If the field is unset, it is first initialized with the default value.
4596        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4597            self.reference_gas_price.get_or_insert_default()
4598        }
4599        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
4600        pub fn reference_gas_price_opt(&self) -> Option<u64> {
4601            self.reference_gas_price.as_ref().map(|field| *field)
4602        }
4603        ///Sets `reference_gas_price` with the provided value.
4604        pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T) {
4605            self.reference_gas_price = Some(field.into().into());
4606        }
4607        ///Sets `reference_gas_price` with the provided value.
4608        pub fn with_reference_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
4609            self.set_reference_gas_price(field.into());
4610            self
4611        }
4612        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
4613        pub fn protocol_config(&self) -> &super::ProtocolConfig {
4614            self.protocol_config
4615                .as_ref()
4616                .map(|field| field as _)
4617                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4618        }
4619        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4620        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4621            self.protocol_config.as_mut().map(|field| field as _)
4622        }
4623        ///Returns a mutable reference to `protocol_config`.
4624        ///If the field is unset, it is first initialized with the default value.
4625        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4626            self.protocol_config.get_or_insert_default()
4627        }
4628        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
4629        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4630            self.protocol_config.as_ref().map(|field| field as _)
4631        }
4632        ///Sets `protocol_config` with the provided value.
4633        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4634            self.protocol_config = Some(field.into().into());
4635        }
4636        ///Sets `protocol_config` with the provided value.
4637        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4638            mut self,
4639            field: T,
4640        ) -> Self {
4641            self.set_protocol_config(field.into());
4642            self
4643        }
4644    }
4645    impl super::Event {
4646        pub const fn const_default() -> Self {
4647            Self {
4648                package_id: None,
4649                module: None,
4650                sender: None,
4651                event_type: None,
4652                contents: None,
4653                json: None,
4654            }
4655        }
4656        #[doc(hidden)]
4657        pub fn default_instance() -> &'static Self {
4658            static DEFAULT: super::Event = super::Event::const_default();
4659            &DEFAULT
4660        }
4661        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4662        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4663            self.package_id.as_mut().map(|field| field as _)
4664        }
4665        ///Returns a mutable reference to `package_id`.
4666        ///If the field is unset, it is first initialized with the default value.
4667        pub fn package_id_mut(&mut self) -> &mut String {
4668            self.package_id.get_or_insert_default()
4669        }
4670        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4671        pub fn package_id_opt(&self) -> Option<&str> {
4672            self.package_id.as_ref().map(|field| field as _)
4673        }
4674        ///Sets `package_id` with the provided value.
4675        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4676            self.package_id = Some(field.into().into());
4677        }
4678        ///Sets `package_id` with the provided value.
4679        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4680            self.set_package_id(field.into());
4681            self
4682        }
4683        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4684        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4685            self.module.as_mut().map(|field| field as _)
4686        }
4687        ///Returns a mutable reference to `module`.
4688        ///If the field is unset, it is first initialized with the default value.
4689        pub fn module_mut(&mut self) -> &mut String {
4690            self.module.get_or_insert_default()
4691        }
4692        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4693        pub fn module_opt(&self) -> Option<&str> {
4694            self.module.as_ref().map(|field| field as _)
4695        }
4696        ///Sets `module` with the provided value.
4697        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4698            self.module = Some(field.into().into());
4699        }
4700        ///Sets `module` with the provided value.
4701        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4702            self.set_module(field.into());
4703            self
4704        }
4705        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4706        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4707            self.sender.as_mut().map(|field| field as _)
4708        }
4709        ///Returns a mutable reference to `sender`.
4710        ///If the field is unset, it is first initialized with the default value.
4711        pub fn sender_mut(&mut self) -> &mut String {
4712            self.sender.get_or_insert_default()
4713        }
4714        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
4715        pub fn sender_opt(&self) -> Option<&str> {
4716            self.sender.as_ref().map(|field| field as _)
4717        }
4718        ///Sets `sender` with the provided value.
4719        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4720            self.sender = Some(field.into().into());
4721        }
4722        ///Sets `sender` with the provided value.
4723        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4724            self.set_sender(field.into());
4725            self
4726        }
4727        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4728        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4729            self.event_type.as_mut().map(|field| field as _)
4730        }
4731        ///Returns a mutable reference to `event_type`.
4732        ///If the field is unset, it is first initialized with the default value.
4733        pub fn event_type_mut(&mut self) -> &mut String {
4734            self.event_type.get_or_insert_default()
4735        }
4736        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4737        pub fn event_type_opt(&self) -> Option<&str> {
4738            self.event_type.as_ref().map(|field| field as _)
4739        }
4740        ///Sets `event_type` with the provided value.
4741        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4742            self.event_type = Some(field.into().into());
4743        }
4744        ///Sets `event_type` with the provided value.
4745        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
4746            self.set_event_type(field.into());
4747            self
4748        }
4749        ///Returns the value of `contents`, or the default value if `contents` is unset.
4750        pub fn contents(&self) -> &super::Bcs {
4751            self.contents
4752                .as_ref()
4753                .map(|field| field as _)
4754                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4755        }
4756        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4757        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4758            self.contents.as_mut().map(|field| field as _)
4759        }
4760        ///Returns a mutable reference to `contents`.
4761        ///If the field is unset, it is first initialized with the default value.
4762        pub fn contents_mut(&mut self) -> &mut super::Bcs {
4763            self.contents.get_or_insert_default()
4764        }
4765        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
4766        pub fn contents_opt(&self) -> Option<&super::Bcs> {
4767            self.contents.as_ref().map(|field| field as _)
4768        }
4769        ///Sets `contents` with the provided value.
4770        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
4771            self.contents = Some(field.into().into());
4772        }
4773        ///Sets `contents` with the provided value.
4774        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4775            self.set_contents(field.into());
4776            self
4777        }
4778        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4779        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4780            self.json.as_mut().map(|field| field as _)
4781        }
4782        ///Returns a mutable reference to `json`.
4783        ///If the field is unset, it is first initialized with the default value.
4784        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
4785            self.json.get_or_insert_default()
4786        }
4787        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
4788        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
4789            self.json.as_ref().map(|field| field as _)
4790        }
4791        ///Sets `json` with the provided value.
4792        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
4793            self.json = Some(field.into().into());
4794        }
4795        ///Sets `json` with the provided value.
4796        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4797            self.set_json(field.into());
4798            self
4799        }
4800    }
4801    impl super::ExecuteTransactionRequest {
4802        pub const fn const_default() -> Self {
4803            Self {
4804                transaction: None,
4805                signatures: Vec::new(),
4806                read_mask: None,
4807            }
4808        }
4809        #[doc(hidden)]
4810        pub fn default_instance() -> &'static Self {
4811            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
4812            &DEFAULT
4813        }
4814        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
4815        pub fn transaction(&self) -> &super::Transaction {
4816            self.transaction
4817                .as_ref()
4818                .map(|field| field as _)
4819                .unwrap_or_else(|| super::Transaction::default_instance() as _)
4820        }
4821        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4822        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
4823            self.transaction.as_mut().map(|field| field as _)
4824        }
4825        ///Returns a mutable reference to `transaction`.
4826        ///If the field is unset, it is first initialized with the default value.
4827        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
4828            self.transaction.get_or_insert_default()
4829        }
4830        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
4831        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
4832            self.transaction.as_ref().map(|field| field as _)
4833        }
4834        ///Sets `transaction` with the provided value.
4835        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
4836            self.transaction = Some(field.into().into());
4837        }
4838        ///Sets `transaction` with the provided value.
4839        pub fn with_transaction<T: Into<super::Transaction>>(
4840            mut self,
4841            field: T,
4842        ) -> Self {
4843            self.set_transaction(field.into());
4844            self
4845        }
4846        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
4847        pub fn signatures(&self) -> &[super::UserSignature] {
4848            &self.signatures
4849        }
4850        ///Returns a mutable reference to `signatures`.
4851        ///If the field is unset, it is first initialized with the default value.
4852        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
4853            &mut self.signatures
4854        }
4855        ///Sets `signatures` with the provided value.
4856        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
4857            self.signatures = field;
4858        }
4859        ///Sets `signatures` with the provided value.
4860        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
4861            self.set_signatures(field);
4862            self
4863        }
4864        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4865        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
4866            self.read_mask.as_mut().map(|field| field as _)
4867        }
4868        ///Returns a mutable reference to `read_mask`.
4869        ///If the field is unset, it is first initialized with the default value.
4870        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
4871            self.read_mask.get_or_insert_default()
4872        }
4873        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
4874        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
4875            self.read_mask.as_ref().map(|field| field as _)
4876        }
4877        ///Sets `read_mask` with the provided value.
4878        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
4879            self.read_mask = Some(field.into().into());
4880        }
4881        ///Sets `read_mask` with the provided value.
4882        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
4883            mut self,
4884            field: T,
4885        ) -> Self {
4886            self.set_read_mask(field.into());
4887            self
4888        }
4889    }
4890    impl super::ExecuteTransactionResponse {
4891        pub const fn const_default() -> Self {
4892            Self {
4893                finality: None,
4894                transaction: None,
4895            }
4896        }
4897        #[doc(hidden)]
4898        pub fn default_instance() -> &'static Self {
4899            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
4900            &DEFAULT
4901        }
4902        ///Returns the value of `finality`, or the default value if `finality` is unset.
4903        pub fn finality(&self) -> &super::TransactionFinality {
4904            self.finality
4905                .as_ref()
4906                .map(|field| field as _)
4907                .unwrap_or_else(|| super::TransactionFinality::default_instance() as _)
4908        }
4909        ///If `finality` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4910        pub fn finality_opt_mut(&mut self) -> Option<&mut super::TransactionFinality> {
4911            self.finality.as_mut().map(|field| field as _)
4912        }
4913        ///Returns a mutable reference to `finality`.
4914        ///If the field is unset, it is first initialized with the default value.
4915        pub fn finality_mut(&mut self) -> &mut super::TransactionFinality {
4916            self.finality.get_or_insert_default()
4917        }
4918        ///If `finality` is set, returns [`Some`] with the value; otherwise returns [`None`].
4919        pub fn finality_opt(&self) -> Option<&super::TransactionFinality> {
4920            self.finality.as_ref().map(|field| field as _)
4921        }
4922        ///Sets `finality` with the provided value.
4923        pub fn set_finality<T: Into<super::TransactionFinality>>(&mut self, field: T) {
4924            self.finality = Some(field.into().into());
4925        }
4926        ///Sets `finality` with the provided value.
4927        pub fn with_finality<T: Into<super::TransactionFinality>>(
4928            mut self,
4929            field: T,
4930        ) -> Self {
4931            self.set_finality(field.into());
4932            self
4933        }
4934        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
4935        pub fn transaction(&self) -> &super::ExecutedTransaction {
4936            self.transaction
4937                .as_ref()
4938                .map(|field| field as _)
4939                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
4940        }
4941        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4942        pub fn transaction_opt_mut(
4943            &mut self,
4944        ) -> Option<&mut super::ExecutedTransaction> {
4945            self.transaction.as_mut().map(|field| field as _)
4946        }
4947        ///Returns a mutable reference to `transaction`.
4948        ///If the field is unset, it is first initialized with the default value.
4949        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
4950            self.transaction.get_or_insert_default()
4951        }
4952        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
4953        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
4954            self.transaction.as_ref().map(|field| field as _)
4955        }
4956        ///Sets `transaction` with the provided value.
4957        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
4958            &mut self,
4959            field: T,
4960        ) {
4961            self.transaction = Some(field.into().into());
4962        }
4963        ///Sets `transaction` with the provided value.
4964        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
4965            mut self,
4966            field: T,
4967        ) -> Self {
4968            self.set_transaction(field.into());
4969            self
4970        }
4971    }
4972    impl super::ExecutedTransaction {
4973        pub const fn const_default() -> Self {
4974            Self {
4975                digest: None,
4976                transaction: None,
4977                signatures: Vec::new(),
4978                effects: None,
4979                events: None,
4980                checkpoint: None,
4981                timestamp: None,
4982                balance_changes: Vec::new(),
4983                input_objects: Vec::new(),
4984                output_objects: Vec::new(),
4985            }
4986        }
4987        #[doc(hidden)]
4988        pub fn default_instance() -> &'static Self {
4989            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
4990            &DEFAULT
4991        }
4992        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4993        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
4994            self.digest.as_mut().map(|field| field as _)
4995        }
4996        ///Returns a mutable reference to `digest`.
4997        ///If the field is unset, it is first initialized with the default value.
4998        pub fn digest_mut(&mut self) -> &mut String {
4999            self.digest.get_or_insert_default()
5000        }
5001        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5002        pub fn digest_opt(&self) -> Option<&str> {
5003            self.digest.as_ref().map(|field| field as _)
5004        }
5005        ///Sets `digest` with the provided value.
5006        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5007            self.digest = Some(field.into().into());
5008        }
5009        ///Sets `digest` with the provided value.
5010        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5011            self.set_digest(field.into());
5012            self
5013        }
5014        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5015        pub fn transaction(&self) -> &super::Transaction {
5016            self.transaction
5017                .as_ref()
5018                .map(|field| field as _)
5019                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5020        }
5021        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5022        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5023            self.transaction.as_mut().map(|field| field as _)
5024        }
5025        ///Returns a mutable reference to `transaction`.
5026        ///If the field is unset, it is first initialized with the default value.
5027        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5028            self.transaction.get_or_insert_default()
5029        }
5030        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5031        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5032            self.transaction.as_ref().map(|field| field as _)
5033        }
5034        ///Sets `transaction` with the provided value.
5035        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5036            self.transaction = Some(field.into().into());
5037        }
5038        ///Sets `transaction` with the provided value.
5039        pub fn with_transaction<T: Into<super::Transaction>>(
5040            mut self,
5041            field: T,
5042        ) -> Self {
5043            self.set_transaction(field.into());
5044            self
5045        }
5046        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5047        pub fn signatures(&self) -> &[super::UserSignature] {
5048            &self.signatures
5049        }
5050        ///Returns a mutable reference to `signatures`.
5051        ///If the field is unset, it is first initialized with the default value.
5052        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5053            &mut self.signatures
5054        }
5055        ///Sets `signatures` with the provided value.
5056        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5057            self.signatures = field;
5058        }
5059        ///Sets `signatures` with the provided value.
5060        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5061            self.set_signatures(field);
5062            self
5063        }
5064        ///Returns the value of `effects`, or the default value if `effects` is unset.
5065        pub fn effects(&self) -> &super::TransactionEffects {
5066            self.effects
5067                .as_ref()
5068                .map(|field| field as _)
5069                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5070        }
5071        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5072        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5073            self.effects.as_mut().map(|field| field as _)
5074        }
5075        ///Returns a mutable reference to `effects`.
5076        ///If the field is unset, it is first initialized with the default value.
5077        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5078            self.effects.get_or_insert_default()
5079        }
5080        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5081        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5082            self.effects.as_ref().map(|field| field as _)
5083        }
5084        ///Sets `effects` with the provided value.
5085        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5086            self.effects = Some(field.into().into());
5087        }
5088        ///Sets `effects` with the provided value.
5089        pub fn with_effects<T: Into<super::TransactionEffects>>(
5090            mut self,
5091            field: T,
5092        ) -> Self {
5093            self.set_effects(field.into());
5094            self
5095        }
5096        ///Returns the value of `events`, or the default value if `events` is unset.
5097        pub fn events(&self) -> &super::TransactionEvents {
5098            self.events
5099                .as_ref()
5100                .map(|field| field as _)
5101                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5102        }
5103        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5104        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5105            self.events.as_mut().map(|field| field as _)
5106        }
5107        ///Returns a mutable reference to `events`.
5108        ///If the field is unset, it is first initialized with the default value.
5109        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5110            self.events.get_or_insert_default()
5111        }
5112        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5113        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5114            self.events.as_ref().map(|field| field as _)
5115        }
5116        ///Sets `events` with the provided value.
5117        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5118            self.events = Some(field.into().into());
5119        }
5120        ///Sets `events` with the provided value.
5121        pub fn with_events<T: Into<super::TransactionEvents>>(
5122            mut self,
5123            field: T,
5124        ) -> Self {
5125            self.set_events(field.into());
5126            self
5127        }
5128        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5129        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5130            self.checkpoint.as_mut().map(|field| field as _)
5131        }
5132        ///Returns a mutable reference to `checkpoint`.
5133        ///If the field is unset, it is first initialized with the default value.
5134        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5135            self.checkpoint.get_or_insert_default()
5136        }
5137        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5138        pub fn checkpoint_opt(&self) -> Option<u64> {
5139            self.checkpoint.as_ref().map(|field| *field)
5140        }
5141        ///Sets `checkpoint` with the provided value.
5142        pub fn set_checkpoint<T: Into<u64>>(&mut self, field: T) {
5143            self.checkpoint = Some(field.into().into());
5144        }
5145        ///Sets `checkpoint` with the provided value.
5146        pub fn with_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
5147            self.set_checkpoint(field.into());
5148            self
5149        }
5150        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5151        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5152            self.timestamp.as_mut().map(|field| field as _)
5153        }
5154        ///Returns a mutable reference to `timestamp`.
5155        ///If the field is unset, it is first initialized with the default value.
5156        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5157            self.timestamp.get_or_insert_default()
5158        }
5159        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5160        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5161            self.timestamp.as_ref().map(|field| field as _)
5162        }
5163        ///Sets `timestamp` with the provided value.
5164        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5165            self.timestamp = Some(field.into().into());
5166        }
5167        ///Sets `timestamp` with the provided value.
5168        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5169            mut self,
5170            field: T,
5171        ) -> Self {
5172            self.set_timestamp(field.into());
5173            self
5174        }
5175        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5176        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5177            &self.balance_changes
5178        }
5179        ///Returns a mutable reference to `balance_changes`.
5180        ///If the field is unset, it is first initialized with the default value.
5181        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5182            &mut self.balance_changes
5183        }
5184        ///Sets `balance_changes` with the provided value.
5185        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5186            self.balance_changes = field;
5187        }
5188        ///Sets `balance_changes` with the provided value.
5189        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5190            self.set_balance_changes(field);
5191            self
5192        }
5193        ///Returns the value of `input_objects`, or the default value if `input_objects` is unset.
5194        pub fn input_objects(&self) -> &[super::Object] {
5195            &self.input_objects
5196        }
5197        ///Returns a mutable reference to `input_objects`.
5198        ///If the field is unset, it is first initialized with the default value.
5199        pub fn input_objects_mut(&mut self) -> &mut Vec<super::Object> {
5200            &mut self.input_objects
5201        }
5202        ///Sets `input_objects` with the provided value.
5203        pub fn set_input_objects(&mut self, field: Vec<super::Object>) {
5204            self.input_objects = field;
5205        }
5206        ///Sets `input_objects` with the provided value.
5207        pub fn with_input_objects(mut self, field: Vec<super::Object>) -> Self {
5208            self.set_input_objects(field);
5209            self
5210        }
5211        ///Returns the value of `output_objects`, or the default value if `output_objects` is unset.
5212        pub fn output_objects(&self) -> &[super::Object] {
5213            &self.output_objects
5214        }
5215        ///Returns a mutable reference to `output_objects`.
5216        ///If the field is unset, it is first initialized with the default value.
5217        pub fn output_objects_mut(&mut self) -> &mut Vec<super::Object> {
5218            &mut self.output_objects
5219        }
5220        ///Sets `output_objects` with the provided value.
5221        pub fn set_output_objects(&mut self, field: Vec<super::Object>) {
5222            self.output_objects = field;
5223        }
5224        ///Sets `output_objects` with the provided value.
5225        pub fn with_output_objects(mut self, field: Vec<super::Object>) -> Self {
5226            self.set_output_objects(field);
5227            self
5228        }
5229    }
5230    impl super::ExecutionError {
5231        pub const fn const_default() -> Self {
5232            Self {
5233                description: None,
5234                command: None,
5235                kind: None,
5236                error_details: None,
5237            }
5238        }
5239        #[doc(hidden)]
5240        pub fn default_instance() -> &'static Self {
5241            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5242            &DEFAULT
5243        }
5244        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5245        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5246            self.description.as_mut().map(|field| field as _)
5247        }
5248        ///Returns a mutable reference to `description`.
5249        ///If the field is unset, it is first initialized with the default value.
5250        pub fn description_mut(&mut self) -> &mut String {
5251            self.description.get_or_insert_default()
5252        }
5253        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5254        pub fn description_opt(&self) -> Option<&str> {
5255            self.description.as_ref().map(|field| field as _)
5256        }
5257        ///Sets `description` with the provided value.
5258        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5259            self.description = Some(field.into().into());
5260        }
5261        ///Sets `description` with the provided value.
5262        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5263            self.set_description(field.into());
5264            self
5265        }
5266        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5267        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5268            self.command.as_mut().map(|field| field as _)
5269        }
5270        ///Returns a mutable reference to `command`.
5271        ///If the field is unset, it is first initialized with the default value.
5272        pub fn command_mut(&mut self) -> &mut u64 {
5273            self.command.get_or_insert_default()
5274        }
5275        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5276        pub fn command_opt(&self) -> Option<u64> {
5277            self.command.as_ref().map(|field| *field)
5278        }
5279        ///Sets `command` with the provided value.
5280        pub fn set_command<T: Into<u64>>(&mut self, field: T) {
5281            self.command = Some(field.into().into());
5282        }
5283        ///Sets `command` with the provided value.
5284        pub fn with_command<T: Into<u64>>(mut self, field: T) -> Self {
5285            self.set_command(field.into());
5286            self
5287        }
5288        ///Sets `kind` with the provided value.
5289        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5290            mut self,
5291            field: T,
5292        ) -> Self {
5293            self.set_kind(field.into());
5294            self
5295        }
5296        ///Returns the value of `abort`, or the default value if `abort` is unset.
5297        pub fn abort(&self) -> &super::MoveAbort {
5298            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5299                .error_details
5300            {
5301                field as _
5302            } else {
5303                super::MoveAbort::default_instance() as _
5304            }
5305        }
5306        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5307        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5308            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5309                .error_details
5310            {
5311                Some(field as _)
5312            } else {
5313                None
5314            }
5315        }
5316        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5317        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5318            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5319                .error_details
5320            {
5321                Some(field as _)
5322            } else {
5323                None
5324            }
5325        }
5326        ///Returns a mutable reference to `abort`.
5327        ///If the field is unset, it is first initialized with the default value.
5328        ///If any other oneof field in the same oneof is set, it will be cleared.
5329        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5330            if self.abort_opt_mut().is_none() {
5331                self.error_details = Some(
5332                    super::execution_error::ErrorDetails::Abort(
5333                        super::MoveAbort::default(),
5334                    ),
5335                );
5336            }
5337            self.abort_opt_mut().unwrap()
5338        }
5339        ///Sets `abort` with the provided value.
5340        ///If any other oneof field in the same oneof is set, it will be cleared.
5341        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5342            self.error_details = Some(
5343                super::execution_error::ErrorDetails::Abort(field.into().into()),
5344            );
5345        }
5346        ///Sets `abort` with the provided value.
5347        ///If any other oneof field in the same oneof is set, it will be cleared.
5348        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5349            self.set_abort(field.into());
5350            self
5351        }
5352        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5353        pub fn size_error(&self) -> &super::SizeError {
5354            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5355                .error_details
5356            {
5357                field as _
5358            } else {
5359                super::SizeError::default_instance() as _
5360            }
5361        }
5362        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5363        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5364            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5365                .error_details
5366            {
5367                Some(field as _)
5368            } else {
5369                None
5370            }
5371        }
5372        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5373        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5374            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5375                .error_details
5376            {
5377                Some(field as _)
5378            } else {
5379                None
5380            }
5381        }
5382        ///Returns a mutable reference to `size_error`.
5383        ///If the field is unset, it is first initialized with the default value.
5384        ///If any other oneof field in the same oneof is set, it will be cleared.
5385        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5386            if self.size_error_opt_mut().is_none() {
5387                self.error_details = Some(
5388                    super::execution_error::ErrorDetails::SizeError(
5389                        super::SizeError::default(),
5390                    ),
5391                );
5392            }
5393            self.size_error_opt_mut().unwrap()
5394        }
5395        ///Sets `size_error` with the provided value.
5396        ///If any other oneof field in the same oneof is set, it will be cleared.
5397        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5398            self.error_details = Some(
5399                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5400            );
5401        }
5402        ///Sets `size_error` with the provided value.
5403        ///If any other oneof field in the same oneof is set, it will be cleared.
5404        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5405            self.set_size_error(field.into());
5406            self
5407        }
5408        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5409        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5410            if let Some(
5411                super::execution_error::ErrorDetails::CommandArgumentError(field),
5412            ) = &self.error_details
5413            {
5414                field as _
5415            } else {
5416                super::CommandArgumentError::default_instance() as _
5417            }
5418        }
5419        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5420        pub fn command_argument_error_opt(
5421            &self,
5422        ) -> Option<&super::CommandArgumentError> {
5423            if let Some(
5424                super::execution_error::ErrorDetails::CommandArgumentError(field),
5425            ) = &self.error_details
5426            {
5427                Some(field as _)
5428            } else {
5429                None
5430            }
5431        }
5432        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5433        pub fn command_argument_error_opt_mut(
5434            &mut self,
5435        ) -> Option<&mut super::CommandArgumentError> {
5436            if let Some(
5437                super::execution_error::ErrorDetails::CommandArgumentError(field),
5438            ) = &mut self.error_details
5439            {
5440                Some(field as _)
5441            } else {
5442                None
5443            }
5444        }
5445        ///Returns a mutable reference to `command_argument_error`.
5446        ///If the field is unset, it is first initialized with the default value.
5447        ///If any other oneof field in the same oneof is set, it will be cleared.
5448        pub fn command_argument_error_mut(
5449            &mut self,
5450        ) -> &mut super::CommandArgumentError {
5451            if self.command_argument_error_opt_mut().is_none() {
5452                self.error_details = Some(
5453                    super::execution_error::ErrorDetails::CommandArgumentError(
5454                        super::CommandArgumentError::default(),
5455                    ),
5456                );
5457            }
5458            self.command_argument_error_opt_mut().unwrap()
5459        }
5460        ///Sets `command_argument_error` with the provided value.
5461        ///If any other oneof field in the same oneof is set, it will be cleared.
5462        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5463            &mut self,
5464            field: T,
5465        ) {
5466            self.error_details = Some(
5467                super::execution_error::ErrorDetails::CommandArgumentError(
5468                    field.into().into(),
5469                ),
5470            );
5471        }
5472        ///Sets `command_argument_error` with the provided value.
5473        ///If any other oneof field in the same oneof is set, it will be cleared.
5474        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5475            mut self,
5476            field: T,
5477        ) -> Self {
5478            self.set_command_argument_error(field.into());
5479            self
5480        }
5481        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5482        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5483            if let Some(
5484                super::execution_error::ErrorDetails::TypeArgumentError(field),
5485            ) = &self.error_details
5486            {
5487                field as _
5488            } else {
5489                super::TypeArgumentError::default_instance() as _
5490            }
5491        }
5492        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5493        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5494            if let Some(
5495                super::execution_error::ErrorDetails::TypeArgumentError(field),
5496            ) = &self.error_details
5497            {
5498                Some(field as _)
5499            } else {
5500                None
5501            }
5502        }
5503        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5504        pub fn type_argument_error_opt_mut(
5505            &mut self,
5506        ) -> Option<&mut super::TypeArgumentError> {
5507            if let Some(
5508                super::execution_error::ErrorDetails::TypeArgumentError(field),
5509            ) = &mut self.error_details
5510            {
5511                Some(field as _)
5512            } else {
5513                None
5514            }
5515        }
5516        ///Returns a mutable reference to `type_argument_error`.
5517        ///If the field is unset, it is first initialized with the default value.
5518        ///If any other oneof field in the same oneof is set, it will be cleared.
5519        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5520            if self.type_argument_error_opt_mut().is_none() {
5521                self.error_details = Some(
5522                    super::execution_error::ErrorDetails::TypeArgumentError(
5523                        super::TypeArgumentError::default(),
5524                    ),
5525                );
5526            }
5527            self.type_argument_error_opt_mut().unwrap()
5528        }
5529        ///Sets `type_argument_error` with the provided value.
5530        ///If any other oneof field in the same oneof is set, it will be cleared.
5531        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5532            &mut self,
5533            field: T,
5534        ) {
5535            self.error_details = Some(
5536                super::execution_error::ErrorDetails::TypeArgumentError(
5537                    field.into().into(),
5538                ),
5539            );
5540        }
5541        ///Sets `type_argument_error` with the provided value.
5542        ///If any other oneof field in the same oneof is set, it will be cleared.
5543        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5544            mut self,
5545            field: T,
5546        ) -> Self {
5547            self.set_type_argument_error(field.into());
5548            self
5549        }
5550        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5551        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5552            if let Some(
5553                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5554            ) = &self.error_details
5555            {
5556                field as _
5557            } else {
5558                super::PackageUpgradeError::default_instance() as _
5559            }
5560        }
5561        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5562        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5563            if let Some(
5564                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5565            ) = &self.error_details
5566            {
5567                Some(field as _)
5568            } else {
5569                None
5570            }
5571        }
5572        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5573        pub fn package_upgrade_error_opt_mut(
5574            &mut self,
5575        ) -> Option<&mut super::PackageUpgradeError> {
5576            if let Some(
5577                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5578            ) = &mut self.error_details
5579            {
5580                Some(field as _)
5581            } else {
5582                None
5583            }
5584        }
5585        ///Returns a mutable reference to `package_upgrade_error`.
5586        ///If the field is unset, it is first initialized with the default value.
5587        ///If any other oneof field in the same oneof is set, it will be cleared.
5588        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5589            if self.package_upgrade_error_opt_mut().is_none() {
5590                self.error_details = Some(
5591                    super::execution_error::ErrorDetails::PackageUpgradeError(
5592                        super::PackageUpgradeError::default(),
5593                    ),
5594                );
5595            }
5596            self.package_upgrade_error_opt_mut().unwrap()
5597        }
5598        ///Sets `package_upgrade_error` with the provided value.
5599        ///If any other oneof field in the same oneof is set, it will be cleared.
5600        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5601            &mut self,
5602            field: T,
5603        ) {
5604            self.error_details = Some(
5605                super::execution_error::ErrorDetails::PackageUpgradeError(
5606                    field.into().into(),
5607                ),
5608            );
5609        }
5610        ///Sets `package_upgrade_error` with the provided value.
5611        ///If any other oneof field in the same oneof is set, it will be cleared.
5612        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5613            mut self,
5614            field: T,
5615        ) -> Self {
5616            self.set_package_upgrade_error(field.into());
5617            self
5618        }
5619        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5620        pub fn index_error(&self) -> &super::IndexError {
5621            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5622                .error_details
5623            {
5624                field as _
5625            } else {
5626                super::IndexError::default_instance() as _
5627            }
5628        }
5629        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5630        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5631            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5632                .error_details
5633            {
5634                Some(field as _)
5635            } else {
5636                None
5637            }
5638        }
5639        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5640        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5641            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5642                .error_details
5643            {
5644                Some(field as _)
5645            } else {
5646                None
5647            }
5648        }
5649        ///Returns a mutable reference to `index_error`.
5650        ///If the field is unset, it is first initialized with the default value.
5651        ///If any other oneof field in the same oneof is set, it will be cleared.
5652        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5653            if self.index_error_opt_mut().is_none() {
5654                self.error_details = Some(
5655                    super::execution_error::ErrorDetails::IndexError(
5656                        super::IndexError::default(),
5657                    ),
5658                );
5659            }
5660            self.index_error_opt_mut().unwrap()
5661        }
5662        ///Sets `index_error` with the provided value.
5663        ///If any other oneof field in the same oneof is set, it will be cleared.
5664        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5665            self.error_details = Some(
5666                super::execution_error::ErrorDetails::IndexError(field.into().into()),
5667            );
5668        }
5669        ///Sets `index_error` with the provided value.
5670        ///If any other oneof field in the same oneof is set, it will be cleared.
5671        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5672            self.set_index_error(field.into());
5673            self
5674        }
5675        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
5676        pub fn object_id(&self) -> &str {
5677            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5678                .error_details
5679            {
5680                field as _
5681            } else {
5682                ""
5683            }
5684        }
5685        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5686        pub fn object_id_opt(&self) -> Option<&str> {
5687            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5688                .error_details
5689            {
5690                Some(field as _)
5691            } else {
5692                None
5693            }
5694        }
5695        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5696        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5697            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5698                .error_details
5699            {
5700                Some(field as _)
5701            } else {
5702                None
5703            }
5704        }
5705        ///Returns a mutable reference to `object_id`.
5706        ///If the field is unset, it is first initialized with the default value.
5707        ///If any other oneof field in the same oneof is set, it will be cleared.
5708        pub fn object_id_mut(&mut self) -> &mut String {
5709            if self.object_id_opt_mut().is_none() {
5710                self.error_details = Some(
5711                    super::execution_error::ErrorDetails::ObjectId(String::default()),
5712                );
5713            }
5714            self.object_id_opt_mut().unwrap()
5715        }
5716        ///Sets `object_id` with the provided value.
5717        ///If any other oneof field in the same oneof is set, it will be cleared.
5718        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5719            self.error_details = Some(
5720                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5721            );
5722        }
5723        ///Sets `object_id` with the provided value.
5724        ///If any other oneof field in the same oneof is set, it will be cleared.
5725        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5726            self.set_object_id(field.into());
5727            self
5728        }
5729        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
5730        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5731            if let Some(
5732                super::execution_error::ErrorDetails::CoinDenyListError(field),
5733            ) = &self.error_details
5734            {
5735                field as _
5736            } else {
5737                super::CoinDenyListError::default_instance() as _
5738            }
5739        }
5740        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5741        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5742            if let Some(
5743                super::execution_error::ErrorDetails::CoinDenyListError(field),
5744            ) = &self.error_details
5745            {
5746                Some(field as _)
5747            } else {
5748                None
5749            }
5750        }
5751        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5752        pub fn coin_deny_list_error_opt_mut(
5753            &mut self,
5754        ) -> Option<&mut super::CoinDenyListError> {
5755            if let Some(
5756                super::execution_error::ErrorDetails::CoinDenyListError(field),
5757            ) = &mut self.error_details
5758            {
5759                Some(field as _)
5760            } else {
5761                None
5762            }
5763        }
5764        ///Returns a mutable reference to `coin_deny_list_error`.
5765        ///If the field is unset, it is first initialized with the default value.
5766        ///If any other oneof field in the same oneof is set, it will be cleared.
5767        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5768            if self.coin_deny_list_error_opt_mut().is_none() {
5769                self.error_details = Some(
5770                    super::execution_error::ErrorDetails::CoinDenyListError(
5771                        super::CoinDenyListError::default(),
5772                    ),
5773                );
5774            }
5775            self.coin_deny_list_error_opt_mut().unwrap()
5776        }
5777        ///Sets `coin_deny_list_error` with the provided value.
5778        ///If any other oneof field in the same oneof is set, it will be cleared.
5779        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5780            &mut self,
5781            field: T,
5782        ) {
5783            self.error_details = Some(
5784                super::execution_error::ErrorDetails::CoinDenyListError(
5785                    field.into().into(),
5786                ),
5787            );
5788        }
5789        ///Sets `coin_deny_list_error` with the provided value.
5790        ///If any other oneof field in the same oneof is set, it will be cleared.
5791        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5792            mut self,
5793            field: T,
5794        ) -> Self {
5795            self.set_coin_deny_list_error(field.into());
5796            self
5797        }
5798        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
5799        pub fn congested_objects(&self) -> &super::CongestedObjects {
5800            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5801                .error_details
5802            {
5803                field as _
5804            } else {
5805                super::CongestedObjects::default_instance() as _
5806            }
5807        }
5808        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5809        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
5810            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5811                .error_details
5812            {
5813                Some(field as _)
5814            } else {
5815                None
5816            }
5817        }
5818        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5819        pub fn congested_objects_opt_mut(
5820            &mut self,
5821        ) -> Option<&mut super::CongestedObjects> {
5822            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
5823                .error_details
5824            {
5825                Some(field as _)
5826            } else {
5827                None
5828            }
5829        }
5830        ///Returns a mutable reference to `congested_objects`.
5831        ///If the field is unset, it is first initialized with the default value.
5832        ///If any other oneof field in the same oneof is set, it will be cleared.
5833        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
5834            if self.congested_objects_opt_mut().is_none() {
5835                self.error_details = Some(
5836                    super::execution_error::ErrorDetails::CongestedObjects(
5837                        super::CongestedObjects::default(),
5838                    ),
5839                );
5840            }
5841            self.congested_objects_opt_mut().unwrap()
5842        }
5843        ///Sets `congested_objects` with the provided value.
5844        ///If any other oneof field in the same oneof is set, it will be cleared.
5845        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
5846            &mut self,
5847            field: T,
5848        ) {
5849            self.error_details = Some(
5850                super::execution_error::ErrorDetails::CongestedObjects(
5851                    field.into().into(),
5852                ),
5853            );
5854        }
5855        ///Sets `congested_objects` with the provided value.
5856        ///If any other oneof field in the same oneof is set, it will be cleared.
5857        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
5858            mut self,
5859            field: T,
5860        ) -> Self {
5861            self.set_congested_objects(field.into());
5862            self
5863        }
5864    }
5865    impl super::ExecutionStatus {
5866        pub const fn const_default() -> Self {
5867            Self { success: None, error: None }
5868        }
5869        #[doc(hidden)]
5870        pub fn default_instance() -> &'static Self {
5871            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
5872            &DEFAULT
5873        }
5874        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5875        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
5876            self.success.as_mut().map(|field| field as _)
5877        }
5878        ///Returns a mutable reference to `success`.
5879        ///If the field is unset, it is first initialized with the default value.
5880        pub fn success_mut(&mut self) -> &mut bool {
5881            self.success.get_or_insert_default()
5882        }
5883        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
5884        pub fn success_opt(&self) -> Option<bool> {
5885            self.success.as_ref().map(|field| *field)
5886        }
5887        ///Sets `success` with the provided value.
5888        pub fn set_success<T: Into<bool>>(&mut self, field: T) {
5889            self.success = Some(field.into().into());
5890        }
5891        ///Sets `success` with the provided value.
5892        pub fn with_success<T: Into<bool>>(mut self, field: T) -> Self {
5893            self.set_success(field.into());
5894            self
5895        }
5896        ///Returns the value of `error`, or the default value if `error` is unset.
5897        pub fn error(&self) -> &super::ExecutionError {
5898            self.error
5899                .as_ref()
5900                .map(|field| field as _)
5901                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
5902        }
5903        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5904        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
5905            self.error.as_mut().map(|field| field as _)
5906        }
5907        ///Returns a mutable reference to `error`.
5908        ///If the field is unset, it is first initialized with the default value.
5909        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
5910            self.error.get_or_insert_default()
5911        }
5912        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5913        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
5914            self.error.as_ref().map(|field| field as _)
5915        }
5916        ///Sets `error` with the provided value.
5917        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
5918            self.error = Some(field.into().into());
5919        }
5920        ///Sets `error` with the provided value.
5921        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
5922            self.set_error(field.into());
5923            self
5924        }
5925    }
5926    impl super::ExecutionTimeObservation {
5927        pub const fn const_default() -> Self {
5928            Self {
5929                kind: None,
5930                move_entry_point: None,
5931                validator_observations: Vec::new(),
5932            }
5933        }
5934        #[doc(hidden)]
5935        pub fn default_instance() -> &'static Self {
5936            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
5937            &DEFAULT
5938        }
5939        ///Sets `kind` with the provided value.
5940        pub fn with_kind<
5941            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
5942        >(mut self, field: T) -> Self {
5943            self.set_kind(field.into());
5944            self
5945        }
5946        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
5947        pub fn move_entry_point(&self) -> &super::MoveCall {
5948            self.move_entry_point
5949                .as_ref()
5950                .map(|field| field as _)
5951                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
5952        }
5953        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5954        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
5955            self.move_entry_point.as_mut().map(|field| field as _)
5956        }
5957        ///Returns a mutable reference to `move_entry_point`.
5958        ///If the field is unset, it is first initialized with the default value.
5959        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
5960            self.move_entry_point.get_or_insert_default()
5961        }
5962        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
5963        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
5964            self.move_entry_point.as_ref().map(|field| field as _)
5965        }
5966        ///Sets `move_entry_point` with the provided value.
5967        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
5968            self.move_entry_point = Some(field.into().into());
5969        }
5970        ///Sets `move_entry_point` with the provided value.
5971        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
5972            mut self,
5973            field: T,
5974        ) -> Self {
5975            self.set_move_entry_point(field.into());
5976            self
5977        }
5978        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
5979        pub fn validator_observations(
5980            &self,
5981        ) -> &[super::ValidatorExecutionTimeObservation] {
5982            &self.validator_observations
5983        }
5984        ///Returns a mutable reference to `validator_observations`.
5985        ///If the field is unset, it is first initialized with the default value.
5986        pub fn validator_observations_mut(
5987            &mut self,
5988        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
5989            &mut self.validator_observations
5990        }
5991        ///Sets `validator_observations` with the provided value.
5992        pub fn set_validator_observations(
5993            &mut self,
5994            field: Vec<super::ValidatorExecutionTimeObservation>,
5995        ) {
5996            self.validator_observations = field;
5997        }
5998        ///Sets `validator_observations` with the provided value.
5999        pub fn with_validator_observations(
6000            mut self,
6001            field: Vec<super::ValidatorExecutionTimeObservation>,
6002        ) -> Self {
6003            self.set_validator_observations(field);
6004            self
6005        }
6006    }
6007    impl super::ExecutionTimeObservations {
6008        pub const fn const_default() -> Self {
6009            Self {
6010                version: None,
6011                observations: Vec::new(),
6012            }
6013        }
6014        #[doc(hidden)]
6015        pub fn default_instance() -> &'static Self {
6016            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6017            &DEFAULT
6018        }
6019        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6020        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6021            self.version.as_mut().map(|field| field as _)
6022        }
6023        ///Returns a mutable reference to `version`.
6024        ///If the field is unset, it is first initialized with the default value.
6025        pub fn version_mut(&mut self) -> &mut i32 {
6026            self.version.get_or_insert_default()
6027        }
6028        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6029        pub fn version_opt(&self) -> Option<i32> {
6030            self.version.as_ref().map(|field| *field)
6031        }
6032        ///Sets `version` with the provided value.
6033        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
6034            self.version = Some(field.into().into());
6035        }
6036        ///Sets `version` with the provided value.
6037        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
6038            self.set_version(field.into());
6039            self
6040        }
6041        ///Returns the value of `observations`, or the default value if `observations` is unset.
6042        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6043            &self.observations
6044        }
6045        ///Returns a mutable reference to `observations`.
6046        ///If the field is unset, it is first initialized with the default value.
6047        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6048            &mut self.observations
6049        }
6050        ///Sets `observations` with the provided value.
6051        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6052            self.observations = field;
6053        }
6054        ///Sets `observations` with the provided value.
6055        pub fn with_observations(
6056            mut self,
6057            field: Vec<super::ExecutionTimeObservation>,
6058        ) -> Self {
6059            self.set_observations(field);
6060            self
6061        }
6062    }
6063    impl super::FieldDescriptor {
6064        pub const fn const_default() -> Self {
6065            Self {
6066                name: None,
6067                position: None,
6068                r#type: None,
6069            }
6070        }
6071        #[doc(hidden)]
6072        pub fn default_instance() -> &'static Self {
6073            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6074            &DEFAULT
6075        }
6076        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6077        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6078            self.name.as_mut().map(|field| field as _)
6079        }
6080        ///Returns a mutable reference to `name`.
6081        ///If the field is unset, it is first initialized with the default value.
6082        pub fn name_mut(&mut self) -> &mut String {
6083            self.name.get_or_insert_default()
6084        }
6085        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6086        pub fn name_opt(&self) -> Option<&str> {
6087            self.name.as_ref().map(|field| field as _)
6088        }
6089        ///Sets `name` with the provided value.
6090        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6091            self.name = Some(field.into().into());
6092        }
6093        ///Sets `name` with the provided value.
6094        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6095            self.set_name(field.into());
6096            self
6097        }
6098        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6099        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6100            self.position.as_mut().map(|field| field as _)
6101        }
6102        ///Returns a mutable reference to `position`.
6103        ///If the field is unset, it is first initialized with the default value.
6104        pub fn position_mut(&mut self) -> &mut u32 {
6105            self.position.get_or_insert_default()
6106        }
6107        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6108        pub fn position_opt(&self) -> Option<u32> {
6109            self.position.as_ref().map(|field| *field)
6110        }
6111        ///Sets `position` with the provided value.
6112        pub fn set_position<T: Into<u32>>(&mut self, field: T) {
6113            self.position = Some(field.into().into());
6114        }
6115        ///Sets `position` with the provided value.
6116        pub fn with_position<T: Into<u32>>(mut self, field: T) -> Self {
6117            self.set_position(field.into());
6118            self
6119        }
6120        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6121        pub fn r#type(&self) -> &super::OpenSignatureBody {
6122            self.r#type
6123                .as_ref()
6124                .map(|field| field as _)
6125                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6126        }
6127        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6128        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6129            self.r#type.as_mut().map(|field| field as _)
6130        }
6131        ///Returns a mutable reference to `r#type`.
6132        ///If the field is unset, it is first initialized with the default value.
6133        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6134            self.r#type.get_or_insert_default()
6135        }
6136        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6137        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6138            self.r#type.as_ref().map(|field| field as _)
6139        }
6140        ///Sets `r#type` with the provided value.
6141        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6142            self.r#type = Some(field.into().into());
6143        }
6144        ///Sets `r#type` with the provided value.
6145        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6146            self.set_type(field.into());
6147            self
6148        }
6149    }
6150    impl super::FunctionDescriptor {
6151        pub const fn const_default() -> Self {
6152            Self {
6153                name: None,
6154                visibility: None,
6155                is_entry: None,
6156                type_parameters: Vec::new(),
6157                parameters: Vec::new(),
6158                returns: Vec::new(),
6159            }
6160        }
6161        #[doc(hidden)]
6162        pub fn default_instance() -> &'static Self {
6163            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6164            &DEFAULT
6165        }
6166        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6167        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6168            self.name.as_mut().map(|field| field as _)
6169        }
6170        ///Returns a mutable reference to `name`.
6171        ///If the field is unset, it is first initialized with the default value.
6172        pub fn name_mut(&mut self) -> &mut String {
6173            self.name.get_or_insert_default()
6174        }
6175        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6176        pub fn name_opt(&self) -> Option<&str> {
6177            self.name.as_ref().map(|field| field as _)
6178        }
6179        ///Sets `name` with the provided value.
6180        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6181            self.name = Some(field.into().into());
6182        }
6183        ///Sets `name` with the provided value.
6184        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6185            self.set_name(field.into());
6186            self
6187        }
6188        ///Sets `visibility` with the provided value.
6189        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6190            mut self,
6191            field: T,
6192        ) -> Self {
6193            self.set_visibility(field.into());
6194            self
6195        }
6196        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6197        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6198            self.is_entry.as_mut().map(|field| field as _)
6199        }
6200        ///Returns a mutable reference to `is_entry`.
6201        ///If the field is unset, it is first initialized with the default value.
6202        pub fn is_entry_mut(&mut self) -> &mut bool {
6203            self.is_entry.get_or_insert_default()
6204        }
6205        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6206        pub fn is_entry_opt(&self) -> Option<bool> {
6207            self.is_entry.as_ref().map(|field| *field)
6208        }
6209        ///Sets `is_entry` with the provided value.
6210        pub fn set_is_entry<T: Into<bool>>(&mut self, field: T) {
6211            self.is_entry = Some(field.into().into());
6212        }
6213        ///Sets `is_entry` with the provided value.
6214        pub fn with_is_entry<T: Into<bool>>(mut self, field: T) -> Self {
6215            self.set_is_entry(field.into());
6216            self
6217        }
6218        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6219        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6220            &self.type_parameters
6221        }
6222        ///Returns a mutable reference to `type_parameters`.
6223        ///If the field is unset, it is first initialized with the default value.
6224        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6225            &mut self.type_parameters
6226        }
6227        ///Sets `type_parameters` with the provided value.
6228        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6229            self.type_parameters = field;
6230        }
6231        ///Sets `type_parameters` with the provided value.
6232        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6233            self.set_type_parameters(field);
6234            self
6235        }
6236        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6237        pub fn parameters(&self) -> &[super::OpenSignature] {
6238            &self.parameters
6239        }
6240        ///Returns a mutable reference to `parameters`.
6241        ///If the field is unset, it is first initialized with the default value.
6242        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6243            &mut self.parameters
6244        }
6245        ///Sets `parameters` with the provided value.
6246        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6247            self.parameters = field;
6248        }
6249        ///Sets `parameters` with the provided value.
6250        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6251            self.set_parameters(field);
6252            self
6253        }
6254        ///Returns the value of `returns`, or the default value if `returns` is unset.
6255        pub fn returns(&self) -> &[super::OpenSignature] {
6256            &self.returns
6257        }
6258        ///Returns a mutable reference to `returns`.
6259        ///If the field is unset, it is first initialized with the default value.
6260        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6261            &mut self.returns
6262        }
6263        ///Sets `returns` with the provided value.
6264        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6265            self.returns = field;
6266        }
6267        ///Sets `returns` with the provided value.
6268        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6269            self.set_returns(field);
6270            self
6271        }
6272    }
6273    impl super::GasCostSummary {
6274        pub const fn const_default() -> Self {
6275            Self {
6276                computation_cost: None,
6277                storage_cost: None,
6278                storage_rebate: None,
6279                non_refundable_storage_fee: None,
6280            }
6281        }
6282        #[doc(hidden)]
6283        pub fn default_instance() -> &'static Self {
6284            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6285            &DEFAULT
6286        }
6287        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6288        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6289            self.computation_cost.as_mut().map(|field| field as _)
6290        }
6291        ///Returns a mutable reference to `computation_cost`.
6292        ///If the field is unset, it is first initialized with the default value.
6293        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6294            self.computation_cost.get_or_insert_default()
6295        }
6296        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6297        pub fn computation_cost_opt(&self) -> Option<u64> {
6298            self.computation_cost.as_ref().map(|field| *field)
6299        }
6300        ///Sets `computation_cost` with the provided value.
6301        pub fn set_computation_cost<T: Into<u64>>(&mut self, field: T) {
6302            self.computation_cost = Some(field.into().into());
6303        }
6304        ///Sets `computation_cost` with the provided value.
6305        pub fn with_computation_cost<T: Into<u64>>(mut self, field: T) -> Self {
6306            self.set_computation_cost(field.into());
6307            self
6308        }
6309        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6310        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6311            self.storage_cost.as_mut().map(|field| field as _)
6312        }
6313        ///Returns a mutable reference to `storage_cost`.
6314        ///If the field is unset, it is first initialized with the default value.
6315        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6316            self.storage_cost.get_or_insert_default()
6317        }
6318        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6319        pub fn storage_cost_opt(&self) -> Option<u64> {
6320            self.storage_cost.as_ref().map(|field| *field)
6321        }
6322        ///Sets `storage_cost` with the provided value.
6323        pub fn set_storage_cost<T: Into<u64>>(&mut self, field: T) {
6324            self.storage_cost = Some(field.into().into());
6325        }
6326        ///Sets `storage_cost` with the provided value.
6327        pub fn with_storage_cost<T: Into<u64>>(mut self, field: T) -> Self {
6328            self.set_storage_cost(field.into());
6329            self
6330        }
6331        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6332        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6333            self.storage_rebate.as_mut().map(|field| field as _)
6334        }
6335        ///Returns a mutable reference to `storage_rebate`.
6336        ///If the field is unset, it is first initialized with the default value.
6337        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6338            self.storage_rebate.get_or_insert_default()
6339        }
6340        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6341        pub fn storage_rebate_opt(&self) -> Option<u64> {
6342            self.storage_rebate.as_ref().map(|field| *field)
6343        }
6344        ///Sets `storage_rebate` with the provided value.
6345        pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
6346            self.storage_rebate = Some(field.into().into());
6347        }
6348        ///Sets `storage_rebate` with the provided value.
6349        pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
6350            self.set_storage_rebate(field.into());
6351            self
6352        }
6353        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6354        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6355            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6356        }
6357        ///Returns a mutable reference to `non_refundable_storage_fee`.
6358        ///If the field is unset, it is first initialized with the default value.
6359        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6360            self.non_refundable_storage_fee.get_or_insert_default()
6361        }
6362        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6363        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6364            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6365        }
6366        ///Sets `non_refundable_storage_fee` with the provided value.
6367        pub fn set_non_refundable_storage_fee<T: Into<u64>>(&mut self, field: T) {
6368            self.non_refundable_storage_fee = Some(field.into().into());
6369        }
6370        ///Sets `non_refundable_storage_fee` with the provided value.
6371        pub fn with_non_refundable_storage_fee<T: Into<u64>>(
6372            mut self,
6373            field: T,
6374        ) -> Self {
6375            self.set_non_refundable_storage_fee(field.into());
6376            self
6377        }
6378    }
6379    impl super::GasPayment {
6380        pub const fn const_default() -> Self {
6381            Self {
6382                objects: Vec::new(),
6383                owner: None,
6384                price: None,
6385                budget: None,
6386            }
6387        }
6388        #[doc(hidden)]
6389        pub fn default_instance() -> &'static Self {
6390            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6391            &DEFAULT
6392        }
6393        ///Returns the value of `objects`, or the default value if `objects` is unset.
6394        pub fn objects(&self) -> &[super::ObjectReference] {
6395            &self.objects
6396        }
6397        ///Returns a mutable reference to `objects`.
6398        ///If the field is unset, it is first initialized with the default value.
6399        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6400            &mut self.objects
6401        }
6402        ///Sets `objects` with the provided value.
6403        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6404            self.objects = field;
6405        }
6406        ///Sets `objects` with the provided value.
6407        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6408            self.set_objects(field);
6409            self
6410        }
6411        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6412        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6413            self.owner.as_mut().map(|field| field as _)
6414        }
6415        ///Returns a mutable reference to `owner`.
6416        ///If the field is unset, it is first initialized with the default value.
6417        pub fn owner_mut(&mut self) -> &mut String {
6418            self.owner.get_or_insert_default()
6419        }
6420        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6421        pub fn owner_opt(&self) -> Option<&str> {
6422            self.owner.as_ref().map(|field| field as _)
6423        }
6424        ///Sets `owner` with the provided value.
6425        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6426            self.owner = Some(field.into().into());
6427        }
6428        ///Sets `owner` with the provided value.
6429        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6430            self.set_owner(field.into());
6431            self
6432        }
6433        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6434        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6435            self.price.as_mut().map(|field| field as _)
6436        }
6437        ///Returns a mutable reference to `price`.
6438        ///If the field is unset, it is first initialized with the default value.
6439        pub fn price_mut(&mut self) -> &mut u64 {
6440            self.price.get_or_insert_default()
6441        }
6442        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6443        pub fn price_opt(&self) -> Option<u64> {
6444            self.price.as_ref().map(|field| *field)
6445        }
6446        ///Sets `price` with the provided value.
6447        pub fn set_price<T: Into<u64>>(&mut self, field: T) {
6448            self.price = Some(field.into().into());
6449        }
6450        ///Sets `price` with the provided value.
6451        pub fn with_price<T: Into<u64>>(mut self, field: T) -> Self {
6452            self.set_price(field.into());
6453            self
6454        }
6455        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6456        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6457            self.budget.as_mut().map(|field| field as _)
6458        }
6459        ///Returns a mutable reference to `budget`.
6460        ///If the field is unset, it is first initialized with the default value.
6461        pub fn budget_mut(&mut self) -> &mut u64 {
6462            self.budget.get_or_insert_default()
6463        }
6464        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6465        pub fn budget_opt(&self) -> Option<u64> {
6466            self.budget.as_ref().map(|field| *field)
6467        }
6468        ///Sets `budget` with the provided value.
6469        pub fn set_budget<T: Into<u64>>(&mut self, field: T) {
6470            self.budget = Some(field.into().into());
6471        }
6472        ///Sets `budget` with the provided value.
6473        pub fn with_budget<T: Into<u64>>(mut self, field: T) -> Self {
6474            self.set_budget(field.into());
6475            self
6476        }
6477    }
6478    impl super::GenesisTransaction {
6479        pub const fn const_default() -> Self {
6480            Self { objects: Vec::new() }
6481        }
6482        #[doc(hidden)]
6483        pub fn default_instance() -> &'static Self {
6484            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6485            &DEFAULT
6486        }
6487        ///Returns the value of `objects`, or the default value if `objects` is unset.
6488        pub fn objects(&self) -> &[super::Object] {
6489            &self.objects
6490        }
6491        ///Returns a mutable reference to `objects`.
6492        ///If the field is unset, it is first initialized with the default value.
6493        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6494            &mut self.objects
6495        }
6496        ///Sets `objects` with the provided value.
6497        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6498            self.objects = field;
6499        }
6500        ///Sets `objects` with the provided value.
6501        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6502            self.set_objects(field);
6503            self
6504        }
6505    }
6506    impl super::GetBalanceRequest {
6507        pub const fn const_default() -> Self {
6508            Self {
6509                owner: None,
6510                coin_type: None,
6511            }
6512        }
6513        #[doc(hidden)]
6514        pub fn default_instance() -> &'static Self {
6515            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6516            &DEFAULT
6517        }
6518        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6519        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6520            self.owner.as_mut().map(|field| field as _)
6521        }
6522        ///Returns a mutable reference to `owner`.
6523        ///If the field is unset, it is first initialized with the default value.
6524        pub fn owner_mut(&mut self) -> &mut String {
6525            self.owner.get_or_insert_default()
6526        }
6527        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6528        pub fn owner_opt(&self) -> Option<&str> {
6529            self.owner.as_ref().map(|field| field as _)
6530        }
6531        ///Sets `owner` with the provided value.
6532        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6533            self.owner = Some(field.into().into());
6534        }
6535        ///Sets `owner` with the provided value.
6536        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6537            self.set_owner(field.into());
6538            self
6539        }
6540        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6541        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6542            self.coin_type.as_mut().map(|field| field as _)
6543        }
6544        ///Returns a mutable reference to `coin_type`.
6545        ///If the field is unset, it is first initialized with the default value.
6546        pub fn coin_type_mut(&mut self) -> &mut String {
6547            self.coin_type.get_or_insert_default()
6548        }
6549        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6550        pub fn coin_type_opt(&self) -> Option<&str> {
6551            self.coin_type.as_ref().map(|field| field as _)
6552        }
6553        ///Sets `coin_type` with the provided value.
6554        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6555            self.coin_type = Some(field.into().into());
6556        }
6557        ///Sets `coin_type` with the provided value.
6558        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6559            self.set_coin_type(field.into());
6560            self
6561        }
6562    }
6563    impl super::GetBalanceResponse {
6564        pub const fn const_default() -> Self {
6565            Self { balance: None }
6566        }
6567        #[doc(hidden)]
6568        pub fn default_instance() -> &'static Self {
6569            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6570            &DEFAULT
6571        }
6572        ///Returns the value of `balance`, or the default value if `balance` is unset.
6573        pub fn balance(&self) -> &super::Balance {
6574            self.balance
6575                .as_ref()
6576                .map(|field| field as _)
6577                .unwrap_or_else(|| super::Balance::default_instance() as _)
6578        }
6579        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6580        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6581            self.balance.as_mut().map(|field| field as _)
6582        }
6583        ///Returns a mutable reference to `balance`.
6584        ///If the field is unset, it is first initialized with the default value.
6585        pub fn balance_mut(&mut self) -> &mut super::Balance {
6586            self.balance.get_or_insert_default()
6587        }
6588        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
6589        pub fn balance_opt(&self) -> Option<&super::Balance> {
6590            self.balance.as_ref().map(|field| field as _)
6591        }
6592        ///Sets `balance` with the provided value.
6593        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6594            self.balance = Some(field.into().into());
6595        }
6596        ///Sets `balance` with the provided value.
6597        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6598            self.set_balance(field.into());
6599            self
6600        }
6601    }
6602    impl super::GetCheckpointRequest {
6603        pub const fn const_default() -> Self {
6604            Self {
6605                read_mask: None,
6606                checkpoint_id: None,
6607            }
6608        }
6609        #[doc(hidden)]
6610        pub fn default_instance() -> &'static Self {
6611            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6612            &DEFAULT
6613        }
6614        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6615        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6616            self.read_mask.as_mut().map(|field| field as _)
6617        }
6618        ///Returns a mutable reference to `read_mask`.
6619        ///If the field is unset, it is first initialized with the default value.
6620        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6621            self.read_mask.get_or_insert_default()
6622        }
6623        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6624        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6625            self.read_mask.as_ref().map(|field| field as _)
6626        }
6627        ///Sets `read_mask` with the provided value.
6628        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6629            self.read_mask = Some(field.into().into());
6630        }
6631        ///Sets `read_mask` with the provided value.
6632        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6633            mut self,
6634            field: T,
6635        ) -> Self {
6636            self.set_read_mask(field.into());
6637            self
6638        }
6639        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
6640        pub fn sequence_number(&self) -> u64 {
6641            if let Some(
6642                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6643            ) = &self.checkpoint_id
6644            {
6645                *field
6646            } else {
6647                0u64
6648            }
6649        }
6650        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
6651        pub fn sequence_number_opt(&self) -> Option<u64> {
6652            if let Some(
6653                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6654            ) = &self.checkpoint_id
6655            {
6656                Some(*field)
6657            } else {
6658                None
6659            }
6660        }
6661        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6662        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6663            if let Some(
6664                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6665            ) = &mut self.checkpoint_id
6666            {
6667                Some(field as _)
6668            } else {
6669                None
6670            }
6671        }
6672        ///Returns a mutable reference to `sequence_number`.
6673        ///If the field is unset, it is first initialized with the default value.
6674        ///If any other oneof field in the same oneof is set, it will be cleared.
6675        pub fn sequence_number_mut(&mut self) -> &mut u64 {
6676            if self.sequence_number_opt_mut().is_none() {
6677                self.checkpoint_id = Some(
6678                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
6679                        u64::default(),
6680                    ),
6681                );
6682            }
6683            self.sequence_number_opt_mut().unwrap()
6684        }
6685        ///Sets `sequence_number` with the provided value.
6686        ///If any other oneof field in the same oneof is set, it will be cleared.
6687        pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
6688            self.checkpoint_id = Some(
6689                super::get_checkpoint_request::CheckpointId::SequenceNumber(
6690                    field.into().into(),
6691                ),
6692            );
6693        }
6694        ///Sets `sequence_number` with the provided value.
6695        ///If any other oneof field in the same oneof is set, it will be cleared.
6696        pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
6697            self.set_sequence_number(field.into());
6698            self
6699        }
6700        ///Returns the value of `digest`, or the default value if `digest` is unset.
6701        pub fn digest(&self) -> &str {
6702            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6703                .checkpoint_id
6704            {
6705                field as _
6706            } else {
6707                ""
6708            }
6709        }
6710        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6711        pub fn digest_opt(&self) -> Option<&str> {
6712            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6713                .checkpoint_id
6714            {
6715                Some(field as _)
6716            } else {
6717                None
6718            }
6719        }
6720        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6721        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6722            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6723                .checkpoint_id
6724            {
6725                Some(field as _)
6726            } else {
6727                None
6728            }
6729        }
6730        ///Returns a mutable reference to `digest`.
6731        ///If the field is unset, it is first initialized with the default value.
6732        ///If any other oneof field in the same oneof is set, it will be cleared.
6733        pub fn digest_mut(&mut self) -> &mut String {
6734            if self.digest_opt_mut().is_none() {
6735                self.checkpoint_id = Some(
6736                    super::get_checkpoint_request::CheckpointId::Digest(
6737                        String::default(),
6738                    ),
6739                );
6740            }
6741            self.digest_opt_mut().unwrap()
6742        }
6743        ///Sets `digest` with the provided value.
6744        ///If any other oneof field in the same oneof is set, it will be cleared.
6745        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6746            self.checkpoint_id = Some(
6747                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
6748            );
6749        }
6750        ///Sets `digest` with the provided value.
6751        ///If any other oneof field in the same oneof is set, it will be cleared.
6752        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6753            self.set_digest(field.into());
6754            self
6755        }
6756    }
6757    impl super::GetCheckpointResponse {
6758        pub const fn const_default() -> Self {
6759            Self { checkpoint: None }
6760        }
6761        #[doc(hidden)]
6762        pub fn default_instance() -> &'static Self {
6763            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
6764            &DEFAULT
6765        }
6766        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
6767        pub fn checkpoint(&self) -> &super::Checkpoint {
6768            self.checkpoint
6769                .as_ref()
6770                .map(|field| field as _)
6771                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
6772        }
6773        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6774        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
6775            self.checkpoint.as_mut().map(|field| field as _)
6776        }
6777        ///Returns a mutable reference to `checkpoint`.
6778        ///If the field is unset, it is first initialized with the default value.
6779        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
6780            self.checkpoint.get_or_insert_default()
6781        }
6782        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
6783        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
6784            self.checkpoint.as_ref().map(|field| field as _)
6785        }
6786        ///Sets `checkpoint` with the provided value.
6787        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
6788            self.checkpoint = Some(field.into().into());
6789        }
6790        ///Sets `checkpoint` with the provided value.
6791        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
6792            self.set_checkpoint(field.into());
6793            self
6794        }
6795    }
6796    impl super::GetCoinInfoRequest {
6797        pub const fn const_default() -> Self {
6798            Self { coin_type: None }
6799        }
6800        #[doc(hidden)]
6801        pub fn default_instance() -> &'static Self {
6802            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
6803            &DEFAULT
6804        }
6805        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6806        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6807            self.coin_type.as_mut().map(|field| field as _)
6808        }
6809        ///Returns a mutable reference to `coin_type`.
6810        ///If the field is unset, it is first initialized with the default value.
6811        pub fn coin_type_mut(&mut self) -> &mut String {
6812            self.coin_type.get_or_insert_default()
6813        }
6814        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6815        pub fn coin_type_opt(&self) -> Option<&str> {
6816            self.coin_type.as_ref().map(|field| field as _)
6817        }
6818        ///Sets `coin_type` with the provided value.
6819        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6820            self.coin_type = Some(field.into().into());
6821        }
6822        ///Sets `coin_type` with the provided value.
6823        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6824            self.set_coin_type(field.into());
6825            self
6826        }
6827    }
6828    impl super::GetCoinInfoResponse {
6829        pub const fn const_default() -> Self {
6830            Self {
6831                coin_type: None,
6832                metadata: None,
6833                treasury: None,
6834                regulated_metadata: None,
6835            }
6836        }
6837        #[doc(hidden)]
6838        pub fn default_instance() -> &'static Self {
6839            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
6840            &DEFAULT
6841        }
6842        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6843        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6844            self.coin_type.as_mut().map(|field| field as _)
6845        }
6846        ///Returns a mutable reference to `coin_type`.
6847        ///If the field is unset, it is first initialized with the default value.
6848        pub fn coin_type_mut(&mut self) -> &mut String {
6849            self.coin_type.get_or_insert_default()
6850        }
6851        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6852        pub fn coin_type_opt(&self) -> Option<&str> {
6853            self.coin_type.as_ref().map(|field| field as _)
6854        }
6855        ///Sets `coin_type` with the provided value.
6856        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6857            self.coin_type = Some(field.into().into());
6858        }
6859        ///Sets `coin_type` with the provided value.
6860        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6861            self.set_coin_type(field.into());
6862            self
6863        }
6864        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
6865        pub fn metadata(&self) -> &super::CoinMetadata {
6866            self.metadata
6867                .as_ref()
6868                .map(|field| field as _)
6869                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
6870        }
6871        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6872        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
6873            self.metadata.as_mut().map(|field| field as _)
6874        }
6875        ///Returns a mutable reference to `metadata`.
6876        ///If the field is unset, it is first initialized with the default value.
6877        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
6878            self.metadata.get_or_insert_default()
6879        }
6880        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
6881        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
6882            self.metadata.as_ref().map(|field| field as _)
6883        }
6884        ///Sets `metadata` with the provided value.
6885        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
6886            self.metadata = Some(field.into().into());
6887        }
6888        ///Sets `metadata` with the provided value.
6889        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
6890            self.set_metadata(field.into());
6891            self
6892        }
6893        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
6894        pub fn treasury(&self) -> &super::CoinTreasury {
6895            self.treasury
6896                .as_ref()
6897                .map(|field| field as _)
6898                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
6899        }
6900        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6901        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
6902            self.treasury.as_mut().map(|field| field as _)
6903        }
6904        ///Returns a mutable reference to `treasury`.
6905        ///If the field is unset, it is first initialized with the default value.
6906        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
6907            self.treasury.get_or_insert_default()
6908        }
6909        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
6910        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
6911            self.treasury.as_ref().map(|field| field as _)
6912        }
6913        ///Sets `treasury` with the provided value.
6914        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
6915            self.treasury = Some(field.into().into());
6916        }
6917        ///Sets `treasury` with the provided value.
6918        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
6919            self.set_treasury(field.into());
6920            self
6921        }
6922        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
6923        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
6924            self.regulated_metadata
6925                .as_ref()
6926                .map(|field| field as _)
6927                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
6928        }
6929        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6930        pub fn regulated_metadata_opt_mut(
6931            &mut self,
6932        ) -> Option<&mut super::RegulatedCoinMetadata> {
6933            self.regulated_metadata.as_mut().map(|field| field as _)
6934        }
6935        ///Returns a mutable reference to `regulated_metadata`.
6936        ///If the field is unset, it is first initialized with the default value.
6937        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
6938            self.regulated_metadata.get_or_insert_default()
6939        }
6940        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
6941        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
6942            self.regulated_metadata.as_ref().map(|field| field as _)
6943        }
6944        ///Sets `regulated_metadata` with the provided value.
6945        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6946            &mut self,
6947            field: T,
6948        ) {
6949            self.regulated_metadata = Some(field.into().into());
6950        }
6951        ///Sets `regulated_metadata` with the provided value.
6952        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6953            mut self,
6954            field: T,
6955        ) -> Self {
6956            self.set_regulated_metadata(field.into());
6957            self
6958        }
6959    }
6960    impl super::GetDatatypeRequest {
6961        pub const fn const_default() -> Self {
6962            Self {
6963                package_id: None,
6964                module_name: None,
6965                name: None,
6966            }
6967        }
6968        #[doc(hidden)]
6969        pub fn default_instance() -> &'static Self {
6970            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
6971            &DEFAULT
6972        }
6973        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6974        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
6975            self.package_id.as_mut().map(|field| field as _)
6976        }
6977        ///Returns a mutable reference to `package_id`.
6978        ///If the field is unset, it is first initialized with the default value.
6979        pub fn package_id_mut(&mut self) -> &mut String {
6980            self.package_id.get_or_insert_default()
6981        }
6982        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6983        pub fn package_id_opt(&self) -> Option<&str> {
6984            self.package_id.as_ref().map(|field| field as _)
6985        }
6986        ///Sets `package_id` with the provided value.
6987        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
6988            self.package_id = Some(field.into().into());
6989        }
6990        ///Sets `package_id` with the provided value.
6991        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
6992            self.set_package_id(field.into());
6993            self
6994        }
6995        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6996        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
6997            self.module_name.as_mut().map(|field| field as _)
6998        }
6999        ///Returns a mutable reference to `module_name`.
7000        ///If the field is unset, it is first initialized with the default value.
7001        pub fn module_name_mut(&mut self) -> &mut String {
7002            self.module_name.get_or_insert_default()
7003        }
7004        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7005        pub fn module_name_opt(&self) -> Option<&str> {
7006            self.module_name.as_ref().map(|field| field as _)
7007        }
7008        ///Sets `module_name` with the provided value.
7009        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7010            self.module_name = Some(field.into().into());
7011        }
7012        ///Sets `module_name` with the provided value.
7013        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7014            self.set_module_name(field.into());
7015            self
7016        }
7017        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7018        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7019            self.name.as_mut().map(|field| field as _)
7020        }
7021        ///Returns a mutable reference to `name`.
7022        ///If the field is unset, it is first initialized with the default value.
7023        pub fn name_mut(&mut self) -> &mut String {
7024            self.name.get_or_insert_default()
7025        }
7026        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7027        pub fn name_opt(&self) -> Option<&str> {
7028            self.name.as_ref().map(|field| field as _)
7029        }
7030        ///Sets `name` with the provided value.
7031        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7032            self.name = Some(field.into().into());
7033        }
7034        ///Sets `name` with the provided value.
7035        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7036            self.set_name(field.into());
7037            self
7038        }
7039    }
7040    impl super::GetDatatypeResponse {
7041        pub const fn const_default() -> Self {
7042            Self { datatype: None }
7043        }
7044        #[doc(hidden)]
7045        pub fn default_instance() -> &'static Self {
7046            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7047            &DEFAULT
7048        }
7049        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7050        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7051            self.datatype
7052                .as_ref()
7053                .map(|field| field as _)
7054                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7055        }
7056        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7057        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7058            self.datatype.as_mut().map(|field| field as _)
7059        }
7060        ///Returns a mutable reference to `datatype`.
7061        ///If the field is unset, it is first initialized with the default value.
7062        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7063            self.datatype.get_or_insert_default()
7064        }
7065        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7066        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7067            self.datatype.as_ref().map(|field| field as _)
7068        }
7069        ///Sets `datatype` with the provided value.
7070        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7071            self.datatype = Some(field.into().into());
7072        }
7073        ///Sets `datatype` with the provided value.
7074        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7075            mut self,
7076            field: T,
7077        ) -> Self {
7078            self.set_datatype(field.into());
7079            self
7080        }
7081    }
7082    impl super::GetEpochRequest {
7083        pub const fn const_default() -> Self {
7084            Self {
7085                epoch: None,
7086                read_mask: None,
7087            }
7088        }
7089        #[doc(hidden)]
7090        pub fn default_instance() -> &'static Self {
7091            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7092            &DEFAULT
7093        }
7094        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7095        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7096            self.epoch.as_mut().map(|field| field as _)
7097        }
7098        ///Returns a mutable reference to `epoch`.
7099        ///If the field is unset, it is first initialized with the default value.
7100        pub fn epoch_mut(&mut self) -> &mut u64 {
7101            self.epoch.get_or_insert_default()
7102        }
7103        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7104        pub fn epoch_opt(&self) -> Option<u64> {
7105            self.epoch.as_ref().map(|field| *field)
7106        }
7107        ///Sets `epoch` with the provided value.
7108        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
7109            self.epoch = Some(field.into().into());
7110        }
7111        ///Sets `epoch` with the provided value.
7112        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
7113            self.set_epoch(field.into());
7114            self
7115        }
7116        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7117        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7118            self.read_mask.as_mut().map(|field| field as _)
7119        }
7120        ///Returns a mutable reference to `read_mask`.
7121        ///If the field is unset, it is first initialized with the default value.
7122        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7123            self.read_mask.get_or_insert_default()
7124        }
7125        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7126        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7127            self.read_mask.as_ref().map(|field| field as _)
7128        }
7129        ///Sets `read_mask` with the provided value.
7130        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7131            self.read_mask = Some(field.into().into());
7132        }
7133        ///Sets `read_mask` with the provided value.
7134        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7135            mut self,
7136            field: T,
7137        ) -> Self {
7138            self.set_read_mask(field.into());
7139            self
7140        }
7141    }
7142    impl super::GetEpochResponse {
7143        pub const fn const_default() -> Self {
7144            Self { epoch: None }
7145        }
7146        #[doc(hidden)]
7147        pub fn default_instance() -> &'static Self {
7148            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7149            &DEFAULT
7150        }
7151        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7152        pub fn epoch(&self) -> &super::Epoch {
7153            self.epoch
7154                .as_ref()
7155                .map(|field| field as _)
7156                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7157        }
7158        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7159        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7160            self.epoch.as_mut().map(|field| field as _)
7161        }
7162        ///Returns a mutable reference to `epoch`.
7163        ///If the field is unset, it is first initialized with the default value.
7164        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7165            self.epoch.get_or_insert_default()
7166        }
7167        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7168        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7169            self.epoch.as_ref().map(|field| field as _)
7170        }
7171        ///Sets `epoch` with the provided value.
7172        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7173            self.epoch = Some(field.into().into());
7174        }
7175        ///Sets `epoch` with the provided value.
7176        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7177            self.set_epoch(field.into());
7178            self
7179        }
7180    }
7181    impl super::GetFunctionRequest {
7182        pub const fn const_default() -> Self {
7183            Self {
7184                package_id: None,
7185                module_name: None,
7186                name: None,
7187            }
7188        }
7189        #[doc(hidden)]
7190        pub fn default_instance() -> &'static Self {
7191            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7192            &DEFAULT
7193        }
7194        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7195        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7196            self.package_id.as_mut().map(|field| field as _)
7197        }
7198        ///Returns a mutable reference to `package_id`.
7199        ///If the field is unset, it is first initialized with the default value.
7200        pub fn package_id_mut(&mut self) -> &mut String {
7201            self.package_id.get_or_insert_default()
7202        }
7203        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7204        pub fn package_id_opt(&self) -> Option<&str> {
7205            self.package_id.as_ref().map(|field| field as _)
7206        }
7207        ///Sets `package_id` with the provided value.
7208        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7209            self.package_id = Some(field.into().into());
7210        }
7211        ///Sets `package_id` with the provided value.
7212        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7213            self.set_package_id(field.into());
7214            self
7215        }
7216        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7217        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7218            self.module_name.as_mut().map(|field| field as _)
7219        }
7220        ///Returns a mutable reference to `module_name`.
7221        ///If the field is unset, it is first initialized with the default value.
7222        pub fn module_name_mut(&mut self) -> &mut String {
7223            self.module_name.get_or_insert_default()
7224        }
7225        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7226        pub fn module_name_opt(&self) -> Option<&str> {
7227            self.module_name.as_ref().map(|field| field as _)
7228        }
7229        ///Sets `module_name` with the provided value.
7230        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7231            self.module_name = Some(field.into().into());
7232        }
7233        ///Sets `module_name` with the provided value.
7234        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7235            self.set_module_name(field.into());
7236            self
7237        }
7238        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7239        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7240            self.name.as_mut().map(|field| field as _)
7241        }
7242        ///Returns a mutable reference to `name`.
7243        ///If the field is unset, it is first initialized with the default value.
7244        pub fn name_mut(&mut self) -> &mut String {
7245            self.name.get_or_insert_default()
7246        }
7247        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7248        pub fn name_opt(&self) -> Option<&str> {
7249            self.name.as_ref().map(|field| field as _)
7250        }
7251        ///Sets `name` with the provided value.
7252        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7253            self.name = Some(field.into().into());
7254        }
7255        ///Sets `name` with the provided value.
7256        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7257            self.set_name(field.into());
7258            self
7259        }
7260    }
7261    impl super::GetFunctionResponse {
7262        pub const fn const_default() -> Self {
7263            Self { function: None }
7264        }
7265        #[doc(hidden)]
7266        pub fn default_instance() -> &'static Self {
7267            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7268            &DEFAULT
7269        }
7270        ///Returns the value of `function`, or the default value if `function` is unset.
7271        pub fn function(&self) -> &super::FunctionDescriptor {
7272            self.function
7273                .as_ref()
7274                .map(|field| field as _)
7275                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7276        }
7277        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7278        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7279            self.function.as_mut().map(|field| field as _)
7280        }
7281        ///Returns a mutable reference to `function`.
7282        ///If the field is unset, it is first initialized with the default value.
7283        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7284            self.function.get_or_insert_default()
7285        }
7286        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7287        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7288            self.function.as_ref().map(|field| field as _)
7289        }
7290        ///Sets `function` with the provided value.
7291        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7292            self.function = Some(field.into().into());
7293        }
7294        ///Sets `function` with the provided value.
7295        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7296            mut self,
7297            field: T,
7298        ) -> Self {
7299            self.set_function(field.into());
7300            self
7301        }
7302    }
7303    impl super::GetObjectRequest {
7304        pub const fn const_default() -> Self {
7305            Self {
7306                object_id: None,
7307                version: None,
7308                read_mask: None,
7309            }
7310        }
7311        #[doc(hidden)]
7312        pub fn default_instance() -> &'static Self {
7313            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7314            &DEFAULT
7315        }
7316        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7317        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7318            self.object_id.as_mut().map(|field| field as _)
7319        }
7320        ///Returns a mutable reference to `object_id`.
7321        ///If the field is unset, it is first initialized with the default value.
7322        pub fn object_id_mut(&mut self) -> &mut String {
7323            self.object_id.get_or_insert_default()
7324        }
7325        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7326        pub fn object_id_opt(&self) -> Option<&str> {
7327            self.object_id.as_ref().map(|field| field as _)
7328        }
7329        ///Sets `object_id` with the provided value.
7330        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7331            self.object_id = Some(field.into().into());
7332        }
7333        ///Sets `object_id` with the provided value.
7334        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7335            self.set_object_id(field.into());
7336            self
7337        }
7338        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7339        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7340            self.version.as_mut().map(|field| field as _)
7341        }
7342        ///Returns a mutable reference to `version`.
7343        ///If the field is unset, it is first initialized with the default value.
7344        pub fn version_mut(&mut self) -> &mut u64 {
7345            self.version.get_or_insert_default()
7346        }
7347        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7348        pub fn version_opt(&self) -> Option<u64> {
7349            self.version.as_ref().map(|field| *field)
7350        }
7351        ///Sets `version` with the provided value.
7352        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
7353            self.version = Some(field.into().into());
7354        }
7355        ///Sets `version` with the provided value.
7356        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
7357            self.set_version(field.into());
7358            self
7359        }
7360        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7361        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7362            self.read_mask.as_mut().map(|field| field as _)
7363        }
7364        ///Returns a mutable reference to `read_mask`.
7365        ///If the field is unset, it is first initialized with the default value.
7366        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7367            self.read_mask.get_or_insert_default()
7368        }
7369        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7370        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7371            self.read_mask.as_ref().map(|field| field as _)
7372        }
7373        ///Sets `read_mask` with the provided value.
7374        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7375            self.read_mask = Some(field.into().into());
7376        }
7377        ///Sets `read_mask` with the provided value.
7378        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7379            mut self,
7380            field: T,
7381        ) -> Self {
7382            self.set_read_mask(field.into());
7383            self
7384        }
7385    }
7386    impl super::GetObjectResponse {
7387        pub const fn const_default() -> Self {
7388            Self { object: None }
7389        }
7390        #[doc(hidden)]
7391        pub fn default_instance() -> &'static Self {
7392            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7393            &DEFAULT
7394        }
7395        ///Returns the value of `object`, or the default value if `object` is unset.
7396        pub fn object(&self) -> &super::Object {
7397            self.object
7398                .as_ref()
7399                .map(|field| field as _)
7400                .unwrap_or_else(|| super::Object::default_instance() as _)
7401        }
7402        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7403        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7404            self.object.as_mut().map(|field| field as _)
7405        }
7406        ///Returns a mutable reference to `object`.
7407        ///If the field is unset, it is first initialized with the default value.
7408        pub fn object_mut(&mut self) -> &mut super::Object {
7409            self.object.get_or_insert_default()
7410        }
7411        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7412        pub fn object_opt(&self) -> Option<&super::Object> {
7413            self.object.as_ref().map(|field| field as _)
7414        }
7415        ///Sets `object` with the provided value.
7416        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7417            self.object = Some(field.into().into());
7418        }
7419        ///Sets `object` with the provided value.
7420        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7421            self.set_object(field.into());
7422            self
7423        }
7424    }
7425    impl super::GetObjectResult {
7426        pub const fn const_default() -> Self {
7427            Self { result: None }
7428        }
7429        #[doc(hidden)]
7430        pub fn default_instance() -> &'static Self {
7431            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7432            &DEFAULT
7433        }
7434        ///Returns the value of `object`, or the default value if `object` is unset.
7435        pub fn object(&self) -> &super::Object {
7436            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7437                field as _
7438            } else {
7439                super::Object::default_instance() as _
7440            }
7441        }
7442        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7443        pub fn object_opt(&self) -> Option<&super::Object> {
7444            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7445                Some(field as _)
7446            } else {
7447                None
7448            }
7449        }
7450        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7451        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7452            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7453                .result
7454            {
7455                Some(field as _)
7456            } else {
7457                None
7458            }
7459        }
7460        ///Returns a mutable reference to `object`.
7461        ///If the field is unset, it is first initialized with the default value.
7462        ///If any other oneof field in the same oneof is set, it will be cleared.
7463        pub fn object_mut(&mut self) -> &mut super::Object {
7464            if self.object_opt_mut().is_none() {
7465                self.result = Some(
7466                    super::get_object_result::Result::Object(super::Object::default()),
7467                );
7468            }
7469            self.object_opt_mut().unwrap()
7470        }
7471        ///Sets `object` with the provided value.
7472        ///If any other oneof field in the same oneof is set, it will be cleared.
7473        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7474            self.result = Some(
7475                super::get_object_result::Result::Object(field.into().into()),
7476            );
7477        }
7478        ///Sets `object` with the provided value.
7479        ///If any other oneof field in the same oneof is set, it will be cleared.
7480        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7481            self.set_object(field.into());
7482            self
7483        }
7484        ///Returns the value of `error`, or the default value if `error` is unset.
7485        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7486            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7487                field as _
7488            } else {
7489                super::super::super::super::google::rpc::Status::default_instance() as _
7490            }
7491        }
7492        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7493        pub fn error_opt(
7494            &self,
7495        ) -> Option<&super::super::super::super::google::rpc::Status> {
7496            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7497                Some(field as _)
7498            } else {
7499                None
7500            }
7501        }
7502        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7503        pub fn error_opt_mut(
7504            &mut self,
7505        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7506            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7507                .result
7508            {
7509                Some(field as _)
7510            } else {
7511                None
7512            }
7513        }
7514        ///Returns a mutable reference to `error`.
7515        ///If the field is unset, it is first initialized with the default value.
7516        ///If any other oneof field in the same oneof is set, it will be cleared.
7517        pub fn error_mut(
7518            &mut self,
7519        ) -> &mut super::super::super::super::google::rpc::Status {
7520            if self.error_opt_mut().is_none() {
7521                self.result = Some(
7522                    super::get_object_result::Result::Error(
7523                        super::super::super::super::google::rpc::Status::default(),
7524                    ),
7525                );
7526            }
7527            self.error_opt_mut().unwrap()
7528        }
7529        ///Sets `error` with the provided value.
7530        ///If any other oneof field in the same oneof is set, it will be cleared.
7531        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7532            &mut self,
7533            field: T,
7534        ) {
7535            self.result = Some(
7536                super::get_object_result::Result::Error(field.into().into()),
7537            );
7538        }
7539        ///Sets `error` with the provided value.
7540        ///If any other oneof field in the same oneof is set, it will be cleared.
7541        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7542            mut self,
7543            field: T,
7544        ) -> Self {
7545            self.set_error(field.into());
7546            self
7547        }
7548    }
7549    impl super::GetPackageRequest {
7550        pub const fn const_default() -> Self {
7551            Self { package_id: None }
7552        }
7553        #[doc(hidden)]
7554        pub fn default_instance() -> &'static Self {
7555            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7556            &DEFAULT
7557        }
7558        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7559        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7560            self.package_id.as_mut().map(|field| field as _)
7561        }
7562        ///Returns a mutable reference to `package_id`.
7563        ///If the field is unset, it is first initialized with the default value.
7564        pub fn package_id_mut(&mut self) -> &mut String {
7565            self.package_id.get_or_insert_default()
7566        }
7567        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7568        pub fn package_id_opt(&self) -> Option<&str> {
7569            self.package_id.as_ref().map(|field| field as _)
7570        }
7571        ///Sets `package_id` with the provided value.
7572        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7573            self.package_id = Some(field.into().into());
7574        }
7575        ///Sets `package_id` with the provided value.
7576        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7577            self.set_package_id(field.into());
7578            self
7579        }
7580    }
7581    impl super::GetPackageResponse {
7582        pub const fn const_default() -> Self {
7583            Self { package: None }
7584        }
7585        #[doc(hidden)]
7586        pub fn default_instance() -> &'static Self {
7587            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7588            &DEFAULT
7589        }
7590        ///Returns the value of `package`, or the default value if `package` is unset.
7591        pub fn package(&self) -> &super::Package {
7592            self.package
7593                .as_ref()
7594                .map(|field| field as _)
7595                .unwrap_or_else(|| super::Package::default_instance() as _)
7596        }
7597        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7598        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7599            self.package.as_mut().map(|field| field as _)
7600        }
7601        ///Returns a mutable reference to `package`.
7602        ///If the field is unset, it is first initialized with the default value.
7603        pub fn package_mut(&mut self) -> &mut super::Package {
7604            self.package.get_or_insert_default()
7605        }
7606        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
7607        pub fn package_opt(&self) -> Option<&super::Package> {
7608            self.package.as_ref().map(|field| field as _)
7609        }
7610        ///Sets `package` with the provided value.
7611        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7612            self.package = Some(field.into().into());
7613        }
7614        ///Sets `package` with the provided value.
7615        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7616            self.set_package(field.into());
7617            self
7618        }
7619    }
7620    impl super::GetServiceInfoRequest {
7621        pub const fn const_default() -> Self {
7622            Self {}
7623        }
7624        #[doc(hidden)]
7625        pub fn default_instance() -> &'static Self {
7626            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7627            &DEFAULT
7628        }
7629    }
7630    impl super::GetServiceInfoResponse {
7631        pub const fn const_default() -> Self {
7632            Self {
7633                chain_id: None,
7634                chain: None,
7635                epoch: None,
7636                checkpoint_height: None,
7637                timestamp: None,
7638                lowest_available_checkpoint: None,
7639                lowest_available_checkpoint_objects: None,
7640                server: None,
7641            }
7642        }
7643        #[doc(hidden)]
7644        pub fn default_instance() -> &'static Self {
7645            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7646            &DEFAULT
7647        }
7648        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7649        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7650            self.chain_id.as_mut().map(|field| field as _)
7651        }
7652        ///Returns a mutable reference to `chain_id`.
7653        ///If the field is unset, it is first initialized with the default value.
7654        pub fn chain_id_mut(&mut self) -> &mut String {
7655            self.chain_id.get_or_insert_default()
7656        }
7657        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7658        pub fn chain_id_opt(&self) -> Option<&str> {
7659            self.chain_id.as_ref().map(|field| field as _)
7660        }
7661        ///Sets `chain_id` with the provided value.
7662        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7663            self.chain_id = Some(field.into().into());
7664        }
7665        ///Sets `chain_id` with the provided value.
7666        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7667            self.set_chain_id(field.into());
7668            self
7669        }
7670        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7671        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7672            self.chain.as_mut().map(|field| field as _)
7673        }
7674        ///Returns a mutable reference to `chain`.
7675        ///If the field is unset, it is first initialized with the default value.
7676        pub fn chain_mut(&mut self) -> &mut String {
7677            self.chain.get_or_insert_default()
7678        }
7679        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
7680        pub fn chain_opt(&self) -> Option<&str> {
7681            self.chain.as_ref().map(|field| field as _)
7682        }
7683        ///Sets `chain` with the provided value.
7684        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7685            self.chain = Some(field.into().into());
7686        }
7687        ///Sets `chain` with the provided value.
7688        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7689            self.set_chain(field.into());
7690            self
7691        }
7692        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7693        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7694            self.epoch.as_mut().map(|field| field as _)
7695        }
7696        ///Returns a mutable reference to `epoch`.
7697        ///If the field is unset, it is first initialized with the default value.
7698        pub fn epoch_mut(&mut self) -> &mut u64 {
7699            self.epoch.get_or_insert_default()
7700        }
7701        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7702        pub fn epoch_opt(&self) -> Option<u64> {
7703            self.epoch.as_ref().map(|field| *field)
7704        }
7705        ///Sets `epoch` with the provided value.
7706        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
7707            self.epoch = Some(field.into().into());
7708        }
7709        ///Sets `epoch` with the provided value.
7710        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
7711            self.set_epoch(field.into());
7712            self
7713        }
7714        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7715        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7716            self.checkpoint_height.as_mut().map(|field| field as _)
7717        }
7718        ///Returns a mutable reference to `checkpoint_height`.
7719        ///If the field is unset, it is first initialized with the default value.
7720        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7721            self.checkpoint_height.get_or_insert_default()
7722        }
7723        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
7724        pub fn checkpoint_height_opt(&self) -> Option<u64> {
7725            self.checkpoint_height.as_ref().map(|field| *field)
7726        }
7727        ///Sets `checkpoint_height` with the provided value.
7728        pub fn set_checkpoint_height<T: Into<u64>>(&mut self, field: T) {
7729            self.checkpoint_height = Some(field.into().into());
7730        }
7731        ///Sets `checkpoint_height` with the provided value.
7732        pub fn with_checkpoint_height<T: Into<u64>>(mut self, field: T) -> Self {
7733            self.set_checkpoint_height(field.into());
7734            self
7735        }
7736        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7737        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
7738            self.timestamp.as_mut().map(|field| field as _)
7739        }
7740        ///Returns a mutable reference to `timestamp`.
7741        ///If the field is unset, it is first initialized with the default value.
7742        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
7743            self.timestamp.get_or_insert_default()
7744        }
7745        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
7746        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
7747            self.timestamp.as_ref().map(|field| field as _)
7748        }
7749        ///Sets `timestamp` with the provided value.
7750        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
7751            self.timestamp = Some(field.into().into());
7752        }
7753        ///Sets `timestamp` with the provided value.
7754        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
7755            mut self,
7756            field: T,
7757        ) -> Self {
7758            self.set_timestamp(field.into());
7759            self
7760        }
7761        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7762        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
7763            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
7764        }
7765        ///Returns a mutable reference to `lowest_available_checkpoint`.
7766        ///If the field is unset, it is first initialized with the default value.
7767        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
7768            self.lowest_available_checkpoint.get_or_insert_default()
7769        }
7770        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7771        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
7772            self.lowest_available_checkpoint.as_ref().map(|field| *field)
7773        }
7774        ///Sets `lowest_available_checkpoint` with the provided value.
7775        pub fn set_lowest_available_checkpoint<T: Into<u64>>(&mut self, field: T) {
7776            self.lowest_available_checkpoint = Some(field.into().into());
7777        }
7778        ///Sets `lowest_available_checkpoint` with the provided value.
7779        pub fn with_lowest_available_checkpoint<T: Into<u64>>(
7780            mut self,
7781            field: T,
7782        ) -> Self {
7783            self.set_lowest_available_checkpoint(field.into());
7784            self
7785        }
7786        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7787        pub fn lowest_available_checkpoint_objects_opt_mut(
7788            &mut self,
7789        ) -> Option<&mut u64> {
7790            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
7791        }
7792        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
7793        ///If the field is unset, it is first initialized with the default value.
7794        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
7795            self.lowest_available_checkpoint_objects.get_or_insert_default()
7796        }
7797        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
7798        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
7799            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
7800        }
7801        ///Sets `lowest_available_checkpoint_objects` with the provided value.
7802        pub fn set_lowest_available_checkpoint_objects<T: Into<u64>>(
7803            &mut self,
7804            field: T,
7805        ) {
7806            self.lowest_available_checkpoint_objects = Some(field.into().into());
7807        }
7808        ///Sets `lowest_available_checkpoint_objects` with the provided value.
7809        pub fn with_lowest_available_checkpoint_objects<T: Into<u64>>(
7810            mut self,
7811            field: T,
7812        ) -> Self {
7813            self.set_lowest_available_checkpoint_objects(field.into());
7814            self
7815        }
7816        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7817        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
7818            self.server.as_mut().map(|field| field as _)
7819        }
7820        ///Returns a mutable reference to `server`.
7821        ///If the field is unset, it is first initialized with the default value.
7822        pub fn server_mut(&mut self) -> &mut String {
7823            self.server.get_or_insert_default()
7824        }
7825        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
7826        pub fn server_opt(&self) -> Option<&str> {
7827            self.server.as_ref().map(|field| field as _)
7828        }
7829        ///Sets `server` with the provided value.
7830        pub fn set_server<T: Into<String>>(&mut self, field: T) {
7831            self.server = Some(field.into().into());
7832        }
7833        ///Sets `server` with the provided value.
7834        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
7835            self.set_server(field.into());
7836            self
7837        }
7838    }
7839    impl super::GetTransactionRequest {
7840        pub const fn const_default() -> Self {
7841            Self {
7842                digest: None,
7843                read_mask: None,
7844            }
7845        }
7846        #[doc(hidden)]
7847        pub fn default_instance() -> &'static Self {
7848            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
7849            &DEFAULT
7850        }
7851        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7852        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7853            self.digest.as_mut().map(|field| field as _)
7854        }
7855        ///Returns a mutable reference to `digest`.
7856        ///If the field is unset, it is first initialized with the default value.
7857        pub fn digest_mut(&mut self) -> &mut String {
7858            self.digest.get_or_insert_default()
7859        }
7860        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7861        pub fn digest_opt(&self) -> Option<&str> {
7862            self.digest.as_ref().map(|field| field as _)
7863        }
7864        ///Sets `digest` with the provided value.
7865        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7866            self.digest = Some(field.into().into());
7867        }
7868        ///Sets `digest` with the provided value.
7869        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7870            self.set_digest(field.into());
7871            self
7872        }
7873        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7874        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7875            self.read_mask.as_mut().map(|field| field as _)
7876        }
7877        ///Returns a mutable reference to `read_mask`.
7878        ///If the field is unset, it is first initialized with the default value.
7879        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7880            self.read_mask.get_or_insert_default()
7881        }
7882        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7883        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7884            self.read_mask.as_ref().map(|field| field as _)
7885        }
7886        ///Sets `read_mask` with the provided value.
7887        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7888            self.read_mask = Some(field.into().into());
7889        }
7890        ///Sets `read_mask` with the provided value.
7891        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7892            mut self,
7893            field: T,
7894        ) -> Self {
7895            self.set_read_mask(field.into());
7896            self
7897        }
7898    }
7899    impl super::GetTransactionResponse {
7900        pub const fn const_default() -> Self {
7901            Self { transaction: None }
7902        }
7903        #[doc(hidden)]
7904        pub fn default_instance() -> &'static Self {
7905            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
7906            &DEFAULT
7907        }
7908        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
7909        pub fn transaction(&self) -> &super::ExecutedTransaction {
7910            self.transaction
7911                .as_ref()
7912                .map(|field| field as _)
7913                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
7914        }
7915        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7916        pub fn transaction_opt_mut(
7917            &mut self,
7918        ) -> Option<&mut super::ExecutedTransaction> {
7919            self.transaction.as_mut().map(|field| field as _)
7920        }
7921        ///Returns a mutable reference to `transaction`.
7922        ///If the field is unset, it is first initialized with the default value.
7923        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
7924            self.transaction.get_or_insert_default()
7925        }
7926        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
7927        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7928            self.transaction.as_ref().map(|field| field as _)
7929        }
7930        ///Sets `transaction` with the provided value.
7931        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
7932            &mut self,
7933            field: T,
7934        ) {
7935            self.transaction = Some(field.into().into());
7936        }
7937        ///Sets `transaction` with the provided value.
7938        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
7939            mut self,
7940            field: T,
7941        ) -> Self {
7942            self.set_transaction(field.into());
7943            self
7944        }
7945    }
7946    impl super::GetTransactionResult {
7947        pub const fn const_default() -> Self {
7948            Self { result: None }
7949        }
7950        #[doc(hidden)]
7951        pub fn default_instance() -> &'static Self {
7952            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
7953            &DEFAULT
7954        }
7955        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
7956        pub fn transaction(&self) -> &super::ExecutedTransaction {
7957            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
7958                .result
7959            {
7960                field as _
7961            } else {
7962                super::ExecutedTransaction::default_instance() as _
7963            }
7964        }
7965        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
7966        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7967            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
7968                .result
7969            {
7970                Some(field as _)
7971            } else {
7972                None
7973            }
7974        }
7975        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7976        pub fn transaction_opt_mut(
7977            &mut self,
7978        ) -> Option<&mut super::ExecutedTransaction> {
7979            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
7980                .result
7981            {
7982                Some(field as _)
7983            } else {
7984                None
7985            }
7986        }
7987        ///Returns a mutable reference to `transaction`.
7988        ///If the field is unset, it is first initialized with the default value.
7989        ///If any other oneof field in the same oneof is set, it will be cleared.
7990        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
7991            if self.transaction_opt_mut().is_none() {
7992                self.result = Some(
7993                    super::get_transaction_result::Result::Transaction(
7994                        super::ExecutedTransaction::default(),
7995                    ),
7996                );
7997            }
7998            self.transaction_opt_mut().unwrap()
7999        }
8000        ///Sets `transaction` with the provided value.
8001        ///If any other oneof field in the same oneof is set, it will be cleared.
8002        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8003            &mut self,
8004            field: T,
8005        ) {
8006            self.result = Some(
8007                super::get_transaction_result::Result::Transaction(field.into().into()),
8008            );
8009        }
8010        ///Sets `transaction` with the provided value.
8011        ///If any other oneof field in the same oneof is set, it will be cleared.
8012        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8013            mut self,
8014            field: T,
8015        ) -> Self {
8016            self.set_transaction(field.into());
8017            self
8018        }
8019        ///Returns the value of `error`, or the default value if `error` is unset.
8020        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8021            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8022                .result
8023            {
8024                field as _
8025            } else {
8026                super::super::super::super::google::rpc::Status::default_instance() as _
8027            }
8028        }
8029        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8030        pub fn error_opt(
8031            &self,
8032        ) -> Option<&super::super::super::super::google::rpc::Status> {
8033            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8034                .result
8035            {
8036                Some(field as _)
8037            } else {
8038                None
8039            }
8040        }
8041        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8042        pub fn error_opt_mut(
8043            &mut self,
8044        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8045            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8046                .result
8047            {
8048                Some(field as _)
8049            } else {
8050                None
8051            }
8052        }
8053        ///Returns a mutable reference to `error`.
8054        ///If the field is unset, it is first initialized with the default value.
8055        ///If any other oneof field in the same oneof is set, it will be cleared.
8056        pub fn error_mut(
8057            &mut self,
8058        ) -> &mut super::super::super::super::google::rpc::Status {
8059            if self.error_opt_mut().is_none() {
8060                self.result = Some(
8061                    super::get_transaction_result::Result::Error(
8062                        super::super::super::super::google::rpc::Status::default(),
8063                    ),
8064                );
8065            }
8066            self.error_opt_mut().unwrap()
8067        }
8068        ///Sets `error` with the provided value.
8069        ///If any other oneof field in the same oneof is set, it will be cleared.
8070        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8071            &mut self,
8072            field: T,
8073        ) {
8074            self.result = Some(
8075                super::get_transaction_result::Result::Error(field.into().into()),
8076            );
8077        }
8078        ///Sets `error` with the provided value.
8079        ///If any other oneof field in the same oneof is set, it will be cleared.
8080        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8081            mut self,
8082            field: T,
8083        ) -> Self {
8084            self.set_error(field.into());
8085            self
8086        }
8087    }
8088    impl super::IndexError {
8089        pub const fn const_default() -> Self {
8090            Self {
8091                index: None,
8092                subresult: None,
8093            }
8094        }
8095        #[doc(hidden)]
8096        pub fn default_instance() -> &'static Self {
8097            static DEFAULT: super::IndexError = super::IndexError::const_default();
8098            &DEFAULT
8099        }
8100        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8101        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8102            self.index.as_mut().map(|field| field as _)
8103        }
8104        ///Returns a mutable reference to `index`.
8105        ///If the field is unset, it is first initialized with the default value.
8106        pub fn index_mut(&mut self) -> &mut u32 {
8107            self.index.get_or_insert_default()
8108        }
8109        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8110        pub fn index_opt(&self) -> Option<u32> {
8111            self.index.as_ref().map(|field| *field)
8112        }
8113        ///Sets `index` with the provided value.
8114        pub fn set_index<T: Into<u32>>(&mut self, field: T) {
8115            self.index = Some(field.into().into());
8116        }
8117        ///Sets `index` with the provided value.
8118        pub fn with_index<T: Into<u32>>(mut self, field: T) -> Self {
8119            self.set_index(field.into());
8120            self
8121        }
8122        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8123        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8124            self.subresult.as_mut().map(|field| field as _)
8125        }
8126        ///Returns a mutable reference to `subresult`.
8127        ///If the field is unset, it is first initialized with the default value.
8128        pub fn subresult_mut(&mut self) -> &mut u32 {
8129            self.subresult.get_or_insert_default()
8130        }
8131        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8132        pub fn subresult_opt(&self) -> Option<u32> {
8133            self.subresult.as_ref().map(|field| *field)
8134        }
8135        ///Sets `subresult` with the provided value.
8136        pub fn set_subresult<T: Into<u32>>(&mut self, field: T) {
8137            self.subresult = Some(field.into().into());
8138        }
8139        ///Sets `subresult` with the provided value.
8140        pub fn with_subresult<T: Into<u32>>(mut self, field: T) -> Self {
8141            self.set_subresult(field.into());
8142            self
8143        }
8144    }
8145    impl super::Input {
8146        pub const fn const_default() -> Self {
8147            Self {
8148                kind: None,
8149                pure: None,
8150                object_id: None,
8151                version: None,
8152                digest: None,
8153                mutable: None,
8154                literal: None,
8155            }
8156        }
8157        #[doc(hidden)]
8158        pub fn default_instance() -> &'static Self {
8159            static DEFAULT: super::Input = super::Input::const_default();
8160            &DEFAULT
8161        }
8162        ///Sets `kind` with the provided value.
8163        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8164            self.set_kind(field.into());
8165            self
8166        }
8167        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8168        pub fn pure_opt(&self) -> Option<&[u8]> {
8169            self.pure.as_ref().map(|field| field as _)
8170        }
8171        ///Sets `pure` with the provided value.
8172        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8173            self.pure = Some(field.into().into());
8174        }
8175        ///Sets `pure` with the provided value.
8176        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8177            self.set_pure(field.into());
8178            self
8179        }
8180        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8181        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8182            self.object_id.as_mut().map(|field| field as _)
8183        }
8184        ///Returns a mutable reference to `object_id`.
8185        ///If the field is unset, it is first initialized with the default value.
8186        pub fn object_id_mut(&mut self) -> &mut String {
8187            self.object_id.get_or_insert_default()
8188        }
8189        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8190        pub fn object_id_opt(&self) -> Option<&str> {
8191            self.object_id.as_ref().map(|field| field as _)
8192        }
8193        ///Sets `object_id` with the provided value.
8194        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8195            self.object_id = Some(field.into().into());
8196        }
8197        ///Sets `object_id` with the provided value.
8198        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8199            self.set_object_id(field.into());
8200            self
8201        }
8202        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8203        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8204            self.version.as_mut().map(|field| field as _)
8205        }
8206        ///Returns a mutable reference to `version`.
8207        ///If the field is unset, it is first initialized with the default value.
8208        pub fn version_mut(&mut self) -> &mut u64 {
8209            self.version.get_or_insert_default()
8210        }
8211        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8212        pub fn version_opt(&self) -> Option<u64> {
8213            self.version.as_ref().map(|field| *field)
8214        }
8215        ///Sets `version` with the provided value.
8216        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
8217            self.version = Some(field.into().into());
8218        }
8219        ///Sets `version` with the provided value.
8220        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
8221            self.set_version(field.into());
8222            self
8223        }
8224        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8225        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8226            self.digest.as_mut().map(|field| field as _)
8227        }
8228        ///Returns a mutable reference to `digest`.
8229        ///If the field is unset, it is first initialized with the default value.
8230        pub fn digest_mut(&mut self) -> &mut String {
8231            self.digest.get_or_insert_default()
8232        }
8233        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8234        pub fn digest_opt(&self) -> Option<&str> {
8235            self.digest.as_ref().map(|field| field as _)
8236        }
8237        ///Sets `digest` with the provided value.
8238        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8239            self.digest = Some(field.into().into());
8240        }
8241        ///Sets `digest` with the provided value.
8242        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8243            self.set_digest(field.into());
8244            self
8245        }
8246        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8247        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8248            self.mutable.as_mut().map(|field| field as _)
8249        }
8250        ///Returns a mutable reference to `mutable`.
8251        ///If the field is unset, it is first initialized with the default value.
8252        pub fn mutable_mut(&mut self) -> &mut bool {
8253            self.mutable.get_or_insert_default()
8254        }
8255        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8256        pub fn mutable_opt(&self) -> Option<bool> {
8257            self.mutable.as_ref().map(|field| *field)
8258        }
8259        ///Sets `mutable` with the provided value.
8260        pub fn set_mutable<T: Into<bool>>(&mut self, field: T) {
8261            self.mutable = Some(field.into().into());
8262        }
8263        ///Sets `mutable` with the provided value.
8264        pub fn with_mutable<T: Into<bool>>(mut self, field: T) -> Self {
8265            self.set_mutable(field.into());
8266            self
8267        }
8268        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8269        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8270            self.literal.as_mut().map(|field| field as _)
8271        }
8272        ///Returns a mutable reference to `literal`.
8273        ///If the field is unset, it is first initialized with the default value.
8274        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8275            self.literal.get_or_insert_default()
8276        }
8277        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8278        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8279            self.literal.as_ref().map(|field| field as _)
8280        }
8281        ///Sets `literal` with the provided value.
8282        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8283            self.literal = Some(field.into().into());
8284        }
8285        ///Sets `literal` with the provided value.
8286        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8287            self.set_literal(field.into());
8288            self
8289        }
8290    }
8291    impl super::Jwk {
8292        pub const fn const_default() -> Self {
8293            Self {
8294                kty: None,
8295                e: None,
8296                n: None,
8297                alg: None,
8298            }
8299        }
8300        #[doc(hidden)]
8301        pub fn default_instance() -> &'static Self {
8302            static DEFAULT: super::Jwk = super::Jwk::const_default();
8303            &DEFAULT
8304        }
8305        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8306        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8307            self.kty.as_mut().map(|field| field as _)
8308        }
8309        ///Returns a mutable reference to `kty`.
8310        ///If the field is unset, it is first initialized with the default value.
8311        pub fn kty_mut(&mut self) -> &mut String {
8312            self.kty.get_or_insert_default()
8313        }
8314        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8315        pub fn kty_opt(&self) -> Option<&str> {
8316            self.kty.as_ref().map(|field| field as _)
8317        }
8318        ///Sets `kty` with the provided value.
8319        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8320            self.kty = Some(field.into().into());
8321        }
8322        ///Sets `kty` with the provided value.
8323        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8324            self.set_kty(field.into());
8325            self
8326        }
8327        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8328        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8329            self.e.as_mut().map(|field| field as _)
8330        }
8331        ///Returns a mutable reference to `e`.
8332        ///If the field is unset, it is first initialized with the default value.
8333        pub fn e_mut(&mut self) -> &mut String {
8334            self.e.get_or_insert_default()
8335        }
8336        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8337        pub fn e_opt(&self) -> Option<&str> {
8338            self.e.as_ref().map(|field| field as _)
8339        }
8340        ///Sets `e` with the provided value.
8341        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8342            self.e = Some(field.into().into());
8343        }
8344        ///Sets `e` with the provided value.
8345        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8346            self.set_e(field.into());
8347            self
8348        }
8349        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8350        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8351            self.n.as_mut().map(|field| field as _)
8352        }
8353        ///Returns a mutable reference to `n`.
8354        ///If the field is unset, it is first initialized with the default value.
8355        pub fn n_mut(&mut self) -> &mut String {
8356            self.n.get_or_insert_default()
8357        }
8358        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8359        pub fn n_opt(&self) -> Option<&str> {
8360            self.n.as_ref().map(|field| field as _)
8361        }
8362        ///Sets `n` with the provided value.
8363        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8364            self.n = Some(field.into().into());
8365        }
8366        ///Sets `n` with the provided value.
8367        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8368            self.set_n(field.into());
8369            self
8370        }
8371        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8372        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8373            self.alg.as_mut().map(|field| field as _)
8374        }
8375        ///Returns a mutable reference to `alg`.
8376        ///If the field is unset, it is first initialized with the default value.
8377        pub fn alg_mut(&mut self) -> &mut String {
8378            self.alg.get_or_insert_default()
8379        }
8380        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8381        pub fn alg_opt(&self) -> Option<&str> {
8382            self.alg.as_ref().map(|field| field as _)
8383        }
8384        ///Sets `alg` with the provided value.
8385        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8386            self.alg = Some(field.into().into());
8387        }
8388        ///Sets `alg` with the provided value.
8389        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8390            self.set_alg(field.into());
8391            self
8392        }
8393    }
8394    impl super::JwkId {
8395        pub const fn const_default() -> Self {
8396            Self { iss: None, kid: None }
8397        }
8398        #[doc(hidden)]
8399        pub fn default_instance() -> &'static Self {
8400            static DEFAULT: super::JwkId = super::JwkId::const_default();
8401            &DEFAULT
8402        }
8403        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8404        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8405            self.iss.as_mut().map(|field| field as _)
8406        }
8407        ///Returns a mutable reference to `iss`.
8408        ///If the field is unset, it is first initialized with the default value.
8409        pub fn iss_mut(&mut self) -> &mut String {
8410            self.iss.get_or_insert_default()
8411        }
8412        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8413        pub fn iss_opt(&self) -> Option<&str> {
8414            self.iss.as_ref().map(|field| field as _)
8415        }
8416        ///Sets `iss` with the provided value.
8417        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8418            self.iss = Some(field.into().into());
8419        }
8420        ///Sets `iss` with the provided value.
8421        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8422            self.set_iss(field.into());
8423            self
8424        }
8425        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8426        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8427            self.kid.as_mut().map(|field| field as _)
8428        }
8429        ///Returns a mutable reference to `kid`.
8430        ///If the field is unset, it is first initialized with the default value.
8431        pub fn kid_mut(&mut self) -> &mut String {
8432            self.kid.get_or_insert_default()
8433        }
8434        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8435        pub fn kid_opt(&self) -> Option<&str> {
8436            self.kid.as_ref().map(|field| field as _)
8437        }
8438        ///Sets `kid` with the provided value.
8439        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8440            self.kid = Some(field.into().into());
8441        }
8442        ///Sets `kid` with the provided value.
8443        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8444            self.set_kid(field.into());
8445            self
8446        }
8447    }
8448    impl super::Linkage {
8449        pub const fn const_default() -> Self {
8450            Self {
8451                original_id: None,
8452                upgraded_id: None,
8453                upgraded_version: None,
8454            }
8455        }
8456        #[doc(hidden)]
8457        pub fn default_instance() -> &'static Self {
8458            static DEFAULT: super::Linkage = super::Linkage::const_default();
8459            &DEFAULT
8460        }
8461        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8462        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8463            self.original_id.as_mut().map(|field| field as _)
8464        }
8465        ///Returns a mutable reference to `original_id`.
8466        ///If the field is unset, it is first initialized with the default value.
8467        pub fn original_id_mut(&mut self) -> &mut String {
8468            self.original_id.get_or_insert_default()
8469        }
8470        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8471        pub fn original_id_opt(&self) -> Option<&str> {
8472            self.original_id.as_ref().map(|field| field as _)
8473        }
8474        ///Sets `original_id` with the provided value.
8475        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8476            self.original_id = Some(field.into().into());
8477        }
8478        ///Sets `original_id` with the provided value.
8479        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8480            self.set_original_id(field.into());
8481            self
8482        }
8483        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8484        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8485            self.upgraded_id.as_mut().map(|field| field as _)
8486        }
8487        ///Returns a mutable reference to `upgraded_id`.
8488        ///If the field is unset, it is first initialized with the default value.
8489        pub fn upgraded_id_mut(&mut self) -> &mut String {
8490            self.upgraded_id.get_or_insert_default()
8491        }
8492        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8493        pub fn upgraded_id_opt(&self) -> Option<&str> {
8494            self.upgraded_id.as_ref().map(|field| field as _)
8495        }
8496        ///Sets `upgraded_id` with the provided value.
8497        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8498            self.upgraded_id = Some(field.into().into());
8499        }
8500        ///Sets `upgraded_id` with the provided value.
8501        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8502            self.set_upgraded_id(field.into());
8503            self
8504        }
8505        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8506        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8507            self.upgraded_version.as_mut().map(|field| field as _)
8508        }
8509        ///Returns a mutable reference to `upgraded_version`.
8510        ///If the field is unset, it is first initialized with the default value.
8511        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8512            self.upgraded_version.get_or_insert_default()
8513        }
8514        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8515        pub fn upgraded_version_opt(&self) -> Option<u64> {
8516            self.upgraded_version.as_ref().map(|field| *field)
8517        }
8518        ///Sets `upgraded_version` with the provided value.
8519        pub fn set_upgraded_version<T: Into<u64>>(&mut self, field: T) {
8520            self.upgraded_version = Some(field.into().into());
8521        }
8522        ///Sets `upgraded_version` with the provided value.
8523        pub fn with_upgraded_version<T: Into<u64>>(mut self, field: T) -> Self {
8524            self.set_upgraded_version(field.into());
8525            self
8526        }
8527    }
8528    impl super::ListBalancesRequest {
8529        pub const fn const_default() -> Self {
8530            Self {
8531                owner: None,
8532                page_size: None,
8533                page_token: None,
8534            }
8535        }
8536        #[doc(hidden)]
8537        pub fn default_instance() -> &'static Self {
8538            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8539            &DEFAULT
8540        }
8541        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8542        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8543            self.owner.as_mut().map(|field| field as _)
8544        }
8545        ///Returns a mutable reference to `owner`.
8546        ///If the field is unset, it is first initialized with the default value.
8547        pub fn owner_mut(&mut self) -> &mut String {
8548            self.owner.get_or_insert_default()
8549        }
8550        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8551        pub fn owner_opt(&self) -> Option<&str> {
8552            self.owner.as_ref().map(|field| field as _)
8553        }
8554        ///Sets `owner` with the provided value.
8555        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8556            self.owner = Some(field.into().into());
8557        }
8558        ///Sets `owner` with the provided value.
8559        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8560            self.set_owner(field.into());
8561            self
8562        }
8563        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8564        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8565            self.page_size.as_mut().map(|field| field as _)
8566        }
8567        ///Returns a mutable reference to `page_size`.
8568        ///If the field is unset, it is first initialized with the default value.
8569        pub fn page_size_mut(&mut self) -> &mut u32 {
8570            self.page_size.get_or_insert_default()
8571        }
8572        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8573        pub fn page_size_opt(&self) -> Option<u32> {
8574            self.page_size.as_ref().map(|field| *field)
8575        }
8576        ///Sets `page_size` with the provided value.
8577        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8578            self.page_size = Some(field.into().into());
8579        }
8580        ///Sets `page_size` with the provided value.
8581        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8582            self.set_page_size(field.into());
8583            self
8584        }
8585        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8586        pub fn page_token_opt(&self) -> Option<&[u8]> {
8587            self.page_token.as_ref().map(|field| field as _)
8588        }
8589        ///Sets `page_token` with the provided value.
8590        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8591            self.page_token = Some(field.into().into());
8592        }
8593        ///Sets `page_token` with the provided value.
8594        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8595            mut self,
8596            field: T,
8597        ) -> Self {
8598            self.set_page_token(field.into());
8599            self
8600        }
8601    }
8602    impl super::ListBalancesResponse {
8603        pub const fn const_default() -> Self {
8604            Self {
8605                balances: Vec::new(),
8606                next_page_token: None,
8607            }
8608        }
8609        #[doc(hidden)]
8610        pub fn default_instance() -> &'static Self {
8611            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8612            &DEFAULT
8613        }
8614        ///Returns the value of `balances`, or the default value if `balances` is unset.
8615        pub fn balances(&self) -> &[super::Balance] {
8616            &self.balances
8617        }
8618        ///Returns a mutable reference to `balances`.
8619        ///If the field is unset, it is first initialized with the default value.
8620        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8621            &mut self.balances
8622        }
8623        ///Sets `balances` with the provided value.
8624        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8625            self.balances = field;
8626        }
8627        ///Sets `balances` with the provided value.
8628        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8629            self.set_balances(field);
8630            self
8631        }
8632        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8633        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8634            self.next_page_token.as_ref().map(|field| field as _)
8635        }
8636        ///Sets `next_page_token` with the provided value.
8637        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8638            self.next_page_token = Some(field.into().into());
8639        }
8640        ///Sets `next_page_token` with the provided value.
8641        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8642            mut self,
8643            field: T,
8644        ) -> Self {
8645            self.set_next_page_token(field.into());
8646            self
8647        }
8648    }
8649    impl super::ListDynamicFieldsRequest {
8650        pub const fn const_default() -> Self {
8651            Self {
8652                parent: None,
8653                page_size: None,
8654                page_token: None,
8655                read_mask: None,
8656            }
8657        }
8658        #[doc(hidden)]
8659        pub fn default_instance() -> &'static Self {
8660            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8661            &DEFAULT
8662        }
8663        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8664        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8665            self.parent.as_mut().map(|field| field as _)
8666        }
8667        ///Returns a mutable reference to `parent`.
8668        ///If the field is unset, it is first initialized with the default value.
8669        pub fn parent_mut(&mut self) -> &mut String {
8670            self.parent.get_or_insert_default()
8671        }
8672        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
8673        pub fn parent_opt(&self) -> Option<&str> {
8674            self.parent.as_ref().map(|field| field as _)
8675        }
8676        ///Sets `parent` with the provided value.
8677        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8678            self.parent = Some(field.into().into());
8679        }
8680        ///Sets `parent` with the provided value.
8681        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8682            self.set_parent(field.into());
8683            self
8684        }
8685        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8686        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8687            self.page_size.as_mut().map(|field| field as _)
8688        }
8689        ///Returns a mutable reference to `page_size`.
8690        ///If the field is unset, it is first initialized with the default value.
8691        pub fn page_size_mut(&mut self) -> &mut u32 {
8692            self.page_size.get_or_insert_default()
8693        }
8694        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8695        pub fn page_size_opt(&self) -> Option<u32> {
8696            self.page_size.as_ref().map(|field| *field)
8697        }
8698        ///Sets `page_size` with the provided value.
8699        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8700            self.page_size = Some(field.into().into());
8701        }
8702        ///Sets `page_size` with the provided value.
8703        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8704            self.set_page_size(field.into());
8705            self
8706        }
8707        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8708        pub fn page_token_opt(&self) -> Option<&[u8]> {
8709            self.page_token.as_ref().map(|field| field as _)
8710        }
8711        ///Sets `page_token` with the provided value.
8712        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8713            self.page_token = Some(field.into().into());
8714        }
8715        ///Sets `page_token` with the provided value.
8716        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8717            mut self,
8718            field: T,
8719        ) -> Self {
8720            self.set_page_token(field.into());
8721            self
8722        }
8723        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8724        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8725            self.read_mask.as_mut().map(|field| field as _)
8726        }
8727        ///Returns a mutable reference to `read_mask`.
8728        ///If the field is unset, it is first initialized with the default value.
8729        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8730            self.read_mask.get_or_insert_default()
8731        }
8732        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8733        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8734            self.read_mask.as_ref().map(|field| field as _)
8735        }
8736        ///Sets `read_mask` with the provided value.
8737        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8738            self.read_mask = Some(field.into().into());
8739        }
8740        ///Sets `read_mask` with the provided value.
8741        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8742            mut self,
8743            field: T,
8744        ) -> Self {
8745            self.set_read_mask(field.into());
8746            self
8747        }
8748    }
8749    impl super::ListDynamicFieldsResponse {
8750        pub const fn const_default() -> Self {
8751            Self {
8752                dynamic_fields: Vec::new(),
8753                next_page_token: None,
8754            }
8755        }
8756        #[doc(hidden)]
8757        pub fn default_instance() -> &'static Self {
8758            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
8759            &DEFAULT
8760        }
8761        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
8762        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
8763            &self.dynamic_fields
8764        }
8765        ///Returns a mutable reference to `dynamic_fields`.
8766        ///If the field is unset, it is first initialized with the default value.
8767        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
8768            &mut self.dynamic_fields
8769        }
8770        ///Sets `dynamic_fields` with the provided value.
8771        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
8772            self.dynamic_fields = field;
8773        }
8774        ///Sets `dynamic_fields` with the provided value.
8775        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
8776            self.set_dynamic_fields(field);
8777            self
8778        }
8779        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8780        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8781            self.next_page_token.as_ref().map(|field| field as _)
8782        }
8783        ///Sets `next_page_token` with the provided value.
8784        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8785            self.next_page_token = Some(field.into().into());
8786        }
8787        ///Sets `next_page_token` with the provided value.
8788        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8789            mut self,
8790            field: T,
8791        ) -> Self {
8792            self.set_next_page_token(field.into());
8793            self
8794        }
8795    }
8796    impl super::ListOwnedObjectsRequest {
8797        pub const fn const_default() -> Self {
8798            Self {
8799                owner: None,
8800                page_size: None,
8801                page_token: None,
8802                read_mask: None,
8803                object_type: None,
8804            }
8805        }
8806        #[doc(hidden)]
8807        pub fn default_instance() -> &'static Self {
8808            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
8809            &DEFAULT
8810        }
8811        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8812        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8813            self.owner.as_mut().map(|field| field as _)
8814        }
8815        ///Returns a mutable reference to `owner`.
8816        ///If the field is unset, it is first initialized with the default value.
8817        pub fn owner_mut(&mut self) -> &mut String {
8818            self.owner.get_or_insert_default()
8819        }
8820        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8821        pub fn owner_opt(&self) -> Option<&str> {
8822            self.owner.as_ref().map(|field| field as _)
8823        }
8824        ///Sets `owner` with the provided value.
8825        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8826            self.owner = Some(field.into().into());
8827        }
8828        ///Sets `owner` with the provided value.
8829        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8830            self.set_owner(field.into());
8831            self
8832        }
8833        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8834        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8835            self.page_size.as_mut().map(|field| field as _)
8836        }
8837        ///Returns a mutable reference to `page_size`.
8838        ///If the field is unset, it is first initialized with the default value.
8839        pub fn page_size_mut(&mut self) -> &mut u32 {
8840            self.page_size.get_or_insert_default()
8841        }
8842        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8843        pub fn page_size_opt(&self) -> Option<u32> {
8844            self.page_size.as_ref().map(|field| *field)
8845        }
8846        ///Sets `page_size` with the provided value.
8847        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8848            self.page_size = Some(field.into().into());
8849        }
8850        ///Sets `page_size` with the provided value.
8851        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8852            self.set_page_size(field.into());
8853            self
8854        }
8855        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8856        pub fn page_token_opt(&self) -> Option<&[u8]> {
8857            self.page_token.as_ref().map(|field| field as _)
8858        }
8859        ///Sets `page_token` with the provided value.
8860        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8861            self.page_token = Some(field.into().into());
8862        }
8863        ///Sets `page_token` with the provided value.
8864        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8865            mut self,
8866            field: T,
8867        ) -> Self {
8868            self.set_page_token(field.into());
8869            self
8870        }
8871        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8872        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8873            self.read_mask.as_mut().map(|field| field as _)
8874        }
8875        ///Returns a mutable reference to `read_mask`.
8876        ///If the field is unset, it is first initialized with the default value.
8877        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8878            self.read_mask.get_or_insert_default()
8879        }
8880        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8881        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8882            self.read_mask.as_ref().map(|field| field as _)
8883        }
8884        ///Sets `read_mask` with the provided value.
8885        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8886            self.read_mask = Some(field.into().into());
8887        }
8888        ///Sets `read_mask` with the provided value.
8889        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8890            mut self,
8891            field: T,
8892        ) -> Self {
8893            self.set_read_mask(field.into());
8894            self
8895        }
8896        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8897        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
8898            self.object_type.as_mut().map(|field| field as _)
8899        }
8900        ///Returns a mutable reference to `object_type`.
8901        ///If the field is unset, it is first initialized with the default value.
8902        pub fn object_type_mut(&mut self) -> &mut String {
8903            self.object_type.get_or_insert_default()
8904        }
8905        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8906        pub fn object_type_opt(&self) -> Option<&str> {
8907            self.object_type.as_ref().map(|field| field as _)
8908        }
8909        ///Sets `object_type` with the provided value.
8910        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
8911            self.object_type = Some(field.into().into());
8912        }
8913        ///Sets `object_type` with the provided value.
8914        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
8915            self.set_object_type(field.into());
8916            self
8917        }
8918    }
8919    impl super::ListOwnedObjectsResponse {
8920        pub const fn const_default() -> Self {
8921            Self {
8922                objects: Vec::new(),
8923                next_page_token: None,
8924            }
8925        }
8926        #[doc(hidden)]
8927        pub fn default_instance() -> &'static Self {
8928            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
8929            &DEFAULT
8930        }
8931        ///Returns the value of `objects`, or the default value if `objects` is unset.
8932        pub fn objects(&self) -> &[super::Object] {
8933            &self.objects
8934        }
8935        ///Returns a mutable reference to `objects`.
8936        ///If the field is unset, it is first initialized with the default value.
8937        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
8938            &mut self.objects
8939        }
8940        ///Sets `objects` with the provided value.
8941        pub fn set_objects(&mut self, field: Vec<super::Object>) {
8942            self.objects = field;
8943        }
8944        ///Sets `objects` with the provided value.
8945        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
8946            self.set_objects(field);
8947            self
8948        }
8949        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8950        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8951            self.next_page_token.as_ref().map(|field| field as _)
8952        }
8953        ///Sets `next_page_token` with the provided value.
8954        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8955            self.next_page_token = Some(field.into().into());
8956        }
8957        ///Sets `next_page_token` with the provided value.
8958        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8959            mut self,
8960            field: T,
8961        ) -> Self {
8962            self.set_next_page_token(field.into());
8963            self
8964        }
8965    }
8966    impl super::ListPackageVersionsRequest {
8967        pub const fn const_default() -> Self {
8968            Self {
8969                package_id: None,
8970                page_size: None,
8971                page_token: None,
8972            }
8973        }
8974        #[doc(hidden)]
8975        pub fn default_instance() -> &'static Self {
8976            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
8977            &DEFAULT
8978        }
8979        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8980        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8981            self.package_id.as_mut().map(|field| field as _)
8982        }
8983        ///Returns a mutable reference to `package_id`.
8984        ///If the field is unset, it is first initialized with the default value.
8985        pub fn package_id_mut(&mut self) -> &mut String {
8986            self.package_id.get_or_insert_default()
8987        }
8988        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8989        pub fn package_id_opt(&self) -> Option<&str> {
8990            self.package_id.as_ref().map(|field| field as _)
8991        }
8992        ///Sets `package_id` with the provided value.
8993        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8994            self.package_id = Some(field.into().into());
8995        }
8996        ///Sets `package_id` with the provided value.
8997        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8998            self.set_package_id(field.into());
8999            self
9000        }
9001        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9002        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9003            self.page_size.as_mut().map(|field| field as _)
9004        }
9005        ///Returns a mutable reference to `page_size`.
9006        ///If the field is unset, it is first initialized with the default value.
9007        pub fn page_size_mut(&mut self) -> &mut u32 {
9008            self.page_size.get_or_insert_default()
9009        }
9010        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9011        pub fn page_size_opt(&self) -> Option<u32> {
9012            self.page_size.as_ref().map(|field| *field)
9013        }
9014        ///Sets `page_size` with the provided value.
9015        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
9016            self.page_size = Some(field.into().into());
9017        }
9018        ///Sets `page_size` with the provided value.
9019        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
9020            self.set_page_size(field.into());
9021            self
9022        }
9023        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9024        pub fn page_token_opt(&self) -> Option<&[u8]> {
9025            self.page_token.as_ref().map(|field| field as _)
9026        }
9027        ///Sets `page_token` with the provided value.
9028        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9029            self.page_token = Some(field.into().into());
9030        }
9031        ///Sets `page_token` with the provided value.
9032        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9033            mut self,
9034            field: T,
9035        ) -> Self {
9036            self.set_page_token(field.into());
9037            self
9038        }
9039    }
9040    impl super::ListPackageVersionsResponse {
9041        pub const fn const_default() -> Self {
9042            Self {
9043                versions: Vec::new(),
9044                next_page_token: None,
9045            }
9046        }
9047        #[doc(hidden)]
9048        pub fn default_instance() -> &'static Self {
9049            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9050            &DEFAULT
9051        }
9052        ///Returns the value of `versions`, or the default value if `versions` is unset.
9053        pub fn versions(&self) -> &[super::PackageVersion] {
9054            &self.versions
9055        }
9056        ///Returns a mutable reference to `versions`.
9057        ///If the field is unset, it is first initialized with the default value.
9058        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9059            &mut self.versions
9060        }
9061        ///Sets `versions` with the provided value.
9062        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9063            self.versions = field;
9064        }
9065        ///Sets `versions` with the provided value.
9066        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9067            self.set_versions(field);
9068            self
9069        }
9070        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9071        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9072            self.next_page_token.as_ref().map(|field| field as _)
9073        }
9074        ///Sets `next_page_token` with the provided value.
9075        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9076            self.next_page_token = Some(field.into().into());
9077        }
9078        ///Sets `next_page_token` with the provided value.
9079        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9080            mut self,
9081            field: T,
9082        ) -> Self {
9083            self.set_next_page_token(field.into());
9084            self
9085        }
9086    }
9087    impl super::LookupNameRequest {
9088        pub const fn const_default() -> Self {
9089            Self { name: None }
9090        }
9091        #[doc(hidden)]
9092        pub fn default_instance() -> &'static Self {
9093            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9094            &DEFAULT
9095        }
9096        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9097        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9098            self.name.as_mut().map(|field| field as _)
9099        }
9100        ///Returns a mutable reference to `name`.
9101        ///If the field is unset, it is first initialized with the default value.
9102        pub fn name_mut(&mut self) -> &mut String {
9103            self.name.get_or_insert_default()
9104        }
9105        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9106        pub fn name_opt(&self) -> Option<&str> {
9107            self.name.as_ref().map(|field| field as _)
9108        }
9109        ///Sets `name` with the provided value.
9110        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9111            self.name = Some(field.into().into());
9112        }
9113        ///Sets `name` with the provided value.
9114        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9115            self.set_name(field.into());
9116            self
9117        }
9118    }
9119    impl super::LookupNameResponse {
9120        pub const fn const_default() -> Self {
9121            Self { record: None }
9122        }
9123        #[doc(hidden)]
9124        pub fn default_instance() -> &'static Self {
9125            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9126            &DEFAULT
9127        }
9128        ///Returns the value of `record`, or the default value if `record` is unset.
9129        pub fn record(&self) -> &super::NameRecord {
9130            self.record
9131                .as_ref()
9132                .map(|field| field as _)
9133                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9134        }
9135        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9136        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9137            self.record.as_mut().map(|field| field as _)
9138        }
9139        ///Returns a mutable reference to `record`.
9140        ///If the field is unset, it is first initialized with the default value.
9141        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9142            self.record.get_or_insert_default()
9143        }
9144        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9145        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9146            self.record.as_ref().map(|field| field as _)
9147        }
9148        ///Sets `record` with the provided value.
9149        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9150            self.record = Some(field.into().into());
9151        }
9152        ///Sets `record` with the provided value.
9153        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9154            self.set_record(field.into());
9155            self
9156        }
9157    }
9158    impl super::MakeMoveVector {
9159        pub const fn const_default() -> Self {
9160            Self {
9161                element_type: None,
9162                elements: Vec::new(),
9163            }
9164        }
9165        #[doc(hidden)]
9166        pub fn default_instance() -> &'static Self {
9167            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9168            &DEFAULT
9169        }
9170        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9171        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9172            self.element_type.as_mut().map(|field| field as _)
9173        }
9174        ///Returns a mutable reference to `element_type`.
9175        ///If the field is unset, it is first initialized with the default value.
9176        pub fn element_type_mut(&mut self) -> &mut String {
9177            self.element_type.get_or_insert_default()
9178        }
9179        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9180        pub fn element_type_opt(&self) -> Option<&str> {
9181            self.element_type.as_ref().map(|field| field as _)
9182        }
9183        ///Sets `element_type` with the provided value.
9184        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9185            self.element_type = Some(field.into().into());
9186        }
9187        ///Sets `element_type` with the provided value.
9188        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9189            self.set_element_type(field.into());
9190            self
9191        }
9192        ///Returns the value of `elements`, or the default value if `elements` is unset.
9193        pub fn elements(&self) -> &[super::Argument] {
9194            &self.elements
9195        }
9196        ///Returns a mutable reference to `elements`.
9197        ///If the field is unset, it is first initialized with the default value.
9198        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9199            &mut self.elements
9200        }
9201        ///Sets `elements` with the provided value.
9202        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9203            self.elements = field;
9204        }
9205        ///Sets `elements` with the provided value.
9206        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9207            self.set_elements(field);
9208            self
9209        }
9210    }
9211    impl super::MergeCoins {
9212        pub const fn const_default() -> Self {
9213            Self {
9214                coin: None,
9215                coins_to_merge: Vec::new(),
9216            }
9217        }
9218        #[doc(hidden)]
9219        pub fn default_instance() -> &'static Self {
9220            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9221            &DEFAULT
9222        }
9223        ///Returns the value of `coin`, or the default value if `coin` is unset.
9224        pub fn coin(&self) -> &super::Argument {
9225            self.coin
9226                .as_ref()
9227                .map(|field| field as _)
9228                .unwrap_or_else(|| super::Argument::default_instance() as _)
9229        }
9230        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9231        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9232            self.coin.as_mut().map(|field| field as _)
9233        }
9234        ///Returns a mutable reference to `coin`.
9235        ///If the field is unset, it is first initialized with the default value.
9236        pub fn coin_mut(&mut self) -> &mut super::Argument {
9237            self.coin.get_or_insert_default()
9238        }
9239        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9240        pub fn coin_opt(&self) -> Option<&super::Argument> {
9241            self.coin.as_ref().map(|field| field as _)
9242        }
9243        ///Sets `coin` with the provided value.
9244        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9245            self.coin = Some(field.into().into());
9246        }
9247        ///Sets `coin` with the provided value.
9248        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9249            self.set_coin(field.into());
9250            self
9251        }
9252        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9253        pub fn coins_to_merge(&self) -> &[super::Argument] {
9254            &self.coins_to_merge
9255        }
9256        ///Returns a mutable reference to `coins_to_merge`.
9257        ///If the field is unset, it is first initialized with the default value.
9258        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9259            &mut self.coins_to_merge
9260        }
9261        ///Sets `coins_to_merge` with the provided value.
9262        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9263            self.coins_to_merge = field;
9264        }
9265        ///Sets `coins_to_merge` with the provided value.
9266        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9267            self.set_coins_to_merge(field);
9268            self
9269        }
9270    }
9271    impl super::Module {
9272        pub const fn const_default() -> Self {
9273            Self {
9274                name: None,
9275                contents: None,
9276                datatypes: Vec::new(),
9277                functions: Vec::new(),
9278            }
9279        }
9280        #[doc(hidden)]
9281        pub fn default_instance() -> &'static Self {
9282            static DEFAULT: super::Module = super::Module::const_default();
9283            &DEFAULT
9284        }
9285        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9286        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9287            self.name.as_mut().map(|field| field as _)
9288        }
9289        ///Returns a mutable reference to `name`.
9290        ///If the field is unset, it is first initialized with the default value.
9291        pub fn name_mut(&mut self) -> &mut String {
9292            self.name.get_or_insert_default()
9293        }
9294        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9295        pub fn name_opt(&self) -> Option<&str> {
9296            self.name.as_ref().map(|field| field as _)
9297        }
9298        ///Sets `name` with the provided value.
9299        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9300            self.name = Some(field.into().into());
9301        }
9302        ///Sets `name` with the provided value.
9303        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9304            self.set_name(field.into());
9305            self
9306        }
9307        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9308        pub fn contents_opt(&self) -> Option<&[u8]> {
9309            self.contents.as_ref().map(|field| field as _)
9310        }
9311        ///Sets `contents` with the provided value.
9312        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9313            self.contents = Some(field.into().into());
9314        }
9315        ///Sets `contents` with the provided value.
9316        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9317            mut self,
9318            field: T,
9319        ) -> Self {
9320            self.set_contents(field.into());
9321            self
9322        }
9323        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9324        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9325            &self.datatypes
9326        }
9327        ///Returns a mutable reference to `datatypes`.
9328        ///If the field is unset, it is first initialized with the default value.
9329        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9330            &mut self.datatypes
9331        }
9332        ///Sets `datatypes` with the provided value.
9333        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9334            self.datatypes = field;
9335        }
9336        ///Sets `datatypes` with the provided value.
9337        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9338            self.set_datatypes(field);
9339            self
9340        }
9341        ///Returns the value of `functions`, or the default value if `functions` is unset.
9342        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9343            &self.functions
9344        }
9345        ///Returns a mutable reference to `functions`.
9346        ///If the field is unset, it is first initialized with the default value.
9347        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9348            &mut self.functions
9349        }
9350        ///Sets `functions` with the provided value.
9351        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9352            self.functions = field;
9353        }
9354        ///Sets `functions` with the provided value.
9355        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9356            self.set_functions(field);
9357            self
9358        }
9359    }
9360    impl super::MoveAbort {
9361        pub const fn const_default() -> Self {
9362            Self {
9363                abort_code: None,
9364                location: None,
9365                clever_error: None,
9366            }
9367        }
9368        #[doc(hidden)]
9369        pub fn default_instance() -> &'static Self {
9370            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9371            &DEFAULT
9372        }
9373        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9374        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9375            self.abort_code.as_mut().map(|field| field as _)
9376        }
9377        ///Returns a mutable reference to `abort_code`.
9378        ///If the field is unset, it is first initialized with the default value.
9379        pub fn abort_code_mut(&mut self) -> &mut u64 {
9380            self.abort_code.get_or_insert_default()
9381        }
9382        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9383        pub fn abort_code_opt(&self) -> Option<u64> {
9384            self.abort_code.as_ref().map(|field| *field)
9385        }
9386        ///Sets `abort_code` with the provided value.
9387        pub fn set_abort_code<T: Into<u64>>(&mut self, field: T) {
9388            self.abort_code = Some(field.into().into());
9389        }
9390        ///Sets `abort_code` with the provided value.
9391        pub fn with_abort_code<T: Into<u64>>(mut self, field: T) -> Self {
9392            self.set_abort_code(field.into());
9393            self
9394        }
9395        ///Returns the value of `location`, or the default value if `location` is unset.
9396        pub fn location(&self) -> &super::MoveLocation {
9397            self.location
9398                .as_ref()
9399                .map(|field| field as _)
9400                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9401        }
9402        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9403        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9404            self.location.as_mut().map(|field| field as _)
9405        }
9406        ///Returns a mutable reference to `location`.
9407        ///If the field is unset, it is first initialized with the default value.
9408        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9409            self.location.get_or_insert_default()
9410        }
9411        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9412        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9413            self.location.as_ref().map(|field| field as _)
9414        }
9415        ///Sets `location` with the provided value.
9416        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9417            self.location = Some(field.into().into());
9418        }
9419        ///Sets `location` with the provided value.
9420        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9421            self.set_location(field.into());
9422            self
9423        }
9424        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9425        pub fn clever_error(&self) -> &super::CleverError {
9426            self.clever_error
9427                .as_ref()
9428                .map(|field| field as _)
9429                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9430        }
9431        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9432        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9433            self.clever_error.as_mut().map(|field| field as _)
9434        }
9435        ///Returns a mutable reference to `clever_error`.
9436        ///If the field is unset, it is first initialized with the default value.
9437        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9438            self.clever_error.get_or_insert_default()
9439        }
9440        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9441        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9442            self.clever_error.as_ref().map(|field| field as _)
9443        }
9444        ///Sets `clever_error` with the provided value.
9445        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9446            self.clever_error = Some(field.into().into());
9447        }
9448        ///Sets `clever_error` with the provided value.
9449        pub fn with_clever_error<T: Into<super::CleverError>>(
9450            mut self,
9451            field: T,
9452        ) -> Self {
9453            self.set_clever_error(field.into());
9454            self
9455        }
9456    }
9457    impl super::MoveCall {
9458        pub const fn const_default() -> Self {
9459            Self {
9460                package: None,
9461                module: None,
9462                function: None,
9463                type_arguments: Vec::new(),
9464                arguments: Vec::new(),
9465            }
9466        }
9467        #[doc(hidden)]
9468        pub fn default_instance() -> &'static Self {
9469            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9470            &DEFAULT
9471        }
9472        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9473        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9474            self.package.as_mut().map(|field| field as _)
9475        }
9476        ///Returns a mutable reference to `package`.
9477        ///If the field is unset, it is first initialized with the default value.
9478        pub fn package_mut(&mut self) -> &mut String {
9479            self.package.get_or_insert_default()
9480        }
9481        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9482        pub fn package_opt(&self) -> Option<&str> {
9483            self.package.as_ref().map(|field| field as _)
9484        }
9485        ///Sets `package` with the provided value.
9486        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9487            self.package = Some(field.into().into());
9488        }
9489        ///Sets `package` with the provided value.
9490        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9491            self.set_package(field.into());
9492            self
9493        }
9494        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9495        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9496            self.module.as_mut().map(|field| field as _)
9497        }
9498        ///Returns a mutable reference to `module`.
9499        ///If the field is unset, it is first initialized with the default value.
9500        pub fn module_mut(&mut self) -> &mut String {
9501            self.module.get_or_insert_default()
9502        }
9503        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9504        pub fn module_opt(&self) -> Option<&str> {
9505            self.module.as_ref().map(|field| field as _)
9506        }
9507        ///Sets `module` with the provided value.
9508        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9509            self.module = Some(field.into().into());
9510        }
9511        ///Sets `module` with the provided value.
9512        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9513            self.set_module(field.into());
9514            self
9515        }
9516        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9517        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9518            self.function.as_mut().map(|field| field as _)
9519        }
9520        ///Returns a mutable reference to `function`.
9521        ///If the field is unset, it is first initialized with the default value.
9522        pub fn function_mut(&mut self) -> &mut String {
9523            self.function.get_or_insert_default()
9524        }
9525        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9526        pub fn function_opt(&self) -> Option<&str> {
9527            self.function.as_ref().map(|field| field as _)
9528        }
9529        ///Sets `function` with the provided value.
9530        pub fn set_function<T: Into<String>>(&mut self, field: T) {
9531            self.function = Some(field.into().into());
9532        }
9533        ///Sets `function` with the provided value.
9534        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9535            self.set_function(field.into());
9536            self
9537        }
9538        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
9539        pub fn type_arguments(&self) -> &[String] {
9540            &self.type_arguments
9541        }
9542        ///Returns a mutable reference to `type_arguments`.
9543        ///If the field is unset, it is first initialized with the default value.
9544        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9545            &mut self.type_arguments
9546        }
9547        ///Sets `type_arguments` with the provided value.
9548        pub fn set_type_arguments(&mut self, field: Vec<String>) {
9549            self.type_arguments = field;
9550        }
9551        ///Sets `type_arguments` with the provided value.
9552        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9553            self.set_type_arguments(field);
9554            self
9555        }
9556        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
9557        pub fn arguments(&self) -> &[super::Argument] {
9558            &self.arguments
9559        }
9560        ///Returns a mutable reference to `arguments`.
9561        ///If the field is unset, it is first initialized with the default value.
9562        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9563            &mut self.arguments
9564        }
9565        ///Sets `arguments` with the provided value.
9566        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9567            self.arguments = field;
9568        }
9569        ///Sets `arguments` with the provided value.
9570        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9571            self.set_arguments(field);
9572            self
9573        }
9574    }
9575    impl super::MoveLocation {
9576        pub const fn const_default() -> Self {
9577            Self {
9578                package: None,
9579                module: None,
9580                function: None,
9581                instruction: None,
9582                function_name: None,
9583            }
9584        }
9585        #[doc(hidden)]
9586        pub fn default_instance() -> &'static Self {
9587            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9588            &DEFAULT
9589        }
9590        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9591        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9592            self.package.as_mut().map(|field| field as _)
9593        }
9594        ///Returns a mutable reference to `package`.
9595        ///If the field is unset, it is first initialized with the default value.
9596        pub fn package_mut(&mut self) -> &mut String {
9597            self.package.get_or_insert_default()
9598        }
9599        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9600        pub fn package_opt(&self) -> Option<&str> {
9601            self.package.as_ref().map(|field| field as _)
9602        }
9603        ///Sets `package` with the provided value.
9604        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9605            self.package = Some(field.into().into());
9606        }
9607        ///Sets `package` with the provided value.
9608        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9609            self.set_package(field.into());
9610            self
9611        }
9612        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9613        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9614            self.module.as_mut().map(|field| field as _)
9615        }
9616        ///Returns a mutable reference to `module`.
9617        ///If the field is unset, it is first initialized with the default value.
9618        pub fn module_mut(&mut self) -> &mut String {
9619            self.module.get_or_insert_default()
9620        }
9621        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9622        pub fn module_opt(&self) -> Option<&str> {
9623            self.module.as_ref().map(|field| field as _)
9624        }
9625        ///Sets `module` with the provided value.
9626        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9627            self.module = Some(field.into().into());
9628        }
9629        ///Sets `module` with the provided value.
9630        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9631            self.set_module(field.into());
9632            self
9633        }
9634        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9635        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9636            self.function.as_mut().map(|field| field as _)
9637        }
9638        ///Returns a mutable reference to `function`.
9639        ///If the field is unset, it is first initialized with the default value.
9640        pub fn function_mut(&mut self) -> &mut u32 {
9641            self.function.get_or_insert_default()
9642        }
9643        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9644        pub fn function_opt(&self) -> Option<u32> {
9645            self.function.as_ref().map(|field| *field)
9646        }
9647        ///Sets `function` with the provided value.
9648        pub fn set_function<T: Into<u32>>(&mut self, field: T) {
9649            self.function = Some(field.into().into());
9650        }
9651        ///Sets `function` with the provided value.
9652        pub fn with_function<T: Into<u32>>(mut self, field: T) -> Self {
9653            self.set_function(field.into());
9654            self
9655        }
9656        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9657        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9658            self.instruction.as_mut().map(|field| field as _)
9659        }
9660        ///Returns a mutable reference to `instruction`.
9661        ///If the field is unset, it is first initialized with the default value.
9662        pub fn instruction_mut(&mut self) -> &mut u32 {
9663            self.instruction.get_or_insert_default()
9664        }
9665        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9666        pub fn instruction_opt(&self) -> Option<u32> {
9667            self.instruction.as_ref().map(|field| *field)
9668        }
9669        ///Sets `instruction` with the provided value.
9670        pub fn set_instruction<T: Into<u32>>(&mut self, field: T) {
9671            self.instruction = Some(field.into().into());
9672        }
9673        ///Sets `instruction` with the provided value.
9674        pub fn with_instruction<T: Into<u32>>(mut self, field: T) -> Self {
9675            self.set_instruction(field.into());
9676            self
9677        }
9678        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9679        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9680            self.function_name.as_mut().map(|field| field as _)
9681        }
9682        ///Returns a mutable reference to `function_name`.
9683        ///If the field is unset, it is first initialized with the default value.
9684        pub fn function_name_mut(&mut self) -> &mut String {
9685            self.function_name.get_or_insert_default()
9686        }
9687        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9688        pub fn function_name_opt(&self) -> Option<&str> {
9689            self.function_name.as_ref().map(|field| field as _)
9690        }
9691        ///Sets `function_name` with the provided value.
9692        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
9693            self.function_name = Some(field.into().into());
9694        }
9695        ///Sets `function_name` with the provided value.
9696        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
9697            self.set_function_name(field.into());
9698            self
9699        }
9700    }
9701    impl super::MoveTable {
9702        pub const fn const_default() -> Self {
9703            Self { id: None, size: None }
9704        }
9705        #[doc(hidden)]
9706        pub fn default_instance() -> &'static Self {
9707            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
9708            &DEFAULT
9709        }
9710        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9711        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
9712            self.id.as_mut().map(|field| field as _)
9713        }
9714        ///Returns a mutable reference to `id`.
9715        ///If the field is unset, it is first initialized with the default value.
9716        pub fn id_mut(&mut self) -> &mut String {
9717            self.id.get_or_insert_default()
9718        }
9719        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9720        pub fn id_opt(&self) -> Option<&str> {
9721            self.id.as_ref().map(|field| field as _)
9722        }
9723        ///Sets `id` with the provided value.
9724        pub fn set_id<T: Into<String>>(&mut self, field: T) {
9725            self.id = Some(field.into().into());
9726        }
9727        ///Sets `id` with the provided value.
9728        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
9729            self.set_id(field.into());
9730            self
9731        }
9732        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9733        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
9734            self.size.as_mut().map(|field| field as _)
9735        }
9736        ///Returns a mutable reference to `size`.
9737        ///If the field is unset, it is first initialized with the default value.
9738        pub fn size_mut(&mut self) -> &mut u64 {
9739            self.size.get_or_insert_default()
9740        }
9741        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9742        pub fn size_opt(&self) -> Option<u64> {
9743            self.size.as_ref().map(|field| *field)
9744        }
9745        ///Sets `size` with the provided value.
9746        pub fn set_size<T: Into<u64>>(&mut self, field: T) {
9747            self.size = Some(field.into().into());
9748        }
9749        ///Sets `size` with the provided value.
9750        pub fn with_size<T: Into<u64>>(mut self, field: T) -> Self {
9751            self.set_size(field.into());
9752            self
9753        }
9754    }
9755    impl super::MultisigAggregatedSignature {
9756        pub const fn const_default() -> Self {
9757            Self {
9758                signatures: Vec::new(),
9759                bitmap: None,
9760                legacy_bitmap: Vec::new(),
9761                committee: None,
9762            }
9763        }
9764        #[doc(hidden)]
9765        pub fn default_instance() -> &'static Self {
9766            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
9767            &DEFAULT
9768        }
9769        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
9770        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
9771            &self.signatures
9772        }
9773        ///Returns a mutable reference to `signatures`.
9774        ///If the field is unset, it is first initialized with the default value.
9775        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
9776            &mut self.signatures
9777        }
9778        ///Sets `signatures` with the provided value.
9779        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
9780            self.signatures = field;
9781        }
9782        ///Sets `signatures` with the provided value.
9783        pub fn with_signatures(
9784            mut self,
9785            field: Vec<super::MultisigMemberSignature>,
9786        ) -> Self {
9787            self.set_signatures(field);
9788            self
9789        }
9790        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9791        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
9792            self.bitmap.as_mut().map(|field| field as _)
9793        }
9794        ///Returns a mutable reference to `bitmap`.
9795        ///If the field is unset, it is first initialized with the default value.
9796        pub fn bitmap_mut(&mut self) -> &mut u32 {
9797            self.bitmap.get_or_insert_default()
9798        }
9799        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
9800        pub fn bitmap_opt(&self) -> Option<u32> {
9801            self.bitmap.as_ref().map(|field| *field)
9802        }
9803        ///Sets `bitmap` with the provided value.
9804        pub fn set_bitmap<T: Into<u32>>(&mut self, field: T) {
9805            self.bitmap = Some(field.into().into());
9806        }
9807        ///Sets `bitmap` with the provided value.
9808        pub fn with_bitmap<T: Into<u32>>(mut self, field: T) -> Self {
9809            self.set_bitmap(field.into());
9810            self
9811        }
9812        ///Returns the value of `legacy_bitmap`, or the default value if `legacy_bitmap` is unset.
9813        pub fn legacy_bitmap(&self) -> &[u32] {
9814            &self.legacy_bitmap
9815        }
9816        ///Returns a mutable reference to `legacy_bitmap`.
9817        ///If the field is unset, it is first initialized with the default value.
9818        pub fn legacy_bitmap_mut(&mut self) -> &mut Vec<u32> {
9819            &mut self.legacy_bitmap
9820        }
9821        ///Sets `legacy_bitmap` with the provided value.
9822        pub fn set_legacy_bitmap(&mut self, field: Vec<u32>) {
9823            self.legacy_bitmap = field;
9824        }
9825        ///Sets `legacy_bitmap` with the provided value.
9826        pub fn with_legacy_bitmap(mut self, field: Vec<u32>) -> Self {
9827            self.set_legacy_bitmap(field);
9828            self
9829        }
9830        ///Returns the value of `committee`, or the default value if `committee` is unset.
9831        pub fn committee(&self) -> &super::MultisigCommittee {
9832            self.committee
9833                .as_ref()
9834                .map(|field| field as _)
9835                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
9836        }
9837        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9838        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
9839            self.committee.as_mut().map(|field| field as _)
9840        }
9841        ///Returns a mutable reference to `committee`.
9842        ///If the field is unset, it is first initialized with the default value.
9843        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
9844            self.committee.get_or_insert_default()
9845        }
9846        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
9847        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
9848            self.committee.as_ref().map(|field| field as _)
9849        }
9850        ///Sets `committee` with the provided value.
9851        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
9852            self.committee = Some(field.into().into());
9853        }
9854        ///Sets `committee` with the provided value.
9855        pub fn with_committee<T: Into<super::MultisigCommittee>>(
9856            mut self,
9857            field: T,
9858        ) -> Self {
9859            self.set_committee(field.into());
9860            self
9861        }
9862    }
9863    impl super::MultisigCommittee {
9864        pub const fn const_default() -> Self {
9865            Self {
9866                members: Vec::new(),
9867                threshold: None,
9868            }
9869        }
9870        #[doc(hidden)]
9871        pub fn default_instance() -> &'static Self {
9872            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
9873            &DEFAULT
9874        }
9875        ///Returns the value of `members`, or the default value if `members` is unset.
9876        pub fn members(&self) -> &[super::MultisigMember] {
9877            &self.members
9878        }
9879        ///Returns a mutable reference to `members`.
9880        ///If the field is unset, it is first initialized with the default value.
9881        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
9882            &mut self.members
9883        }
9884        ///Sets `members` with the provided value.
9885        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
9886            self.members = field;
9887        }
9888        ///Sets `members` with the provided value.
9889        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
9890            self.set_members(field);
9891            self
9892        }
9893        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9894        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
9895            self.threshold.as_mut().map(|field| field as _)
9896        }
9897        ///Returns a mutable reference to `threshold`.
9898        ///If the field is unset, it is first initialized with the default value.
9899        pub fn threshold_mut(&mut self) -> &mut u32 {
9900            self.threshold.get_or_insert_default()
9901        }
9902        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
9903        pub fn threshold_opt(&self) -> Option<u32> {
9904            self.threshold.as_ref().map(|field| *field)
9905        }
9906        ///Sets `threshold` with the provided value.
9907        pub fn set_threshold<T: Into<u32>>(&mut self, field: T) {
9908            self.threshold = Some(field.into().into());
9909        }
9910        ///Sets `threshold` with the provided value.
9911        pub fn with_threshold<T: Into<u32>>(mut self, field: T) -> Self {
9912            self.set_threshold(field.into());
9913            self
9914        }
9915    }
9916    impl super::MultisigMember {
9917        pub const fn const_default() -> Self {
9918            Self {
9919                public_key: None,
9920                weight: None,
9921            }
9922        }
9923        #[doc(hidden)]
9924        pub fn default_instance() -> &'static Self {
9925            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
9926            &DEFAULT
9927        }
9928        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
9929        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
9930            self.public_key
9931                .as_ref()
9932                .map(|field| field as _)
9933                .unwrap_or_else(|| {
9934                    super::MultisigMemberPublicKey::default_instance() as _
9935                })
9936        }
9937        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9938        pub fn public_key_opt_mut(
9939            &mut self,
9940        ) -> Option<&mut super::MultisigMemberPublicKey> {
9941            self.public_key.as_mut().map(|field| field as _)
9942        }
9943        ///Returns a mutable reference to `public_key`.
9944        ///If the field is unset, it is first initialized with the default value.
9945        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
9946            self.public_key.get_or_insert_default()
9947        }
9948        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
9949        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
9950            self.public_key.as_ref().map(|field| field as _)
9951        }
9952        ///Sets `public_key` with the provided value.
9953        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
9954            &mut self,
9955            field: T,
9956        ) {
9957            self.public_key = Some(field.into().into());
9958        }
9959        ///Sets `public_key` with the provided value.
9960        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
9961            mut self,
9962            field: T,
9963        ) -> Self {
9964            self.set_public_key(field.into());
9965            self
9966        }
9967        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9968        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
9969            self.weight.as_mut().map(|field| field as _)
9970        }
9971        ///Returns a mutable reference to `weight`.
9972        ///If the field is unset, it is first initialized with the default value.
9973        pub fn weight_mut(&mut self) -> &mut u32 {
9974            self.weight.get_or_insert_default()
9975        }
9976        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
9977        pub fn weight_opt(&self) -> Option<u32> {
9978            self.weight.as_ref().map(|field| *field)
9979        }
9980        ///Sets `weight` with the provided value.
9981        pub fn set_weight<T: Into<u32>>(&mut self, field: T) {
9982            self.weight = Some(field.into().into());
9983        }
9984        ///Sets `weight` with the provided value.
9985        pub fn with_weight<T: Into<u32>>(mut self, field: T) -> Self {
9986            self.set_weight(field.into());
9987            self
9988        }
9989    }
9990    impl super::MultisigMemberPublicKey {
9991        pub const fn const_default() -> Self {
9992            Self {
9993                scheme: None,
9994                public_key: None,
9995                zklogin: None,
9996            }
9997        }
9998        #[doc(hidden)]
9999        pub fn default_instance() -> &'static Self {
10000            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10001            &DEFAULT
10002        }
10003        ///Sets `scheme` with the provided value.
10004        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10005            self.set_scheme(field.into());
10006            self
10007        }
10008        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10009        pub fn public_key_opt(&self) -> Option<&[u8]> {
10010            self.public_key.as_ref().map(|field| field as _)
10011        }
10012        ///Sets `public_key` with the provided value.
10013        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10014            self.public_key = Some(field.into().into());
10015        }
10016        ///Sets `public_key` with the provided value.
10017        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10018            mut self,
10019            field: T,
10020        ) -> Self {
10021            self.set_public_key(field.into());
10022            self
10023        }
10024        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10025        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10026            self.zklogin
10027                .as_ref()
10028                .map(|field| field as _)
10029                .unwrap_or_else(|| {
10030                    super::ZkLoginPublicIdentifier::default_instance() as _
10031                })
10032        }
10033        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10034        pub fn zklogin_opt_mut(
10035            &mut self,
10036        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10037            self.zklogin.as_mut().map(|field| field as _)
10038        }
10039        ///Returns a mutable reference to `zklogin`.
10040        ///If the field is unset, it is first initialized with the default value.
10041        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10042            self.zklogin.get_or_insert_default()
10043        }
10044        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10045        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10046            self.zklogin.as_ref().map(|field| field as _)
10047        }
10048        ///Sets `zklogin` with the provided value.
10049        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10050            &mut self,
10051            field: T,
10052        ) {
10053            self.zklogin = Some(field.into().into());
10054        }
10055        ///Sets `zklogin` with the provided value.
10056        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10057            mut self,
10058            field: T,
10059        ) -> Self {
10060            self.set_zklogin(field.into());
10061            self
10062        }
10063    }
10064    impl super::MultisigMemberSignature {
10065        pub const fn const_default() -> Self {
10066            Self {
10067                scheme: None,
10068                signature: None,
10069                zklogin: None,
10070                passkey: None,
10071            }
10072        }
10073        #[doc(hidden)]
10074        pub fn default_instance() -> &'static Self {
10075            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10076            &DEFAULT
10077        }
10078        ///Sets `scheme` with the provided value.
10079        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10080            self.set_scheme(field.into());
10081            self
10082        }
10083        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10084        pub fn signature_opt(&self) -> Option<&[u8]> {
10085            self.signature.as_ref().map(|field| field as _)
10086        }
10087        ///Sets `signature` with the provided value.
10088        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10089            self.signature = Some(field.into().into());
10090        }
10091        ///Sets `signature` with the provided value.
10092        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10093            mut self,
10094            field: T,
10095        ) -> Self {
10096            self.set_signature(field.into());
10097            self
10098        }
10099        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10100        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10101            self.zklogin
10102                .as_ref()
10103                .map(|field| field as _)
10104                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10105        }
10106        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10107        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10108            self.zklogin.as_mut().map(|field| field as _)
10109        }
10110        ///Returns a mutable reference to `zklogin`.
10111        ///If the field is unset, it is first initialized with the default value.
10112        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10113            self.zklogin.get_or_insert_default()
10114        }
10115        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10116        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10117            self.zklogin.as_ref().map(|field| field as _)
10118        }
10119        ///Sets `zklogin` with the provided value.
10120        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10121            self.zklogin = Some(field.into().into());
10122        }
10123        ///Sets `zklogin` with the provided value.
10124        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10125            mut self,
10126            field: T,
10127        ) -> Self {
10128            self.set_zklogin(field.into());
10129            self
10130        }
10131        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10132        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10133            self.passkey
10134                .as_ref()
10135                .map(|field| field as _)
10136                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10137        }
10138        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10139        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10140            self.passkey.as_mut().map(|field| field as _)
10141        }
10142        ///Returns a mutable reference to `passkey`.
10143        ///If the field is unset, it is first initialized with the default value.
10144        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10145            self.passkey.get_or_insert_default()
10146        }
10147        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10148        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10149            self.passkey.as_ref().map(|field| field as _)
10150        }
10151        ///Sets `passkey` with the provided value.
10152        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10153            self.passkey = Some(field.into().into());
10154        }
10155        ///Sets `passkey` with the provided value.
10156        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10157            mut self,
10158            field: T,
10159        ) -> Self {
10160            self.set_passkey(field.into());
10161            self
10162        }
10163    }
10164    impl super::NameRecord {
10165        pub const fn const_default() -> Self {
10166            Self {
10167                id: None,
10168                name: None,
10169                registration_nft_id: None,
10170                expiration_timestamp: None,
10171                target_address: None,
10172                data: std::collections::BTreeMap::new(),
10173            }
10174        }
10175        #[doc(hidden)]
10176        pub fn default_instance() -> &'static Self {
10177            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10178            &DEFAULT
10179        }
10180        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10181        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10182            self.id.as_mut().map(|field| field as _)
10183        }
10184        ///Returns a mutable reference to `id`.
10185        ///If the field is unset, it is first initialized with the default value.
10186        pub fn id_mut(&mut self) -> &mut String {
10187            self.id.get_or_insert_default()
10188        }
10189        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10190        pub fn id_opt(&self) -> Option<&str> {
10191            self.id.as_ref().map(|field| field as _)
10192        }
10193        ///Sets `id` with the provided value.
10194        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10195            self.id = Some(field.into().into());
10196        }
10197        ///Sets `id` with the provided value.
10198        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10199            self.set_id(field.into());
10200            self
10201        }
10202        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10203        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10204            self.name.as_mut().map(|field| field as _)
10205        }
10206        ///Returns a mutable reference to `name`.
10207        ///If the field is unset, it is first initialized with the default value.
10208        pub fn name_mut(&mut self) -> &mut String {
10209            self.name.get_or_insert_default()
10210        }
10211        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10212        pub fn name_opt(&self) -> Option<&str> {
10213            self.name.as_ref().map(|field| field as _)
10214        }
10215        ///Sets `name` with the provided value.
10216        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10217            self.name = Some(field.into().into());
10218        }
10219        ///Sets `name` with the provided value.
10220        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10221            self.set_name(field.into());
10222            self
10223        }
10224        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10225        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10226            self.registration_nft_id.as_mut().map(|field| field as _)
10227        }
10228        ///Returns a mutable reference to `registration_nft_id`.
10229        ///If the field is unset, it is first initialized with the default value.
10230        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10231            self.registration_nft_id.get_or_insert_default()
10232        }
10233        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10234        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10235            self.registration_nft_id.as_ref().map(|field| field as _)
10236        }
10237        ///Sets `registration_nft_id` with the provided value.
10238        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10239            self.registration_nft_id = Some(field.into().into());
10240        }
10241        ///Sets `registration_nft_id` with the provided value.
10242        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10243            self.set_registration_nft_id(field.into());
10244            self
10245        }
10246        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10247        pub fn expiration_timestamp_opt_mut(
10248            &mut self,
10249        ) -> Option<&mut ::prost_types::Timestamp> {
10250            self.expiration_timestamp.as_mut().map(|field| field as _)
10251        }
10252        ///Returns a mutable reference to `expiration_timestamp`.
10253        ///If the field is unset, it is first initialized with the default value.
10254        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10255            self.expiration_timestamp.get_or_insert_default()
10256        }
10257        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10258        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10259            self.expiration_timestamp.as_ref().map(|field| field as _)
10260        }
10261        ///Sets `expiration_timestamp` with the provided value.
10262        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10263            &mut self,
10264            field: T,
10265        ) {
10266            self.expiration_timestamp = Some(field.into().into());
10267        }
10268        ///Sets `expiration_timestamp` with the provided value.
10269        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10270            mut self,
10271            field: T,
10272        ) -> Self {
10273            self.set_expiration_timestamp(field.into());
10274            self
10275        }
10276        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10277        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10278            self.target_address.as_mut().map(|field| field as _)
10279        }
10280        ///Returns a mutable reference to `target_address`.
10281        ///If the field is unset, it is first initialized with the default value.
10282        pub fn target_address_mut(&mut self) -> &mut String {
10283            self.target_address.get_or_insert_default()
10284        }
10285        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10286        pub fn target_address_opt(&self) -> Option<&str> {
10287            self.target_address.as_ref().map(|field| field as _)
10288        }
10289        ///Sets `target_address` with the provided value.
10290        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10291            self.target_address = Some(field.into().into());
10292        }
10293        ///Sets `target_address` with the provided value.
10294        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10295            self.set_target_address(field.into());
10296            self
10297        }
10298        ///Returns the value of `data`, or the default value if `data` is unset.
10299        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10300            &self.data
10301        }
10302        ///Returns a mutable reference to `data`.
10303        ///If the field is unset, it is first initialized with the default value.
10304        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10305            &mut self.data
10306        }
10307        ///Sets `data` with the provided value.
10308        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10309            self.data = field;
10310        }
10311        ///Sets `data` with the provided value.
10312        pub fn with_data(
10313            mut self,
10314            field: ::std::collections::BTreeMap<String, String>,
10315        ) -> Self {
10316            self.set_data(field);
10317            self
10318        }
10319    }
10320    impl super::Object {
10321        pub const fn const_default() -> Self {
10322            Self {
10323                bcs: None,
10324                object_id: None,
10325                version: None,
10326                digest: None,
10327                owner: None,
10328                object_type: None,
10329                has_public_transfer: None,
10330                contents: None,
10331                package: None,
10332                previous_transaction: None,
10333                storage_rebate: None,
10334                json: None,
10335                balance: None,
10336            }
10337        }
10338        #[doc(hidden)]
10339        pub fn default_instance() -> &'static Self {
10340            static DEFAULT: super::Object = super::Object::const_default();
10341            &DEFAULT
10342        }
10343        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10344        pub fn bcs(&self) -> &super::Bcs {
10345            self.bcs
10346                .as_ref()
10347                .map(|field| field as _)
10348                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10349        }
10350        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10351        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10352            self.bcs.as_mut().map(|field| field as _)
10353        }
10354        ///Returns a mutable reference to `bcs`.
10355        ///If the field is unset, it is first initialized with the default value.
10356        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10357            self.bcs.get_or_insert_default()
10358        }
10359        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10360        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10361            self.bcs.as_ref().map(|field| field as _)
10362        }
10363        ///Sets `bcs` with the provided value.
10364        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10365            self.bcs = Some(field.into().into());
10366        }
10367        ///Sets `bcs` with the provided value.
10368        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10369            self.set_bcs(field.into());
10370            self
10371        }
10372        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10373        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10374            self.object_id.as_mut().map(|field| field as _)
10375        }
10376        ///Returns a mutable reference to `object_id`.
10377        ///If the field is unset, it is first initialized with the default value.
10378        pub fn object_id_mut(&mut self) -> &mut String {
10379            self.object_id.get_or_insert_default()
10380        }
10381        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10382        pub fn object_id_opt(&self) -> Option<&str> {
10383            self.object_id.as_ref().map(|field| field as _)
10384        }
10385        ///Sets `object_id` with the provided value.
10386        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10387            self.object_id = Some(field.into().into());
10388        }
10389        ///Sets `object_id` with the provided value.
10390        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10391            self.set_object_id(field.into());
10392            self
10393        }
10394        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10395        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10396            self.version.as_mut().map(|field| field as _)
10397        }
10398        ///Returns a mutable reference to `version`.
10399        ///If the field is unset, it is first initialized with the default value.
10400        pub fn version_mut(&mut self) -> &mut u64 {
10401            self.version.get_or_insert_default()
10402        }
10403        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10404        pub fn version_opt(&self) -> Option<u64> {
10405            self.version.as_ref().map(|field| *field)
10406        }
10407        ///Sets `version` with the provided value.
10408        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10409            self.version = Some(field.into().into());
10410        }
10411        ///Sets `version` with the provided value.
10412        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10413            self.set_version(field.into());
10414            self
10415        }
10416        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10417        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10418            self.digest.as_mut().map(|field| field as _)
10419        }
10420        ///Returns a mutable reference to `digest`.
10421        ///If the field is unset, it is first initialized with the default value.
10422        pub fn digest_mut(&mut self) -> &mut String {
10423            self.digest.get_or_insert_default()
10424        }
10425        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10426        pub fn digest_opt(&self) -> Option<&str> {
10427            self.digest.as_ref().map(|field| field as _)
10428        }
10429        ///Sets `digest` with the provided value.
10430        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10431            self.digest = Some(field.into().into());
10432        }
10433        ///Sets `digest` with the provided value.
10434        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10435            self.set_digest(field.into());
10436            self
10437        }
10438        ///Returns the value of `owner`, or the default value if `owner` is unset.
10439        pub fn owner(&self) -> &super::Owner {
10440            self.owner
10441                .as_ref()
10442                .map(|field| field as _)
10443                .unwrap_or_else(|| super::Owner::default_instance() as _)
10444        }
10445        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10446        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10447            self.owner.as_mut().map(|field| field as _)
10448        }
10449        ///Returns a mutable reference to `owner`.
10450        ///If the field is unset, it is first initialized with the default value.
10451        pub fn owner_mut(&mut self) -> &mut super::Owner {
10452            self.owner.get_or_insert_default()
10453        }
10454        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10455        pub fn owner_opt(&self) -> Option<&super::Owner> {
10456            self.owner.as_ref().map(|field| field as _)
10457        }
10458        ///Sets `owner` with the provided value.
10459        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10460            self.owner = Some(field.into().into());
10461        }
10462        ///Sets `owner` with the provided value.
10463        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10464            self.set_owner(field.into());
10465            self
10466        }
10467        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10468        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10469            self.object_type.as_mut().map(|field| field as _)
10470        }
10471        ///Returns a mutable reference to `object_type`.
10472        ///If the field is unset, it is first initialized with the default value.
10473        pub fn object_type_mut(&mut self) -> &mut String {
10474            self.object_type.get_or_insert_default()
10475        }
10476        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10477        pub fn object_type_opt(&self) -> Option<&str> {
10478            self.object_type.as_ref().map(|field| field as _)
10479        }
10480        ///Sets `object_type` with the provided value.
10481        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10482            self.object_type = Some(field.into().into());
10483        }
10484        ///Sets `object_type` with the provided value.
10485        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10486            self.set_object_type(field.into());
10487            self
10488        }
10489        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10490        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10491            self.has_public_transfer.as_mut().map(|field| field as _)
10492        }
10493        ///Returns a mutable reference to `has_public_transfer`.
10494        ///If the field is unset, it is first initialized with the default value.
10495        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10496            self.has_public_transfer.get_or_insert_default()
10497        }
10498        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10499        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10500            self.has_public_transfer.as_ref().map(|field| *field)
10501        }
10502        ///Sets `has_public_transfer` with the provided value.
10503        pub fn set_has_public_transfer<T: Into<bool>>(&mut self, field: T) {
10504            self.has_public_transfer = Some(field.into().into());
10505        }
10506        ///Sets `has_public_transfer` with the provided value.
10507        pub fn with_has_public_transfer<T: Into<bool>>(mut self, field: T) -> Self {
10508            self.set_has_public_transfer(field.into());
10509            self
10510        }
10511        ///Returns the value of `contents`, or the default value if `contents` is unset.
10512        pub fn contents(&self) -> &super::Bcs {
10513            self.contents
10514                .as_ref()
10515                .map(|field| field as _)
10516                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10517        }
10518        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10519        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10520            self.contents.as_mut().map(|field| field as _)
10521        }
10522        ///Returns a mutable reference to `contents`.
10523        ///If the field is unset, it is first initialized with the default value.
10524        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10525            self.contents.get_or_insert_default()
10526        }
10527        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10528        pub fn contents_opt(&self) -> Option<&super::Bcs> {
10529            self.contents.as_ref().map(|field| field as _)
10530        }
10531        ///Sets `contents` with the provided value.
10532        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10533            self.contents = Some(field.into().into());
10534        }
10535        ///Sets `contents` with the provided value.
10536        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10537            self.set_contents(field.into());
10538            self
10539        }
10540        ///Returns the value of `package`, or the default value if `package` is unset.
10541        pub fn package(&self) -> &super::Package {
10542            self.package
10543                .as_ref()
10544                .map(|field| field as _)
10545                .unwrap_or_else(|| super::Package::default_instance() as _)
10546        }
10547        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10548        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10549            self.package.as_mut().map(|field| field as _)
10550        }
10551        ///Returns a mutable reference to `package`.
10552        ///If the field is unset, it is first initialized with the default value.
10553        pub fn package_mut(&mut self) -> &mut super::Package {
10554            self.package.get_or_insert_default()
10555        }
10556        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10557        pub fn package_opt(&self) -> Option<&super::Package> {
10558            self.package.as_ref().map(|field| field as _)
10559        }
10560        ///Sets `package` with the provided value.
10561        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10562            self.package = Some(field.into().into());
10563        }
10564        ///Sets `package` with the provided value.
10565        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10566            self.set_package(field.into());
10567            self
10568        }
10569        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10570        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10571            self.previous_transaction.as_mut().map(|field| field as _)
10572        }
10573        ///Returns a mutable reference to `previous_transaction`.
10574        ///If the field is unset, it is first initialized with the default value.
10575        pub fn previous_transaction_mut(&mut self) -> &mut String {
10576            self.previous_transaction.get_or_insert_default()
10577        }
10578        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10579        pub fn previous_transaction_opt(&self) -> Option<&str> {
10580            self.previous_transaction.as_ref().map(|field| field as _)
10581        }
10582        ///Sets `previous_transaction` with the provided value.
10583        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10584            self.previous_transaction = Some(field.into().into());
10585        }
10586        ///Sets `previous_transaction` with the provided value.
10587        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10588            self.set_previous_transaction(field.into());
10589            self
10590        }
10591        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10592        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10593            self.storage_rebate.as_mut().map(|field| field as _)
10594        }
10595        ///Returns a mutable reference to `storage_rebate`.
10596        ///If the field is unset, it is first initialized with the default value.
10597        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10598            self.storage_rebate.get_or_insert_default()
10599        }
10600        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
10601        pub fn storage_rebate_opt(&self) -> Option<u64> {
10602            self.storage_rebate.as_ref().map(|field| *field)
10603        }
10604        ///Sets `storage_rebate` with the provided value.
10605        pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
10606            self.storage_rebate = Some(field.into().into());
10607        }
10608        ///Sets `storage_rebate` with the provided value.
10609        pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
10610            self.set_storage_rebate(field.into());
10611            self
10612        }
10613        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10614        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10615            self.json.as_mut().map(|field| field as _)
10616        }
10617        ///Returns a mutable reference to `json`.
10618        ///If the field is unset, it is first initialized with the default value.
10619        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10620            self.json.get_or_insert_default()
10621        }
10622        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
10623        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10624            self.json.as_ref().map(|field| field as _)
10625        }
10626        ///Sets `json` with the provided value.
10627        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10628            self.json = Some(field.into().into());
10629        }
10630        ///Sets `json` with the provided value.
10631        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10632            self.set_json(field.into());
10633            self
10634        }
10635        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10636        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10637            self.balance.as_mut().map(|field| field as _)
10638        }
10639        ///Returns a mutable reference to `balance`.
10640        ///If the field is unset, it is first initialized with the default value.
10641        pub fn balance_mut(&mut self) -> &mut u64 {
10642            self.balance.get_or_insert_default()
10643        }
10644        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
10645        pub fn balance_opt(&self) -> Option<u64> {
10646            self.balance.as_ref().map(|field| *field)
10647        }
10648        ///Sets `balance` with the provided value.
10649        pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
10650            self.balance = Some(field.into().into());
10651        }
10652        ///Sets `balance` with the provided value.
10653        pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
10654            self.set_balance(field.into());
10655            self
10656        }
10657    }
10658    impl super::ObjectReference {
10659        pub const fn const_default() -> Self {
10660            Self {
10661                object_id: None,
10662                version: None,
10663                digest: None,
10664            }
10665        }
10666        #[doc(hidden)]
10667        pub fn default_instance() -> &'static Self {
10668            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10669            &DEFAULT
10670        }
10671        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10672        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10673            self.object_id.as_mut().map(|field| field as _)
10674        }
10675        ///Returns a mutable reference to `object_id`.
10676        ///If the field is unset, it is first initialized with the default value.
10677        pub fn object_id_mut(&mut self) -> &mut String {
10678            self.object_id.get_or_insert_default()
10679        }
10680        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10681        pub fn object_id_opt(&self) -> Option<&str> {
10682            self.object_id.as_ref().map(|field| field as _)
10683        }
10684        ///Sets `object_id` with the provided value.
10685        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10686            self.object_id = Some(field.into().into());
10687        }
10688        ///Sets `object_id` with the provided value.
10689        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10690            self.set_object_id(field.into());
10691            self
10692        }
10693        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10694        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10695            self.version.as_mut().map(|field| field as _)
10696        }
10697        ///Returns a mutable reference to `version`.
10698        ///If the field is unset, it is first initialized with the default value.
10699        pub fn version_mut(&mut self) -> &mut u64 {
10700            self.version.get_or_insert_default()
10701        }
10702        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10703        pub fn version_opt(&self) -> Option<u64> {
10704            self.version.as_ref().map(|field| *field)
10705        }
10706        ///Sets `version` with the provided value.
10707        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10708            self.version = Some(field.into().into());
10709        }
10710        ///Sets `version` with the provided value.
10711        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10712            self.set_version(field.into());
10713            self
10714        }
10715        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10716        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10717            self.digest.as_mut().map(|field| field as _)
10718        }
10719        ///Returns a mutable reference to `digest`.
10720        ///If the field is unset, it is first initialized with the default value.
10721        pub fn digest_mut(&mut self) -> &mut String {
10722            self.digest.get_or_insert_default()
10723        }
10724        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10725        pub fn digest_opt(&self) -> Option<&str> {
10726            self.digest.as_ref().map(|field| field as _)
10727        }
10728        ///Sets `digest` with the provided value.
10729        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10730            self.digest = Some(field.into().into());
10731        }
10732        ///Sets `digest` with the provided value.
10733        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10734            self.set_digest(field.into());
10735            self
10736        }
10737    }
10738    impl super::OpenSignature {
10739        pub const fn const_default() -> Self {
10740            Self {
10741                reference: None,
10742                body: None,
10743            }
10744        }
10745        #[doc(hidden)]
10746        pub fn default_instance() -> &'static Self {
10747            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
10748            &DEFAULT
10749        }
10750        ///Sets `reference` with the provided value.
10751        pub fn with_reference<T: Into<super::open_signature::Reference>>(
10752            mut self,
10753            field: T,
10754        ) -> Self {
10755            self.set_reference(field.into());
10756            self
10757        }
10758        ///Returns the value of `body`, or the default value if `body` is unset.
10759        pub fn body(&self) -> &super::OpenSignatureBody {
10760            self.body
10761                .as_ref()
10762                .map(|field| field as _)
10763                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
10764        }
10765        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10766        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
10767            self.body.as_mut().map(|field| field as _)
10768        }
10769        ///Returns a mutable reference to `body`.
10770        ///If the field is unset, it is first initialized with the default value.
10771        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
10772            self.body.get_or_insert_default()
10773        }
10774        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
10775        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
10776            self.body.as_ref().map(|field| field as _)
10777        }
10778        ///Sets `body` with the provided value.
10779        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
10780            self.body = Some(field.into().into());
10781        }
10782        ///Sets `body` with the provided value.
10783        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
10784            self.set_body(field.into());
10785            self
10786        }
10787    }
10788    impl super::OpenSignatureBody {
10789        pub const fn const_default() -> Self {
10790            Self {
10791                r#type: None,
10792                type_name: None,
10793                type_parameter_instantiation: Vec::new(),
10794                type_parameter: None,
10795            }
10796        }
10797        #[doc(hidden)]
10798        pub fn default_instance() -> &'static Self {
10799            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
10800            &DEFAULT
10801        }
10802        ///Sets `r#type` with the provided value.
10803        pub fn with_type<T: Into<super::open_signature_body::Type>>(
10804            mut self,
10805            field: T,
10806        ) -> Self {
10807            self.set_type(field.into());
10808            self
10809        }
10810        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10811        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
10812            self.type_name.as_mut().map(|field| field as _)
10813        }
10814        ///Returns a mutable reference to `type_name`.
10815        ///If the field is unset, it is first initialized with the default value.
10816        pub fn type_name_mut(&mut self) -> &mut String {
10817            self.type_name.get_or_insert_default()
10818        }
10819        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10820        pub fn type_name_opt(&self) -> Option<&str> {
10821            self.type_name.as_ref().map(|field| field as _)
10822        }
10823        ///Sets `type_name` with the provided value.
10824        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
10825            self.type_name = Some(field.into().into());
10826        }
10827        ///Sets `type_name` with the provided value.
10828        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
10829            self.set_type_name(field.into());
10830            self
10831        }
10832        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
10833        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
10834            &self.type_parameter_instantiation
10835        }
10836        ///Returns a mutable reference to `type_parameter_instantiation`.
10837        ///If the field is unset, it is first initialized with the default value.
10838        pub fn type_parameter_instantiation_mut(
10839            &mut self,
10840        ) -> &mut Vec<super::OpenSignatureBody> {
10841            &mut self.type_parameter_instantiation
10842        }
10843        ///Sets `type_parameter_instantiation` with the provided value.
10844        pub fn set_type_parameter_instantiation(
10845            &mut self,
10846            field: Vec<super::OpenSignatureBody>,
10847        ) {
10848            self.type_parameter_instantiation = field;
10849        }
10850        ///Sets `type_parameter_instantiation` with the provided value.
10851        pub fn with_type_parameter_instantiation(
10852            mut self,
10853            field: Vec<super::OpenSignatureBody>,
10854        ) -> Self {
10855            self.set_type_parameter_instantiation(field);
10856            self
10857        }
10858        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10859        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
10860            self.type_parameter.as_mut().map(|field| field as _)
10861        }
10862        ///Returns a mutable reference to `type_parameter`.
10863        ///If the field is unset, it is first initialized with the default value.
10864        pub fn type_parameter_mut(&mut self) -> &mut u32 {
10865            self.type_parameter.get_or_insert_default()
10866        }
10867        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10868        pub fn type_parameter_opt(&self) -> Option<u32> {
10869            self.type_parameter.as_ref().map(|field| *field)
10870        }
10871        ///Sets `type_parameter` with the provided value.
10872        pub fn set_type_parameter<T: Into<u32>>(&mut self, field: T) {
10873            self.type_parameter = Some(field.into().into());
10874        }
10875        ///Sets `type_parameter` with the provided value.
10876        pub fn with_type_parameter<T: Into<u32>>(mut self, field: T) -> Self {
10877            self.set_type_parameter(field.into());
10878            self
10879        }
10880    }
10881    impl super::Owner {
10882        pub const fn const_default() -> Self {
10883            Self {
10884                kind: None,
10885                address: None,
10886                version: None,
10887            }
10888        }
10889        #[doc(hidden)]
10890        pub fn default_instance() -> &'static Self {
10891            static DEFAULT: super::Owner = super::Owner::const_default();
10892            &DEFAULT
10893        }
10894        ///Sets `kind` with the provided value.
10895        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
10896            self.set_kind(field.into());
10897            self
10898        }
10899        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10900        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
10901            self.address.as_mut().map(|field| field as _)
10902        }
10903        ///Returns a mutable reference to `address`.
10904        ///If the field is unset, it is first initialized with the default value.
10905        pub fn address_mut(&mut self) -> &mut String {
10906            self.address.get_or_insert_default()
10907        }
10908        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10909        pub fn address_opt(&self) -> Option<&str> {
10910            self.address.as_ref().map(|field| field as _)
10911        }
10912        ///Sets `address` with the provided value.
10913        pub fn set_address<T: Into<String>>(&mut self, field: T) {
10914            self.address = Some(field.into().into());
10915        }
10916        ///Sets `address` with the provided value.
10917        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
10918            self.set_address(field.into());
10919            self
10920        }
10921        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10922        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10923            self.version.as_mut().map(|field| field as _)
10924        }
10925        ///Returns a mutable reference to `version`.
10926        ///If the field is unset, it is first initialized with the default value.
10927        pub fn version_mut(&mut self) -> &mut u64 {
10928            self.version.get_or_insert_default()
10929        }
10930        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10931        pub fn version_opt(&self) -> Option<u64> {
10932            self.version.as_ref().map(|field| *field)
10933        }
10934        ///Sets `version` with the provided value.
10935        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10936            self.version = Some(field.into().into());
10937        }
10938        ///Sets `version` with the provided value.
10939        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10940            self.set_version(field.into());
10941            self
10942        }
10943    }
10944    impl super::Package {
10945        pub const fn const_default() -> Self {
10946            Self {
10947                storage_id: None,
10948                original_id: None,
10949                version: None,
10950                modules: Vec::new(),
10951                type_origins: Vec::new(),
10952                linkage: Vec::new(),
10953            }
10954        }
10955        #[doc(hidden)]
10956        pub fn default_instance() -> &'static Self {
10957            static DEFAULT: super::Package = super::Package::const_default();
10958            &DEFAULT
10959        }
10960        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10961        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
10962            self.storage_id.as_mut().map(|field| field as _)
10963        }
10964        ///Returns a mutable reference to `storage_id`.
10965        ///If the field is unset, it is first initialized with the default value.
10966        pub fn storage_id_mut(&mut self) -> &mut String {
10967            self.storage_id.get_or_insert_default()
10968        }
10969        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10970        pub fn storage_id_opt(&self) -> Option<&str> {
10971            self.storage_id.as_ref().map(|field| field as _)
10972        }
10973        ///Sets `storage_id` with the provided value.
10974        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
10975            self.storage_id = Some(field.into().into());
10976        }
10977        ///Sets `storage_id` with the provided value.
10978        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
10979            self.set_storage_id(field.into());
10980            self
10981        }
10982        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10983        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
10984            self.original_id.as_mut().map(|field| field as _)
10985        }
10986        ///Returns a mutable reference to `original_id`.
10987        ///If the field is unset, it is first initialized with the default value.
10988        pub fn original_id_mut(&mut self) -> &mut String {
10989            self.original_id.get_or_insert_default()
10990        }
10991        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10992        pub fn original_id_opt(&self) -> Option<&str> {
10993            self.original_id.as_ref().map(|field| field as _)
10994        }
10995        ///Sets `original_id` with the provided value.
10996        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
10997            self.original_id = Some(field.into().into());
10998        }
10999        ///Sets `original_id` with the provided value.
11000        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11001            self.set_original_id(field.into());
11002            self
11003        }
11004        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11005        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11006            self.version.as_mut().map(|field| field as _)
11007        }
11008        ///Returns a mutable reference to `version`.
11009        ///If the field is unset, it is first initialized with the default value.
11010        pub fn version_mut(&mut self) -> &mut u64 {
11011            self.version.get_or_insert_default()
11012        }
11013        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11014        pub fn version_opt(&self) -> Option<u64> {
11015            self.version.as_ref().map(|field| *field)
11016        }
11017        ///Sets `version` with the provided value.
11018        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11019            self.version = Some(field.into().into());
11020        }
11021        ///Sets `version` with the provided value.
11022        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11023            self.set_version(field.into());
11024            self
11025        }
11026        ///Returns the value of `modules`, or the default value if `modules` is unset.
11027        pub fn modules(&self) -> &[super::Module] {
11028            &self.modules
11029        }
11030        ///Returns a mutable reference to `modules`.
11031        ///If the field is unset, it is first initialized with the default value.
11032        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11033            &mut self.modules
11034        }
11035        ///Sets `modules` with the provided value.
11036        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11037            self.modules = field;
11038        }
11039        ///Sets `modules` with the provided value.
11040        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11041            self.set_modules(field);
11042            self
11043        }
11044        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11045        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11046            &self.type_origins
11047        }
11048        ///Returns a mutable reference to `type_origins`.
11049        ///If the field is unset, it is first initialized with the default value.
11050        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11051            &mut self.type_origins
11052        }
11053        ///Sets `type_origins` with the provided value.
11054        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11055            self.type_origins = field;
11056        }
11057        ///Sets `type_origins` with the provided value.
11058        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11059            self.set_type_origins(field);
11060            self
11061        }
11062        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11063        pub fn linkage(&self) -> &[super::Linkage] {
11064            &self.linkage
11065        }
11066        ///Returns a mutable reference to `linkage`.
11067        ///If the field is unset, it is first initialized with the default value.
11068        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11069            &mut self.linkage
11070        }
11071        ///Sets `linkage` with the provided value.
11072        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11073            self.linkage = field;
11074        }
11075        ///Sets `linkage` with the provided value.
11076        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11077            self.set_linkage(field);
11078            self
11079        }
11080    }
11081    impl super::PackageUpgradeError {
11082        pub const fn const_default() -> Self {
11083            Self {
11084                kind: None,
11085                package_id: None,
11086                digest: None,
11087                policy: None,
11088                ticket_id: None,
11089            }
11090        }
11091        #[doc(hidden)]
11092        pub fn default_instance() -> &'static Self {
11093            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11094            &DEFAULT
11095        }
11096        ///Sets `kind` with the provided value.
11097        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11098            mut self,
11099            field: T,
11100        ) -> Self {
11101            self.set_kind(field.into());
11102            self
11103        }
11104        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11105        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11106            self.package_id.as_mut().map(|field| field as _)
11107        }
11108        ///Returns a mutable reference to `package_id`.
11109        ///If the field is unset, it is first initialized with the default value.
11110        pub fn package_id_mut(&mut self) -> &mut String {
11111            self.package_id.get_or_insert_default()
11112        }
11113        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11114        pub fn package_id_opt(&self) -> Option<&str> {
11115            self.package_id.as_ref().map(|field| field as _)
11116        }
11117        ///Sets `package_id` with the provided value.
11118        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11119            self.package_id = Some(field.into().into());
11120        }
11121        ///Sets `package_id` with the provided value.
11122        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11123            self.set_package_id(field.into());
11124            self
11125        }
11126        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11127        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11128            self.digest.as_mut().map(|field| field as _)
11129        }
11130        ///Returns a mutable reference to `digest`.
11131        ///If the field is unset, it is first initialized with the default value.
11132        pub fn digest_mut(&mut self) -> &mut String {
11133            self.digest.get_or_insert_default()
11134        }
11135        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11136        pub fn digest_opt(&self) -> Option<&str> {
11137            self.digest.as_ref().map(|field| field as _)
11138        }
11139        ///Sets `digest` with the provided value.
11140        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11141            self.digest = Some(field.into().into());
11142        }
11143        ///Sets `digest` with the provided value.
11144        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11145            self.set_digest(field.into());
11146            self
11147        }
11148        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11149        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11150            self.policy.as_mut().map(|field| field as _)
11151        }
11152        ///Returns a mutable reference to `policy`.
11153        ///If the field is unset, it is first initialized with the default value.
11154        pub fn policy_mut(&mut self) -> &mut u32 {
11155            self.policy.get_or_insert_default()
11156        }
11157        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11158        pub fn policy_opt(&self) -> Option<u32> {
11159            self.policy.as_ref().map(|field| *field)
11160        }
11161        ///Sets `policy` with the provided value.
11162        pub fn set_policy<T: Into<u32>>(&mut self, field: T) {
11163            self.policy = Some(field.into().into());
11164        }
11165        ///Sets `policy` with the provided value.
11166        pub fn with_policy<T: Into<u32>>(mut self, field: T) -> Self {
11167            self.set_policy(field.into());
11168            self
11169        }
11170        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11171        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11172            self.ticket_id.as_mut().map(|field| field as _)
11173        }
11174        ///Returns a mutable reference to `ticket_id`.
11175        ///If the field is unset, it is first initialized with the default value.
11176        pub fn ticket_id_mut(&mut self) -> &mut String {
11177            self.ticket_id.get_or_insert_default()
11178        }
11179        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11180        pub fn ticket_id_opt(&self) -> Option<&str> {
11181            self.ticket_id.as_ref().map(|field| field as _)
11182        }
11183        ///Sets `ticket_id` with the provided value.
11184        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11185            self.ticket_id = Some(field.into().into());
11186        }
11187        ///Sets `ticket_id` with the provided value.
11188        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11189            self.set_ticket_id(field.into());
11190            self
11191        }
11192    }
11193    impl super::PackageVersion {
11194        pub const fn const_default() -> Self {
11195            Self {
11196                package_id: None,
11197                version: None,
11198            }
11199        }
11200        #[doc(hidden)]
11201        pub fn default_instance() -> &'static Self {
11202            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11203            &DEFAULT
11204        }
11205        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11206        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11207            self.package_id.as_mut().map(|field| field as _)
11208        }
11209        ///Returns a mutable reference to `package_id`.
11210        ///If the field is unset, it is first initialized with the default value.
11211        pub fn package_id_mut(&mut self) -> &mut String {
11212            self.package_id.get_or_insert_default()
11213        }
11214        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11215        pub fn package_id_opt(&self) -> Option<&str> {
11216            self.package_id.as_ref().map(|field| field as _)
11217        }
11218        ///Sets `package_id` with the provided value.
11219        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11220            self.package_id = Some(field.into().into());
11221        }
11222        ///Sets `package_id` with the provided value.
11223        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11224            self.set_package_id(field.into());
11225            self
11226        }
11227        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11228        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11229            self.version.as_mut().map(|field| field as _)
11230        }
11231        ///Returns a mutable reference to `version`.
11232        ///If the field is unset, it is first initialized with the default value.
11233        pub fn version_mut(&mut self) -> &mut u64 {
11234            self.version.get_or_insert_default()
11235        }
11236        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11237        pub fn version_opt(&self) -> Option<u64> {
11238            self.version.as_ref().map(|field| *field)
11239        }
11240        ///Sets `version` with the provided value.
11241        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11242            self.version = Some(field.into().into());
11243        }
11244        ///Sets `version` with the provided value.
11245        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11246            self.set_version(field.into());
11247            self
11248        }
11249    }
11250    impl super::PasskeyAuthenticator {
11251        pub const fn const_default() -> Self {
11252            Self {
11253                authenticator_data: None,
11254                client_data_json: None,
11255                signature: None,
11256            }
11257        }
11258        #[doc(hidden)]
11259        pub fn default_instance() -> &'static Self {
11260            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11261            &DEFAULT
11262        }
11263        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11264        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11265            self.authenticator_data.as_ref().map(|field| field as _)
11266        }
11267        ///Sets `authenticator_data` with the provided value.
11268        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11269            &mut self,
11270            field: T,
11271        ) {
11272            self.authenticator_data = Some(field.into().into());
11273        }
11274        ///Sets `authenticator_data` with the provided value.
11275        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11276            mut self,
11277            field: T,
11278        ) -> Self {
11279            self.set_authenticator_data(field.into());
11280            self
11281        }
11282        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11283        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11284            self.client_data_json.as_mut().map(|field| field as _)
11285        }
11286        ///Returns a mutable reference to `client_data_json`.
11287        ///If the field is unset, it is first initialized with the default value.
11288        pub fn client_data_json_mut(&mut self) -> &mut String {
11289            self.client_data_json.get_or_insert_default()
11290        }
11291        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11292        pub fn client_data_json_opt(&self) -> Option<&str> {
11293            self.client_data_json.as_ref().map(|field| field as _)
11294        }
11295        ///Sets `client_data_json` with the provided value.
11296        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11297            self.client_data_json = Some(field.into().into());
11298        }
11299        ///Sets `client_data_json` with the provided value.
11300        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11301            self.set_client_data_json(field.into());
11302            self
11303        }
11304        ///Returns the value of `signature`, or the default value if `signature` is unset.
11305        pub fn signature(&self) -> &super::SimpleSignature {
11306            self.signature
11307                .as_ref()
11308                .map(|field| field as _)
11309                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11310        }
11311        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11312        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11313            self.signature.as_mut().map(|field| field as _)
11314        }
11315        ///Returns a mutable reference to `signature`.
11316        ///If the field is unset, it is first initialized with the default value.
11317        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11318            self.signature.get_or_insert_default()
11319        }
11320        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11321        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11322            self.signature.as_ref().map(|field| field as _)
11323        }
11324        ///Sets `signature` with the provided value.
11325        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11326            self.signature = Some(field.into().into());
11327        }
11328        ///Sets `signature` with the provided value.
11329        pub fn with_signature<T: Into<super::SimpleSignature>>(
11330            mut self,
11331            field: T,
11332        ) -> Self {
11333            self.set_signature(field.into());
11334            self
11335        }
11336    }
11337    impl super::ProgrammableTransaction {
11338        pub const fn const_default() -> Self {
11339            Self {
11340                inputs: Vec::new(),
11341                commands: Vec::new(),
11342            }
11343        }
11344        #[doc(hidden)]
11345        pub fn default_instance() -> &'static Self {
11346            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11347            &DEFAULT
11348        }
11349        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11350        pub fn inputs(&self) -> &[super::Input] {
11351            &self.inputs
11352        }
11353        ///Returns a mutable reference to `inputs`.
11354        ///If the field is unset, it is first initialized with the default value.
11355        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11356            &mut self.inputs
11357        }
11358        ///Sets `inputs` with the provided value.
11359        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11360            self.inputs = field;
11361        }
11362        ///Sets `inputs` with the provided value.
11363        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11364            self.set_inputs(field);
11365            self
11366        }
11367        ///Returns the value of `commands`, or the default value if `commands` is unset.
11368        pub fn commands(&self) -> &[super::Command] {
11369            &self.commands
11370        }
11371        ///Returns a mutable reference to `commands`.
11372        ///If the field is unset, it is first initialized with the default value.
11373        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11374            &mut self.commands
11375        }
11376        ///Sets `commands` with the provided value.
11377        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11378            self.commands = field;
11379        }
11380        ///Sets `commands` with the provided value.
11381        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11382            self.set_commands(field);
11383            self
11384        }
11385    }
11386    impl super::ProtocolConfig {
11387        pub const fn const_default() -> Self {
11388            Self {
11389                protocol_version: None,
11390                feature_flags: std::collections::BTreeMap::new(),
11391                attributes: std::collections::BTreeMap::new(),
11392            }
11393        }
11394        #[doc(hidden)]
11395        pub fn default_instance() -> &'static Self {
11396            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11397            &DEFAULT
11398        }
11399        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11400        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11401            self.protocol_version.as_mut().map(|field| field as _)
11402        }
11403        ///Returns a mutable reference to `protocol_version`.
11404        ///If the field is unset, it is first initialized with the default value.
11405        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11406            self.protocol_version.get_or_insert_default()
11407        }
11408        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11409        pub fn protocol_version_opt(&self) -> Option<u64> {
11410            self.protocol_version.as_ref().map(|field| *field)
11411        }
11412        ///Sets `protocol_version` with the provided value.
11413        pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
11414            self.protocol_version = Some(field.into().into());
11415        }
11416        ///Sets `protocol_version` with the provided value.
11417        pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
11418            self.set_protocol_version(field.into());
11419            self
11420        }
11421        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11422        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11423            &self.feature_flags
11424        }
11425        ///Returns a mutable reference to `feature_flags`.
11426        ///If the field is unset, it is first initialized with the default value.
11427        pub fn feature_flags_mut(
11428            &mut self,
11429        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11430            &mut self.feature_flags
11431        }
11432        ///Sets `feature_flags` with the provided value.
11433        pub fn set_feature_flags(
11434            &mut self,
11435            field: ::std::collections::BTreeMap<String, bool>,
11436        ) {
11437            self.feature_flags = field;
11438        }
11439        ///Sets `feature_flags` with the provided value.
11440        pub fn with_feature_flags(
11441            mut self,
11442            field: ::std::collections::BTreeMap<String, bool>,
11443        ) -> Self {
11444            self.set_feature_flags(field);
11445            self
11446        }
11447        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11448        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11449            &self.attributes
11450        }
11451        ///Returns a mutable reference to `attributes`.
11452        ///If the field is unset, it is first initialized with the default value.
11453        pub fn attributes_mut(
11454            &mut self,
11455        ) -> &mut ::std::collections::BTreeMap<String, String> {
11456            &mut self.attributes
11457        }
11458        ///Sets `attributes` with the provided value.
11459        pub fn set_attributes(
11460            &mut self,
11461            field: ::std::collections::BTreeMap<String, String>,
11462        ) {
11463            self.attributes = field;
11464        }
11465        ///Sets `attributes` with the provided value.
11466        pub fn with_attributes(
11467            mut self,
11468            field: ::std::collections::BTreeMap<String, String>,
11469        ) -> Self {
11470            self.set_attributes(field);
11471            self
11472        }
11473    }
11474    impl super::Publish {
11475        pub const fn const_default() -> Self {
11476            Self {
11477                modules: Vec::new(),
11478                dependencies: Vec::new(),
11479            }
11480        }
11481        #[doc(hidden)]
11482        pub fn default_instance() -> &'static Self {
11483            static DEFAULT: super::Publish = super::Publish::const_default();
11484            &DEFAULT
11485        }
11486        ///Returns the value of `modules`, or the default value if `modules` is unset.
11487        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11488            &self.modules
11489        }
11490        ///Returns a mutable reference to `modules`.
11491        ///If the field is unset, it is first initialized with the default value.
11492        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11493            &mut self.modules
11494        }
11495        ///Sets `modules` with the provided value.
11496        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11497            self.modules = field;
11498        }
11499        ///Sets `modules` with the provided value.
11500        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11501            self.set_modules(field);
11502            self
11503        }
11504        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
11505        pub fn dependencies(&self) -> &[String] {
11506            &self.dependencies
11507        }
11508        ///Returns a mutable reference to `dependencies`.
11509        ///If the field is unset, it is first initialized with the default value.
11510        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11511            &mut self.dependencies
11512        }
11513        ///Sets `dependencies` with the provided value.
11514        pub fn set_dependencies(&mut self, field: Vec<String>) {
11515            self.dependencies = field;
11516        }
11517        ///Sets `dependencies` with the provided value.
11518        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11519            self.set_dependencies(field);
11520            self
11521        }
11522    }
11523    impl super::RandomnessStateUpdate {
11524        pub const fn const_default() -> Self {
11525            Self {
11526                epoch: None,
11527                randomness_round: None,
11528                random_bytes: None,
11529                randomness_object_initial_shared_version: None,
11530            }
11531        }
11532        #[doc(hidden)]
11533        pub fn default_instance() -> &'static Self {
11534            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11535            &DEFAULT
11536        }
11537        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11538        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11539            self.epoch.as_mut().map(|field| field as _)
11540        }
11541        ///Returns a mutable reference to `epoch`.
11542        ///If the field is unset, it is first initialized with the default value.
11543        pub fn epoch_mut(&mut self) -> &mut u64 {
11544            self.epoch.get_or_insert_default()
11545        }
11546        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
11547        pub fn epoch_opt(&self) -> Option<u64> {
11548            self.epoch.as_ref().map(|field| *field)
11549        }
11550        ///Sets `epoch` with the provided value.
11551        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
11552            self.epoch = Some(field.into().into());
11553        }
11554        ///Sets `epoch` with the provided value.
11555        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
11556            self.set_epoch(field.into());
11557            self
11558        }
11559        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11560        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11561            self.randomness_round.as_mut().map(|field| field as _)
11562        }
11563        ///Returns a mutable reference to `randomness_round`.
11564        ///If the field is unset, it is first initialized with the default value.
11565        pub fn randomness_round_mut(&mut self) -> &mut u64 {
11566            self.randomness_round.get_or_insert_default()
11567        }
11568        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
11569        pub fn randomness_round_opt(&self) -> Option<u64> {
11570            self.randomness_round.as_ref().map(|field| *field)
11571        }
11572        ///Sets `randomness_round` with the provided value.
11573        pub fn set_randomness_round<T: Into<u64>>(&mut self, field: T) {
11574            self.randomness_round = Some(field.into().into());
11575        }
11576        ///Sets `randomness_round` with the provided value.
11577        pub fn with_randomness_round<T: Into<u64>>(mut self, field: T) -> Self {
11578            self.set_randomness_round(field.into());
11579            self
11580        }
11581        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
11582        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11583            self.random_bytes.as_ref().map(|field| field as _)
11584        }
11585        ///Sets `random_bytes` with the provided value.
11586        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11587            self.random_bytes = Some(field.into().into());
11588        }
11589        ///Sets `random_bytes` with the provided value.
11590        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11591            mut self,
11592            field: T,
11593        ) -> Self {
11594            self.set_random_bytes(field.into());
11595            self
11596        }
11597        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11598        pub fn randomness_object_initial_shared_version_opt_mut(
11599            &mut self,
11600        ) -> Option<&mut u64> {
11601            self.randomness_object_initial_shared_version
11602                .as_mut()
11603                .map(|field| field as _)
11604        }
11605        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
11606        ///If the field is unset, it is first initialized with the default value.
11607        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11608            self.randomness_object_initial_shared_version.get_or_insert_default()
11609        }
11610        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11611        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11612            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11613        }
11614        ///Sets `randomness_object_initial_shared_version` with the provided value.
11615        pub fn set_randomness_object_initial_shared_version<T: Into<u64>>(
11616            &mut self,
11617            field: T,
11618        ) {
11619            self.randomness_object_initial_shared_version = Some(field.into().into());
11620        }
11621        ///Sets `randomness_object_initial_shared_version` with the provided value.
11622        pub fn with_randomness_object_initial_shared_version<T: Into<u64>>(
11623            mut self,
11624            field: T,
11625        ) -> Self {
11626            self.set_randomness_object_initial_shared_version(field.into());
11627            self
11628        }
11629    }
11630    impl super::RegulatedCoinMetadata {
11631        pub const fn const_default() -> Self {
11632            Self {
11633                id: None,
11634                coin_metadata_object: None,
11635                deny_cap_object: None,
11636                allow_global_pause: None,
11637                variant: None,
11638                coin_regulated_state: None,
11639            }
11640        }
11641        #[doc(hidden)]
11642        pub fn default_instance() -> &'static Self {
11643            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11644            &DEFAULT
11645        }
11646        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11647        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11648            self.id.as_mut().map(|field| field as _)
11649        }
11650        ///Returns a mutable reference to `id`.
11651        ///If the field is unset, it is first initialized with the default value.
11652        pub fn id_mut(&mut self) -> &mut String {
11653            self.id.get_or_insert_default()
11654        }
11655        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11656        pub fn id_opt(&self) -> Option<&str> {
11657            self.id.as_ref().map(|field| field as _)
11658        }
11659        ///Sets `id` with the provided value.
11660        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11661            self.id = Some(field.into().into());
11662        }
11663        ///Sets `id` with the provided value.
11664        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11665            self.set_id(field.into());
11666            self
11667        }
11668        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11669        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
11670            self.coin_metadata_object.as_mut().map(|field| field as _)
11671        }
11672        ///Returns a mutable reference to `coin_metadata_object`.
11673        ///If the field is unset, it is first initialized with the default value.
11674        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
11675            self.coin_metadata_object.get_or_insert_default()
11676        }
11677        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11678        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
11679            self.coin_metadata_object.as_ref().map(|field| field as _)
11680        }
11681        ///Sets `coin_metadata_object` with the provided value.
11682        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
11683            self.coin_metadata_object = Some(field.into().into());
11684        }
11685        ///Sets `coin_metadata_object` with the provided value.
11686        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
11687            self.set_coin_metadata_object(field.into());
11688            self
11689        }
11690        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11691        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
11692            self.deny_cap_object.as_mut().map(|field| field as _)
11693        }
11694        ///Returns a mutable reference to `deny_cap_object`.
11695        ///If the field is unset, it is first initialized with the default value.
11696        pub fn deny_cap_object_mut(&mut self) -> &mut String {
11697            self.deny_cap_object.get_or_insert_default()
11698        }
11699        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11700        pub fn deny_cap_object_opt(&self) -> Option<&str> {
11701            self.deny_cap_object.as_ref().map(|field| field as _)
11702        }
11703        ///Sets `deny_cap_object` with the provided value.
11704        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
11705            self.deny_cap_object = Some(field.into().into());
11706        }
11707        ///Sets `deny_cap_object` with the provided value.
11708        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
11709            self.set_deny_cap_object(field.into());
11710            self
11711        }
11712        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11713        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
11714            self.allow_global_pause.as_mut().map(|field| field as _)
11715        }
11716        ///Returns a mutable reference to `allow_global_pause`.
11717        ///If the field is unset, it is first initialized with the default value.
11718        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
11719            self.allow_global_pause.get_or_insert_default()
11720        }
11721        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
11722        pub fn allow_global_pause_opt(&self) -> Option<bool> {
11723            self.allow_global_pause.as_ref().map(|field| *field)
11724        }
11725        ///Sets `allow_global_pause` with the provided value.
11726        pub fn set_allow_global_pause<T: Into<bool>>(&mut self, field: T) {
11727            self.allow_global_pause = Some(field.into().into());
11728        }
11729        ///Sets `allow_global_pause` with the provided value.
11730        pub fn with_allow_global_pause<T: Into<bool>>(mut self, field: T) -> Self {
11731            self.set_allow_global_pause(field.into());
11732            self
11733        }
11734        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11735        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
11736            self.variant.as_mut().map(|field| field as _)
11737        }
11738        ///Returns a mutable reference to `variant`.
11739        ///If the field is unset, it is first initialized with the default value.
11740        pub fn variant_mut(&mut self) -> &mut u32 {
11741            self.variant.get_or_insert_default()
11742        }
11743        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
11744        pub fn variant_opt(&self) -> Option<u32> {
11745            self.variant.as_ref().map(|field| *field)
11746        }
11747        ///Sets `variant` with the provided value.
11748        pub fn set_variant<T: Into<u32>>(&mut self, field: T) {
11749            self.variant = Some(field.into().into());
11750        }
11751        ///Sets `variant` with the provided value.
11752        pub fn with_variant<T: Into<u32>>(mut self, field: T) -> Self {
11753            self.set_variant(field.into());
11754            self
11755        }
11756        ///Sets `coin_regulated_state` with the provided value.
11757        pub fn with_coin_regulated_state<
11758            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
11759        >(mut self, field: T) -> Self {
11760            self.set_coin_regulated_state(field.into());
11761            self
11762        }
11763    }
11764    impl super::ReverseLookupNameRequest {
11765        pub const fn const_default() -> Self {
11766            Self { address: None }
11767        }
11768        #[doc(hidden)]
11769        pub fn default_instance() -> &'static Self {
11770            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
11771            &DEFAULT
11772        }
11773        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11774        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11775            self.address.as_mut().map(|field| field as _)
11776        }
11777        ///Returns a mutable reference to `address`.
11778        ///If the field is unset, it is first initialized with the default value.
11779        pub fn address_mut(&mut self) -> &mut String {
11780            self.address.get_or_insert_default()
11781        }
11782        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11783        pub fn address_opt(&self) -> Option<&str> {
11784            self.address.as_ref().map(|field| field as _)
11785        }
11786        ///Sets `address` with the provided value.
11787        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11788            self.address = Some(field.into().into());
11789        }
11790        ///Sets `address` with the provided value.
11791        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11792            self.set_address(field.into());
11793            self
11794        }
11795    }
11796    impl super::ReverseLookupNameResponse {
11797        pub const fn const_default() -> Self {
11798            Self { record: None }
11799        }
11800        #[doc(hidden)]
11801        pub fn default_instance() -> &'static Self {
11802            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
11803            &DEFAULT
11804        }
11805        ///Returns the value of `record`, or the default value if `record` is unset.
11806        pub fn record(&self) -> &super::NameRecord {
11807            self.record
11808                .as_ref()
11809                .map(|field| field as _)
11810                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11811        }
11812        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11813        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11814            self.record.as_mut().map(|field| field as _)
11815        }
11816        ///Returns a mutable reference to `record`.
11817        ///If the field is unset, it is first initialized with the default value.
11818        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11819            self.record.get_or_insert_default()
11820        }
11821        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11822        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11823            self.record.as_ref().map(|field| field as _)
11824        }
11825        ///Sets `record` with the provided value.
11826        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11827            self.record = Some(field.into().into());
11828        }
11829        ///Sets `record` with the provided value.
11830        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11831            self.set_record(field.into());
11832            self
11833        }
11834    }
11835    impl super::SimpleSignature {
11836        pub const fn const_default() -> Self {
11837            Self {
11838                scheme: None,
11839                signature: None,
11840                public_key: None,
11841            }
11842        }
11843        #[doc(hidden)]
11844        pub fn default_instance() -> &'static Self {
11845            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
11846            &DEFAULT
11847        }
11848        ///Sets `scheme` with the provided value.
11849        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11850            self.set_scheme(field.into());
11851            self
11852        }
11853        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11854        pub fn signature_opt(&self) -> Option<&[u8]> {
11855            self.signature.as_ref().map(|field| field as _)
11856        }
11857        ///Sets `signature` with the provided value.
11858        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11859            self.signature = Some(field.into().into());
11860        }
11861        ///Sets `signature` with the provided value.
11862        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
11863            mut self,
11864            field: T,
11865        ) -> Self {
11866            self.set_signature(field.into());
11867            self
11868        }
11869        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11870        pub fn public_key_opt(&self) -> Option<&[u8]> {
11871            self.public_key.as_ref().map(|field| field as _)
11872        }
11873        ///Sets `public_key` with the provided value.
11874        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11875            self.public_key = Some(field.into().into());
11876        }
11877        ///Sets `public_key` with the provided value.
11878        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11879            mut self,
11880            field: T,
11881        ) -> Self {
11882            self.set_public_key(field.into());
11883            self
11884        }
11885    }
11886    impl super::SimulateTransactionRequest {
11887        pub const fn const_default() -> Self {
11888            Self {
11889                transaction: None,
11890                read_mask: None,
11891                checks: None,
11892                do_gas_selection: None,
11893            }
11894        }
11895        #[doc(hidden)]
11896        pub fn default_instance() -> &'static Self {
11897            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
11898            &DEFAULT
11899        }
11900        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
11901        pub fn transaction(&self) -> &super::Transaction {
11902            self.transaction
11903                .as_ref()
11904                .map(|field| field as _)
11905                .unwrap_or_else(|| super::Transaction::default_instance() as _)
11906        }
11907        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11908        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
11909            self.transaction.as_mut().map(|field| field as _)
11910        }
11911        ///Returns a mutable reference to `transaction`.
11912        ///If the field is unset, it is first initialized with the default value.
11913        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
11914            self.transaction.get_or_insert_default()
11915        }
11916        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11917        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
11918            self.transaction.as_ref().map(|field| field as _)
11919        }
11920        ///Sets `transaction` with the provided value.
11921        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
11922            self.transaction = Some(field.into().into());
11923        }
11924        ///Sets `transaction` with the provided value.
11925        pub fn with_transaction<T: Into<super::Transaction>>(
11926            mut self,
11927            field: T,
11928        ) -> Self {
11929            self.set_transaction(field.into());
11930            self
11931        }
11932        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11933        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11934            self.read_mask.as_mut().map(|field| field as _)
11935        }
11936        ///Returns a mutable reference to `read_mask`.
11937        ///If the field is unset, it is first initialized with the default value.
11938        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11939            self.read_mask.get_or_insert_default()
11940        }
11941        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
11942        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11943            self.read_mask.as_ref().map(|field| field as _)
11944        }
11945        ///Sets `read_mask` with the provided value.
11946        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11947            self.read_mask = Some(field.into().into());
11948        }
11949        ///Sets `read_mask` with the provided value.
11950        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11951            mut self,
11952            field: T,
11953        ) -> Self {
11954            self.set_read_mask(field.into());
11955            self
11956        }
11957        ///Sets `checks` with the provided value.
11958        pub fn with_checks<
11959            T: Into<super::simulate_transaction_request::TransactionChecks>,
11960        >(mut self, field: T) -> Self {
11961            self.set_checks(field.into());
11962            self
11963        }
11964        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11965        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
11966            self.do_gas_selection.as_mut().map(|field| field as _)
11967        }
11968        ///Returns a mutable reference to `do_gas_selection`.
11969        ///If the field is unset, it is first initialized with the default value.
11970        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
11971            self.do_gas_selection.get_or_insert_default()
11972        }
11973        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
11974        pub fn do_gas_selection_opt(&self) -> Option<bool> {
11975            self.do_gas_selection.as_ref().map(|field| *field)
11976        }
11977        ///Sets `do_gas_selection` with the provided value.
11978        pub fn set_do_gas_selection<T: Into<bool>>(&mut self, field: T) {
11979            self.do_gas_selection = Some(field.into().into());
11980        }
11981        ///Sets `do_gas_selection` with the provided value.
11982        pub fn with_do_gas_selection<T: Into<bool>>(mut self, field: T) -> Self {
11983            self.set_do_gas_selection(field.into());
11984            self
11985        }
11986    }
11987    impl super::SimulateTransactionResponse {
11988        pub const fn const_default() -> Self {
11989            Self {
11990                transaction: None,
11991                outputs: Vec::new(),
11992            }
11993        }
11994        #[doc(hidden)]
11995        pub fn default_instance() -> &'static Self {
11996            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
11997            &DEFAULT
11998        }
11999        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12000        pub fn transaction(&self) -> &super::ExecutedTransaction {
12001            self.transaction
12002                .as_ref()
12003                .map(|field| field as _)
12004                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12005        }
12006        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12007        pub fn transaction_opt_mut(
12008            &mut self,
12009        ) -> Option<&mut super::ExecutedTransaction> {
12010            self.transaction.as_mut().map(|field| field as _)
12011        }
12012        ///Returns a mutable reference to `transaction`.
12013        ///If the field is unset, it is first initialized with the default value.
12014        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12015            self.transaction.get_or_insert_default()
12016        }
12017        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12018        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12019            self.transaction.as_ref().map(|field| field as _)
12020        }
12021        ///Sets `transaction` with the provided value.
12022        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12023            &mut self,
12024            field: T,
12025        ) {
12026            self.transaction = Some(field.into().into());
12027        }
12028        ///Sets `transaction` with the provided value.
12029        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12030            mut self,
12031            field: T,
12032        ) -> Self {
12033            self.set_transaction(field.into());
12034            self
12035        }
12036        ///Returns the value of `outputs`, or the default value if `outputs` is unset.
12037        pub fn outputs(&self) -> &[super::CommandResult] {
12038            &self.outputs
12039        }
12040        ///Returns a mutable reference to `outputs`.
12041        ///If the field is unset, it is first initialized with the default value.
12042        pub fn outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12043            &mut self.outputs
12044        }
12045        ///Sets `outputs` with the provided value.
12046        pub fn set_outputs(&mut self, field: Vec<super::CommandResult>) {
12047            self.outputs = field;
12048        }
12049        ///Sets `outputs` with the provided value.
12050        pub fn with_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12051            self.set_outputs(field);
12052            self
12053        }
12054    }
12055    impl super::SizeError {
12056        pub const fn const_default() -> Self {
12057            Self { size: None, max_size: None }
12058        }
12059        #[doc(hidden)]
12060        pub fn default_instance() -> &'static Self {
12061            static DEFAULT: super::SizeError = super::SizeError::const_default();
12062            &DEFAULT
12063        }
12064        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12065        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12066            self.size.as_mut().map(|field| field as _)
12067        }
12068        ///Returns a mutable reference to `size`.
12069        ///If the field is unset, it is first initialized with the default value.
12070        pub fn size_mut(&mut self) -> &mut u64 {
12071            self.size.get_or_insert_default()
12072        }
12073        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12074        pub fn size_opt(&self) -> Option<u64> {
12075            self.size.as_ref().map(|field| *field)
12076        }
12077        ///Sets `size` with the provided value.
12078        pub fn set_size<T: Into<u64>>(&mut self, field: T) {
12079            self.size = Some(field.into().into());
12080        }
12081        ///Sets `size` with the provided value.
12082        pub fn with_size<T: Into<u64>>(mut self, field: T) -> Self {
12083            self.set_size(field.into());
12084            self
12085        }
12086        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12087        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12088            self.max_size.as_mut().map(|field| field as _)
12089        }
12090        ///Returns a mutable reference to `max_size`.
12091        ///If the field is unset, it is first initialized with the default value.
12092        pub fn max_size_mut(&mut self) -> &mut u64 {
12093            self.max_size.get_or_insert_default()
12094        }
12095        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12096        pub fn max_size_opt(&self) -> Option<u64> {
12097            self.max_size.as_ref().map(|field| *field)
12098        }
12099        ///Sets `max_size` with the provided value.
12100        pub fn set_max_size<T: Into<u64>>(&mut self, field: T) {
12101            self.max_size = Some(field.into().into());
12102        }
12103        ///Sets `max_size` with the provided value.
12104        pub fn with_max_size<T: Into<u64>>(mut self, field: T) -> Self {
12105            self.set_max_size(field.into());
12106            self
12107        }
12108    }
12109    impl super::SplitCoins {
12110        pub const fn const_default() -> Self {
12111            Self {
12112                coin: None,
12113                amounts: Vec::new(),
12114            }
12115        }
12116        #[doc(hidden)]
12117        pub fn default_instance() -> &'static Self {
12118            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12119            &DEFAULT
12120        }
12121        ///Returns the value of `coin`, or the default value if `coin` is unset.
12122        pub fn coin(&self) -> &super::Argument {
12123            self.coin
12124                .as_ref()
12125                .map(|field| field as _)
12126                .unwrap_or_else(|| super::Argument::default_instance() as _)
12127        }
12128        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12129        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12130            self.coin.as_mut().map(|field| field as _)
12131        }
12132        ///Returns a mutable reference to `coin`.
12133        ///If the field is unset, it is first initialized with the default value.
12134        pub fn coin_mut(&mut self) -> &mut super::Argument {
12135            self.coin.get_or_insert_default()
12136        }
12137        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12138        pub fn coin_opt(&self) -> Option<&super::Argument> {
12139            self.coin.as_ref().map(|field| field as _)
12140        }
12141        ///Sets `coin` with the provided value.
12142        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12143            self.coin = Some(field.into().into());
12144        }
12145        ///Sets `coin` with the provided value.
12146        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12147            self.set_coin(field.into());
12148            self
12149        }
12150        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12151        pub fn amounts(&self) -> &[super::Argument] {
12152            &self.amounts
12153        }
12154        ///Returns a mutable reference to `amounts`.
12155        ///If the field is unset, it is first initialized with the default value.
12156        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12157            &mut self.amounts
12158        }
12159        ///Sets `amounts` with the provided value.
12160        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12161            self.amounts = field;
12162        }
12163        ///Sets `amounts` with the provided value.
12164        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12165            self.set_amounts(field);
12166            self
12167        }
12168    }
12169    impl super::StakeSubsidy {
12170        pub const fn const_default() -> Self {
12171            Self {
12172                balance: None,
12173                distribution_counter: None,
12174                current_distribution_amount: None,
12175                stake_subsidy_period_length: None,
12176                stake_subsidy_decrease_rate: None,
12177                extra_fields: None,
12178            }
12179        }
12180        #[doc(hidden)]
12181        pub fn default_instance() -> &'static Self {
12182            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12183            &DEFAULT
12184        }
12185        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12186        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12187            self.balance.as_mut().map(|field| field as _)
12188        }
12189        ///Returns a mutable reference to `balance`.
12190        ///If the field is unset, it is first initialized with the default value.
12191        pub fn balance_mut(&mut self) -> &mut u64 {
12192            self.balance.get_or_insert_default()
12193        }
12194        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12195        pub fn balance_opt(&self) -> Option<u64> {
12196            self.balance.as_ref().map(|field| *field)
12197        }
12198        ///Sets `balance` with the provided value.
12199        pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
12200            self.balance = Some(field.into().into());
12201        }
12202        ///Sets `balance` with the provided value.
12203        pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
12204            self.set_balance(field.into());
12205            self
12206        }
12207        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12208        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12209            self.distribution_counter.as_mut().map(|field| field as _)
12210        }
12211        ///Returns a mutable reference to `distribution_counter`.
12212        ///If the field is unset, it is first initialized with the default value.
12213        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12214            self.distribution_counter.get_or_insert_default()
12215        }
12216        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12217        pub fn distribution_counter_opt(&self) -> Option<u64> {
12218            self.distribution_counter.as_ref().map(|field| *field)
12219        }
12220        ///Sets `distribution_counter` with the provided value.
12221        pub fn set_distribution_counter<T: Into<u64>>(&mut self, field: T) {
12222            self.distribution_counter = Some(field.into().into());
12223        }
12224        ///Sets `distribution_counter` with the provided value.
12225        pub fn with_distribution_counter<T: Into<u64>>(mut self, field: T) -> Self {
12226            self.set_distribution_counter(field.into());
12227            self
12228        }
12229        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12230        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12231            self.current_distribution_amount.as_mut().map(|field| field as _)
12232        }
12233        ///Returns a mutable reference to `current_distribution_amount`.
12234        ///If the field is unset, it is first initialized with the default value.
12235        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12236            self.current_distribution_amount.get_or_insert_default()
12237        }
12238        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12239        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12240            self.current_distribution_amount.as_ref().map(|field| *field)
12241        }
12242        ///Sets `current_distribution_amount` with the provided value.
12243        pub fn set_current_distribution_amount<T: Into<u64>>(&mut self, field: T) {
12244            self.current_distribution_amount = Some(field.into().into());
12245        }
12246        ///Sets `current_distribution_amount` with the provided value.
12247        pub fn with_current_distribution_amount<T: Into<u64>>(
12248            mut self,
12249            field: T,
12250        ) -> Self {
12251            self.set_current_distribution_amount(field.into());
12252            self
12253        }
12254        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12255        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12256            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12257        }
12258        ///Returns a mutable reference to `stake_subsidy_period_length`.
12259        ///If the field is unset, it is first initialized with the default value.
12260        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12261            self.stake_subsidy_period_length.get_or_insert_default()
12262        }
12263        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12264        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12265            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12266        }
12267        ///Sets `stake_subsidy_period_length` with the provided value.
12268        pub fn set_stake_subsidy_period_length<T: Into<u64>>(&mut self, field: T) {
12269            self.stake_subsidy_period_length = Some(field.into().into());
12270        }
12271        ///Sets `stake_subsidy_period_length` with the provided value.
12272        pub fn with_stake_subsidy_period_length<T: Into<u64>>(
12273            mut self,
12274            field: T,
12275        ) -> Self {
12276            self.set_stake_subsidy_period_length(field.into());
12277            self
12278        }
12279        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12280        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12281            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12282        }
12283        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12284        ///If the field is unset, it is first initialized with the default value.
12285        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12286            self.stake_subsidy_decrease_rate.get_or_insert_default()
12287        }
12288        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12289        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12290            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12291        }
12292        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12293        pub fn set_stake_subsidy_decrease_rate<T: Into<u32>>(&mut self, field: T) {
12294            self.stake_subsidy_decrease_rate = Some(field.into().into());
12295        }
12296        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12297        pub fn with_stake_subsidy_decrease_rate<T: Into<u32>>(
12298            mut self,
12299            field: T,
12300        ) -> Self {
12301            self.set_stake_subsidy_decrease_rate(field.into());
12302            self
12303        }
12304        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12305        pub fn extra_fields(&self) -> &super::MoveTable {
12306            self.extra_fields
12307                .as_ref()
12308                .map(|field| field as _)
12309                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12310        }
12311        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12312        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12313            self.extra_fields.as_mut().map(|field| field as _)
12314        }
12315        ///Returns a mutable reference to `extra_fields`.
12316        ///If the field is unset, it is first initialized with the default value.
12317        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12318            self.extra_fields.get_or_insert_default()
12319        }
12320        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12321        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12322            self.extra_fields.as_ref().map(|field| field as _)
12323        }
12324        ///Sets `extra_fields` with the provided value.
12325        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12326            self.extra_fields = Some(field.into().into());
12327        }
12328        ///Sets `extra_fields` with the provided value.
12329        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12330            self.set_extra_fields(field.into());
12331            self
12332        }
12333    }
12334    impl super::StakingPool {
12335        pub const fn const_default() -> Self {
12336            Self {
12337                id: None,
12338                activation_epoch: None,
12339                deactivation_epoch: None,
12340                sui_balance: None,
12341                rewards_pool: None,
12342                pool_token_balance: None,
12343                exchange_rates: None,
12344                pending_stake: None,
12345                pending_total_sui_withdraw: None,
12346                pending_pool_token_withdraw: None,
12347                extra_fields: None,
12348            }
12349        }
12350        #[doc(hidden)]
12351        pub fn default_instance() -> &'static Self {
12352            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12353            &DEFAULT
12354        }
12355        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12356        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12357            self.id.as_mut().map(|field| field as _)
12358        }
12359        ///Returns a mutable reference to `id`.
12360        ///If the field is unset, it is first initialized with the default value.
12361        pub fn id_mut(&mut self) -> &mut String {
12362            self.id.get_or_insert_default()
12363        }
12364        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12365        pub fn id_opt(&self) -> Option<&str> {
12366            self.id.as_ref().map(|field| field as _)
12367        }
12368        ///Sets `id` with the provided value.
12369        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12370            self.id = Some(field.into().into());
12371        }
12372        ///Sets `id` with the provided value.
12373        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12374            self.set_id(field.into());
12375            self
12376        }
12377        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12378        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12379            self.activation_epoch.as_mut().map(|field| field as _)
12380        }
12381        ///Returns a mutable reference to `activation_epoch`.
12382        ///If the field is unset, it is first initialized with the default value.
12383        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12384            self.activation_epoch.get_or_insert_default()
12385        }
12386        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12387        pub fn activation_epoch_opt(&self) -> Option<u64> {
12388            self.activation_epoch.as_ref().map(|field| *field)
12389        }
12390        ///Sets `activation_epoch` with the provided value.
12391        pub fn set_activation_epoch<T: Into<u64>>(&mut self, field: T) {
12392            self.activation_epoch = Some(field.into().into());
12393        }
12394        ///Sets `activation_epoch` with the provided value.
12395        pub fn with_activation_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12396            self.set_activation_epoch(field.into());
12397            self
12398        }
12399        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12400        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12401            self.deactivation_epoch.as_mut().map(|field| field as _)
12402        }
12403        ///Returns a mutable reference to `deactivation_epoch`.
12404        ///If the field is unset, it is first initialized with the default value.
12405        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12406            self.deactivation_epoch.get_or_insert_default()
12407        }
12408        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12409        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12410            self.deactivation_epoch.as_ref().map(|field| *field)
12411        }
12412        ///Sets `deactivation_epoch` with the provided value.
12413        pub fn set_deactivation_epoch<T: Into<u64>>(&mut self, field: T) {
12414            self.deactivation_epoch = Some(field.into().into());
12415        }
12416        ///Sets `deactivation_epoch` with the provided value.
12417        pub fn with_deactivation_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12418            self.set_deactivation_epoch(field.into());
12419            self
12420        }
12421        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12422        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12423            self.sui_balance.as_mut().map(|field| field as _)
12424        }
12425        ///Returns a mutable reference to `sui_balance`.
12426        ///If the field is unset, it is first initialized with the default value.
12427        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12428            self.sui_balance.get_or_insert_default()
12429        }
12430        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12431        pub fn sui_balance_opt(&self) -> Option<u64> {
12432            self.sui_balance.as_ref().map(|field| *field)
12433        }
12434        ///Sets `sui_balance` with the provided value.
12435        pub fn set_sui_balance<T: Into<u64>>(&mut self, field: T) {
12436            self.sui_balance = Some(field.into().into());
12437        }
12438        ///Sets `sui_balance` with the provided value.
12439        pub fn with_sui_balance<T: Into<u64>>(mut self, field: T) -> Self {
12440            self.set_sui_balance(field.into());
12441            self
12442        }
12443        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12444        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12445            self.rewards_pool.as_mut().map(|field| field as _)
12446        }
12447        ///Returns a mutable reference to `rewards_pool`.
12448        ///If the field is unset, it is first initialized with the default value.
12449        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12450            self.rewards_pool.get_or_insert_default()
12451        }
12452        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12453        pub fn rewards_pool_opt(&self) -> Option<u64> {
12454            self.rewards_pool.as_ref().map(|field| *field)
12455        }
12456        ///Sets `rewards_pool` with the provided value.
12457        pub fn set_rewards_pool<T: Into<u64>>(&mut self, field: T) {
12458            self.rewards_pool = Some(field.into().into());
12459        }
12460        ///Sets `rewards_pool` with the provided value.
12461        pub fn with_rewards_pool<T: Into<u64>>(mut self, field: T) -> Self {
12462            self.set_rewards_pool(field.into());
12463            self
12464        }
12465        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12466        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12467            self.pool_token_balance.as_mut().map(|field| field as _)
12468        }
12469        ///Returns a mutable reference to `pool_token_balance`.
12470        ///If the field is unset, it is first initialized with the default value.
12471        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12472            self.pool_token_balance.get_or_insert_default()
12473        }
12474        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12475        pub fn pool_token_balance_opt(&self) -> Option<u64> {
12476            self.pool_token_balance.as_ref().map(|field| *field)
12477        }
12478        ///Sets `pool_token_balance` with the provided value.
12479        pub fn set_pool_token_balance<T: Into<u64>>(&mut self, field: T) {
12480            self.pool_token_balance = Some(field.into().into());
12481        }
12482        ///Sets `pool_token_balance` with the provided value.
12483        pub fn with_pool_token_balance<T: Into<u64>>(mut self, field: T) -> Self {
12484            self.set_pool_token_balance(field.into());
12485            self
12486        }
12487        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
12488        pub fn exchange_rates(&self) -> &super::MoveTable {
12489            self.exchange_rates
12490                .as_ref()
12491                .map(|field| field as _)
12492                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12493        }
12494        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12495        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12496            self.exchange_rates.as_mut().map(|field| field as _)
12497        }
12498        ///Returns a mutable reference to `exchange_rates`.
12499        ///If the field is unset, it is first initialized with the default value.
12500        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12501            self.exchange_rates.get_or_insert_default()
12502        }
12503        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12504        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12505            self.exchange_rates.as_ref().map(|field| field as _)
12506        }
12507        ///Sets `exchange_rates` with the provided value.
12508        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12509            self.exchange_rates = Some(field.into().into());
12510        }
12511        ///Sets `exchange_rates` with the provided value.
12512        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12513            mut self,
12514            field: T,
12515        ) -> Self {
12516            self.set_exchange_rates(field.into());
12517            self
12518        }
12519        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12520        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12521            self.pending_stake.as_mut().map(|field| field as _)
12522        }
12523        ///Returns a mutable reference to `pending_stake`.
12524        ///If the field is unset, it is first initialized with the default value.
12525        pub fn pending_stake_mut(&mut self) -> &mut u64 {
12526            self.pending_stake.get_or_insert_default()
12527        }
12528        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12529        pub fn pending_stake_opt(&self) -> Option<u64> {
12530            self.pending_stake.as_ref().map(|field| *field)
12531        }
12532        ///Sets `pending_stake` with the provided value.
12533        pub fn set_pending_stake<T: Into<u64>>(&mut self, field: T) {
12534            self.pending_stake = Some(field.into().into());
12535        }
12536        ///Sets `pending_stake` with the provided value.
12537        pub fn with_pending_stake<T: Into<u64>>(mut self, field: T) -> Self {
12538            self.set_pending_stake(field.into());
12539            self
12540        }
12541        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12542        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12543            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12544        }
12545        ///Returns a mutable reference to `pending_total_sui_withdraw`.
12546        ///If the field is unset, it is first initialized with the default value.
12547        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12548            self.pending_total_sui_withdraw.get_or_insert_default()
12549        }
12550        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12551        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12552            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12553        }
12554        ///Sets `pending_total_sui_withdraw` with the provided value.
12555        pub fn set_pending_total_sui_withdraw<T: Into<u64>>(&mut self, field: T) {
12556            self.pending_total_sui_withdraw = Some(field.into().into());
12557        }
12558        ///Sets `pending_total_sui_withdraw` with the provided value.
12559        pub fn with_pending_total_sui_withdraw<T: Into<u64>>(
12560            mut self,
12561            field: T,
12562        ) -> Self {
12563            self.set_pending_total_sui_withdraw(field.into());
12564            self
12565        }
12566        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12567        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12568            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12569        }
12570        ///Returns a mutable reference to `pending_pool_token_withdraw`.
12571        ///If the field is unset, it is first initialized with the default value.
12572        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12573            self.pending_pool_token_withdraw.get_or_insert_default()
12574        }
12575        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12576        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12577            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12578        }
12579        ///Sets `pending_pool_token_withdraw` with the provided value.
12580        pub fn set_pending_pool_token_withdraw<T: Into<u64>>(&mut self, field: T) {
12581            self.pending_pool_token_withdraw = Some(field.into().into());
12582        }
12583        ///Sets `pending_pool_token_withdraw` with the provided value.
12584        pub fn with_pending_pool_token_withdraw<T: Into<u64>>(
12585            mut self,
12586            field: T,
12587        ) -> Self {
12588            self.set_pending_pool_token_withdraw(field.into());
12589            self
12590        }
12591        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12592        pub fn extra_fields(&self) -> &super::MoveTable {
12593            self.extra_fields
12594                .as_ref()
12595                .map(|field| field as _)
12596                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12597        }
12598        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12599        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12600            self.extra_fields.as_mut().map(|field| field as _)
12601        }
12602        ///Returns a mutable reference to `extra_fields`.
12603        ///If the field is unset, it is first initialized with the default value.
12604        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12605            self.extra_fields.get_or_insert_default()
12606        }
12607        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12608        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12609            self.extra_fields.as_ref().map(|field| field as _)
12610        }
12611        ///Sets `extra_fields` with the provided value.
12612        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12613            self.extra_fields = Some(field.into().into());
12614        }
12615        ///Sets `extra_fields` with the provided value.
12616        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12617            self.set_extra_fields(field.into());
12618            self
12619        }
12620    }
12621    impl super::StorageFund {
12622        pub const fn const_default() -> Self {
12623            Self {
12624                total_object_storage_rebates: None,
12625                non_refundable_balance: None,
12626            }
12627        }
12628        #[doc(hidden)]
12629        pub fn default_instance() -> &'static Self {
12630            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12631            &DEFAULT
12632        }
12633        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12634        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12635            self.total_object_storage_rebates.as_mut().map(|field| field as _)
12636        }
12637        ///Returns a mutable reference to `total_object_storage_rebates`.
12638        ///If the field is unset, it is first initialized with the default value.
12639        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12640            self.total_object_storage_rebates.get_or_insert_default()
12641        }
12642        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12643        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12644            self.total_object_storage_rebates.as_ref().map(|field| *field)
12645        }
12646        ///Sets `total_object_storage_rebates` with the provided value.
12647        pub fn set_total_object_storage_rebates<T: Into<u64>>(&mut self, field: T) {
12648            self.total_object_storage_rebates = Some(field.into().into());
12649        }
12650        ///Sets `total_object_storage_rebates` with the provided value.
12651        pub fn with_total_object_storage_rebates<T: Into<u64>>(
12652            mut self,
12653            field: T,
12654        ) -> Self {
12655            self.set_total_object_storage_rebates(field.into());
12656            self
12657        }
12658        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12659        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12660            self.non_refundable_balance.as_mut().map(|field| field as _)
12661        }
12662        ///Returns a mutable reference to `non_refundable_balance`.
12663        ///If the field is unset, it is first initialized with the default value.
12664        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12665            self.non_refundable_balance.get_or_insert_default()
12666        }
12667        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12668        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12669            self.non_refundable_balance.as_ref().map(|field| *field)
12670        }
12671        ///Sets `non_refundable_balance` with the provided value.
12672        pub fn set_non_refundable_balance<T: Into<u64>>(&mut self, field: T) {
12673            self.non_refundable_balance = Some(field.into().into());
12674        }
12675        ///Sets `non_refundable_balance` with the provided value.
12676        pub fn with_non_refundable_balance<T: Into<u64>>(mut self, field: T) -> Self {
12677            self.set_non_refundable_balance(field.into());
12678            self
12679        }
12680    }
12681    impl super::SubscribeCheckpointsRequest {
12682        pub const fn const_default() -> Self {
12683            Self { read_mask: None }
12684        }
12685        #[doc(hidden)]
12686        pub fn default_instance() -> &'static Self {
12687            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
12688            &DEFAULT
12689        }
12690        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12691        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12692            self.read_mask.as_mut().map(|field| field as _)
12693        }
12694        ///Returns a mutable reference to `read_mask`.
12695        ///If the field is unset, it is first initialized with the default value.
12696        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12697            self.read_mask.get_or_insert_default()
12698        }
12699        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12700        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12701            self.read_mask.as_ref().map(|field| field as _)
12702        }
12703        ///Sets `read_mask` with the provided value.
12704        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12705            self.read_mask = Some(field.into().into());
12706        }
12707        ///Sets `read_mask` with the provided value.
12708        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12709            mut self,
12710            field: T,
12711        ) -> Self {
12712            self.set_read_mask(field.into());
12713            self
12714        }
12715    }
12716    impl super::SubscribeCheckpointsResponse {
12717        pub const fn const_default() -> Self {
12718            Self {
12719                cursor: None,
12720                checkpoint: None,
12721            }
12722        }
12723        #[doc(hidden)]
12724        pub fn default_instance() -> &'static Self {
12725            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
12726            &DEFAULT
12727        }
12728        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12729        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
12730            self.cursor.as_mut().map(|field| field as _)
12731        }
12732        ///Returns a mutable reference to `cursor`.
12733        ///If the field is unset, it is first initialized with the default value.
12734        pub fn cursor_mut(&mut self) -> &mut u64 {
12735            self.cursor.get_or_insert_default()
12736        }
12737        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
12738        pub fn cursor_opt(&self) -> Option<u64> {
12739            self.cursor.as_ref().map(|field| *field)
12740        }
12741        ///Sets `cursor` with the provided value.
12742        pub fn set_cursor<T: Into<u64>>(&mut self, field: T) {
12743            self.cursor = Some(field.into().into());
12744        }
12745        ///Sets `cursor` with the provided value.
12746        pub fn with_cursor<T: Into<u64>>(mut self, field: T) -> Self {
12747            self.set_cursor(field.into());
12748            self
12749        }
12750        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
12751        pub fn checkpoint(&self) -> &super::Checkpoint {
12752            self.checkpoint
12753                .as_ref()
12754                .map(|field| field as _)
12755                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
12756        }
12757        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12758        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
12759            self.checkpoint.as_mut().map(|field| field as _)
12760        }
12761        ///Returns a mutable reference to `checkpoint`.
12762        ///If the field is unset, it is first initialized with the default value.
12763        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
12764            self.checkpoint.get_or_insert_default()
12765        }
12766        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
12767        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
12768            self.checkpoint.as_ref().map(|field| field as _)
12769        }
12770        ///Sets `checkpoint` with the provided value.
12771        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
12772            self.checkpoint = Some(field.into().into());
12773        }
12774        ///Sets `checkpoint` with the provided value.
12775        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
12776            self.set_checkpoint(field.into());
12777            self
12778        }
12779    }
12780    impl super::SystemPackage {
12781        pub const fn const_default() -> Self {
12782            Self {
12783                version: None,
12784                modules: Vec::new(),
12785                dependencies: Vec::new(),
12786            }
12787        }
12788        #[doc(hidden)]
12789        pub fn default_instance() -> &'static Self {
12790            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
12791            &DEFAULT
12792        }
12793        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12794        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12795            self.version.as_mut().map(|field| field as _)
12796        }
12797        ///Returns a mutable reference to `version`.
12798        ///If the field is unset, it is first initialized with the default value.
12799        pub fn version_mut(&mut self) -> &mut u64 {
12800            self.version.get_or_insert_default()
12801        }
12802        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12803        pub fn version_opt(&self) -> Option<u64> {
12804            self.version.as_ref().map(|field| *field)
12805        }
12806        ///Sets `version` with the provided value.
12807        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
12808            self.version = Some(field.into().into());
12809        }
12810        ///Sets `version` with the provided value.
12811        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
12812            self.set_version(field.into());
12813            self
12814        }
12815        ///Returns the value of `modules`, or the default value if `modules` is unset.
12816        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12817            &self.modules
12818        }
12819        ///Returns a mutable reference to `modules`.
12820        ///If the field is unset, it is first initialized with the default value.
12821        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12822            &mut self.modules
12823        }
12824        ///Sets `modules` with the provided value.
12825        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12826            self.modules = field;
12827        }
12828        ///Sets `modules` with the provided value.
12829        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12830            self.set_modules(field);
12831            self
12832        }
12833        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
12834        pub fn dependencies(&self) -> &[String] {
12835            &self.dependencies
12836        }
12837        ///Returns a mutable reference to `dependencies`.
12838        ///If the field is unset, it is first initialized with the default value.
12839        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12840            &mut self.dependencies
12841        }
12842        ///Sets `dependencies` with the provided value.
12843        pub fn set_dependencies(&mut self, field: Vec<String>) {
12844            self.dependencies = field;
12845        }
12846        ///Sets `dependencies` with the provided value.
12847        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12848            self.set_dependencies(field);
12849            self
12850        }
12851    }
12852    impl super::SystemParameters {
12853        pub const fn const_default() -> Self {
12854            Self {
12855                epoch_duration_ms: None,
12856                stake_subsidy_start_epoch: None,
12857                min_validator_count: None,
12858                max_validator_count: None,
12859                min_validator_joining_stake: None,
12860                validator_low_stake_threshold: None,
12861                validator_very_low_stake_threshold: None,
12862                validator_low_stake_grace_period: None,
12863                extra_fields: None,
12864            }
12865        }
12866        #[doc(hidden)]
12867        pub fn default_instance() -> &'static Self {
12868            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
12869            &DEFAULT
12870        }
12871        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12872        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
12873            self.epoch_duration_ms.as_mut().map(|field| field as _)
12874        }
12875        ///Returns a mutable reference to `epoch_duration_ms`.
12876        ///If the field is unset, it is first initialized with the default value.
12877        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
12878            self.epoch_duration_ms.get_or_insert_default()
12879        }
12880        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
12881        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
12882            self.epoch_duration_ms.as_ref().map(|field| *field)
12883        }
12884        ///Sets `epoch_duration_ms` with the provided value.
12885        pub fn set_epoch_duration_ms<T: Into<u64>>(&mut self, field: T) {
12886            self.epoch_duration_ms = Some(field.into().into());
12887        }
12888        ///Sets `epoch_duration_ms` with the provided value.
12889        pub fn with_epoch_duration_ms<T: Into<u64>>(mut self, field: T) -> Self {
12890            self.set_epoch_duration_ms(field.into());
12891            self
12892        }
12893        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12894        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12895            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
12896        }
12897        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
12898        ///If the field is unset, it is first initialized with the default value.
12899        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
12900            self.stake_subsidy_start_epoch.get_or_insert_default()
12901        }
12902        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12903        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
12904            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
12905        }
12906        ///Sets `stake_subsidy_start_epoch` with the provided value.
12907        pub fn set_stake_subsidy_start_epoch<T: Into<u64>>(&mut self, field: T) {
12908            self.stake_subsidy_start_epoch = Some(field.into().into());
12909        }
12910        ///Sets `stake_subsidy_start_epoch` with the provided value.
12911        pub fn with_stake_subsidy_start_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12912            self.set_stake_subsidy_start_epoch(field.into());
12913            self
12914        }
12915        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12916        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12917            self.min_validator_count.as_mut().map(|field| field as _)
12918        }
12919        ///Returns a mutable reference to `min_validator_count`.
12920        ///If the field is unset, it is first initialized with the default value.
12921        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
12922            self.min_validator_count.get_or_insert_default()
12923        }
12924        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
12925        pub fn min_validator_count_opt(&self) -> Option<u64> {
12926            self.min_validator_count.as_ref().map(|field| *field)
12927        }
12928        ///Sets `min_validator_count` with the provided value.
12929        pub fn set_min_validator_count<T: Into<u64>>(&mut self, field: T) {
12930            self.min_validator_count = Some(field.into().into());
12931        }
12932        ///Sets `min_validator_count` with the provided value.
12933        pub fn with_min_validator_count<T: Into<u64>>(mut self, field: T) -> Self {
12934            self.set_min_validator_count(field.into());
12935            self
12936        }
12937        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12938        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12939            self.max_validator_count.as_mut().map(|field| field as _)
12940        }
12941        ///Returns a mutable reference to `max_validator_count`.
12942        ///If the field is unset, it is first initialized with the default value.
12943        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
12944            self.max_validator_count.get_or_insert_default()
12945        }
12946        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
12947        pub fn max_validator_count_opt(&self) -> Option<u64> {
12948            self.max_validator_count.as_ref().map(|field| *field)
12949        }
12950        ///Sets `max_validator_count` with the provided value.
12951        pub fn set_max_validator_count<T: Into<u64>>(&mut self, field: T) {
12952            self.max_validator_count = Some(field.into().into());
12953        }
12954        ///Sets `max_validator_count` with the provided value.
12955        pub fn with_max_validator_count<T: Into<u64>>(mut self, field: T) -> Self {
12956            self.set_max_validator_count(field.into());
12957            self
12958        }
12959        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12960        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
12961            self.min_validator_joining_stake.as_mut().map(|field| field as _)
12962        }
12963        ///Returns a mutable reference to `min_validator_joining_stake`.
12964        ///If the field is unset, it is first initialized with the default value.
12965        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
12966            self.min_validator_joining_stake.get_or_insert_default()
12967        }
12968        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12969        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
12970            self.min_validator_joining_stake.as_ref().map(|field| *field)
12971        }
12972        ///Sets `min_validator_joining_stake` with the provided value.
12973        pub fn set_min_validator_joining_stake<T: Into<u64>>(&mut self, field: T) {
12974            self.min_validator_joining_stake = Some(field.into().into());
12975        }
12976        ///Sets `min_validator_joining_stake` with the provided value.
12977        pub fn with_min_validator_joining_stake<T: Into<u64>>(
12978            mut self,
12979            field: T,
12980        ) -> Self {
12981            self.set_min_validator_joining_stake(field.into());
12982            self
12983        }
12984        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12985        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
12986            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
12987        }
12988        ///Returns a mutable reference to `validator_low_stake_threshold`.
12989        ///If the field is unset, it is first initialized with the default value.
12990        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
12991            self.validator_low_stake_threshold.get_or_insert_default()
12992        }
12993        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
12994        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
12995            self.validator_low_stake_threshold.as_ref().map(|field| *field)
12996        }
12997        ///Sets `validator_low_stake_threshold` with the provided value.
12998        pub fn set_validator_low_stake_threshold<T: Into<u64>>(&mut self, field: T) {
12999            self.validator_low_stake_threshold = Some(field.into().into());
13000        }
13001        ///Sets `validator_low_stake_threshold` with the provided value.
13002        pub fn with_validator_low_stake_threshold<T: Into<u64>>(
13003            mut self,
13004            field: T,
13005        ) -> Self {
13006            self.set_validator_low_stake_threshold(field.into());
13007            self
13008        }
13009        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13010        pub fn validator_very_low_stake_threshold_opt_mut(
13011            &mut self,
13012        ) -> Option<&mut u64> {
13013            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13014        }
13015        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13016        ///If the field is unset, it is first initialized with the default value.
13017        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13018            self.validator_very_low_stake_threshold.get_or_insert_default()
13019        }
13020        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13021        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13022            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13023        }
13024        ///Sets `validator_very_low_stake_threshold` with the provided value.
13025        pub fn set_validator_very_low_stake_threshold<T: Into<u64>>(
13026            &mut self,
13027            field: T,
13028        ) {
13029            self.validator_very_low_stake_threshold = Some(field.into().into());
13030        }
13031        ///Sets `validator_very_low_stake_threshold` with the provided value.
13032        pub fn with_validator_very_low_stake_threshold<T: Into<u64>>(
13033            mut self,
13034            field: T,
13035        ) -> Self {
13036            self.set_validator_very_low_stake_threshold(field.into());
13037            self
13038        }
13039        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13040        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13041            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13042        }
13043        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13044        ///If the field is unset, it is first initialized with the default value.
13045        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13046            self.validator_low_stake_grace_period.get_or_insert_default()
13047        }
13048        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13049        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13050            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13051        }
13052        ///Sets `validator_low_stake_grace_period` with the provided value.
13053        pub fn set_validator_low_stake_grace_period<T: Into<u64>>(&mut self, field: T) {
13054            self.validator_low_stake_grace_period = Some(field.into().into());
13055        }
13056        ///Sets `validator_low_stake_grace_period` with the provided value.
13057        pub fn with_validator_low_stake_grace_period<T: Into<u64>>(
13058            mut self,
13059            field: T,
13060        ) -> Self {
13061            self.set_validator_low_stake_grace_period(field.into());
13062            self
13063        }
13064        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13065        pub fn extra_fields(&self) -> &super::MoveTable {
13066            self.extra_fields
13067                .as_ref()
13068                .map(|field| field as _)
13069                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13070        }
13071        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13072        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13073            self.extra_fields.as_mut().map(|field| field as _)
13074        }
13075        ///Returns a mutable reference to `extra_fields`.
13076        ///If the field is unset, it is first initialized with the default value.
13077        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13078            self.extra_fields.get_or_insert_default()
13079        }
13080        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13081        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13082            self.extra_fields.as_ref().map(|field| field as _)
13083        }
13084        ///Sets `extra_fields` with the provided value.
13085        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13086            self.extra_fields = Some(field.into().into());
13087        }
13088        ///Sets `extra_fields` with the provided value.
13089        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13090            self.set_extra_fields(field.into());
13091            self
13092        }
13093    }
13094    impl super::SystemState {
13095        pub const fn const_default() -> Self {
13096            Self {
13097                version: None,
13098                epoch: None,
13099                protocol_version: None,
13100                validators: None,
13101                storage_fund: None,
13102                parameters: None,
13103                reference_gas_price: None,
13104                validator_report_records: Vec::new(),
13105                stake_subsidy: None,
13106                safe_mode: None,
13107                safe_mode_storage_rewards: None,
13108                safe_mode_computation_rewards: None,
13109                safe_mode_storage_rebates: None,
13110                safe_mode_non_refundable_storage_fee: None,
13111                epoch_start_timestamp_ms: None,
13112                extra_fields: None,
13113            }
13114        }
13115        #[doc(hidden)]
13116        pub fn default_instance() -> &'static Self {
13117            static DEFAULT: super::SystemState = super::SystemState::const_default();
13118            &DEFAULT
13119        }
13120        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13121        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13122            self.version.as_mut().map(|field| field as _)
13123        }
13124        ///Returns a mutable reference to `version`.
13125        ///If the field is unset, it is first initialized with the default value.
13126        pub fn version_mut(&mut self) -> &mut u64 {
13127            self.version.get_or_insert_default()
13128        }
13129        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13130        pub fn version_opt(&self) -> Option<u64> {
13131            self.version.as_ref().map(|field| *field)
13132        }
13133        ///Sets `version` with the provided value.
13134        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
13135            self.version = Some(field.into().into());
13136        }
13137        ///Sets `version` with the provided value.
13138        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
13139            self.set_version(field.into());
13140            self
13141        }
13142        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13143        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13144            self.epoch.as_mut().map(|field| field as _)
13145        }
13146        ///Returns a mutable reference to `epoch`.
13147        ///If the field is unset, it is first initialized with the default value.
13148        pub fn epoch_mut(&mut self) -> &mut u64 {
13149            self.epoch.get_or_insert_default()
13150        }
13151        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13152        pub fn epoch_opt(&self) -> Option<u64> {
13153            self.epoch.as_ref().map(|field| *field)
13154        }
13155        ///Sets `epoch` with the provided value.
13156        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
13157            self.epoch = Some(field.into().into());
13158        }
13159        ///Sets `epoch` with the provided value.
13160        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
13161            self.set_epoch(field.into());
13162            self
13163        }
13164        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13165        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13166            self.protocol_version.as_mut().map(|field| field as _)
13167        }
13168        ///Returns a mutable reference to `protocol_version`.
13169        ///If the field is unset, it is first initialized with the default value.
13170        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13171            self.protocol_version.get_or_insert_default()
13172        }
13173        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13174        pub fn protocol_version_opt(&self) -> Option<u64> {
13175            self.protocol_version.as_ref().map(|field| *field)
13176        }
13177        ///Sets `protocol_version` with the provided value.
13178        pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
13179            self.protocol_version = Some(field.into().into());
13180        }
13181        ///Sets `protocol_version` with the provided value.
13182        pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
13183            self.set_protocol_version(field.into());
13184            self
13185        }
13186        ///Returns the value of `validators`, or the default value if `validators` is unset.
13187        pub fn validators(&self) -> &super::ValidatorSet {
13188            self.validators
13189                .as_ref()
13190                .map(|field| field as _)
13191                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13192        }
13193        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13194        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13195            self.validators.as_mut().map(|field| field as _)
13196        }
13197        ///Returns a mutable reference to `validators`.
13198        ///If the field is unset, it is first initialized with the default value.
13199        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13200            self.validators.get_or_insert_default()
13201        }
13202        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13203        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13204            self.validators.as_ref().map(|field| field as _)
13205        }
13206        ///Sets `validators` with the provided value.
13207        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13208            self.validators = Some(field.into().into());
13209        }
13210        ///Sets `validators` with the provided value.
13211        pub fn with_validators<T: Into<super::ValidatorSet>>(
13212            mut self,
13213            field: T,
13214        ) -> Self {
13215            self.set_validators(field.into());
13216            self
13217        }
13218        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13219        pub fn storage_fund(&self) -> &super::StorageFund {
13220            self.storage_fund
13221                .as_ref()
13222                .map(|field| field as _)
13223                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13224        }
13225        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13226        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13227            self.storage_fund.as_mut().map(|field| field as _)
13228        }
13229        ///Returns a mutable reference to `storage_fund`.
13230        ///If the field is unset, it is first initialized with the default value.
13231        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13232            self.storage_fund.get_or_insert_default()
13233        }
13234        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13235        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13236            self.storage_fund.as_ref().map(|field| field as _)
13237        }
13238        ///Sets `storage_fund` with the provided value.
13239        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13240            self.storage_fund = Some(field.into().into());
13241        }
13242        ///Sets `storage_fund` with the provided value.
13243        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13244            mut self,
13245            field: T,
13246        ) -> Self {
13247            self.set_storage_fund(field.into());
13248            self
13249        }
13250        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13251        pub fn parameters(&self) -> &super::SystemParameters {
13252            self.parameters
13253                .as_ref()
13254                .map(|field| field as _)
13255                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13256        }
13257        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13258        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13259            self.parameters.as_mut().map(|field| field as _)
13260        }
13261        ///Returns a mutable reference to `parameters`.
13262        ///If the field is unset, it is first initialized with the default value.
13263        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13264            self.parameters.get_or_insert_default()
13265        }
13266        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13267        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13268            self.parameters.as_ref().map(|field| field as _)
13269        }
13270        ///Sets `parameters` with the provided value.
13271        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13272            self.parameters = Some(field.into().into());
13273        }
13274        ///Sets `parameters` with the provided value.
13275        pub fn with_parameters<T: Into<super::SystemParameters>>(
13276            mut self,
13277            field: T,
13278        ) -> Self {
13279            self.set_parameters(field.into());
13280            self
13281        }
13282        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13283        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13284            self.reference_gas_price.as_mut().map(|field| field as _)
13285        }
13286        ///Returns a mutable reference to `reference_gas_price`.
13287        ///If the field is unset, it is first initialized with the default value.
13288        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13289            self.reference_gas_price.get_or_insert_default()
13290        }
13291        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13292        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13293            self.reference_gas_price.as_ref().map(|field| *field)
13294        }
13295        ///Sets `reference_gas_price` with the provided value.
13296        pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T) {
13297            self.reference_gas_price = Some(field.into().into());
13298        }
13299        ///Sets `reference_gas_price` with the provided value.
13300        pub fn with_reference_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
13301            self.set_reference_gas_price(field.into());
13302            self
13303        }
13304        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13305        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13306            &self.validator_report_records
13307        }
13308        ///Returns a mutable reference to `validator_report_records`.
13309        ///If the field is unset, it is first initialized with the default value.
13310        pub fn validator_report_records_mut(
13311            &mut self,
13312        ) -> &mut Vec<super::ValidatorReportRecord> {
13313            &mut self.validator_report_records
13314        }
13315        ///Sets `validator_report_records` with the provided value.
13316        pub fn set_validator_report_records(
13317            &mut self,
13318            field: Vec<super::ValidatorReportRecord>,
13319        ) {
13320            self.validator_report_records = field;
13321        }
13322        ///Sets `validator_report_records` with the provided value.
13323        pub fn with_validator_report_records(
13324            mut self,
13325            field: Vec<super::ValidatorReportRecord>,
13326        ) -> Self {
13327            self.set_validator_report_records(field);
13328            self
13329        }
13330        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13331        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13332            self.stake_subsidy
13333                .as_ref()
13334                .map(|field| field as _)
13335                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13336        }
13337        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13338        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13339            self.stake_subsidy.as_mut().map(|field| field as _)
13340        }
13341        ///Returns a mutable reference to `stake_subsidy`.
13342        ///If the field is unset, it is first initialized with the default value.
13343        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13344            self.stake_subsidy.get_or_insert_default()
13345        }
13346        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13347        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13348            self.stake_subsidy.as_ref().map(|field| field as _)
13349        }
13350        ///Sets `stake_subsidy` with the provided value.
13351        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13352            self.stake_subsidy = Some(field.into().into());
13353        }
13354        ///Sets `stake_subsidy` with the provided value.
13355        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13356            mut self,
13357            field: T,
13358        ) -> Self {
13359            self.set_stake_subsidy(field.into());
13360            self
13361        }
13362        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13363        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13364            self.safe_mode.as_mut().map(|field| field as _)
13365        }
13366        ///Returns a mutable reference to `safe_mode`.
13367        ///If the field is unset, it is first initialized with the default value.
13368        pub fn safe_mode_mut(&mut self) -> &mut bool {
13369            self.safe_mode.get_or_insert_default()
13370        }
13371        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13372        pub fn safe_mode_opt(&self) -> Option<bool> {
13373            self.safe_mode.as_ref().map(|field| *field)
13374        }
13375        ///Sets `safe_mode` with the provided value.
13376        pub fn set_safe_mode<T: Into<bool>>(&mut self, field: T) {
13377            self.safe_mode = Some(field.into().into());
13378        }
13379        ///Sets `safe_mode` with the provided value.
13380        pub fn with_safe_mode<T: Into<bool>>(mut self, field: T) -> Self {
13381            self.set_safe_mode(field.into());
13382            self
13383        }
13384        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13385        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13386            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13387        }
13388        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13389        ///If the field is unset, it is first initialized with the default value.
13390        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13391            self.safe_mode_storage_rewards.get_or_insert_default()
13392        }
13393        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13394        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13395            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13396        }
13397        ///Sets `safe_mode_storage_rewards` with the provided value.
13398        pub fn set_safe_mode_storage_rewards<T: Into<u64>>(&mut self, field: T) {
13399            self.safe_mode_storage_rewards = Some(field.into().into());
13400        }
13401        ///Sets `safe_mode_storage_rewards` with the provided value.
13402        pub fn with_safe_mode_storage_rewards<T: Into<u64>>(mut self, field: T) -> Self {
13403            self.set_safe_mode_storage_rewards(field.into());
13404            self
13405        }
13406        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13407        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13408            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13409        }
13410        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13411        ///If the field is unset, it is first initialized with the default value.
13412        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13413            self.safe_mode_computation_rewards.get_or_insert_default()
13414        }
13415        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13416        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13417            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13418        }
13419        ///Sets `safe_mode_computation_rewards` with the provided value.
13420        pub fn set_safe_mode_computation_rewards<T: Into<u64>>(&mut self, field: T) {
13421            self.safe_mode_computation_rewards = Some(field.into().into());
13422        }
13423        ///Sets `safe_mode_computation_rewards` with the provided value.
13424        pub fn with_safe_mode_computation_rewards<T: Into<u64>>(
13425            mut self,
13426            field: T,
13427        ) -> Self {
13428            self.set_safe_mode_computation_rewards(field.into());
13429            self
13430        }
13431        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13432        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13433            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13434        }
13435        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13436        ///If the field is unset, it is first initialized with the default value.
13437        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13438            self.safe_mode_storage_rebates.get_or_insert_default()
13439        }
13440        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13441        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13442            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13443        }
13444        ///Sets `safe_mode_storage_rebates` with the provided value.
13445        pub fn set_safe_mode_storage_rebates<T: Into<u64>>(&mut self, field: T) {
13446            self.safe_mode_storage_rebates = Some(field.into().into());
13447        }
13448        ///Sets `safe_mode_storage_rebates` with the provided value.
13449        pub fn with_safe_mode_storage_rebates<T: Into<u64>>(mut self, field: T) -> Self {
13450            self.set_safe_mode_storage_rebates(field.into());
13451            self
13452        }
13453        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13454        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13455            &mut self,
13456        ) -> Option<&mut u64> {
13457            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13458        }
13459        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13460        ///If the field is unset, it is first initialized with the default value.
13461        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13462            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13463        }
13464        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13465        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13466            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13467        }
13468        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13469        pub fn set_safe_mode_non_refundable_storage_fee<T: Into<u64>>(
13470            &mut self,
13471            field: T,
13472        ) {
13473            self.safe_mode_non_refundable_storage_fee = Some(field.into().into());
13474        }
13475        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13476        pub fn with_safe_mode_non_refundable_storage_fee<T: Into<u64>>(
13477            mut self,
13478            field: T,
13479        ) -> Self {
13480            self.set_safe_mode_non_refundable_storage_fee(field.into());
13481            self
13482        }
13483        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13484        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13485            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13486        }
13487        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13488        ///If the field is unset, it is first initialized with the default value.
13489        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13490            self.epoch_start_timestamp_ms.get_or_insert_default()
13491        }
13492        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13493        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13494            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13495        }
13496        ///Sets `epoch_start_timestamp_ms` with the provided value.
13497        pub fn set_epoch_start_timestamp_ms<T: Into<u64>>(&mut self, field: T) {
13498            self.epoch_start_timestamp_ms = Some(field.into().into());
13499        }
13500        ///Sets `epoch_start_timestamp_ms` with the provided value.
13501        pub fn with_epoch_start_timestamp_ms<T: Into<u64>>(mut self, field: T) -> Self {
13502            self.set_epoch_start_timestamp_ms(field.into());
13503            self
13504        }
13505        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13506        pub fn extra_fields(&self) -> &super::MoveTable {
13507            self.extra_fields
13508                .as_ref()
13509                .map(|field| field as _)
13510                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13511        }
13512        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13513        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13514            self.extra_fields.as_mut().map(|field| field as _)
13515        }
13516        ///Returns a mutable reference to `extra_fields`.
13517        ///If the field is unset, it is first initialized with the default value.
13518        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13519            self.extra_fields.get_or_insert_default()
13520        }
13521        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13522        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13523            self.extra_fields.as_ref().map(|field| field as _)
13524        }
13525        ///Sets `extra_fields` with the provided value.
13526        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13527            self.extra_fields = Some(field.into().into());
13528        }
13529        ///Sets `extra_fields` with the provided value.
13530        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13531            self.set_extra_fields(field.into());
13532            self
13533        }
13534    }
13535    impl super::Transaction {
13536        pub const fn const_default() -> Self {
13537            Self {
13538                bcs: None,
13539                digest: None,
13540                version: None,
13541                kind: None,
13542                sender: None,
13543                gas_payment: None,
13544                expiration: None,
13545            }
13546        }
13547        #[doc(hidden)]
13548        pub fn default_instance() -> &'static Self {
13549            static DEFAULT: super::Transaction = super::Transaction::const_default();
13550            &DEFAULT
13551        }
13552        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13553        pub fn bcs(&self) -> &super::Bcs {
13554            self.bcs
13555                .as_ref()
13556                .map(|field| field as _)
13557                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13558        }
13559        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13560        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13561            self.bcs.as_mut().map(|field| field as _)
13562        }
13563        ///Returns a mutable reference to `bcs`.
13564        ///If the field is unset, it is first initialized with the default value.
13565        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13566            self.bcs.get_or_insert_default()
13567        }
13568        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13569        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13570            self.bcs.as_ref().map(|field| field as _)
13571        }
13572        ///Sets `bcs` with the provided value.
13573        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13574            self.bcs = Some(field.into().into());
13575        }
13576        ///Sets `bcs` with the provided value.
13577        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13578            self.set_bcs(field.into());
13579            self
13580        }
13581        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13582        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13583            self.digest.as_mut().map(|field| field as _)
13584        }
13585        ///Returns a mutable reference to `digest`.
13586        ///If the field is unset, it is first initialized with the default value.
13587        pub fn digest_mut(&mut self) -> &mut String {
13588            self.digest.get_or_insert_default()
13589        }
13590        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13591        pub fn digest_opt(&self) -> Option<&str> {
13592            self.digest.as_ref().map(|field| field as _)
13593        }
13594        ///Sets `digest` with the provided value.
13595        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13596            self.digest = Some(field.into().into());
13597        }
13598        ///Sets `digest` with the provided value.
13599        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13600            self.set_digest(field.into());
13601            self
13602        }
13603        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13604        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13605            self.version.as_mut().map(|field| field as _)
13606        }
13607        ///Returns a mutable reference to `version`.
13608        ///If the field is unset, it is first initialized with the default value.
13609        pub fn version_mut(&mut self) -> &mut i32 {
13610            self.version.get_or_insert_default()
13611        }
13612        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13613        pub fn version_opt(&self) -> Option<i32> {
13614            self.version.as_ref().map(|field| *field)
13615        }
13616        ///Sets `version` with the provided value.
13617        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
13618            self.version = Some(field.into().into());
13619        }
13620        ///Sets `version` with the provided value.
13621        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
13622            self.set_version(field.into());
13623            self
13624        }
13625        ///Returns the value of `kind`, or the default value if `kind` is unset.
13626        pub fn kind(&self) -> &super::TransactionKind {
13627            self.kind
13628                .as_ref()
13629                .map(|field| field as _)
13630                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13631        }
13632        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13633        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13634            self.kind.as_mut().map(|field| field as _)
13635        }
13636        ///Returns a mutable reference to `kind`.
13637        ///If the field is unset, it is first initialized with the default value.
13638        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13639            self.kind.get_or_insert_default()
13640        }
13641        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
13642        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13643            self.kind.as_ref().map(|field| field as _)
13644        }
13645        ///Sets `kind` with the provided value.
13646        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13647            self.kind = Some(field.into().into());
13648        }
13649        ///Sets `kind` with the provided value.
13650        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13651            self.set_kind(field.into());
13652            self
13653        }
13654        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13655        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13656            self.sender.as_mut().map(|field| field as _)
13657        }
13658        ///Returns a mutable reference to `sender`.
13659        ///If the field is unset, it is first initialized with the default value.
13660        pub fn sender_mut(&mut self) -> &mut String {
13661            self.sender.get_or_insert_default()
13662        }
13663        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
13664        pub fn sender_opt(&self) -> Option<&str> {
13665            self.sender.as_ref().map(|field| field as _)
13666        }
13667        ///Sets `sender` with the provided value.
13668        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13669            self.sender = Some(field.into().into());
13670        }
13671        ///Sets `sender` with the provided value.
13672        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13673            self.set_sender(field.into());
13674            self
13675        }
13676        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
13677        pub fn gas_payment(&self) -> &super::GasPayment {
13678            self.gas_payment
13679                .as_ref()
13680                .map(|field| field as _)
13681                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13682        }
13683        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13684        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13685            self.gas_payment.as_mut().map(|field| field as _)
13686        }
13687        ///Returns a mutable reference to `gas_payment`.
13688        ///If the field is unset, it is first initialized with the default value.
13689        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13690            self.gas_payment.get_or_insert_default()
13691        }
13692        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
13693        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13694            self.gas_payment.as_ref().map(|field| field as _)
13695        }
13696        ///Sets `gas_payment` with the provided value.
13697        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13698            self.gas_payment = Some(field.into().into());
13699        }
13700        ///Sets `gas_payment` with the provided value.
13701        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13702            self.set_gas_payment(field.into());
13703            self
13704        }
13705        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
13706        pub fn expiration(&self) -> &super::TransactionExpiration {
13707            self.expiration
13708                .as_ref()
13709                .map(|field| field as _)
13710                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
13711        }
13712        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13713        pub fn expiration_opt_mut(
13714            &mut self,
13715        ) -> Option<&mut super::TransactionExpiration> {
13716            self.expiration.as_mut().map(|field| field as _)
13717        }
13718        ///Returns a mutable reference to `expiration`.
13719        ///If the field is unset, it is first initialized with the default value.
13720        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
13721            self.expiration.get_or_insert_default()
13722        }
13723        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
13724        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
13725            self.expiration.as_ref().map(|field| field as _)
13726        }
13727        ///Sets `expiration` with the provided value.
13728        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
13729            &mut self,
13730            field: T,
13731        ) {
13732            self.expiration = Some(field.into().into());
13733        }
13734        ///Sets `expiration` with the provided value.
13735        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
13736            mut self,
13737            field: T,
13738        ) -> Self {
13739            self.set_expiration(field.into());
13740            self
13741        }
13742    }
13743    impl super::TransactionEffects {
13744        pub const fn const_default() -> Self {
13745            Self {
13746                bcs: None,
13747                digest: None,
13748                version: None,
13749                status: None,
13750                epoch: None,
13751                gas_used: None,
13752                transaction_digest: None,
13753                gas_object: None,
13754                events_digest: None,
13755                dependencies: Vec::new(),
13756                lamport_version: None,
13757                changed_objects: Vec::new(),
13758                unchanged_consensus_objects: Vec::new(),
13759                auxiliary_data_digest: None,
13760            }
13761        }
13762        #[doc(hidden)]
13763        pub fn default_instance() -> &'static Self {
13764            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
13765            &DEFAULT
13766        }
13767        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13768        pub fn bcs(&self) -> &super::Bcs {
13769            self.bcs
13770                .as_ref()
13771                .map(|field| field as _)
13772                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13773        }
13774        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13775        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13776            self.bcs.as_mut().map(|field| field as _)
13777        }
13778        ///Returns a mutable reference to `bcs`.
13779        ///If the field is unset, it is first initialized with the default value.
13780        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13781            self.bcs.get_or_insert_default()
13782        }
13783        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13784        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13785            self.bcs.as_ref().map(|field| field as _)
13786        }
13787        ///Sets `bcs` with the provided value.
13788        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13789            self.bcs = Some(field.into().into());
13790        }
13791        ///Sets `bcs` with the provided value.
13792        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13793            self.set_bcs(field.into());
13794            self
13795        }
13796        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13797        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13798            self.digest.as_mut().map(|field| field as _)
13799        }
13800        ///Returns a mutable reference to `digest`.
13801        ///If the field is unset, it is first initialized with the default value.
13802        pub fn digest_mut(&mut self) -> &mut String {
13803            self.digest.get_or_insert_default()
13804        }
13805        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13806        pub fn digest_opt(&self) -> Option<&str> {
13807            self.digest.as_ref().map(|field| field as _)
13808        }
13809        ///Sets `digest` with the provided value.
13810        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13811            self.digest = Some(field.into().into());
13812        }
13813        ///Sets `digest` with the provided value.
13814        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13815            self.set_digest(field.into());
13816            self
13817        }
13818        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13819        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13820            self.version.as_mut().map(|field| field as _)
13821        }
13822        ///Returns a mutable reference to `version`.
13823        ///If the field is unset, it is first initialized with the default value.
13824        pub fn version_mut(&mut self) -> &mut i32 {
13825            self.version.get_or_insert_default()
13826        }
13827        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13828        pub fn version_opt(&self) -> Option<i32> {
13829            self.version.as_ref().map(|field| *field)
13830        }
13831        ///Sets `version` with the provided value.
13832        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
13833            self.version = Some(field.into().into());
13834        }
13835        ///Sets `version` with the provided value.
13836        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
13837            self.set_version(field.into());
13838            self
13839        }
13840        ///Returns the value of `status`, or the default value if `status` is unset.
13841        pub fn status(&self) -> &super::ExecutionStatus {
13842            self.status
13843                .as_ref()
13844                .map(|field| field as _)
13845                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
13846        }
13847        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13848        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
13849            self.status.as_mut().map(|field| field as _)
13850        }
13851        ///Returns a mutable reference to `status`.
13852        ///If the field is unset, it is first initialized with the default value.
13853        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
13854            self.status.get_or_insert_default()
13855        }
13856        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
13857        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
13858            self.status.as_ref().map(|field| field as _)
13859        }
13860        ///Sets `status` with the provided value.
13861        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
13862            self.status = Some(field.into().into());
13863        }
13864        ///Sets `status` with the provided value.
13865        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
13866            self.set_status(field.into());
13867            self
13868        }
13869        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13870        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13871            self.epoch.as_mut().map(|field| field as _)
13872        }
13873        ///Returns a mutable reference to `epoch`.
13874        ///If the field is unset, it is first initialized with the default value.
13875        pub fn epoch_mut(&mut self) -> &mut u64 {
13876            self.epoch.get_or_insert_default()
13877        }
13878        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13879        pub fn epoch_opt(&self) -> Option<u64> {
13880            self.epoch.as_ref().map(|field| *field)
13881        }
13882        ///Sets `epoch` with the provided value.
13883        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
13884            self.epoch = Some(field.into().into());
13885        }
13886        ///Sets `epoch` with the provided value.
13887        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
13888            self.set_epoch(field.into());
13889            self
13890        }
13891        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
13892        pub fn gas_used(&self) -> &super::GasCostSummary {
13893            self.gas_used
13894                .as_ref()
13895                .map(|field| field as _)
13896                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
13897        }
13898        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13899        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
13900            self.gas_used.as_mut().map(|field| field as _)
13901        }
13902        ///Returns a mutable reference to `gas_used`.
13903        ///If the field is unset, it is first initialized with the default value.
13904        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
13905            self.gas_used.get_or_insert_default()
13906        }
13907        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
13908        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
13909            self.gas_used.as_ref().map(|field| field as _)
13910        }
13911        ///Sets `gas_used` with the provided value.
13912        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
13913            self.gas_used = Some(field.into().into());
13914        }
13915        ///Sets `gas_used` with the provided value.
13916        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
13917            mut self,
13918            field: T,
13919        ) -> Self {
13920            self.set_gas_used(field.into());
13921            self
13922        }
13923        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13924        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
13925            self.transaction_digest.as_mut().map(|field| field as _)
13926        }
13927        ///Returns a mutable reference to `transaction_digest`.
13928        ///If the field is unset, it is first initialized with the default value.
13929        pub fn transaction_digest_mut(&mut self) -> &mut String {
13930            self.transaction_digest.get_or_insert_default()
13931        }
13932        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13933        pub fn transaction_digest_opt(&self) -> Option<&str> {
13934            self.transaction_digest.as_ref().map(|field| field as _)
13935        }
13936        ///Sets `transaction_digest` with the provided value.
13937        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
13938            self.transaction_digest = Some(field.into().into());
13939        }
13940        ///Sets `transaction_digest` with the provided value.
13941        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
13942            self.set_transaction_digest(field.into());
13943            self
13944        }
13945        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
13946        pub fn gas_object(&self) -> &super::ChangedObject {
13947            self.gas_object
13948                .as_ref()
13949                .map(|field| field as _)
13950                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
13951        }
13952        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13953        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
13954            self.gas_object.as_mut().map(|field| field as _)
13955        }
13956        ///Returns a mutable reference to `gas_object`.
13957        ///If the field is unset, it is first initialized with the default value.
13958        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
13959            self.gas_object.get_or_insert_default()
13960        }
13961        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13962        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
13963            self.gas_object.as_ref().map(|field| field as _)
13964        }
13965        ///Sets `gas_object` with the provided value.
13966        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
13967            self.gas_object = Some(field.into().into());
13968        }
13969        ///Sets `gas_object` with the provided value.
13970        pub fn with_gas_object<T: Into<super::ChangedObject>>(
13971            mut self,
13972            field: T,
13973        ) -> Self {
13974            self.set_gas_object(field.into());
13975            self
13976        }
13977        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13978        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
13979            self.events_digest.as_mut().map(|field| field as _)
13980        }
13981        ///Returns a mutable reference to `events_digest`.
13982        ///If the field is unset, it is first initialized with the default value.
13983        pub fn events_digest_mut(&mut self) -> &mut String {
13984            self.events_digest.get_or_insert_default()
13985        }
13986        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13987        pub fn events_digest_opt(&self) -> Option<&str> {
13988            self.events_digest.as_ref().map(|field| field as _)
13989        }
13990        ///Sets `events_digest` with the provided value.
13991        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
13992            self.events_digest = Some(field.into().into());
13993        }
13994        ///Sets `events_digest` with the provided value.
13995        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
13996            self.set_events_digest(field.into());
13997            self
13998        }
13999        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14000        pub fn dependencies(&self) -> &[String] {
14001            &self.dependencies
14002        }
14003        ///Returns a mutable reference to `dependencies`.
14004        ///If the field is unset, it is first initialized with the default value.
14005        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14006            &mut self.dependencies
14007        }
14008        ///Sets `dependencies` with the provided value.
14009        pub fn set_dependencies(&mut self, field: Vec<String>) {
14010            self.dependencies = field;
14011        }
14012        ///Sets `dependencies` with the provided value.
14013        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14014            self.set_dependencies(field);
14015            self
14016        }
14017        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14018        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14019            self.lamport_version.as_mut().map(|field| field as _)
14020        }
14021        ///Returns a mutable reference to `lamport_version`.
14022        ///If the field is unset, it is first initialized with the default value.
14023        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14024            self.lamport_version.get_or_insert_default()
14025        }
14026        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14027        pub fn lamport_version_opt(&self) -> Option<u64> {
14028            self.lamport_version.as_ref().map(|field| *field)
14029        }
14030        ///Sets `lamport_version` with the provided value.
14031        pub fn set_lamport_version<T: Into<u64>>(&mut self, field: T) {
14032            self.lamport_version = Some(field.into().into());
14033        }
14034        ///Sets `lamport_version` with the provided value.
14035        pub fn with_lamport_version<T: Into<u64>>(mut self, field: T) -> Self {
14036            self.set_lamport_version(field.into());
14037            self
14038        }
14039        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14040        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14041            &self.changed_objects
14042        }
14043        ///Returns a mutable reference to `changed_objects`.
14044        ///If the field is unset, it is first initialized with the default value.
14045        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14046            &mut self.changed_objects
14047        }
14048        ///Sets `changed_objects` with the provided value.
14049        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14050            self.changed_objects = field;
14051        }
14052        ///Sets `changed_objects` with the provided value.
14053        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14054            self.set_changed_objects(field);
14055            self
14056        }
14057        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14058        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14059            &self.unchanged_consensus_objects
14060        }
14061        ///Returns a mutable reference to `unchanged_consensus_objects`.
14062        ///If the field is unset, it is first initialized with the default value.
14063        pub fn unchanged_consensus_objects_mut(
14064            &mut self,
14065        ) -> &mut Vec<super::UnchangedConsensusObject> {
14066            &mut self.unchanged_consensus_objects
14067        }
14068        ///Sets `unchanged_consensus_objects` with the provided value.
14069        pub fn set_unchanged_consensus_objects(
14070            &mut self,
14071            field: Vec<super::UnchangedConsensusObject>,
14072        ) {
14073            self.unchanged_consensus_objects = field;
14074        }
14075        ///Sets `unchanged_consensus_objects` with the provided value.
14076        pub fn with_unchanged_consensus_objects(
14077            mut self,
14078            field: Vec<super::UnchangedConsensusObject>,
14079        ) -> Self {
14080            self.set_unchanged_consensus_objects(field);
14081            self
14082        }
14083        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14084        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14085            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14086        }
14087        ///Returns a mutable reference to `auxiliary_data_digest`.
14088        ///If the field is unset, it is first initialized with the default value.
14089        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14090            self.auxiliary_data_digest.get_or_insert_default()
14091        }
14092        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14093        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14094            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14095        }
14096        ///Sets `auxiliary_data_digest` with the provided value.
14097        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14098            self.auxiliary_data_digest = Some(field.into().into());
14099        }
14100        ///Sets `auxiliary_data_digest` with the provided value.
14101        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14102            self.set_auxiliary_data_digest(field.into());
14103            self
14104        }
14105    }
14106    impl super::TransactionEvents {
14107        pub const fn const_default() -> Self {
14108            Self {
14109                bcs: None,
14110                digest: None,
14111                events: Vec::new(),
14112            }
14113        }
14114        #[doc(hidden)]
14115        pub fn default_instance() -> &'static Self {
14116            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14117            &DEFAULT
14118        }
14119        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14120        pub fn bcs(&self) -> &super::Bcs {
14121            self.bcs
14122                .as_ref()
14123                .map(|field| field as _)
14124                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14125        }
14126        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14127        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14128            self.bcs.as_mut().map(|field| field as _)
14129        }
14130        ///Returns a mutable reference to `bcs`.
14131        ///If the field is unset, it is first initialized with the default value.
14132        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14133            self.bcs.get_or_insert_default()
14134        }
14135        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14136        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14137            self.bcs.as_ref().map(|field| field as _)
14138        }
14139        ///Sets `bcs` with the provided value.
14140        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14141            self.bcs = Some(field.into().into());
14142        }
14143        ///Sets `bcs` with the provided value.
14144        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14145            self.set_bcs(field.into());
14146            self
14147        }
14148        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14149        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14150            self.digest.as_mut().map(|field| field as _)
14151        }
14152        ///Returns a mutable reference to `digest`.
14153        ///If the field is unset, it is first initialized with the default value.
14154        pub fn digest_mut(&mut self) -> &mut String {
14155            self.digest.get_or_insert_default()
14156        }
14157        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14158        pub fn digest_opt(&self) -> Option<&str> {
14159            self.digest.as_ref().map(|field| field as _)
14160        }
14161        ///Sets `digest` with the provided value.
14162        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14163            self.digest = Some(field.into().into());
14164        }
14165        ///Sets `digest` with the provided value.
14166        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14167            self.set_digest(field.into());
14168            self
14169        }
14170        ///Returns the value of `events`, or the default value if `events` is unset.
14171        pub fn events(&self) -> &[super::Event] {
14172            &self.events
14173        }
14174        ///Returns a mutable reference to `events`.
14175        ///If the field is unset, it is first initialized with the default value.
14176        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14177            &mut self.events
14178        }
14179        ///Sets `events` with the provided value.
14180        pub fn set_events(&mut self, field: Vec<super::Event>) {
14181            self.events = field;
14182        }
14183        ///Sets `events` with the provided value.
14184        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14185            self.set_events(field);
14186            self
14187        }
14188    }
14189    impl super::TransactionExpiration {
14190        pub const fn const_default() -> Self {
14191            Self { kind: None, epoch: None }
14192        }
14193        #[doc(hidden)]
14194        pub fn default_instance() -> &'static Self {
14195            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14196            &DEFAULT
14197        }
14198        ///Sets `kind` with the provided value.
14199        pub fn with_kind<
14200            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14201        >(mut self, field: T) -> Self {
14202            self.set_kind(field.into());
14203            self
14204        }
14205        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14206        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14207            self.epoch.as_mut().map(|field| field as _)
14208        }
14209        ///Returns a mutable reference to `epoch`.
14210        ///If the field is unset, it is first initialized with the default value.
14211        pub fn epoch_mut(&mut self) -> &mut u64 {
14212            self.epoch.get_or_insert_default()
14213        }
14214        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14215        pub fn epoch_opt(&self) -> Option<u64> {
14216            self.epoch.as_ref().map(|field| *field)
14217        }
14218        ///Sets `epoch` with the provided value.
14219        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
14220            self.epoch = Some(field.into().into());
14221        }
14222        ///Sets `epoch` with the provided value.
14223        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
14224            self.set_epoch(field.into());
14225            self
14226        }
14227    }
14228    impl super::TransactionFinality {
14229        pub const fn const_default() -> Self {
14230            Self { finality: None }
14231        }
14232        #[doc(hidden)]
14233        pub fn default_instance() -> &'static Self {
14234            static DEFAULT: super::TransactionFinality = super::TransactionFinality::const_default();
14235            &DEFAULT
14236        }
14237        ///Returns the value of `certified`, or the default value if `certified` is unset.
14238        pub fn certified(&self) -> &super::ValidatorAggregatedSignature {
14239            if let Some(super::transaction_finality::Finality::Certified(field)) = &self
14240                .finality
14241            {
14242                field as _
14243            } else {
14244                super::ValidatorAggregatedSignature::default_instance() as _
14245            }
14246        }
14247        ///If `certified` is set, returns [`Some`] with the value; otherwise returns [`None`].
14248        pub fn certified_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
14249            if let Some(super::transaction_finality::Finality::Certified(field)) = &self
14250                .finality
14251            {
14252                Some(field as _)
14253            } else {
14254                None
14255            }
14256        }
14257        ///If `certified` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14258        pub fn certified_opt_mut(
14259            &mut self,
14260        ) -> Option<&mut super::ValidatorAggregatedSignature> {
14261            if let Some(super::transaction_finality::Finality::Certified(field)) = &mut self
14262                .finality
14263            {
14264                Some(field as _)
14265            } else {
14266                None
14267            }
14268        }
14269        ///Returns a mutable reference to `certified`.
14270        ///If the field is unset, it is first initialized with the default value.
14271        ///If any other oneof field in the same oneof is set, it will be cleared.
14272        pub fn certified_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
14273            if self.certified_opt_mut().is_none() {
14274                self.finality = Some(
14275                    super::transaction_finality::Finality::Certified(
14276                        super::ValidatorAggregatedSignature::default(),
14277                    ),
14278                );
14279            }
14280            self.certified_opt_mut().unwrap()
14281        }
14282        ///Sets `certified` with the provided value.
14283        ///If any other oneof field in the same oneof is set, it will be cleared.
14284        pub fn set_certified<T: Into<super::ValidatorAggregatedSignature>>(
14285            &mut self,
14286            field: T,
14287        ) {
14288            self.finality = Some(
14289                super::transaction_finality::Finality::Certified(field.into().into()),
14290            );
14291        }
14292        ///Sets `certified` with the provided value.
14293        ///If any other oneof field in the same oneof is set, it will be cleared.
14294        pub fn with_certified<T: Into<super::ValidatorAggregatedSignature>>(
14295            mut self,
14296            field: T,
14297        ) -> Self {
14298            self.set_certified(field.into());
14299            self
14300        }
14301        ///Returns the value of `checkpointed`, or the default value if `checkpointed` is unset.
14302        pub fn checkpointed(&self) -> u64 {
14303            if let Some(super::transaction_finality::Finality::Checkpointed(field)) = &self
14304                .finality
14305            {
14306                *field
14307            } else {
14308                0u64
14309            }
14310        }
14311        ///If `checkpointed` is set, returns [`Some`] with the value; otherwise returns [`None`].
14312        pub fn checkpointed_opt(&self) -> Option<u64> {
14313            if let Some(super::transaction_finality::Finality::Checkpointed(field)) = &self
14314                .finality
14315            {
14316                Some(*field)
14317            } else {
14318                None
14319            }
14320        }
14321        ///If `checkpointed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14322        pub fn checkpointed_opt_mut(&mut self) -> Option<&mut u64> {
14323            if let Some(super::transaction_finality::Finality::Checkpointed(field)) = &mut self
14324                .finality
14325            {
14326                Some(field as _)
14327            } else {
14328                None
14329            }
14330        }
14331        ///Returns a mutable reference to `checkpointed`.
14332        ///If the field is unset, it is first initialized with the default value.
14333        ///If any other oneof field in the same oneof is set, it will be cleared.
14334        pub fn checkpointed_mut(&mut self) -> &mut u64 {
14335            if self.checkpointed_opt_mut().is_none() {
14336                self.finality = Some(
14337                    super::transaction_finality::Finality::Checkpointed(u64::default()),
14338                );
14339            }
14340            self.checkpointed_opt_mut().unwrap()
14341        }
14342        ///Sets `checkpointed` with the provided value.
14343        ///If any other oneof field in the same oneof is set, it will be cleared.
14344        pub fn set_checkpointed<T: Into<u64>>(&mut self, field: T) {
14345            self.finality = Some(
14346                super::transaction_finality::Finality::Checkpointed(field.into().into()),
14347            );
14348        }
14349        ///Sets `checkpointed` with the provided value.
14350        ///If any other oneof field in the same oneof is set, it will be cleared.
14351        pub fn with_checkpointed<T: Into<u64>>(mut self, field: T) -> Self {
14352            self.set_checkpointed(field.into());
14353            self
14354        }
14355    }
14356    impl super::TransactionKind {
14357        pub const fn const_default() -> Self {
14358            Self { kind: None }
14359        }
14360        #[doc(hidden)]
14361        pub fn default_instance() -> &'static Self {
14362            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14363            &DEFAULT
14364        }
14365        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14366        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14367            if let Some(super::transaction_kind::Kind::ProgrammableTransaction(field)) = &self
14368                .kind
14369            {
14370                field as _
14371            } else {
14372                super::ProgrammableTransaction::default_instance() as _
14373            }
14374        }
14375        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14376        pub fn programmable_transaction_opt(
14377            &self,
14378        ) -> Option<&super::ProgrammableTransaction> {
14379            if let Some(super::transaction_kind::Kind::ProgrammableTransaction(field)) = &self
14380                .kind
14381            {
14382                Some(field as _)
14383            } else {
14384                None
14385            }
14386        }
14387        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14388        pub fn programmable_transaction_opt_mut(
14389            &mut self,
14390        ) -> Option<&mut super::ProgrammableTransaction> {
14391            if let Some(super::transaction_kind::Kind::ProgrammableTransaction(field)) = &mut self
14392                .kind
14393            {
14394                Some(field as _)
14395            } else {
14396                None
14397            }
14398        }
14399        ///Returns a mutable reference to `programmable_transaction`.
14400        ///If the field is unset, it is first initialized with the default value.
14401        ///If any other oneof field in the same oneof is set, it will be cleared.
14402        pub fn programmable_transaction_mut(
14403            &mut self,
14404        ) -> &mut super::ProgrammableTransaction {
14405            if self.programmable_transaction_opt_mut().is_none() {
14406                self.kind = Some(
14407                    super::transaction_kind::Kind::ProgrammableTransaction(
14408                        super::ProgrammableTransaction::default(),
14409                    ),
14410                );
14411            }
14412            self.programmable_transaction_opt_mut().unwrap()
14413        }
14414        ///Sets `programmable_transaction` with the provided value.
14415        ///If any other oneof field in the same oneof is set, it will be cleared.
14416        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14417            &mut self,
14418            field: T,
14419        ) {
14420            self.kind = Some(
14421                super::transaction_kind::Kind::ProgrammableTransaction(
14422                    field.into().into(),
14423                ),
14424            );
14425        }
14426        ///Sets `programmable_transaction` with the provided value.
14427        ///If any other oneof field in the same oneof is set, it will be cleared.
14428        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14429            mut self,
14430            field: T,
14431        ) -> Self {
14432            self.set_programmable_transaction(field.into());
14433            self
14434        }
14435        ///Returns the value of `programmable_system_transaction`, or the default value if `programmable_system_transaction` is unset.
14436        pub fn programmable_system_transaction(
14437            &self,
14438        ) -> &super::ProgrammableTransaction {
14439            if let Some(
14440                super::transaction_kind::Kind::ProgrammableSystemTransaction(field),
14441            ) = &self.kind
14442            {
14443                field as _
14444            } else {
14445                super::ProgrammableTransaction::default_instance() as _
14446            }
14447        }
14448        ///If `programmable_system_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14449        pub fn programmable_system_transaction_opt(
14450            &self,
14451        ) -> Option<&super::ProgrammableTransaction> {
14452            if let Some(
14453                super::transaction_kind::Kind::ProgrammableSystemTransaction(field),
14454            ) = &self.kind
14455            {
14456                Some(field as _)
14457            } else {
14458                None
14459            }
14460        }
14461        ///If `programmable_system_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14462        pub fn programmable_system_transaction_opt_mut(
14463            &mut self,
14464        ) -> Option<&mut super::ProgrammableTransaction> {
14465            if let Some(
14466                super::transaction_kind::Kind::ProgrammableSystemTransaction(field),
14467            ) = &mut self.kind
14468            {
14469                Some(field as _)
14470            } else {
14471                None
14472            }
14473        }
14474        ///Returns a mutable reference to `programmable_system_transaction`.
14475        ///If the field is unset, it is first initialized with the default value.
14476        ///If any other oneof field in the same oneof is set, it will be cleared.
14477        pub fn programmable_system_transaction_mut(
14478            &mut self,
14479        ) -> &mut super::ProgrammableTransaction {
14480            if self.programmable_system_transaction_opt_mut().is_none() {
14481                self.kind = Some(
14482                    super::transaction_kind::Kind::ProgrammableSystemTransaction(
14483                        super::ProgrammableTransaction::default(),
14484                    ),
14485                );
14486            }
14487            self.programmable_system_transaction_opt_mut().unwrap()
14488        }
14489        ///Sets `programmable_system_transaction` with the provided value.
14490        ///If any other oneof field in the same oneof is set, it will be cleared.
14491        pub fn set_programmable_system_transaction<
14492            T: Into<super::ProgrammableTransaction>,
14493        >(&mut self, field: T) {
14494            self.kind = Some(
14495                super::transaction_kind::Kind::ProgrammableSystemTransaction(
14496                    field.into().into(),
14497                ),
14498            );
14499        }
14500        ///Sets `programmable_system_transaction` with the provided value.
14501        ///If any other oneof field in the same oneof is set, it will be cleared.
14502        pub fn with_programmable_system_transaction<
14503            T: Into<super::ProgrammableTransaction>,
14504        >(mut self, field: T) -> Self {
14505            self.set_programmable_system_transaction(field.into());
14506            self
14507        }
14508        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14509        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14510            if let Some(super::transaction_kind::Kind::ChangeEpoch(field)) = &self.kind {
14511                field as _
14512            } else {
14513                super::ChangeEpoch::default_instance() as _
14514            }
14515        }
14516        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14517        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14518            if let Some(super::transaction_kind::Kind::ChangeEpoch(field)) = &self.kind {
14519                Some(field as _)
14520            } else {
14521                None
14522            }
14523        }
14524        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14525        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14526            if let Some(super::transaction_kind::Kind::ChangeEpoch(field)) = &mut self
14527                .kind
14528            {
14529                Some(field as _)
14530            } else {
14531                None
14532            }
14533        }
14534        ///Returns a mutable reference to `change_epoch`.
14535        ///If the field is unset, it is first initialized with the default value.
14536        ///If any other oneof field in the same oneof is set, it will be cleared.
14537        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14538            if self.change_epoch_opt_mut().is_none() {
14539                self.kind = Some(
14540                    super::transaction_kind::Kind::ChangeEpoch(
14541                        super::ChangeEpoch::default(),
14542                    ),
14543                );
14544            }
14545            self.change_epoch_opt_mut().unwrap()
14546        }
14547        ///Sets `change_epoch` with the provided value.
14548        ///If any other oneof field in the same oneof is set, it will be cleared.
14549        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14550            self.kind = Some(
14551                super::transaction_kind::Kind::ChangeEpoch(field.into().into()),
14552            );
14553        }
14554        ///Sets `change_epoch` with the provided value.
14555        ///If any other oneof field in the same oneof is set, it will be cleared.
14556        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14557            mut self,
14558            field: T,
14559        ) -> Self {
14560            self.set_change_epoch(field.into());
14561            self
14562        }
14563        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
14564        pub fn genesis(&self) -> &super::GenesisTransaction {
14565            if let Some(super::transaction_kind::Kind::Genesis(field)) = &self.kind {
14566                field as _
14567            } else {
14568                super::GenesisTransaction::default_instance() as _
14569            }
14570        }
14571        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
14572        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14573            if let Some(super::transaction_kind::Kind::Genesis(field)) = &self.kind {
14574                Some(field as _)
14575            } else {
14576                None
14577            }
14578        }
14579        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14580        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14581            if let Some(super::transaction_kind::Kind::Genesis(field)) = &mut self.kind {
14582                Some(field as _)
14583            } else {
14584                None
14585            }
14586        }
14587        ///Returns a mutable reference to `genesis`.
14588        ///If the field is unset, it is first initialized with the default value.
14589        ///If any other oneof field in the same oneof is set, it will be cleared.
14590        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14591            if self.genesis_opt_mut().is_none() {
14592                self.kind = Some(
14593                    super::transaction_kind::Kind::Genesis(
14594                        super::GenesisTransaction::default(),
14595                    ),
14596                );
14597            }
14598            self.genesis_opt_mut().unwrap()
14599        }
14600        ///Sets `genesis` with the provided value.
14601        ///If any other oneof field in the same oneof is set, it will be cleared.
14602        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14603            self.kind = Some(
14604                super::transaction_kind::Kind::Genesis(field.into().into()),
14605            );
14606        }
14607        ///Sets `genesis` with the provided value.
14608        ///If any other oneof field in the same oneof is set, it will be cleared.
14609        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14610            mut self,
14611            field: T,
14612        ) -> Self {
14613            self.set_genesis(field.into());
14614            self
14615        }
14616        ///Returns the value of `consensus_commit_prologue_v1`, or the default value if `consensus_commit_prologue_v1` is unset.
14617        pub fn consensus_commit_prologue_v1(&self) -> &super::ConsensusCommitPrologue {
14618            if let Some(
14619                super::transaction_kind::Kind::ConsensusCommitPrologueV1(field),
14620            ) = &self.kind
14621            {
14622                field as _
14623            } else {
14624                super::ConsensusCommitPrologue::default_instance() as _
14625            }
14626        }
14627        ///If `consensus_commit_prologue_v1` is set, returns [`Some`] with the value; otherwise returns [`None`].
14628        pub fn consensus_commit_prologue_v1_opt(
14629            &self,
14630        ) -> Option<&super::ConsensusCommitPrologue> {
14631            if let Some(
14632                super::transaction_kind::Kind::ConsensusCommitPrologueV1(field),
14633            ) = &self.kind
14634            {
14635                Some(field as _)
14636            } else {
14637                None
14638            }
14639        }
14640        ///If `consensus_commit_prologue_v1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14641        pub fn consensus_commit_prologue_v1_opt_mut(
14642            &mut self,
14643        ) -> Option<&mut super::ConsensusCommitPrologue> {
14644            if let Some(
14645                super::transaction_kind::Kind::ConsensusCommitPrologueV1(field),
14646            ) = &mut self.kind
14647            {
14648                Some(field as _)
14649            } else {
14650                None
14651            }
14652        }
14653        ///Returns a mutable reference to `consensus_commit_prologue_v1`.
14654        ///If the field is unset, it is first initialized with the default value.
14655        ///If any other oneof field in the same oneof is set, it will be cleared.
14656        pub fn consensus_commit_prologue_v1_mut(
14657            &mut self,
14658        ) -> &mut super::ConsensusCommitPrologue {
14659            if self.consensus_commit_prologue_v1_opt_mut().is_none() {
14660                self.kind = Some(
14661                    super::transaction_kind::Kind::ConsensusCommitPrologueV1(
14662                        super::ConsensusCommitPrologue::default(),
14663                    ),
14664                );
14665            }
14666            self.consensus_commit_prologue_v1_opt_mut().unwrap()
14667        }
14668        ///Sets `consensus_commit_prologue_v1` with the provided value.
14669        ///If any other oneof field in the same oneof is set, it will be cleared.
14670        pub fn set_consensus_commit_prologue_v1<T: Into<super::ConsensusCommitPrologue>>(
14671            &mut self,
14672            field: T,
14673        ) {
14674            self.kind = Some(
14675                super::transaction_kind::Kind::ConsensusCommitPrologueV1(
14676                    field.into().into(),
14677                ),
14678            );
14679        }
14680        ///Sets `consensus_commit_prologue_v1` with the provided value.
14681        ///If any other oneof field in the same oneof is set, it will be cleared.
14682        pub fn with_consensus_commit_prologue_v1<
14683            T: Into<super::ConsensusCommitPrologue>,
14684        >(mut self, field: T) -> Self {
14685            self.set_consensus_commit_prologue_v1(field.into());
14686            self
14687        }
14688        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
14689        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14690            if let Some(
14691                super::transaction_kind::Kind::AuthenticatorStateUpdate(field),
14692            ) = &self.kind
14693            {
14694                field as _
14695            } else {
14696                super::AuthenticatorStateUpdate::default_instance() as _
14697            }
14698        }
14699        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14700        pub fn authenticator_state_update_opt(
14701            &self,
14702        ) -> Option<&super::AuthenticatorStateUpdate> {
14703            if let Some(
14704                super::transaction_kind::Kind::AuthenticatorStateUpdate(field),
14705            ) = &self.kind
14706            {
14707                Some(field as _)
14708            } else {
14709                None
14710            }
14711        }
14712        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14713        pub fn authenticator_state_update_opt_mut(
14714            &mut self,
14715        ) -> Option<&mut super::AuthenticatorStateUpdate> {
14716            if let Some(
14717                super::transaction_kind::Kind::AuthenticatorStateUpdate(field),
14718            ) = &mut self.kind
14719            {
14720                Some(field as _)
14721            } else {
14722                None
14723            }
14724        }
14725        ///Returns a mutable reference to `authenticator_state_update`.
14726        ///If the field is unset, it is first initialized with the default value.
14727        ///If any other oneof field in the same oneof is set, it will be cleared.
14728        pub fn authenticator_state_update_mut(
14729            &mut self,
14730        ) -> &mut super::AuthenticatorStateUpdate {
14731            if self.authenticator_state_update_opt_mut().is_none() {
14732                self.kind = Some(
14733                    super::transaction_kind::Kind::AuthenticatorStateUpdate(
14734                        super::AuthenticatorStateUpdate::default(),
14735                    ),
14736                );
14737            }
14738            self.authenticator_state_update_opt_mut().unwrap()
14739        }
14740        ///Sets `authenticator_state_update` with the provided value.
14741        ///If any other oneof field in the same oneof is set, it will be cleared.
14742        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14743            &mut self,
14744            field: T,
14745        ) {
14746            self.kind = Some(
14747                super::transaction_kind::Kind::AuthenticatorStateUpdate(
14748                    field.into().into(),
14749                ),
14750            );
14751        }
14752        ///Sets `authenticator_state_update` with the provided value.
14753        ///If any other oneof field in the same oneof is set, it will be cleared.
14754        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14755            mut self,
14756            field: T,
14757        ) -> Self {
14758            self.set_authenticator_state_update(field.into());
14759            self
14760        }
14761        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
14762        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
14763            if let Some(super::transaction_kind::Kind::EndOfEpoch(field)) = &self.kind {
14764                field as _
14765            } else {
14766                super::EndOfEpochTransaction::default_instance() as _
14767            }
14768        }
14769        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14770        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
14771            if let Some(super::transaction_kind::Kind::EndOfEpoch(field)) = &self.kind {
14772                Some(field as _)
14773            } else {
14774                None
14775            }
14776        }
14777        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14778        pub fn end_of_epoch_opt_mut(
14779            &mut self,
14780        ) -> Option<&mut super::EndOfEpochTransaction> {
14781            if let Some(super::transaction_kind::Kind::EndOfEpoch(field)) = &mut self
14782                .kind
14783            {
14784                Some(field as _)
14785            } else {
14786                None
14787            }
14788        }
14789        ///Returns a mutable reference to `end_of_epoch`.
14790        ///If the field is unset, it is first initialized with the default value.
14791        ///If any other oneof field in the same oneof is set, it will be cleared.
14792        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
14793            if self.end_of_epoch_opt_mut().is_none() {
14794                self.kind = Some(
14795                    super::transaction_kind::Kind::EndOfEpoch(
14796                        super::EndOfEpochTransaction::default(),
14797                    ),
14798                );
14799            }
14800            self.end_of_epoch_opt_mut().unwrap()
14801        }
14802        ///Sets `end_of_epoch` with the provided value.
14803        ///If any other oneof field in the same oneof is set, it will be cleared.
14804        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14805            &mut self,
14806            field: T,
14807        ) {
14808            self.kind = Some(
14809                super::transaction_kind::Kind::EndOfEpoch(field.into().into()),
14810            );
14811        }
14812        ///Sets `end_of_epoch` with the provided value.
14813        ///If any other oneof field in the same oneof is set, it will be cleared.
14814        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14815            mut self,
14816            field: T,
14817        ) -> Self {
14818            self.set_end_of_epoch(field.into());
14819            self
14820        }
14821        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
14822        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
14823            if let Some(super::transaction_kind::Kind::RandomnessStateUpdate(field)) = &self
14824                .kind
14825            {
14826                field as _
14827            } else {
14828                super::RandomnessStateUpdate::default_instance() as _
14829            }
14830        }
14831        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14832        pub fn randomness_state_update_opt(
14833            &self,
14834        ) -> Option<&super::RandomnessStateUpdate> {
14835            if let Some(super::transaction_kind::Kind::RandomnessStateUpdate(field)) = &self
14836                .kind
14837            {
14838                Some(field as _)
14839            } else {
14840                None
14841            }
14842        }
14843        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14844        pub fn randomness_state_update_opt_mut(
14845            &mut self,
14846        ) -> Option<&mut super::RandomnessStateUpdate> {
14847            if let Some(super::transaction_kind::Kind::RandomnessStateUpdate(field)) = &mut self
14848                .kind
14849            {
14850                Some(field as _)
14851            } else {
14852                None
14853            }
14854        }
14855        ///Returns a mutable reference to `randomness_state_update`.
14856        ///If the field is unset, it is first initialized with the default value.
14857        ///If any other oneof field in the same oneof is set, it will be cleared.
14858        pub fn randomness_state_update_mut(
14859            &mut self,
14860        ) -> &mut super::RandomnessStateUpdate {
14861            if self.randomness_state_update_opt_mut().is_none() {
14862                self.kind = Some(
14863                    super::transaction_kind::Kind::RandomnessStateUpdate(
14864                        super::RandomnessStateUpdate::default(),
14865                    ),
14866                );
14867            }
14868            self.randomness_state_update_opt_mut().unwrap()
14869        }
14870        ///Sets `randomness_state_update` with the provided value.
14871        ///If any other oneof field in the same oneof is set, it will be cleared.
14872        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14873            &mut self,
14874            field: T,
14875        ) {
14876            self.kind = Some(
14877                super::transaction_kind::Kind::RandomnessStateUpdate(field.into().into()),
14878            );
14879        }
14880        ///Sets `randomness_state_update` with the provided value.
14881        ///If any other oneof field in the same oneof is set, it will be cleared.
14882        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14883            mut self,
14884            field: T,
14885        ) -> Self {
14886            self.set_randomness_state_update(field.into());
14887            self
14888        }
14889        ///Returns the value of `consensus_commit_prologue_v2`, or the default value if `consensus_commit_prologue_v2` is unset.
14890        pub fn consensus_commit_prologue_v2(&self) -> &super::ConsensusCommitPrologue {
14891            if let Some(
14892                super::transaction_kind::Kind::ConsensusCommitPrologueV2(field),
14893            ) = &self.kind
14894            {
14895                field as _
14896            } else {
14897                super::ConsensusCommitPrologue::default_instance() as _
14898            }
14899        }
14900        ///If `consensus_commit_prologue_v2` is set, returns [`Some`] with the value; otherwise returns [`None`].
14901        pub fn consensus_commit_prologue_v2_opt(
14902            &self,
14903        ) -> Option<&super::ConsensusCommitPrologue> {
14904            if let Some(
14905                super::transaction_kind::Kind::ConsensusCommitPrologueV2(field),
14906            ) = &self.kind
14907            {
14908                Some(field as _)
14909            } else {
14910                None
14911            }
14912        }
14913        ///If `consensus_commit_prologue_v2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14914        pub fn consensus_commit_prologue_v2_opt_mut(
14915            &mut self,
14916        ) -> Option<&mut super::ConsensusCommitPrologue> {
14917            if let Some(
14918                super::transaction_kind::Kind::ConsensusCommitPrologueV2(field),
14919            ) = &mut self.kind
14920            {
14921                Some(field as _)
14922            } else {
14923                None
14924            }
14925        }
14926        ///Returns a mutable reference to `consensus_commit_prologue_v2`.
14927        ///If the field is unset, it is first initialized with the default value.
14928        ///If any other oneof field in the same oneof is set, it will be cleared.
14929        pub fn consensus_commit_prologue_v2_mut(
14930            &mut self,
14931        ) -> &mut super::ConsensusCommitPrologue {
14932            if self.consensus_commit_prologue_v2_opt_mut().is_none() {
14933                self.kind = Some(
14934                    super::transaction_kind::Kind::ConsensusCommitPrologueV2(
14935                        super::ConsensusCommitPrologue::default(),
14936                    ),
14937                );
14938            }
14939            self.consensus_commit_prologue_v2_opt_mut().unwrap()
14940        }
14941        ///Sets `consensus_commit_prologue_v2` with the provided value.
14942        ///If any other oneof field in the same oneof is set, it will be cleared.
14943        pub fn set_consensus_commit_prologue_v2<T: Into<super::ConsensusCommitPrologue>>(
14944            &mut self,
14945            field: T,
14946        ) {
14947            self.kind = Some(
14948                super::transaction_kind::Kind::ConsensusCommitPrologueV2(
14949                    field.into().into(),
14950                ),
14951            );
14952        }
14953        ///Sets `consensus_commit_prologue_v2` with the provided value.
14954        ///If any other oneof field in the same oneof is set, it will be cleared.
14955        pub fn with_consensus_commit_prologue_v2<
14956            T: Into<super::ConsensusCommitPrologue>,
14957        >(mut self, field: T) -> Self {
14958            self.set_consensus_commit_prologue_v2(field.into());
14959            self
14960        }
14961        ///Returns the value of `consensus_commit_prologue_v3`, or the default value if `consensus_commit_prologue_v3` is unset.
14962        pub fn consensus_commit_prologue_v3(&self) -> &super::ConsensusCommitPrologue {
14963            if let Some(
14964                super::transaction_kind::Kind::ConsensusCommitPrologueV3(field),
14965            ) = &self.kind
14966            {
14967                field as _
14968            } else {
14969                super::ConsensusCommitPrologue::default_instance() as _
14970            }
14971        }
14972        ///If `consensus_commit_prologue_v3` is set, returns [`Some`] with the value; otherwise returns [`None`].
14973        pub fn consensus_commit_prologue_v3_opt(
14974            &self,
14975        ) -> Option<&super::ConsensusCommitPrologue> {
14976            if let Some(
14977                super::transaction_kind::Kind::ConsensusCommitPrologueV3(field),
14978            ) = &self.kind
14979            {
14980                Some(field as _)
14981            } else {
14982                None
14983            }
14984        }
14985        ///If `consensus_commit_prologue_v3` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14986        pub fn consensus_commit_prologue_v3_opt_mut(
14987            &mut self,
14988        ) -> Option<&mut super::ConsensusCommitPrologue> {
14989            if let Some(
14990                super::transaction_kind::Kind::ConsensusCommitPrologueV3(field),
14991            ) = &mut self.kind
14992            {
14993                Some(field as _)
14994            } else {
14995                None
14996            }
14997        }
14998        ///Returns a mutable reference to `consensus_commit_prologue_v3`.
14999        ///If the field is unset, it is first initialized with the default value.
15000        ///If any other oneof field in the same oneof is set, it will be cleared.
15001        pub fn consensus_commit_prologue_v3_mut(
15002            &mut self,
15003        ) -> &mut super::ConsensusCommitPrologue {
15004            if self.consensus_commit_prologue_v3_opt_mut().is_none() {
15005                self.kind = Some(
15006                    super::transaction_kind::Kind::ConsensusCommitPrologueV3(
15007                        super::ConsensusCommitPrologue::default(),
15008                    ),
15009                );
15010            }
15011            self.consensus_commit_prologue_v3_opt_mut().unwrap()
15012        }
15013        ///Sets `consensus_commit_prologue_v3` with the provided value.
15014        ///If any other oneof field in the same oneof is set, it will be cleared.
15015        pub fn set_consensus_commit_prologue_v3<T: Into<super::ConsensusCommitPrologue>>(
15016            &mut self,
15017            field: T,
15018        ) {
15019            self.kind = Some(
15020                super::transaction_kind::Kind::ConsensusCommitPrologueV3(
15021                    field.into().into(),
15022                ),
15023            );
15024        }
15025        ///Sets `consensus_commit_prologue_v3` with the provided value.
15026        ///If any other oneof field in the same oneof is set, it will be cleared.
15027        pub fn with_consensus_commit_prologue_v3<
15028            T: Into<super::ConsensusCommitPrologue>,
15029        >(mut self, field: T) -> Self {
15030            self.set_consensus_commit_prologue_v3(field.into());
15031            self
15032        }
15033        ///Returns the value of `consensus_commit_prologue_v4`, or the default value if `consensus_commit_prologue_v4` is unset.
15034        pub fn consensus_commit_prologue_v4(&self) -> &super::ConsensusCommitPrologue {
15035            if let Some(
15036                super::transaction_kind::Kind::ConsensusCommitPrologueV4(field),
15037            ) = &self.kind
15038            {
15039                field as _
15040            } else {
15041                super::ConsensusCommitPrologue::default_instance() as _
15042            }
15043        }
15044        ///If `consensus_commit_prologue_v4` is set, returns [`Some`] with the value; otherwise returns [`None`].
15045        pub fn consensus_commit_prologue_v4_opt(
15046            &self,
15047        ) -> Option<&super::ConsensusCommitPrologue> {
15048            if let Some(
15049                super::transaction_kind::Kind::ConsensusCommitPrologueV4(field),
15050            ) = &self.kind
15051            {
15052                Some(field as _)
15053            } else {
15054                None
15055            }
15056        }
15057        ///If `consensus_commit_prologue_v4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15058        pub fn consensus_commit_prologue_v4_opt_mut(
15059            &mut self,
15060        ) -> Option<&mut super::ConsensusCommitPrologue> {
15061            if let Some(
15062                super::transaction_kind::Kind::ConsensusCommitPrologueV4(field),
15063            ) = &mut self.kind
15064            {
15065                Some(field as _)
15066            } else {
15067                None
15068            }
15069        }
15070        ///Returns a mutable reference to `consensus_commit_prologue_v4`.
15071        ///If the field is unset, it is first initialized with the default value.
15072        ///If any other oneof field in the same oneof is set, it will be cleared.
15073        pub fn consensus_commit_prologue_v4_mut(
15074            &mut self,
15075        ) -> &mut super::ConsensusCommitPrologue {
15076            if self.consensus_commit_prologue_v4_opt_mut().is_none() {
15077                self.kind = Some(
15078                    super::transaction_kind::Kind::ConsensusCommitPrologueV4(
15079                        super::ConsensusCommitPrologue::default(),
15080                    ),
15081                );
15082            }
15083            self.consensus_commit_prologue_v4_opt_mut().unwrap()
15084        }
15085        ///Sets `consensus_commit_prologue_v4` with the provided value.
15086        ///If any other oneof field in the same oneof is set, it will be cleared.
15087        pub fn set_consensus_commit_prologue_v4<T: Into<super::ConsensusCommitPrologue>>(
15088            &mut self,
15089            field: T,
15090        ) {
15091            self.kind = Some(
15092                super::transaction_kind::Kind::ConsensusCommitPrologueV4(
15093                    field.into().into(),
15094                ),
15095            );
15096        }
15097        ///Sets `consensus_commit_prologue_v4` with the provided value.
15098        ///If any other oneof field in the same oneof is set, it will be cleared.
15099        pub fn with_consensus_commit_prologue_v4<
15100            T: Into<super::ConsensusCommitPrologue>,
15101        >(mut self, field: T) -> Self {
15102            self.set_consensus_commit_prologue_v4(field.into());
15103            self
15104        }
15105    }
15106    impl super::TransferObjects {
15107        pub const fn const_default() -> Self {
15108            Self {
15109                objects: Vec::new(),
15110                address: None,
15111            }
15112        }
15113        #[doc(hidden)]
15114        pub fn default_instance() -> &'static Self {
15115            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15116            &DEFAULT
15117        }
15118        ///Returns the value of `objects`, or the default value if `objects` is unset.
15119        pub fn objects(&self) -> &[super::Argument] {
15120            &self.objects
15121        }
15122        ///Returns a mutable reference to `objects`.
15123        ///If the field is unset, it is first initialized with the default value.
15124        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15125            &mut self.objects
15126        }
15127        ///Sets `objects` with the provided value.
15128        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15129            self.objects = field;
15130        }
15131        ///Sets `objects` with the provided value.
15132        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15133            self.set_objects(field);
15134            self
15135        }
15136        ///Returns the value of `address`, or the default value if `address` is unset.
15137        pub fn address(&self) -> &super::Argument {
15138            self.address
15139                .as_ref()
15140                .map(|field| field as _)
15141                .unwrap_or_else(|| super::Argument::default_instance() as _)
15142        }
15143        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15144        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15145            self.address.as_mut().map(|field| field as _)
15146        }
15147        ///Returns a mutable reference to `address`.
15148        ///If the field is unset, it is first initialized with the default value.
15149        pub fn address_mut(&mut self) -> &mut super::Argument {
15150            self.address.get_or_insert_default()
15151        }
15152        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15153        pub fn address_opt(&self) -> Option<&super::Argument> {
15154            self.address.as_ref().map(|field| field as _)
15155        }
15156        ///Sets `address` with the provided value.
15157        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15158            self.address = Some(field.into().into());
15159        }
15160        ///Sets `address` with the provided value.
15161        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15162            self.set_address(field.into());
15163            self
15164        }
15165    }
15166    impl super::TypeArgumentError {
15167        pub const fn const_default() -> Self {
15168            Self {
15169                type_argument: None,
15170                kind: None,
15171            }
15172        }
15173        #[doc(hidden)]
15174        pub fn default_instance() -> &'static Self {
15175            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15176            &DEFAULT
15177        }
15178        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15179        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15180            self.type_argument.as_mut().map(|field| field as _)
15181        }
15182        ///Returns a mutable reference to `type_argument`.
15183        ///If the field is unset, it is first initialized with the default value.
15184        pub fn type_argument_mut(&mut self) -> &mut u32 {
15185            self.type_argument.get_or_insert_default()
15186        }
15187        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15188        pub fn type_argument_opt(&self) -> Option<u32> {
15189            self.type_argument.as_ref().map(|field| *field)
15190        }
15191        ///Sets `type_argument` with the provided value.
15192        pub fn set_type_argument<T: Into<u32>>(&mut self, field: T) {
15193            self.type_argument = Some(field.into().into());
15194        }
15195        ///Sets `type_argument` with the provided value.
15196        pub fn with_type_argument<T: Into<u32>>(mut self, field: T) -> Self {
15197            self.set_type_argument(field.into());
15198            self
15199        }
15200        ///Sets `kind` with the provided value.
15201        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15202            mut self,
15203            field: T,
15204        ) -> Self {
15205            self.set_kind(field.into());
15206            self
15207        }
15208    }
15209    impl super::TypeOrigin {
15210        pub const fn const_default() -> Self {
15211            Self {
15212                module_name: None,
15213                datatype_name: None,
15214                package_id: None,
15215            }
15216        }
15217        #[doc(hidden)]
15218        pub fn default_instance() -> &'static Self {
15219            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15220            &DEFAULT
15221        }
15222        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15223        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15224            self.module_name.as_mut().map(|field| field as _)
15225        }
15226        ///Returns a mutable reference to `module_name`.
15227        ///If the field is unset, it is first initialized with the default value.
15228        pub fn module_name_mut(&mut self) -> &mut String {
15229            self.module_name.get_or_insert_default()
15230        }
15231        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15232        pub fn module_name_opt(&self) -> Option<&str> {
15233            self.module_name.as_ref().map(|field| field as _)
15234        }
15235        ///Sets `module_name` with the provided value.
15236        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15237            self.module_name = Some(field.into().into());
15238        }
15239        ///Sets `module_name` with the provided value.
15240        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15241            self.set_module_name(field.into());
15242            self
15243        }
15244        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15245        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15246            self.datatype_name.as_mut().map(|field| field as _)
15247        }
15248        ///Returns a mutable reference to `datatype_name`.
15249        ///If the field is unset, it is first initialized with the default value.
15250        pub fn datatype_name_mut(&mut self) -> &mut String {
15251            self.datatype_name.get_or_insert_default()
15252        }
15253        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15254        pub fn datatype_name_opt(&self) -> Option<&str> {
15255            self.datatype_name.as_ref().map(|field| field as _)
15256        }
15257        ///Sets `datatype_name` with the provided value.
15258        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15259            self.datatype_name = Some(field.into().into());
15260        }
15261        ///Sets `datatype_name` with the provided value.
15262        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15263            self.set_datatype_name(field.into());
15264            self
15265        }
15266        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15267        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15268            self.package_id.as_mut().map(|field| field as _)
15269        }
15270        ///Returns a mutable reference to `package_id`.
15271        ///If the field is unset, it is first initialized with the default value.
15272        pub fn package_id_mut(&mut self) -> &mut String {
15273            self.package_id.get_or_insert_default()
15274        }
15275        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15276        pub fn package_id_opt(&self) -> Option<&str> {
15277            self.package_id.as_ref().map(|field| field as _)
15278        }
15279        ///Sets `package_id` with the provided value.
15280        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15281            self.package_id = Some(field.into().into());
15282        }
15283        ///Sets `package_id` with the provided value.
15284        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15285            self.set_package_id(field.into());
15286            self
15287        }
15288    }
15289    impl super::TypeParameter {
15290        pub const fn const_default() -> Self {
15291            Self {
15292                constraints: Vec::new(),
15293                is_phantom: None,
15294            }
15295        }
15296        #[doc(hidden)]
15297        pub fn default_instance() -> &'static Self {
15298            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15299            &DEFAULT
15300        }
15301        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15302        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15303            self.is_phantom.as_mut().map(|field| field as _)
15304        }
15305        ///Returns a mutable reference to `is_phantom`.
15306        ///If the field is unset, it is first initialized with the default value.
15307        pub fn is_phantom_mut(&mut self) -> &mut bool {
15308            self.is_phantom.get_or_insert_default()
15309        }
15310        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15311        pub fn is_phantom_opt(&self) -> Option<bool> {
15312            self.is_phantom.as_ref().map(|field| *field)
15313        }
15314        ///Sets `is_phantom` with the provided value.
15315        pub fn set_is_phantom<T: Into<bool>>(&mut self, field: T) {
15316            self.is_phantom = Some(field.into().into());
15317        }
15318        ///Sets `is_phantom` with the provided value.
15319        pub fn with_is_phantom<T: Into<bool>>(mut self, field: T) -> Self {
15320            self.set_is_phantom(field.into());
15321            self
15322        }
15323    }
15324    impl super::UnchangedConsensusObject {
15325        pub const fn const_default() -> Self {
15326            Self {
15327                kind: None,
15328                object_id: None,
15329                version: None,
15330                digest: None,
15331                object_type: None,
15332            }
15333        }
15334        #[doc(hidden)]
15335        pub fn default_instance() -> &'static Self {
15336            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15337            &DEFAULT
15338        }
15339        ///Sets `kind` with the provided value.
15340        pub fn with_kind<
15341            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15342        >(mut self, field: T) -> Self {
15343            self.set_kind(field.into());
15344            self
15345        }
15346        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15347        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15348            self.object_id.as_mut().map(|field| field as _)
15349        }
15350        ///Returns a mutable reference to `object_id`.
15351        ///If the field is unset, it is first initialized with the default value.
15352        pub fn object_id_mut(&mut self) -> &mut String {
15353            self.object_id.get_or_insert_default()
15354        }
15355        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15356        pub fn object_id_opt(&self) -> Option<&str> {
15357            self.object_id.as_ref().map(|field| field as _)
15358        }
15359        ///Sets `object_id` with the provided value.
15360        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15361            self.object_id = Some(field.into().into());
15362        }
15363        ///Sets `object_id` with the provided value.
15364        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15365            self.set_object_id(field.into());
15366            self
15367        }
15368        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15369        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15370            self.version.as_mut().map(|field| field as _)
15371        }
15372        ///Returns a mutable reference to `version`.
15373        ///If the field is unset, it is first initialized with the default value.
15374        pub fn version_mut(&mut self) -> &mut u64 {
15375            self.version.get_or_insert_default()
15376        }
15377        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15378        pub fn version_opt(&self) -> Option<u64> {
15379            self.version.as_ref().map(|field| *field)
15380        }
15381        ///Sets `version` with the provided value.
15382        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
15383            self.version = Some(field.into().into());
15384        }
15385        ///Sets `version` with the provided value.
15386        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
15387            self.set_version(field.into());
15388            self
15389        }
15390        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15391        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15392            self.digest.as_mut().map(|field| field as _)
15393        }
15394        ///Returns a mutable reference to `digest`.
15395        ///If the field is unset, it is first initialized with the default value.
15396        pub fn digest_mut(&mut self) -> &mut String {
15397            self.digest.get_or_insert_default()
15398        }
15399        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15400        pub fn digest_opt(&self) -> Option<&str> {
15401            self.digest.as_ref().map(|field| field as _)
15402        }
15403        ///Sets `digest` with the provided value.
15404        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15405            self.digest = Some(field.into().into());
15406        }
15407        ///Sets `digest` with the provided value.
15408        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15409            self.set_digest(field.into());
15410            self
15411        }
15412        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15413        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15414            self.object_type.as_mut().map(|field| field as _)
15415        }
15416        ///Returns a mutable reference to `object_type`.
15417        ///If the field is unset, it is first initialized with the default value.
15418        pub fn object_type_mut(&mut self) -> &mut String {
15419            self.object_type.get_or_insert_default()
15420        }
15421        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15422        pub fn object_type_opt(&self) -> Option<&str> {
15423            self.object_type.as_ref().map(|field| field as _)
15424        }
15425        ///Sets `object_type` with the provided value.
15426        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15427            self.object_type = Some(field.into().into());
15428        }
15429        ///Sets `object_type` with the provided value.
15430        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15431            self.set_object_type(field.into());
15432            self
15433        }
15434    }
15435    impl super::Upgrade {
15436        pub const fn const_default() -> Self {
15437            Self {
15438                modules: Vec::new(),
15439                dependencies: Vec::new(),
15440                package: None,
15441                ticket: None,
15442            }
15443        }
15444        #[doc(hidden)]
15445        pub fn default_instance() -> &'static Self {
15446            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15447            &DEFAULT
15448        }
15449        ///Returns the value of `modules`, or the default value if `modules` is unset.
15450        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15451            &self.modules
15452        }
15453        ///Returns a mutable reference to `modules`.
15454        ///If the field is unset, it is first initialized with the default value.
15455        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15456            &mut self.modules
15457        }
15458        ///Sets `modules` with the provided value.
15459        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15460            self.modules = field;
15461        }
15462        ///Sets `modules` with the provided value.
15463        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15464            self.set_modules(field);
15465            self
15466        }
15467        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15468        pub fn dependencies(&self) -> &[String] {
15469            &self.dependencies
15470        }
15471        ///Returns a mutable reference to `dependencies`.
15472        ///If the field is unset, it is first initialized with the default value.
15473        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15474            &mut self.dependencies
15475        }
15476        ///Sets `dependencies` with the provided value.
15477        pub fn set_dependencies(&mut self, field: Vec<String>) {
15478            self.dependencies = field;
15479        }
15480        ///Sets `dependencies` with the provided value.
15481        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15482            self.set_dependencies(field);
15483            self
15484        }
15485        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15486        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15487            self.package.as_mut().map(|field| field as _)
15488        }
15489        ///Returns a mutable reference to `package`.
15490        ///If the field is unset, it is first initialized with the default value.
15491        pub fn package_mut(&mut self) -> &mut String {
15492            self.package.get_or_insert_default()
15493        }
15494        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15495        pub fn package_opt(&self) -> Option<&str> {
15496            self.package.as_ref().map(|field| field as _)
15497        }
15498        ///Sets `package` with the provided value.
15499        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15500            self.package = Some(field.into().into());
15501        }
15502        ///Sets `package` with the provided value.
15503        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15504            self.set_package(field.into());
15505            self
15506        }
15507        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15508        pub fn ticket(&self) -> &super::Argument {
15509            self.ticket
15510                .as_ref()
15511                .map(|field| field as _)
15512                .unwrap_or_else(|| super::Argument::default_instance() as _)
15513        }
15514        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15515        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15516            self.ticket.as_mut().map(|field| field as _)
15517        }
15518        ///Returns a mutable reference to `ticket`.
15519        ///If the field is unset, it is first initialized with the default value.
15520        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15521            self.ticket.get_or_insert_default()
15522        }
15523        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15524        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15525            self.ticket.as_ref().map(|field| field as _)
15526        }
15527        ///Sets `ticket` with the provided value.
15528        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15529            self.ticket = Some(field.into().into());
15530        }
15531        ///Sets `ticket` with the provided value.
15532        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15533            self.set_ticket(field.into());
15534            self
15535        }
15536    }
15537    impl super::UserSignature {
15538        pub const fn const_default() -> Self {
15539            Self {
15540                bcs: None,
15541                scheme: None,
15542                signature: None,
15543            }
15544        }
15545        #[doc(hidden)]
15546        pub fn default_instance() -> &'static Self {
15547            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15548            &DEFAULT
15549        }
15550        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15551        pub fn bcs(&self) -> &super::Bcs {
15552            self.bcs
15553                .as_ref()
15554                .map(|field| field as _)
15555                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15556        }
15557        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15558        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15559            self.bcs.as_mut().map(|field| field as _)
15560        }
15561        ///Returns a mutable reference to `bcs`.
15562        ///If the field is unset, it is first initialized with the default value.
15563        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15564            self.bcs.get_or_insert_default()
15565        }
15566        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15567        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15568            self.bcs.as_ref().map(|field| field as _)
15569        }
15570        ///Sets `bcs` with the provided value.
15571        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15572            self.bcs = Some(field.into().into());
15573        }
15574        ///Sets `bcs` with the provided value.
15575        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15576            self.set_bcs(field.into());
15577            self
15578        }
15579        ///Sets `scheme` with the provided value.
15580        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15581            self.set_scheme(field.into());
15582            self
15583        }
15584        ///Returns the value of `simple`, or the default value if `simple` is unset.
15585        pub fn simple(&self) -> &super::SimpleSignature {
15586            if let Some(super::user_signature::Signature::Simple(field)) = &self
15587                .signature
15588            {
15589                field as _
15590            } else {
15591                super::SimpleSignature::default_instance() as _
15592            }
15593        }
15594        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15595        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15596            if let Some(super::user_signature::Signature::Simple(field)) = &self
15597                .signature
15598            {
15599                Some(field as _)
15600            } else {
15601                None
15602            }
15603        }
15604        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15605        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15606            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15607                .signature
15608            {
15609                Some(field as _)
15610            } else {
15611                None
15612            }
15613        }
15614        ///Returns a mutable reference to `simple`.
15615        ///If the field is unset, it is first initialized with the default value.
15616        ///If any other oneof field in the same oneof is set, it will be cleared.
15617        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15618            if self.simple_opt_mut().is_none() {
15619                self.signature = Some(
15620                    super::user_signature::Signature::Simple(
15621                        super::SimpleSignature::default(),
15622                    ),
15623                );
15624            }
15625            self.simple_opt_mut().unwrap()
15626        }
15627        ///Sets `simple` with the provided value.
15628        ///If any other oneof field in the same oneof is set, it will be cleared.
15629        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15630            self.signature = Some(
15631                super::user_signature::Signature::Simple(field.into().into()),
15632            );
15633        }
15634        ///Sets `simple` with the provided value.
15635        ///If any other oneof field in the same oneof is set, it will be cleared.
15636        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15637            self.set_simple(field.into());
15638            self
15639        }
15640        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15641        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15642            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15643                .signature
15644            {
15645                field as _
15646            } else {
15647                super::MultisigAggregatedSignature::default_instance() as _
15648            }
15649        }
15650        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15651        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15652            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15653                .signature
15654            {
15655                Some(field as _)
15656            } else {
15657                None
15658            }
15659        }
15660        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15661        pub fn multisig_opt_mut(
15662            &mut self,
15663        ) -> Option<&mut super::MultisigAggregatedSignature> {
15664            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15665                .signature
15666            {
15667                Some(field as _)
15668            } else {
15669                None
15670            }
15671        }
15672        ///Returns a mutable reference to `multisig`.
15673        ///If the field is unset, it is first initialized with the default value.
15674        ///If any other oneof field in the same oneof is set, it will be cleared.
15675        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15676            if self.multisig_opt_mut().is_none() {
15677                self.signature = Some(
15678                    super::user_signature::Signature::Multisig(
15679                        super::MultisigAggregatedSignature::default(),
15680                    ),
15681                );
15682            }
15683            self.multisig_opt_mut().unwrap()
15684        }
15685        ///Sets `multisig` with the provided value.
15686        ///If any other oneof field in the same oneof is set, it will be cleared.
15687        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15688            &mut self,
15689            field: T,
15690        ) {
15691            self.signature = Some(
15692                super::user_signature::Signature::Multisig(field.into().into()),
15693            );
15694        }
15695        ///Sets `multisig` with the provided value.
15696        ///If any other oneof field in the same oneof is set, it will be cleared.
15697        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15698            mut self,
15699            field: T,
15700        ) -> Self {
15701            self.set_multisig(field.into());
15702            self
15703        }
15704        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15705        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15706            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15707                .signature
15708            {
15709                field as _
15710            } else {
15711                super::ZkLoginAuthenticator::default_instance() as _
15712            }
15713        }
15714        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15715        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15716            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15717                .signature
15718            {
15719                Some(field as _)
15720            } else {
15721                None
15722            }
15723        }
15724        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15725        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15726            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15727                .signature
15728            {
15729                Some(field as _)
15730            } else {
15731                None
15732            }
15733        }
15734        ///Returns a mutable reference to `zklogin`.
15735        ///If the field is unset, it is first initialized with the default value.
15736        ///If any other oneof field in the same oneof is set, it will be cleared.
15737        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15738            if self.zklogin_opt_mut().is_none() {
15739                self.signature = Some(
15740                    super::user_signature::Signature::Zklogin(
15741                        super::ZkLoginAuthenticator::default(),
15742                    ),
15743                );
15744            }
15745            self.zklogin_opt_mut().unwrap()
15746        }
15747        ///Sets `zklogin` with the provided value.
15748        ///If any other oneof field in the same oneof is set, it will be cleared.
15749        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15750            self.signature = Some(
15751                super::user_signature::Signature::Zklogin(field.into().into()),
15752            );
15753        }
15754        ///Sets `zklogin` with the provided value.
15755        ///If any other oneof field in the same oneof is set, it will be cleared.
15756        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15757            mut self,
15758            field: T,
15759        ) -> Self {
15760            self.set_zklogin(field.into());
15761            self
15762        }
15763        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
15764        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15765            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15766                .signature
15767            {
15768                field as _
15769            } else {
15770                super::PasskeyAuthenticator::default_instance() as _
15771            }
15772        }
15773        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
15774        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15775            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15776                .signature
15777            {
15778                Some(field as _)
15779            } else {
15780                None
15781            }
15782        }
15783        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15784        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15785            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15786                .signature
15787            {
15788                Some(field as _)
15789            } else {
15790                None
15791            }
15792        }
15793        ///Returns a mutable reference to `passkey`.
15794        ///If the field is unset, it is first initialized with the default value.
15795        ///If any other oneof field in the same oneof is set, it will be cleared.
15796        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15797            if self.passkey_opt_mut().is_none() {
15798                self.signature = Some(
15799                    super::user_signature::Signature::Passkey(
15800                        super::PasskeyAuthenticator::default(),
15801                    ),
15802                );
15803            }
15804            self.passkey_opt_mut().unwrap()
15805        }
15806        ///Sets `passkey` with the provided value.
15807        ///If any other oneof field in the same oneof is set, it will be cleared.
15808        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15809            self.signature = Some(
15810                super::user_signature::Signature::Passkey(field.into().into()),
15811            );
15812        }
15813        ///Sets `passkey` with the provided value.
15814        ///If any other oneof field in the same oneof is set, it will be cleared.
15815        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15816            mut self,
15817            field: T,
15818        ) -> Self {
15819            self.set_passkey(field.into());
15820            self
15821        }
15822    }
15823    impl super::Validator {
15824        pub const fn const_default() -> Self {
15825            Self {
15826                name: None,
15827                address: None,
15828                description: None,
15829                image_url: None,
15830                project_url: None,
15831                protocol_public_key: None,
15832                proof_of_possession: None,
15833                network_public_key: None,
15834                worker_public_key: None,
15835                network_address: None,
15836                p2p_address: None,
15837                primary_address: None,
15838                worker_address: None,
15839                next_epoch_protocol_public_key: None,
15840                next_epoch_proof_of_possession: None,
15841                next_epoch_network_public_key: None,
15842                next_epoch_worker_public_key: None,
15843                next_epoch_network_address: None,
15844                next_epoch_p2p_address: None,
15845                next_epoch_primary_address: None,
15846                next_epoch_worker_address: None,
15847                metadata_extra_fields: None,
15848                voting_power: None,
15849                operation_cap_id: None,
15850                gas_price: None,
15851                staking_pool: None,
15852                commission_rate: None,
15853                next_epoch_stake: None,
15854                next_epoch_gas_price: None,
15855                next_epoch_commission_rate: None,
15856                extra_fields: None,
15857            }
15858        }
15859        #[doc(hidden)]
15860        pub fn default_instance() -> &'static Self {
15861            static DEFAULT: super::Validator = super::Validator::const_default();
15862            &DEFAULT
15863        }
15864        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15865        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15866            self.name.as_mut().map(|field| field as _)
15867        }
15868        ///Returns a mutable reference to `name`.
15869        ///If the field is unset, it is first initialized with the default value.
15870        pub fn name_mut(&mut self) -> &mut String {
15871            self.name.get_or_insert_default()
15872        }
15873        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15874        pub fn name_opt(&self) -> Option<&str> {
15875            self.name.as_ref().map(|field| field as _)
15876        }
15877        ///Sets `name` with the provided value.
15878        pub fn set_name<T: Into<String>>(&mut self, field: T) {
15879            self.name = Some(field.into().into());
15880        }
15881        ///Sets `name` with the provided value.
15882        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15883            self.set_name(field.into());
15884            self
15885        }
15886        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15887        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15888            self.address.as_mut().map(|field| field as _)
15889        }
15890        ///Returns a mutable reference to `address`.
15891        ///If the field is unset, it is first initialized with the default value.
15892        pub fn address_mut(&mut self) -> &mut String {
15893            self.address.get_or_insert_default()
15894        }
15895        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15896        pub fn address_opt(&self) -> Option<&str> {
15897            self.address.as_ref().map(|field| field as _)
15898        }
15899        ///Sets `address` with the provided value.
15900        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15901            self.address = Some(field.into().into());
15902        }
15903        ///Sets `address` with the provided value.
15904        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15905            self.set_address(field.into());
15906            self
15907        }
15908        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15909        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15910            self.description.as_mut().map(|field| field as _)
15911        }
15912        ///Returns a mutable reference to `description`.
15913        ///If the field is unset, it is first initialized with the default value.
15914        pub fn description_mut(&mut self) -> &mut String {
15915            self.description.get_or_insert_default()
15916        }
15917        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
15918        pub fn description_opt(&self) -> Option<&str> {
15919            self.description.as_ref().map(|field| field as _)
15920        }
15921        ///Sets `description` with the provided value.
15922        pub fn set_description<T: Into<String>>(&mut self, field: T) {
15923            self.description = Some(field.into().into());
15924        }
15925        ///Sets `description` with the provided value.
15926        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15927            self.set_description(field.into());
15928            self
15929        }
15930        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15931        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15932            self.image_url.as_mut().map(|field| field as _)
15933        }
15934        ///Returns a mutable reference to `image_url`.
15935        ///If the field is unset, it is first initialized with the default value.
15936        pub fn image_url_mut(&mut self) -> &mut String {
15937            self.image_url.get_or_insert_default()
15938        }
15939        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15940        pub fn image_url_opt(&self) -> Option<&str> {
15941            self.image_url.as_ref().map(|field| field as _)
15942        }
15943        ///Sets `image_url` with the provided value.
15944        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15945            self.image_url = Some(field.into().into());
15946        }
15947        ///Sets `image_url` with the provided value.
15948        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15949            self.set_image_url(field.into());
15950            self
15951        }
15952        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15953        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15954            self.project_url.as_mut().map(|field| field as _)
15955        }
15956        ///Returns a mutable reference to `project_url`.
15957        ///If the field is unset, it is first initialized with the default value.
15958        pub fn project_url_mut(&mut self) -> &mut String {
15959            self.project_url.get_or_insert_default()
15960        }
15961        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15962        pub fn project_url_opt(&self) -> Option<&str> {
15963            self.project_url.as_ref().map(|field| field as _)
15964        }
15965        ///Sets `project_url` with the provided value.
15966        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
15967            self.project_url = Some(field.into().into());
15968        }
15969        ///Sets `project_url` with the provided value.
15970        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
15971            self.set_project_url(field.into());
15972            self
15973        }
15974        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15975        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
15976            self.protocol_public_key.as_ref().map(|field| field as _)
15977        }
15978        ///Sets `protocol_public_key` with the provided value.
15979        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15980            &mut self,
15981            field: T,
15982        ) {
15983            self.protocol_public_key = Some(field.into().into());
15984        }
15985        ///Sets `protocol_public_key` with the provided value.
15986        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15987            mut self,
15988            field: T,
15989        ) -> Self {
15990            self.set_protocol_public_key(field.into());
15991            self
15992        }
15993        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
15994        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
15995            self.proof_of_possession.as_ref().map(|field| field as _)
15996        }
15997        ///Sets `proof_of_possession` with the provided value.
15998        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15999            &mut self,
16000            field: T,
16001        ) {
16002            self.proof_of_possession = Some(field.into().into());
16003        }
16004        ///Sets `proof_of_possession` with the provided value.
16005        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16006            mut self,
16007            field: T,
16008        ) -> Self {
16009            self.set_proof_of_possession(field.into());
16010            self
16011        }
16012        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16013        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16014            self.network_public_key.as_ref().map(|field| field as _)
16015        }
16016        ///Sets `network_public_key` with the provided value.
16017        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16018            &mut self,
16019            field: T,
16020        ) {
16021            self.network_public_key = Some(field.into().into());
16022        }
16023        ///Sets `network_public_key` with the provided value.
16024        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16025            mut self,
16026            field: T,
16027        ) -> Self {
16028            self.set_network_public_key(field.into());
16029            self
16030        }
16031        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16032        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16033            self.worker_public_key.as_ref().map(|field| field as _)
16034        }
16035        ///Sets `worker_public_key` with the provided value.
16036        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16037            &mut self,
16038            field: T,
16039        ) {
16040            self.worker_public_key = Some(field.into().into());
16041        }
16042        ///Sets `worker_public_key` with the provided value.
16043        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16044            mut self,
16045            field: T,
16046        ) -> Self {
16047            self.set_worker_public_key(field.into());
16048            self
16049        }
16050        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16051        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16052            self.network_address.as_mut().map(|field| field as _)
16053        }
16054        ///Returns a mutable reference to `network_address`.
16055        ///If the field is unset, it is first initialized with the default value.
16056        pub fn network_address_mut(&mut self) -> &mut String {
16057            self.network_address.get_or_insert_default()
16058        }
16059        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16060        pub fn network_address_opt(&self) -> Option<&str> {
16061            self.network_address.as_ref().map(|field| field as _)
16062        }
16063        ///Sets `network_address` with the provided value.
16064        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16065            self.network_address = Some(field.into().into());
16066        }
16067        ///Sets `network_address` with the provided value.
16068        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16069            self.set_network_address(field.into());
16070            self
16071        }
16072        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16073        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16074            self.p2p_address.as_mut().map(|field| field as _)
16075        }
16076        ///Returns a mutable reference to `p2p_address`.
16077        ///If the field is unset, it is first initialized with the default value.
16078        pub fn p2p_address_mut(&mut self) -> &mut String {
16079            self.p2p_address.get_or_insert_default()
16080        }
16081        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16082        pub fn p2p_address_opt(&self) -> Option<&str> {
16083            self.p2p_address.as_ref().map(|field| field as _)
16084        }
16085        ///Sets `p2p_address` with the provided value.
16086        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16087            self.p2p_address = Some(field.into().into());
16088        }
16089        ///Sets `p2p_address` with the provided value.
16090        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16091            self.set_p2p_address(field.into());
16092            self
16093        }
16094        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16095        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16096            self.primary_address.as_mut().map(|field| field as _)
16097        }
16098        ///Returns a mutable reference to `primary_address`.
16099        ///If the field is unset, it is first initialized with the default value.
16100        pub fn primary_address_mut(&mut self) -> &mut String {
16101            self.primary_address.get_or_insert_default()
16102        }
16103        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16104        pub fn primary_address_opt(&self) -> Option<&str> {
16105            self.primary_address.as_ref().map(|field| field as _)
16106        }
16107        ///Sets `primary_address` with the provided value.
16108        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16109            self.primary_address = Some(field.into().into());
16110        }
16111        ///Sets `primary_address` with the provided value.
16112        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16113            self.set_primary_address(field.into());
16114            self
16115        }
16116        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16117        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16118            self.worker_address.as_mut().map(|field| field as _)
16119        }
16120        ///Returns a mutable reference to `worker_address`.
16121        ///If the field is unset, it is first initialized with the default value.
16122        pub fn worker_address_mut(&mut self) -> &mut String {
16123            self.worker_address.get_or_insert_default()
16124        }
16125        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16126        pub fn worker_address_opt(&self) -> Option<&str> {
16127            self.worker_address.as_ref().map(|field| field as _)
16128        }
16129        ///Sets `worker_address` with the provided value.
16130        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16131            self.worker_address = Some(field.into().into());
16132        }
16133        ///Sets `worker_address` with the provided value.
16134        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16135            self.set_worker_address(field.into());
16136            self
16137        }
16138        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16139        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16140            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16141        }
16142        ///Sets `next_epoch_protocol_public_key` with the provided value.
16143        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16144            &mut self,
16145            field: T,
16146        ) {
16147            self.next_epoch_protocol_public_key = Some(field.into().into());
16148        }
16149        ///Sets `next_epoch_protocol_public_key` with the provided value.
16150        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16151            mut self,
16152            field: T,
16153        ) -> Self {
16154            self.set_next_epoch_protocol_public_key(field.into());
16155            self
16156        }
16157        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16158        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16159            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16160        }
16161        ///Sets `next_epoch_proof_of_possession` with the provided value.
16162        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16163            &mut self,
16164            field: T,
16165        ) {
16166            self.next_epoch_proof_of_possession = Some(field.into().into());
16167        }
16168        ///Sets `next_epoch_proof_of_possession` with the provided value.
16169        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16170            mut self,
16171            field: T,
16172        ) -> Self {
16173            self.set_next_epoch_proof_of_possession(field.into());
16174            self
16175        }
16176        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16177        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16178            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16179        }
16180        ///Sets `next_epoch_network_public_key` with the provided value.
16181        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16182            &mut self,
16183            field: T,
16184        ) {
16185            self.next_epoch_network_public_key = Some(field.into().into());
16186        }
16187        ///Sets `next_epoch_network_public_key` with the provided value.
16188        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16189            mut self,
16190            field: T,
16191        ) -> Self {
16192            self.set_next_epoch_network_public_key(field.into());
16193            self
16194        }
16195        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16196        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16197            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16198        }
16199        ///Sets `next_epoch_worker_public_key` with the provided value.
16200        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16201            &mut self,
16202            field: T,
16203        ) {
16204            self.next_epoch_worker_public_key = Some(field.into().into());
16205        }
16206        ///Sets `next_epoch_worker_public_key` with the provided value.
16207        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16208            mut self,
16209            field: T,
16210        ) -> Self {
16211            self.set_next_epoch_worker_public_key(field.into());
16212            self
16213        }
16214        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16215        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16216            self.next_epoch_network_address.as_mut().map(|field| field as _)
16217        }
16218        ///Returns a mutable reference to `next_epoch_network_address`.
16219        ///If the field is unset, it is first initialized with the default value.
16220        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16221            self.next_epoch_network_address.get_or_insert_default()
16222        }
16223        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16224        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16225            self.next_epoch_network_address.as_ref().map(|field| field as _)
16226        }
16227        ///Sets `next_epoch_network_address` with the provided value.
16228        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16229            self.next_epoch_network_address = Some(field.into().into());
16230        }
16231        ///Sets `next_epoch_network_address` with the provided value.
16232        pub fn with_next_epoch_network_address<T: Into<String>>(
16233            mut self,
16234            field: T,
16235        ) -> Self {
16236            self.set_next_epoch_network_address(field.into());
16237            self
16238        }
16239        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16240        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16241            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16242        }
16243        ///Returns a mutable reference to `next_epoch_p2p_address`.
16244        ///If the field is unset, it is first initialized with the default value.
16245        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16246            self.next_epoch_p2p_address.get_or_insert_default()
16247        }
16248        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16249        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16250            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16251        }
16252        ///Sets `next_epoch_p2p_address` with the provided value.
16253        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16254            self.next_epoch_p2p_address = Some(field.into().into());
16255        }
16256        ///Sets `next_epoch_p2p_address` with the provided value.
16257        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16258            self.set_next_epoch_p2p_address(field.into());
16259            self
16260        }
16261        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16262        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16263            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16264        }
16265        ///Returns a mutable reference to `next_epoch_primary_address`.
16266        ///If the field is unset, it is first initialized with the default value.
16267        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16268            self.next_epoch_primary_address.get_or_insert_default()
16269        }
16270        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16271        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16272            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16273        }
16274        ///Sets `next_epoch_primary_address` with the provided value.
16275        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16276            self.next_epoch_primary_address = Some(field.into().into());
16277        }
16278        ///Sets `next_epoch_primary_address` with the provided value.
16279        pub fn with_next_epoch_primary_address<T: Into<String>>(
16280            mut self,
16281            field: T,
16282        ) -> Self {
16283            self.set_next_epoch_primary_address(field.into());
16284            self
16285        }
16286        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16287        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16288            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16289        }
16290        ///Returns a mutable reference to `next_epoch_worker_address`.
16291        ///If the field is unset, it is first initialized with the default value.
16292        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16293            self.next_epoch_worker_address.get_or_insert_default()
16294        }
16295        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16296        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16297            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16298        }
16299        ///Sets `next_epoch_worker_address` with the provided value.
16300        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16301            self.next_epoch_worker_address = Some(field.into().into());
16302        }
16303        ///Sets `next_epoch_worker_address` with the provided value.
16304        pub fn with_next_epoch_worker_address<T: Into<String>>(
16305            mut self,
16306            field: T,
16307        ) -> Self {
16308            self.set_next_epoch_worker_address(field.into());
16309            self
16310        }
16311        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16312        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16313            self.metadata_extra_fields
16314                .as_ref()
16315                .map(|field| field as _)
16316                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16317        }
16318        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16319        pub fn metadata_extra_fields_opt_mut(
16320            &mut self,
16321        ) -> Option<&mut super::MoveTable> {
16322            self.metadata_extra_fields.as_mut().map(|field| field as _)
16323        }
16324        ///Returns a mutable reference to `metadata_extra_fields`.
16325        ///If the field is unset, it is first initialized with the default value.
16326        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16327            self.metadata_extra_fields.get_or_insert_default()
16328        }
16329        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16330        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16331            self.metadata_extra_fields.as_ref().map(|field| field as _)
16332        }
16333        ///Sets `metadata_extra_fields` with the provided value.
16334        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16335            &mut self,
16336            field: T,
16337        ) {
16338            self.metadata_extra_fields = Some(field.into().into());
16339        }
16340        ///Sets `metadata_extra_fields` with the provided value.
16341        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16342            mut self,
16343            field: T,
16344        ) -> Self {
16345            self.set_metadata_extra_fields(field.into());
16346            self
16347        }
16348        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16349        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16350            self.voting_power.as_mut().map(|field| field as _)
16351        }
16352        ///Returns a mutable reference to `voting_power`.
16353        ///If the field is unset, it is first initialized with the default value.
16354        pub fn voting_power_mut(&mut self) -> &mut u64 {
16355            self.voting_power.get_or_insert_default()
16356        }
16357        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16358        pub fn voting_power_opt(&self) -> Option<u64> {
16359            self.voting_power.as_ref().map(|field| *field)
16360        }
16361        ///Sets `voting_power` with the provided value.
16362        pub fn set_voting_power<T: Into<u64>>(&mut self, field: T) {
16363            self.voting_power = Some(field.into().into());
16364        }
16365        ///Sets `voting_power` with the provided value.
16366        pub fn with_voting_power<T: Into<u64>>(mut self, field: T) -> Self {
16367            self.set_voting_power(field.into());
16368            self
16369        }
16370        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16371        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16372            self.operation_cap_id.as_mut().map(|field| field as _)
16373        }
16374        ///Returns a mutable reference to `operation_cap_id`.
16375        ///If the field is unset, it is first initialized with the default value.
16376        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16377            self.operation_cap_id.get_or_insert_default()
16378        }
16379        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16380        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16381            self.operation_cap_id.as_ref().map(|field| field as _)
16382        }
16383        ///Sets `operation_cap_id` with the provided value.
16384        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16385            self.operation_cap_id = Some(field.into().into());
16386        }
16387        ///Sets `operation_cap_id` with the provided value.
16388        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16389            self.set_operation_cap_id(field.into());
16390            self
16391        }
16392        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16393        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16394            self.gas_price.as_mut().map(|field| field as _)
16395        }
16396        ///Returns a mutable reference to `gas_price`.
16397        ///If the field is unset, it is first initialized with the default value.
16398        pub fn gas_price_mut(&mut self) -> &mut u64 {
16399            self.gas_price.get_or_insert_default()
16400        }
16401        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16402        pub fn gas_price_opt(&self) -> Option<u64> {
16403            self.gas_price.as_ref().map(|field| *field)
16404        }
16405        ///Sets `gas_price` with the provided value.
16406        pub fn set_gas_price<T: Into<u64>>(&mut self, field: T) {
16407            self.gas_price = Some(field.into().into());
16408        }
16409        ///Sets `gas_price` with the provided value.
16410        pub fn with_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
16411            self.set_gas_price(field.into());
16412            self
16413        }
16414        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16415        pub fn staking_pool(&self) -> &super::StakingPool {
16416            self.staking_pool
16417                .as_ref()
16418                .map(|field| field as _)
16419                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16420        }
16421        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16422        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16423            self.staking_pool.as_mut().map(|field| field as _)
16424        }
16425        ///Returns a mutable reference to `staking_pool`.
16426        ///If the field is unset, it is first initialized with the default value.
16427        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16428            self.staking_pool.get_or_insert_default()
16429        }
16430        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16431        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16432            self.staking_pool.as_ref().map(|field| field as _)
16433        }
16434        ///Sets `staking_pool` with the provided value.
16435        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16436            self.staking_pool = Some(field.into().into());
16437        }
16438        ///Sets `staking_pool` with the provided value.
16439        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16440            mut self,
16441            field: T,
16442        ) -> Self {
16443            self.set_staking_pool(field.into());
16444            self
16445        }
16446        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16447        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16448            self.commission_rate.as_mut().map(|field| field as _)
16449        }
16450        ///Returns a mutable reference to `commission_rate`.
16451        ///If the field is unset, it is first initialized with the default value.
16452        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16453            self.commission_rate.get_or_insert_default()
16454        }
16455        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16456        pub fn commission_rate_opt(&self) -> Option<u64> {
16457            self.commission_rate.as_ref().map(|field| *field)
16458        }
16459        ///Sets `commission_rate` with the provided value.
16460        pub fn set_commission_rate<T: Into<u64>>(&mut self, field: T) {
16461            self.commission_rate = Some(field.into().into());
16462        }
16463        ///Sets `commission_rate` with the provided value.
16464        pub fn with_commission_rate<T: Into<u64>>(mut self, field: T) -> Self {
16465            self.set_commission_rate(field.into());
16466            self
16467        }
16468        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16469        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16470            self.next_epoch_stake.as_mut().map(|field| field as _)
16471        }
16472        ///Returns a mutable reference to `next_epoch_stake`.
16473        ///If the field is unset, it is first initialized with the default value.
16474        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16475            self.next_epoch_stake.get_or_insert_default()
16476        }
16477        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16478        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16479            self.next_epoch_stake.as_ref().map(|field| *field)
16480        }
16481        ///Sets `next_epoch_stake` with the provided value.
16482        pub fn set_next_epoch_stake<T: Into<u64>>(&mut self, field: T) {
16483            self.next_epoch_stake = Some(field.into().into());
16484        }
16485        ///Sets `next_epoch_stake` with the provided value.
16486        pub fn with_next_epoch_stake<T: Into<u64>>(mut self, field: T) -> Self {
16487            self.set_next_epoch_stake(field.into());
16488            self
16489        }
16490        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16491        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16492            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16493        }
16494        ///Returns a mutable reference to `next_epoch_gas_price`.
16495        ///If the field is unset, it is first initialized with the default value.
16496        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16497            self.next_epoch_gas_price.get_or_insert_default()
16498        }
16499        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16500        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16501            self.next_epoch_gas_price.as_ref().map(|field| *field)
16502        }
16503        ///Sets `next_epoch_gas_price` with the provided value.
16504        pub fn set_next_epoch_gas_price<T: Into<u64>>(&mut self, field: T) {
16505            self.next_epoch_gas_price = Some(field.into().into());
16506        }
16507        ///Sets `next_epoch_gas_price` with the provided value.
16508        pub fn with_next_epoch_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
16509            self.set_next_epoch_gas_price(field.into());
16510            self
16511        }
16512        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16513        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16514            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16515        }
16516        ///Returns a mutable reference to `next_epoch_commission_rate`.
16517        ///If the field is unset, it is first initialized with the default value.
16518        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16519            self.next_epoch_commission_rate.get_or_insert_default()
16520        }
16521        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16522        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16523            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16524        }
16525        ///Sets `next_epoch_commission_rate` with the provided value.
16526        pub fn set_next_epoch_commission_rate<T: Into<u64>>(&mut self, field: T) {
16527            self.next_epoch_commission_rate = Some(field.into().into());
16528        }
16529        ///Sets `next_epoch_commission_rate` with the provided value.
16530        pub fn with_next_epoch_commission_rate<T: Into<u64>>(
16531            mut self,
16532            field: T,
16533        ) -> Self {
16534            self.set_next_epoch_commission_rate(field.into());
16535            self
16536        }
16537        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16538        pub fn extra_fields(&self) -> &super::MoveTable {
16539            self.extra_fields
16540                .as_ref()
16541                .map(|field| field as _)
16542                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16543        }
16544        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16545        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16546            self.extra_fields.as_mut().map(|field| field as _)
16547        }
16548        ///Returns a mutable reference to `extra_fields`.
16549        ///If the field is unset, it is first initialized with the default value.
16550        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16551            self.extra_fields.get_or_insert_default()
16552        }
16553        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16554        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16555            self.extra_fields.as_ref().map(|field| field as _)
16556        }
16557        ///Sets `extra_fields` with the provided value.
16558        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16559            self.extra_fields = Some(field.into().into());
16560        }
16561        ///Sets `extra_fields` with the provided value.
16562        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16563            self.set_extra_fields(field.into());
16564            self
16565        }
16566    }
16567    impl super::ValidatorAggregatedSignature {
16568        pub const fn const_default() -> Self {
16569            Self {
16570                epoch: None,
16571                signature: None,
16572                bitmap: Vec::new(),
16573            }
16574        }
16575        #[doc(hidden)]
16576        pub fn default_instance() -> &'static Self {
16577            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16578            &DEFAULT
16579        }
16580        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16581        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16582            self.epoch.as_mut().map(|field| field as _)
16583        }
16584        ///Returns a mutable reference to `epoch`.
16585        ///If the field is unset, it is first initialized with the default value.
16586        pub fn epoch_mut(&mut self) -> &mut u64 {
16587            self.epoch.get_or_insert_default()
16588        }
16589        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16590        pub fn epoch_opt(&self) -> Option<u64> {
16591            self.epoch.as_ref().map(|field| *field)
16592        }
16593        ///Sets `epoch` with the provided value.
16594        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
16595            self.epoch = Some(field.into().into());
16596        }
16597        ///Sets `epoch` with the provided value.
16598        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
16599            self.set_epoch(field.into());
16600            self
16601        }
16602        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16603        pub fn signature_opt(&self) -> Option<&[u8]> {
16604            self.signature.as_ref().map(|field| field as _)
16605        }
16606        ///Sets `signature` with the provided value.
16607        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16608            self.signature = Some(field.into().into());
16609        }
16610        ///Sets `signature` with the provided value.
16611        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16612            mut self,
16613            field: T,
16614        ) -> Self {
16615            self.set_signature(field.into());
16616            self
16617        }
16618        ///Returns the value of `bitmap`, or the default value if `bitmap` is unset.
16619        pub fn bitmap(&self) -> &[u32] {
16620            &self.bitmap
16621        }
16622        ///Returns a mutable reference to `bitmap`.
16623        ///If the field is unset, it is first initialized with the default value.
16624        pub fn bitmap_mut(&mut self) -> &mut Vec<u32> {
16625            &mut self.bitmap
16626        }
16627        ///Sets `bitmap` with the provided value.
16628        pub fn set_bitmap(&mut self, field: Vec<u32>) {
16629            self.bitmap = field;
16630        }
16631        ///Sets `bitmap` with the provided value.
16632        pub fn with_bitmap(mut self, field: Vec<u32>) -> Self {
16633            self.set_bitmap(field);
16634            self
16635        }
16636    }
16637    impl super::ValidatorCommittee {
16638        pub const fn const_default() -> Self {
16639            Self {
16640                epoch: None,
16641                members: Vec::new(),
16642            }
16643        }
16644        #[doc(hidden)]
16645        pub fn default_instance() -> &'static Self {
16646            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16647            &DEFAULT
16648        }
16649        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16650        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16651            self.epoch.as_mut().map(|field| field as _)
16652        }
16653        ///Returns a mutable reference to `epoch`.
16654        ///If the field is unset, it is first initialized with the default value.
16655        pub fn epoch_mut(&mut self) -> &mut u64 {
16656            self.epoch.get_or_insert_default()
16657        }
16658        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16659        pub fn epoch_opt(&self) -> Option<u64> {
16660            self.epoch.as_ref().map(|field| *field)
16661        }
16662        ///Sets `epoch` with the provided value.
16663        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
16664            self.epoch = Some(field.into().into());
16665        }
16666        ///Sets `epoch` with the provided value.
16667        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
16668            self.set_epoch(field.into());
16669            self
16670        }
16671        ///Returns the value of `members`, or the default value if `members` is unset.
16672        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16673            &self.members
16674        }
16675        ///Returns a mutable reference to `members`.
16676        ///If the field is unset, it is first initialized with the default value.
16677        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16678            &mut self.members
16679        }
16680        ///Sets `members` with the provided value.
16681        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16682            self.members = field;
16683        }
16684        ///Sets `members` with the provided value.
16685        pub fn with_members(
16686            mut self,
16687            field: Vec<super::ValidatorCommitteeMember>,
16688        ) -> Self {
16689            self.set_members(field);
16690            self
16691        }
16692    }
16693    impl super::ValidatorCommitteeMember {
16694        pub const fn const_default() -> Self {
16695            Self {
16696                public_key: None,
16697                weight: None,
16698            }
16699        }
16700        #[doc(hidden)]
16701        pub fn default_instance() -> &'static Self {
16702            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16703            &DEFAULT
16704        }
16705        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16706        pub fn public_key_opt(&self) -> Option<&[u8]> {
16707            self.public_key.as_ref().map(|field| field as _)
16708        }
16709        ///Sets `public_key` with the provided value.
16710        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16711            self.public_key = Some(field.into().into());
16712        }
16713        ///Sets `public_key` with the provided value.
16714        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16715            mut self,
16716            field: T,
16717        ) -> Self {
16718            self.set_public_key(field.into());
16719            self
16720        }
16721        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16722        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16723            self.weight.as_mut().map(|field| field as _)
16724        }
16725        ///Returns a mutable reference to `weight`.
16726        ///If the field is unset, it is first initialized with the default value.
16727        pub fn weight_mut(&mut self) -> &mut u64 {
16728            self.weight.get_or_insert_default()
16729        }
16730        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16731        pub fn weight_opt(&self) -> Option<u64> {
16732            self.weight.as_ref().map(|field| *field)
16733        }
16734        ///Sets `weight` with the provided value.
16735        pub fn set_weight<T: Into<u64>>(&mut self, field: T) {
16736            self.weight = Some(field.into().into());
16737        }
16738        ///Sets `weight` with the provided value.
16739        pub fn with_weight<T: Into<u64>>(mut self, field: T) -> Self {
16740            self.set_weight(field.into());
16741            self
16742        }
16743    }
16744    impl super::ValidatorExecutionTimeObservation {
16745        pub const fn const_default() -> Self {
16746            Self {
16747                validator: None,
16748                duration: None,
16749            }
16750        }
16751        #[doc(hidden)]
16752        pub fn default_instance() -> &'static Self {
16753            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16754            &DEFAULT
16755        }
16756        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
16757        pub fn validator_opt(&self) -> Option<&[u8]> {
16758            self.validator.as_ref().map(|field| field as _)
16759        }
16760        ///Sets `validator` with the provided value.
16761        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16762            self.validator = Some(field.into().into());
16763        }
16764        ///Sets `validator` with the provided value.
16765        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16766            mut self,
16767            field: T,
16768        ) -> Self {
16769            self.set_validator(field.into());
16770            self
16771        }
16772        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16773        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16774            self.duration.as_mut().map(|field| field as _)
16775        }
16776        ///Returns a mutable reference to `duration`.
16777        ///If the field is unset, it is first initialized with the default value.
16778        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16779            self.duration.get_or_insert_default()
16780        }
16781        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16782        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16783            self.duration.as_ref().map(|field| field as _)
16784        }
16785        ///Sets `duration` with the provided value.
16786        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16787            self.duration = Some(field.into().into());
16788        }
16789        ///Sets `duration` with the provided value.
16790        pub fn with_duration<T: Into<::prost_types::Duration>>(
16791            mut self,
16792            field: T,
16793        ) -> Self {
16794            self.set_duration(field.into());
16795            self
16796        }
16797    }
16798    impl super::ValidatorReportRecord {
16799        pub const fn const_default() -> Self {
16800            Self {
16801                reported: None,
16802                reporters: Vec::new(),
16803            }
16804        }
16805        #[doc(hidden)]
16806        pub fn default_instance() -> &'static Self {
16807            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16808            &DEFAULT
16809        }
16810        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16811        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16812            self.reported.as_mut().map(|field| field as _)
16813        }
16814        ///Returns a mutable reference to `reported`.
16815        ///If the field is unset, it is first initialized with the default value.
16816        pub fn reported_mut(&mut self) -> &mut String {
16817            self.reported.get_or_insert_default()
16818        }
16819        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
16820        pub fn reported_opt(&self) -> Option<&str> {
16821            self.reported.as_ref().map(|field| field as _)
16822        }
16823        ///Sets `reported` with the provided value.
16824        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16825            self.reported = Some(field.into().into());
16826        }
16827        ///Sets `reported` with the provided value.
16828        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16829            self.set_reported(field.into());
16830            self
16831        }
16832        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
16833        pub fn reporters(&self) -> &[String] {
16834            &self.reporters
16835        }
16836        ///Returns a mutable reference to `reporters`.
16837        ///If the field is unset, it is first initialized with the default value.
16838        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16839            &mut self.reporters
16840        }
16841        ///Sets `reporters` with the provided value.
16842        pub fn set_reporters(&mut self, field: Vec<String>) {
16843            self.reporters = field;
16844        }
16845        ///Sets `reporters` with the provided value.
16846        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16847            self.set_reporters(field);
16848            self
16849        }
16850    }
16851    impl super::ValidatorSet {
16852        pub const fn const_default() -> Self {
16853            Self {
16854                total_stake: None,
16855                active_validators: Vec::new(),
16856                pending_active_validators: None,
16857                pending_removals: Vec::new(),
16858                staking_pool_mappings: None,
16859                inactive_validators: None,
16860                validator_candidates: None,
16861                at_risk_validators: std::collections::BTreeMap::new(),
16862                extra_fields: None,
16863            }
16864        }
16865        #[doc(hidden)]
16866        pub fn default_instance() -> &'static Self {
16867            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16868            &DEFAULT
16869        }
16870        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16871        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16872            self.total_stake.as_mut().map(|field| field as _)
16873        }
16874        ///Returns a mutable reference to `total_stake`.
16875        ///If the field is unset, it is first initialized with the default value.
16876        pub fn total_stake_mut(&mut self) -> &mut u64 {
16877            self.total_stake.get_or_insert_default()
16878        }
16879        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16880        pub fn total_stake_opt(&self) -> Option<u64> {
16881            self.total_stake.as_ref().map(|field| *field)
16882        }
16883        ///Sets `total_stake` with the provided value.
16884        pub fn set_total_stake<T: Into<u64>>(&mut self, field: T) {
16885            self.total_stake = Some(field.into().into());
16886        }
16887        ///Sets `total_stake` with the provided value.
16888        pub fn with_total_stake<T: Into<u64>>(mut self, field: T) -> Self {
16889            self.set_total_stake(field.into());
16890            self
16891        }
16892        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
16893        pub fn active_validators(&self) -> &[super::Validator] {
16894            &self.active_validators
16895        }
16896        ///Returns a mutable reference to `active_validators`.
16897        ///If the field is unset, it is first initialized with the default value.
16898        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16899            &mut self.active_validators
16900        }
16901        ///Sets `active_validators` with the provided value.
16902        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16903            self.active_validators = field;
16904        }
16905        ///Sets `active_validators` with the provided value.
16906        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16907            self.set_active_validators(field);
16908            self
16909        }
16910        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
16911        pub fn pending_active_validators(&self) -> &super::MoveTable {
16912            self.pending_active_validators
16913                .as_ref()
16914                .map(|field| field as _)
16915                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16916        }
16917        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16918        pub fn pending_active_validators_opt_mut(
16919            &mut self,
16920        ) -> Option<&mut super::MoveTable> {
16921            self.pending_active_validators.as_mut().map(|field| field as _)
16922        }
16923        ///Returns a mutable reference to `pending_active_validators`.
16924        ///If the field is unset, it is first initialized with the default value.
16925        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16926            self.pending_active_validators.get_or_insert_default()
16927        }
16928        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
16929        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16930            self.pending_active_validators.as_ref().map(|field| field as _)
16931        }
16932        ///Sets `pending_active_validators` with the provided value.
16933        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16934            &mut self,
16935            field: T,
16936        ) {
16937            self.pending_active_validators = Some(field.into().into());
16938        }
16939        ///Sets `pending_active_validators` with the provided value.
16940        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16941            mut self,
16942            field: T,
16943        ) -> Self {
16944            self.set_pending_active_validators(field.into());
16945            self
16946        }
16947        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
16948        pub fn pending_removals(&self) -> &[u64] {
16949            &self.pending_removals
16950        }
16951        ///Returns a mutable reference to `pending_removals`.
16952        ///If the field is unset, it is first initialized with the default value.
16953        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16954            &mut self.pending_removals
16955        }
16956        ///Sets `pending_removals` with the provided value.
16957        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16958            self.pending_removals = field;
16959        }
16960        ///Sets `pending_removals` with the provided value.
16961        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16962            self.set_pending_removals(field);
16963            self
16964        }
16965        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
16966        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
16967            self.staking_pool_mappings
16968                .as_ref()
16969                .map(|field| field as _)
16970                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16971        }
16972        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16973        pub fn staking_pool_mappings_opt_mut(
16974            &mut self,
16975        ) -> Option<&mut super::MoveTable> {
16976            self.staking_pool_mappings.as_mut().map(|field| field as _)
16977        }
16978        ///Returns a mutable reference to `staking_pool_mappings`.
16979        ///If the field is unset, it is first initialized with the default value.
16980        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
16981            self.staking_pool_mappings.get_or_insert_default()
16982        }
16983        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
16984        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
16985            self.staking_pool_mappings.as_ref().map(|field| field as _)
16986        }
16987        ///Sets `staking_pool_mappings` with the provided value.
16988        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
16989            &mut self,
16990            field: T,
16991        ) {
16992            self.staking_pool_mappings = Some(field.into().into());
16993        }
16994        ///Sets `staking_pool_mappings` with the provided value.
16995        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
16996            mut self,
16997            field: T,
16998        ) -> Self {
16999            self.set_staking_pool_mappings(field.into());
17000            self
17001        }
17002        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17003        pub fn inactive_validators(&self) -> &super::MoveTable {
17004            self.inactive_validators
17005                .as_ref()
17006                .map(|field| field as _)
17007                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17008        }
17009        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17010        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17011            self.inactive_validators.as_mut().map(|field| field as _)
17012        }
17013        ///Returns a mutable reference to `inactive_validators`.
17014        ///If the field is unset, it is first initialized with the default value.
17015        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17016            self.inactive_validators.get_or_insert_default()
17017        }
17018        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17019        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17020            self.inactive_validators.as_ref().map(|field| field as _)
17021        }
17022        ///Sets `inactive_validators` with the provided value.
17023        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17024            self.inactive_validators = Some(field.into().into());
17025        }
17026        ///Sets `inactive_validators` with the provided value.
17027        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17028            mut self,
17029            field: T,
17030        ) -> Self {
17031            self.set_inactive_validators(field.into());
17032            self
17033        }
17034        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17035        pub fn validator_candidates(&self) -> &super::MoveTable {
17036            self.validator_candidates
17037                .as_ref()
17038                .map(|field| field as _)
17039                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17040        }
17041        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17042        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17043            self.validator_candidates.as_mut().map(|field| field as _)
17044        }
17045        ///Returns a mutable reference to `validator_candidates`.
17046        ///If the field is unset, it is first initialized with the default value.
17047        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17048            self.validator_candidates.get_or_insert_default()
17049        }
17050        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17051        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17052            self.validator_candidates.as_ref().map(|field| field as _)
17053        }
17054        ///Sets `validator_candidates` with the provided value.
17055        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17056            self.validator_candidates = Some(field.into().into());
17057        }
17058        ///Sets `validator_candidates` with the provided value.
17059        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17060            mut self,
17061            field: T,
17062        ) -> Self {
17063            self.set_validator_candidates(field.into());
17064            self
17065        }
17066        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17067        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17068            &self.at_risk_validators
17069        }
17070        ///Returns a mutable reference to `at_risk_validators`.
17071        ///If the field is unset, it is first initialized with the default value.
17072        pub fn at_risk_validators_mut(
17073            &mut self,
17074        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17075            &mut self.at_risk_validators
17076        }
17077        ///Sets `at_risk_validators` with the provided value.
17078        pub fn set_at_risk_validators(
17079            &mut self,
17080            field: ::std::collections::BTreeMap<String, u64>,
17081        ) {
17082            self.at_risk_validators = field;
17083        }
17084        ///Sets `at_risk_validators` with the provided value.
17085        pub fn with_at_risk_validators(
17086            mut self,
17087            field: ::std::collections::BTreeMap<String, u64>,
17088        ) -> Self {
17089            self.set_at_risk_validators(field);
17090            self
17091        }
17092        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17093        pub fn extra_fields(&self) -> &super::MoveTable {
17094            self.extra_fields
17095                .as_ref()
17096                .map(|field| field as _)
17097                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17098        }
17099        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17100        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17101            self.extra_fields.as_mut().map(|field| field as _)
17102        }
17103        ///Returns a mutable reference to `extra_fields`.
17104        ///If the field is unset, it is first initialized with the default value.
17105        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17106            self.extra_fields.get_or_insert_default()
17107        }
17108        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17109        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17110            self.extra_fields.as_ref().map(|field| field as _)
17111        }
17112        ///Sets `extra_fields` with the provided value.
17113        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17114            self.extra_fields = Some(field.into().into());
17115        }
17116        ///Sets `extra_fields` with the provided value.
17117        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17118            self.set_extra_fields(field.into());
17119            self
17120        }
17121    }
17122    impl super::VariantDescriptor {
17123        pub const fn const_default() -> Self {
17124            Self {
17125                name: None,
17126                position: None,
17127                fields: Vec::new(),
17128            }
17129        }
17130        #[doc(hidden)]
17131        pub fn default_instance() -> &'static Self {
17132            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17133            &DEFAULT
17134        }
17135        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17136        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17137            self.name.as_mut().map(|field| field as _)
17138        }
17139        ///Returns a mutable reference to `name`.
17140        ///If the field is unset, it is first initialized with the default value.
17141        pub fn name_mut(&mut self) -> &mut String {
17142            self.name.get_or_insert_default()
17143        }
17144        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17145        pub fn name_opt(&self) -> Option<&str> {
17146            self.name.as_ref().map(|field| field as _)
17147        }
17148        ///Sets `name` with the provided value.
17149        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17150            self.name = Some(field.into().into());
17151        }
17152        ///Sets `name` with the provided value.
17153        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17154            self.set_name(field.into());
17155            self
17156        }
17157        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17158        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17159            self.position.as_mut().map(|field| field as _)
17160        }
17161        ///Returns a mutable reference to `position`.
17162        ///If the field is unset, it is first initialized with the default value.
17163        pub fn position_mut(&mut self) -> &mut u32 {
17164            self.position.get_or_insert_default()
17165        }
17166        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17167        pub fn position_opt(&self) -> Option<u32> {
17168            self.position.as_ref().map(|field| *field)
17169        }
17170        ///Sets `position` with the provided value.
17171        pub fn set_position<T: Into<u32>>(&mut self, field: T) {
17172            self.position = Some(field.into().into());
17173        }
17174        ///Sets `position` with the provided value.
17175        pub fn with_position<T: Into<u32>>(mut self, field: T) -> Self {
17176            self.set_position(field.into());
17177            self
17178        }
17179        ///Returns the value of `fields`, or the default value if `fields` is unset.
17180        pub fn fields(&self) -> &[super::FieldDescriptor] {
17181            &self.fields
17182        }
17183        ///Returns a mutable reference to `fields`.
17184        ///If the field is unset, it is first initialized with the default value.
17185        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17186            &mut self.fields
17187        }
17188        ///Sets `fields` with the provided value.
17189        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17190            self.fields = field;
17191        }
17192        ///Sets `fields` with the provided value.
17193        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17194            self.set_fields(field);
17195            self
17196        }
17197    }
17198    impl super::VerifySignatureRequest {
17199        pub const fn const_default() -> Self {
17200            Self {
17201                message: None,
17202                signature: None,
17203                address: None,
17204                jwks: Vec::new(),
17205            }
17206        }
17207        #[doc(hidden)]
17208        pub fn default_instance() -> &'static Self {
17209            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17210            &DEFAULT
17211        }
17212        ///Returns the value of `message`, or the default value if `message` is unset.
17213        pub fn message(&self) -> &super::Bcs {
17214            self.message
17215                .as_ref()
17216                .map(|field| field as _)
17217                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17218        }
17219        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17220        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17221            self.message.as_mut().map(|field| field as _)
17222        }
17223        ///Returns a mutable reference to `message`.
17224        ///If the field is unset, it is first initialized with the default value.
17225        pub fn message_mut(&mut self) -> &mut super::Bcs {
17226            self.message.get_or_insert_default()
17227        }
17228        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17229        pub fn message_opt(&self) -> Option<&super::Bcs> {
17230            self.message.as_ref().map(|field| field as _)
17231        }
17232        ///Sets `message` with the provided value.
17233        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17234            self.message = Some(field.into().into());
17235        }
17236        ///Sets `message` with the provided value.
17237        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17238            self.set_message(field.into());
17239            self
17240        }
17241        ///Returns the value of `signature`, or the default value if `signature` is unset.
17242        pub fn signature(&self) -> &super::UserSignature {
17243            self.signature
17244                .as_ref()
17245                .map(|field| field as _)
17246                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17247        }
17248        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17249        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17250            self.signature.as_mut().map(|field| field as _)
17251        }
17252        ///Returns a mutable reference to `signature`.
17253        ///If the field is unset, it is first initialized with the default value.
17254        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17255            self.signature.get_or_insert_default()
17256        }
17257        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17258        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17259            self.signature.as_ref().map(|field| field as _)
17260        }
17261        ///Sets `signature` with the provided value.
17262        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17263            self.signature = Some(field.into().into());
17264        }
17265        ///Sets `signature` with the provided value.
17266        pub fn with_signature<T: Into<super::UserSignature>>(
17267            mut self,
17268            field: T,
17269        ) -> Self {
17270            self.set_signature(field.into());
17271            self
17272        }
17273        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17274        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17275            self.address.as_mut().map(|field| field as _)
17276        }
17277        ///Returns a mutable reference to `address`.
17278        ///If the field is unset, it is first initialized with the default value.
17279        pub fn address_mut(&mut self) -> &mut String {
17280            self.address.get_or_insert_default()
17281        }
17282        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17283        pub fn address_opt(&self) -> Option<&str> {
17284            self.address.as_ref().map(|field| field as _)
17285        }
17286        ///Sets `address` with the provided value.
17287        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17288            self.address = Some(field.into().into());
17289        }
17290        ///Sets `address` with the provided value.
17291        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17292            self.set_address(field.into());
17293            self
17294        }
17295        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17296        pub fn jwks(&self) -> &[super::ActiveJwk] {
17297            &self.jwks
17298        }
17299        ///Returns a mutable reference to `jwks`.
17300        ///If the field is unset, it is first initialized with the default value.
17301        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17302            &mut self.jwks
17303        }
17304        ///Sets `jwks` with the provided value.
17305        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17306            self.jwks = field;
17307        }
17308        ///Sets `jwks` with the provided value.
17309        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17310            self.set_jwks(field);
17311            self
17312        }
17313    }
17314    impl super::VerifySignatureResponse {
17315        pub const fn const_default() -> Self {
17316            Self {
17317                is_valid: None,
17318                reason: None,
17319            }
17320        }
17321        #[doc(hidden)]
17322        pub fn default_instance() -> &'static Self {
17323            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17324            &DEFAULT
17325        }
17326        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17327        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17328            self.is_valid.as_mut().map(|field| field as _)
17329        }
17330        ///Returns a mutable reference to `is_valid`.
17331        ///If the field is unset, it is first initialized with the default value.
17332        pub fn is_valid_mut(&mut self) -> &mut bool {
17333            self.is_valid.get_or_insert_default()
17334        }
17335        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17336        pub fn is_valid_opt(&self) -> Option<bool> {
17337            self.is_valid.as_ref().map(|field| *field)
17338        }
17339        ///Sets `is_valid` with the provided value.
17340        pub fn set_is_valid<T: Into<bool>>(&mut self, field: T) {
17341            self.is_valid = Some(field.into().into());
17342        }
17343        ///Sets `is_valid` with the provided value.
17344        pub fn with_is_valid<T: Into<bool>>(mut self, field: T) -> Self {
17345            self.set_is_valid(field.into());
17346            self
17347        }
17348        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17349        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17350            self.reason.as_mut().map(|field| field as _)
17351        }
17352        ///Returns a mutable reference to `reason`.
17353        ///If the field is unset, it is first initialized with the default value.
17354        pub fn reason_mut(&mut self) -> &mut String {
17355            self.reason.get_or_insert_default()
17356        }
17357        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17358        pub fn reason_opt(&self) -> Option<&str> {
17359            self.reason.as_ref().map(|field| field as _)
17360        }
17361        ///Sets `reason` with the provided value.
17362        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17363            self.reason = Some(field.into().into());
17364        }
17365        ///Sets `reason` with the provided value.
17366        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17367            self.set_reason(field.into());
17368            self
17369        }
17370    }
17371    impl super::VersionAssignment {
17372        pub const fn const_default() -> Self {
17373            Self {
17374                object_id: None,
17375                start_version: None,
17376                version: None,
17377            }
17378        }
17379        #[doc(hidden)]
17380        pub fn default_instance() -> &'static Self {
17381            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17382            &DEFAULT
17383        }
17384        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17385        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17386            self.object_id.as_mut().map(|field| field as _)
17387        }
17388        ///Returns a mutable reference to `object_id`.
17389        ///If the field is unset, it is first initialized with the default value.
17390        pub fn object_id_mut(&mut self) -> &mut String {
17391            self.object_id.get_or_insert_default()
17392        }
17393        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17394        pub fn object_id_opt(&self) -> Option<&str> {
17395            self.object_id.as_ref().map(|field| field as _)
17396        }
17397        ///Sets `object_id` with the provided value.
17398        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17399            self.object_id = Some(field.into().into());
17400        }
17401        ///Sets `object_id` with the provided value.
17402        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17403            self.set_object_id(field.into());
17404            self
17405        }
17406        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17407        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17408            self.start_version.as_mut().map(|field| field as _)
17409        }
17410        ///Returns a mutable reference to `start_version`.
17411        ///If the field is unset, it is first initialized with the default value.
17412        pub fn start_version_mut(&mut self) -> &mut u64 {
17413            self.start_version.get_or_insert_default()
17414        }
17415        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17416        pub fn start_version_opt(&self) -> Option<u64> {
17417            self.start_version.as_ref().map(|field| *field)
17418        }
17419        ///Sets `start_version` with the provided value.
17420        pub fn set_start_version<T: Into<u64>>(&mut self, field: T) {
17421            self.start_version = Some(field.into().into());
17422        }
17423        ///Sets `start_version` with the provided value.
17424        pub fn with_start_version<T: Into<u64>>(mut self, field: T) -> Self {
17425            self.set_start_version(field.into());
17426            self
17427        }
17428        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17429        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17430            self.version.as_mut().map(|field| field as _)
17431        }
17432        ///Returns a mutable reference to `version`.
17433        ///If the field is unset, it is first initialized with the default value.
17434        pub fn version_mut(&mut self) -> &mut u64 {
17435            self.version.get_or_insert_default()
17436        }
17437        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17438        pub fn version_opt(&self) -> Option<u64> {
17439            self.version.as_ref().map(|field| *field)
17440        }
17441        ///Sets `version` with the provided value.
17442        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
17443            self.version = Some(field.into().into());
17444        }
17445        ///Sets `version` with the provided value.
17446        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
17447            self.set_version(field.into());
17448            self
17449        }
17450    }
17451    impl super::ZkLoginAuthenticator {
17452        pub const fn const_default() -> Self {
17453            Self {
17454                inputs: None,
17455                max_epoch: None,
17456                signature: None,
17457            }
17458        }
17459        #[doc(hidden)]
17460        pub fn default_instance() -> &'static Self {
17461            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17462            &DEFAULT
17463        }
17464        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17465        pub fn inputs(&self) -> &super::ZkLoginInputs {
17466            self.inputs
17467                .as_ref()
17468                .map(|field| field as _)
17469                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17470        }
17471        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17472        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17473            self.inputs.as_mut().map(|field| field as _)
17474        }
17475        ///Returns a mutable reference to `inputs`.
17476        ///If the field is unset, it is first initialized with the default value.
17477        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17478            self.inputs.get_or_insert_default()
17479        }
17480        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17481        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17482            self.inputs.as_ref().map(|field| field as _)
17483        }
17484        ///Sets `inputs` with the provided value.
17485        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17486            self.inputs = Some(field.into().into());
17487        }
17488        ///Sets `inputs` with the provided value.
17489        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17490            self.set_inputs(field.into());
17491            self
17492        }
17493        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17494        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17495            self.max_epoch.as_mut().map(|field| field as _)
17496        }
17497        ///Returns a mutable reference to `max_epoch`.
17498        ///If the field is unset, it is first initialized with the default value.
17499        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17500            self.max_epoch.get_or_insert_default()
17501        }
17502        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17503        pub fn max_epoch_opt(&self) -> Option<u64> {
17504            self.max_epoch.as_ref().map(|field| *field)
17505        }
17506        ///Sets `max_epoch` with the provided value.
17507        pub fn set_max_epoch<T: Into<u64>>(&mut self, field: T) {
17508            self.max_epoch = Some(field.into().into());
17509        }
17510        ///Sets `max_epoch` with the provided value.
17511        pub fn with_max_epoch<T: Into<u64>>(mut self, field: T) -> Self {
17512            self.set_max_epoch(field.into());
17513            self
17514        }
17515        ///Returns the value of `signature`, or the default value if `signature` is unset.
17516        pub fn signature(&self) -> &super::SimpleSignature {
17517            self.signature
17518                .as_ref()
17519                .map(|field| field as _)
17520                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17521        }
17522        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17523        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17524            self.signature.as_mut().map(|field| field as _)
17525        }
17526        ///Returns a mutable reference to `signature`.
17527        ///If the field is unset, it is first initialized with the default value.
17528        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17529            self.signature.get_or_insert_default()
17530        }
17531        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17532        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17533            self.signature.as_ref().map(|field| field as _)
17534        }
17535        ///Sets `signature` with the provided value.
17536        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17537            self.signature = Some(field.into().into());
17538        }
17539        ///Sets `signature` with the provided value.
17540        pub fn with_signature<T: Into<super::SimpleSignature>>(
17541            mut self,
17542            field: T,
17543        ) -> Self {
17544            self.set_signature(field.into());
17545            self
17546        }
17547    }
17548    impl super::ZkLoginClaim {
17549        pub const fn const_default() -> Self {
17550            Self {
17551                value: None,
17552                index_mod_4: None,
17553            }
17554        }
17555        #[doc(hidden)]
17556        pub fn default_instance() -> &'static Self {
17557            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17558            &DEFAULT
17559        }
17560        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17561        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17562            self.value.as_mut().map(|field| field as _)
17563        }
17564        ///Returns a mutable reference to `value`.
17565        ///If the field is unset, it is first initialized with the default value.
17566        pub fn value_mut(&mut self) -> &mut String {
17567            self.value.get_or_insert_default()
17568        }
17569        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17570        pub fn value_opt(&self) -> Option<&str> {
17571            self.value.as_ref().map(|field| field as _)
17572        }
17573        ///Sets `value` with the provided value.
17574        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17575            self.value = Some(field.into().into());
17576        }
17577        ///Sets `value` with the provided value.
17578        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17579            self.set_value(field.into());
17580            self
17581        }
17582        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17583        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17584            self.index_mod_4.as_mut().map(|field| field as _)
17585        }
17586        ///Returns a mutable reference to `index_mod_4`.
17587        ///If the field is unset, it is first initialized with the default value.
17588        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17589            self.index_mod_4.get_or_insert_default()
17590        }
17591        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17592        pub fn index_mod_4_opt(&self) -> Option<u32> {
17593            self.index_mod_4.as_ref().map(|field| *field)
17594        }
17595        ///Sets `index_mod_4` with the provided value.
17596        pub fn set_index_mod_4<T: Into<u32>>(&mut self, field: T) {
17597            self.index_mod_4 = Some(field.into().into());
17598        }
17599        ///Sets `index_mod_4` with the provided value.
17600        pub fn with_index_mod_4<T: Into<u32>>(mut self, field: T) -> Self {
17601            self.set_index_mod_4(field.into());
17602            self
17603        }
17604    }
17605    impl super::ZkLoginInputs {
17606        pub const fn const_default() -> Self {
17607            Self {
17608                proof_points: None,
17609                iss_base64_details: None,
17610                header_base64: None,
17611                address_seed: None,
17612            }
17613        }
17614        #[doc(hidden)]
17615        pub fn default_instance() -> &'static Self {
17616            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17617            &DEFAULT
17618        }
17619        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17620        pub fn proof_points(&self) -> &super::ZkLoginProof {
17621            self.proof_points
17622                .as_ref()
17623                .map(|field| field as _)
17624                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17625        }
17626        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17627        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17628            self.proof_points.as_mut().map(|field| field as _)
17629        }
17630        ///Returns a mutable reference to `proof_points`.
17631        ///If the field is unset, it is first initialized with the default value.
17632        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17633            self.proof_points.get_or_insert_default()
17634        }
17635        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17636        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17637            self.proof_points.as_ref().map(|field| field as _)
17638        }
17639        ///Sets `proof_points` with the provided value.
17640        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17641            self.proof_points = Some(field.into().into());
17642        }
17643        ///Sets `proof_points` with the provided value.
17644        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17645            mut self,
17646            field: T,
17647        ) -> Self {
17648            self.set_proof_points(field.into());
17649            self
17650        }
17651        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17652        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17653            self.iss_base64_details
17654                .as_ref()
17655                .map(|field| field as _)
17656                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17657        }
17658        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17659        pub fn iss_base64_details_opt_mut(
17660            &mut self,
17661        ) -> Option<&mut super::ZkLoginClaim> {
17662            self.iss_base64_details.as_mut().map(|field| field as _)
17663        }
17664        ///Returns a mutable reference to `iss_base64_details`.
17665        ///If the field is unset, it is first initialized with the default value.
17666        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17667            self.iss_base64_details.get_or_insert_default()
17668        }
17669        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17670        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17671            self.iss_base64_details.as_ref().map(|field| field as _)
17672        }
17673        ///Sets `iss_base64_details` with the provided value.
17674        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17675            &mut self,
17676            field: T,
17677        ) {
17678            self.iss_base64_details = Some(field.into().into());
17679        }
17680        ///Sets `iss_base64_details` with the provided value.
17681        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17682            mut self,
17683            field: T,
17684        ) -> Self {
17685            self.set_iss_base64_details(field.into());
17686            self
17687        }
17688        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17689        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17690            self.header_base64.as_mut().map(|field| field as _)
17691        }
17692        ///Returns a mutable reference to `header_base64`.
17693        ///If the field is unset, it is first initialized with the default value.
17694        pub fn header_base64_mut(&mut self) -> &mut String {
17695            self.header_base64.get_or_insert_default()
17696        }
17697        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
17698        pub fn header_base64_opt(&self) -> Option<&str> {
17699            self.header_base64.as_ref().map(|field| field as _)
17700        }
17701        ///Sets `header_base64` with the provided value.
17702        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17703            self.header_base64 = Some(field.into().into());
17704        }
17705        ///Sets `header_base64` with the provided value.
17706        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17707            self.set_header_base64(field.into());
17708            self
17709        }
17710        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17711        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17712            self.address_seed.as_mut().map(|field| field as _)
17713        }
17714        ///Returns a mutable reference to `address_seed`.
17715        ///If the field is unset, it is first initialized with the default value.
17716        pub fn address_seed_mut(&mut self) -> &mut String {
17717            self.address_seed.get_or_insert_default()
17718        }
17719        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17720        pub fn address_seed_opt(&self) -> Option<&str> {
17721            self.address_seed.as_ref().map(|field| field as _)
17722        }
17723        ///Sets `address_seed` with the provided value.
17724        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17725            self.address_seed = Some(field.into().into());
17726        }
17727        ///Sets `address_seed` with the provided value.
17728        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17729            self.set_address_seed(field.into());
17730            self
17731        }
17732    }
17733    impl super::ZkLoginProof {
17734        pub const fn const_default() -> Self {
17735            Self { a: None, b: None, c: None }
17736        }
17737        #[doc(hidden)]
17738        pub fn default_instance() -> &'static Self {
17739            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17740            &DEFAULT
17741        }
17742        ///Returns the value of `a`, or the default value if `a` is unset.
17743        pub fn a(&self) -> &super::CircomG1 {
17744            self.a
17745                .as_ref()
17746                .map(|field| field as _)
17747                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17748        }
17749        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17750        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17751            self.a.as_mut().map(|field| field as _)
17752        }
17753        ///Returns a mutable reference to `a`.
17754        ///If the field is unset, it is first initialized with the default value.
17755        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17756            self.a.get_or_insert_default()
17757        }
17758        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
17759        pub fn a_opt(&self) -> Option<&super::CircomG1> {
17760            self.a.as_ref().map(|field| field as _)
17761        }
17762        ///Sets `a` with the provided value.
17763        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17764            self.a = Some(field.into().into());
17765        }
17766        ///Sets `a` with the provided value.
17767        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17768            self.set_a(field.into());
17769            self
17770        }
17771        ///Returns the value of `b`, or the default value if `b` is unset.
17772        pub fn b(&self) -> &super::CircomG2 {
17773            self.b
17774                .as_ref()
17775                .map(|field| field as _)
17776                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17777        }
17778        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17779        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17780            self.b.as_mut().map(|field| field as _)
17781        }
17782        ///Returns a mutable reference to `b`.
17783        ///If the field is unset, it is first initialized with the default value.
17784        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17785            self.b.get_or_insert_default()
17786        }
17787        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
17788        pub fn b_opt(&self) -> Option<&super::CircomG2> {
17789            self.b.as_ref().map(|field| field as _)
17790        }
17791        ///Sets `b` with the provided value.
17792        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17793            self.b = Some(field.into().into());
17794        }
17795        ///Sets `b` with the provided value.
17796        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17797            self.set_b(field.into());
17798            self
17799        }
17800        ///Returns the value of `c`, or the default value if `c` is unset.
17801        pub fn c(&self) -> &super::CircomG1 {
17802            self.c
17803                .as_ref()
17804                .map(|field| field as _)
17805                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17806        }
17807        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17808        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17809            self.c.as_mut().map(|field| field as _)
17810        }
17811        ///Returns a mutable reference to `c`.
17812        ///If the field is unset, it is first initialized with the default value.
17813        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17814            self.c.get_or_insert_default()
17815        }
17816        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
17817        pub fn c_opt(&self) -> Option<&super::CircomG1> {
17818            self.c.as_ref().map(|field| field as _)
17819        }
17820        ///Sets `c` with the provided value.
17821        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17822            self.c = Some(field.into().into());
17823        }
17824        ///Sets `c` with the provided value.
17825        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17826            self.set_c(field.into());
17827            self
17828        }
17829    }
17830    impl super::ZkLoginPublicIdentifier {
17831        pub const fn const_default() -> Self {
17832            Self {
17833                iss: None,
17834                address_seed: None,
17835            }
17836        }
17837        #[doc(hidden)]
17838        pub fn default_instance() -> &'static Self {
17839            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17840            &DEFAULT
17841        }
17842        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17843        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17844            self.iss.as_mut().map(|field| field as _)
17845        }
17846        ///Returns a mutable reference to `iss`.
17847        ///If the field is unset, it is first initialized with the default value.
17848        pub fn iss_mut(&mut self) -> &mut String {
17849            self.iss.get_or_insert_default()
17850        }
17851        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
17852        pub fn iss_opt(&self) -> Option<&str> {
17853            self.iss.as_ref().map(|field| field as _)
17854        }
17855        ///Sets `iss` with the provided value.
17856        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17857            self.iss = Some(field.into().into());
17858        }
17859        ///Sets `iss` with the provided value.
17860        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17861            self.set_iss(field.into());
17862            self
17863        }
17864        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17865        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17866            self.address_seed.as_mut().map(|field| field as _)
17867        }
17868        ///Returns a mutable reference to `address_seed`.
17869        ///If the field is unset, it is first initialized with the default value.
17870        pub fn address_seed_mut(&mut self) -> &mut String {
17871            self.address_seed.get_or_insert_default()
17872        }
17873        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17874        pub fn address_seed_opt(&self) -> Option<&str> {
17875            self.address_seed.as_ref().map(|field| field as _)
17876        }
17877        ///Sets `address_seed` with the provided value.
17878        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17879            self.address_seed = Some(field.into().into());
17880        }
17881        ///Sets `address_seed` with the provided value.
17882        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17883            self.set_address_seed(field.into());
17884            self
17885        }
17886    }
17887}