sui_rpc/proto/generated/
sui.rpc.v2.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(&mut self, field: u64) {
89            self.epoch = Some(field);
90        }
91        ///Sets `epoch` with the provided value.
92        pub fn with_epoch(mut self, field: u64) -> Self {
93            self.set_epoch(field);
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(&mut self, field: u32) {
134            self.input = Some(field);
135        }
136        ///Sets `input` with the provided value.
137        pub fn with_input(mut self, field: u32) -> Self {
138            self.set_input(field);
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(&mut self, field: u32) {
156            self.result = Some(field);
157        }
158        ///Sets `result` with the provided value.
159        pub fn with_result(mut self, field: u32) -> Self {
160            self.set_result(field);
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(&mut self, field: u32) {
178            self.subresult = Some(field);
179        }
180        ///Sets `subresult` with the provided value.
181        pub fn with_subresult(mut self, field: u32) -> Self {
182            self.set_subresult(field);
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(&mut self, field: u64) {
213            self.min_epoch = Some(field);
214        }
215        ///Sets `min_epoch` with the provided value.
216        pub fn with_min_epoch(mut self, field: u64) -> Self {
217            self.set_min_epoch(field);
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(&mut self, field: u64) {
239            self.authenticator_object_initial_shared_version = Some(field);
240        }
241        ///Sets `authenticator_object_initial_shared_version` with the provided value.
242        pub fn with_authenticator_object_initial_shared_version(
243            mut self,
244            field: u64,
245        ) -> Self {
246            self.set_authenticator_object_initial_shared_version(field);
247            self
248        }
249    }
250    impl super::AuthenticatorStateUpdate {
251        pub const fn const_default() -> Self {
252            Self {
253                epoch: None,
254                round: None,
255                new_active_jwks: Vec::new(),
256                authenticator_object_initial_shared_version: None,
257            }
258        }
259        #[doc(hidden)]
260        pub fn default_instance() -> &'static Self {
261            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
262            &DEFAULT
263        }
264        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
265        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
266            self.epoch.as_mut().map(|field| field as _)
267        }
268        ///Returns a mutable reference to `epoch`.
269        ///If the field is unset, it is first initialized with the default value.
270        pub fn epoch_mut(&mut self) -> &mut u64 {
271            self.epoch.get_or_insert_default()
272        }
273        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
274        pub fn epoch_opt(&self) -> Option<u64> {
275            self.epoch.as_ref().map(|field| *field)
276        }
277        ///Sets `epoch` with the provided value.
278        pub fn set_epoch(&mut self, field: u64) {
279            self.epoch = Some(field);
280        }
281        ///Sets `epoch` with the provided value.
282        pub fn with_epoch(mut self, field: u64) -> Self {
283            self.set_epoch(field);
284            self
285        }
286        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
287        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
288            self.round.as_mut().map(|field| field as _)
289        }
290        ///Returns a mutable reference to `round`.
291        ///If the field is unset, it is first initialized with the default value.
292        pub fn round_mut(&mut self) -> &mut u64 {
293            self.round.get_or_insert_default()
294        }
295        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
296        pub fn round_opt(&self) -> Option<u64> {
297            self.round.as_ref().map(|field| *field)
298        }
299        ///Sets `round` with the provided value.
300        pub fn set_round(&mut self, field: u64) {
301            self.round = Some(field);
302        }
303        ///Sets `round` with the provided value.
304        pub fn with_round(mut self, field: u64) -> Self {
305            self.set_round(field);
306            self
307        }
308        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
309        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
310            &self.new_active_jwks
311        }
312        ///Returns a mutable reference to `new_active_jwks`.
313        ///If the field is unset, it is first initialized with the default value.
314        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
315            &mut self.new_active_jwks
316        }
317        ///Sets `new_active_jwks` with the provided value.
318        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
319            self.new_active_jwks = field;
320        }
321        ///Sets `new_active_jwks` with the provided value.
322        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
323            self.set_new_active_jwks(field);
324            self
325        }
326        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
327        pub fn authenticator_object_initial_shared_version_opt_mut(
328            &mut self,
329        ) -> Option<&mut u64> {
330            self.authenticator_object_initial_shared_version
331                .as_mut()
332                .map(|field| field as _)
333        }
334        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
335        ///If the field is unset, it is first initialized with the default value.
336        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
337            self.authenticator_object_initial_shared_version.get_or_insert_default()
338        }
339        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
340        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
341            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
342        }
343        ///Sets `authenticator_object_initial_shared_version` with the provided value.
344        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
345            self.authenticator_object_initial_shared_version = Some(field);
346        }
347        ///Sets `authenticator_object_initial_shared_version` with the provided value.
348        pub fn with_authenticator_object_initial_shared_version(
349            mut self,
350            field: u64,
351        ) -> Self {
352            self.set_authenticator_object_initial_shared_version(field);
353            self
354        }
355    }
356    impl super::Balance {
357        pub const fn const_default() -> Self {
358            Self {
359                coin_type: None,
360                balance: None,
361            }
362        }
363        #[doc(hidden)]
364        pub fn default_instance() -> &'static Self {
365            static DEFAULT: super::Balance = super::Balance::const_default();
366            &DEFAULT
367        }
368        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
369        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
370            self.coin_type.as_mut().map(|field| field as _)
371        }
372        ///Returns a mutable reference to `coin_type`.
373        ///If the field is unset, it is first initialized with the default value.
374        pub fn coin_type_mut(&mut self) -> &mut String {
375            self.coin_type.get_or_insert_default()
376        }
377        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
378        pub fn coin_type_opt(&self) -> Option<&str> {
379            self.coin_type.as_ref().map(|field| field as _)
380        }
381        ///Sets `coin_type` with the provided value.
382        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
383            self.coin_type = Some(field.into().into());
384        }
385        ///Sets `coin_type` with the provided value.
386        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
387            self.set_coin_type(field.into());
388            self
389        }
390        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
391        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
392            self.balance.as_mut().map(|field| field as _)
393        }
394        ///Returns a mutable reference to `balance`.
395        ///If the field is unset, it is first initialized with the default value.
396        pub fn balance_mut(&mut self) -> &mut u64 {
397            self.balance.get_or_insert_default()
398        }
399        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
400        pub fn balance_opt(&self) -> Option<u64> {
401            self.balance.as_ref().map(|field| *field)
402        }
403        ///Sets `balance` with the provided value.
404        pub fn set_balance(&mut self, field: u64) {
405            self.balance = Some(field);
406        }
407        ///Sets `balance` with the provided value.
408        pub fn with_balance(mut self, field: u64) -> Self {
409            self.set_balance(field);
410            self
411        }
412    }
413    impl super::BalanceChange {
414        pub const fn const_default() -> Self {
415            Self {
416                address: None,
417                coin_type: None,
418                amount: None,
419            }
420        }
421        #[doc(hidden)]
422        pub fn default_instance() -> &'static Self {
423            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
424            &DEFAULT
425        }
426        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
427        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
428            self.address.as_mut().map(|field| field as _)
429        }
430        ///Returns a mutable reference to `address`.
431        ///If the field is unset, it is first initialized with the default value.
432        pub fn address_mut(&mut self) -> &mut String {
433            self.address.get_or_insert_default()
434        }
435        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
436        pub fn address_opt(&self) -> Option<&str> {
437            self.address.as_ref().map(|field| field as _)
438        }
439        ///Sets `address` with the provided value.
440        pub fn set_address<T: Into<String>>(&mut self, field: T) {
441            self.address = Some(field.into().into());
442        }
443        ///Sets `address` with the provided value.
444        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
445            self.set_address(field.into());
446            self
447        }
448        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
449        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
450            self.coin_type.as_mut().map(|field| field as _)
451        }
452        ///Returns a mutable reference to `coin_type`.
453        ///If the field is unset, it is first initialized with the default value.
454        pub fn coin_type_mut(&mut self) -> &mut String {
455            self.coin_type.get_or_insert_default()
456        }
457        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
458        pub fn coin_type_opt(&self) -> Option<&str> {
459            self.coin_type.as_ref().map(|field| field as _)
460        }
461        ///Sets `coin_type` with the provided value.
462        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
463            self.coin_type = Some(field.into().into());
464        }
465        ///Sets `coin_type` with the provided value.
466        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
467            self.set_coin_type(field.into());
468            self
469        }
470        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
471        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
472            self.amount.as_mut().map(|field| field as _)
473        }
474        ///Returns a mutable reference to `amount`.
475        ///If the field is unset, it is first initialized with the default value.
476        pub fn amount_mut(&mut self) -> &mut String {
477            self.amount.get_or_insert_default()
478        }
479        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
480        pub fn amount_opt(&self) -> Option<&str> {
481            self.amount.as_ref().map(|field| field as _)
482        }
483        ///Sets `amount` with the provided value.
484        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
485            self.amount = Some(field.into().into());
486        }
487        ///Sets `amount` with the provided value.
488        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
489            self.set_amount(field.into());
490            self
491        }
492    }
493    impl super::BatchGetObjectsRequest {
494        pub const fn const_default() -> Self {
495            Self {
496                requests: Vec::new(),
497                read_mask: None,
498            }
499        }
500        #[doc(hidden)]
501        pub fn default_instance() -> &'static Self {
502            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
503            &DEFAULT
504        }
505        ///Returns the value of `requests`, or the default value if `requests` is unset.
506        pub fn requests(&self) -> &[super::GetObjectRequest] {
507            &self.requests
508        }
509        ///Returns a mutable reference to `requests`.
510        ///If the field is unset, it is first initialized with the default value.
511        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
512            &mut self.requests
513        }
514        ///Sets `requests` with the provided value.
515        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
516            self.requests = field;
517        }
518        ///Sets `requests` with the provided value.
519        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
520            self.set_requests(field);
521            self
522        }
523        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
524        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
525            self.read_mask.as_mut().map(|field| field as _)
526        }
527        ///Returns a mutable reference to `read_mask`.
528        ///If the field is unset, it is first initialized with the default value.
529        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
530            self.read_mask.get_or_insert_default()
531        }
532        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
533        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
534            self.read_mask.as_ref().map(|field| field as _)
535        }
536        ///Sets `read_mask` with the provided value.
537        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
538            self.read_mask = Some(field.into().into());
539        }
540        ///Sets `read_mask` with the provided value.
541        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
542            mut self,
543            field: T,
544        ) -> Self {
545            self.set_read_mask(field.into());
546            self
547        }
548    }
549    impl super::BatchGetObjectsResponse {
550        pub const fn const_default() -> Self {
551            Self { objects: Vec::new() }
552        }
553        #[doc(hidden)]
554        pub fn default_instance() -> &'static Self {
555            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
556            &DEFAULT
557        }
558        ///Returns the value of `objects`, or the default value if `objects` is unset.
559        pub fn objects(&self) -> &[super::GetObjectResult] {
560            &self.objects
561        }
562        ///Returns a mutable reference to `objects`.
563        ///If the field is unset, it is first initialized with the default value.
564        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
565            &mut self.objects
566        }
567        ///Sets `objects` with the provided value.
568        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
569            self.objects = field;
570        }
571        ///Sets `objects` with the provided value.
572        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
573            self.set_objects(field);
574            self
575        }
576    }
577    impl super::BatchGetTransactionsRequest {
578        pub const fn const_default() -> Self {
579            Self {
580                digests: Vec::new(),
581                read_mask: None,
582            }
583        }
584        #[doc(hidden)]
585        pub fn default_instance() -> &'static Self {
586            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
587            &DEFAULT
588        }
589        ///Returns the value of `digests`, or the default value if `digests` is unset.
590        pub fn digests(&self) -> &[String] {
591            &self.digests
592        }
593        ///Returns a mutable reference to `digests`.
594        ///If the field is unset, it is first initialized with the default value.
595        pub fn digests_mut(&mut self) -> &mut Vec<String> {
596            &mut self.digests
597        }
598        ///Sets `digests` with the provided value.
599        pub fn set_digests(&mut self, field: Vec<String>) {
600            self.digests = field;
601        }
602        ///Sets `digests` with the provided value.
603        pub fn with_digests(mut self, field: Vec<String>) -> Self {
604            self.set_digests(field);
605            self
606        }
607        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
608        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
609            self.read_mask.as_mut().map(|field| field as _)
610        }
611        ///Returns a mutable reference to `read_mask`.
612        ///If the field is unset, it is first initialized with the default value.
613        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
614            self.read_mask.get_or_insert_default()
615        }
616        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
617        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
618            self.read_mask.as_ref().map(|field| field as _)
619        }
620        ///Sets `read_mask` with the provided value.
621        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
622            self.read_mask = Some(field.into().into());
623        }
624        ///Sets `read_mask` with the provided value.
625        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
626            mut self,
627            field: T,
628        ) -> Self {
629            self.set_read_mask(field.into());
630            self
631        }
632    }
633    impl super::BatchGetTransactionsResponse {
634        pub const fn const_default() -> Self {
635            Self { transactions: Vec::new() }
636        }
637        #[doc(hidden)]
638        pub fn default_instance() -> &'static Self {
639            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
640            &DEFAULT
641        }
642        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
643        pub fn transactions(&self) -> &[super::GetTransactionResult] {
644            &self.transactions
645        }
646        ///Returns a mutable reference to `transactions`.
647        ///If the field is unset, it is first initialized with the default value.
648        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
649            &mut self.transactions
650        }
651        ///Sets `transactions` with the provided value.
652        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
653            self.transactions = field;
654        }
655        ///Sets `transactions` with the provided value.
656        pub fn with_transactions(
657            mut self,
658            field: Vec<super::GetTransactionResult>,
659        ) -> Self {
660            self.set_transactions(field);
661            self
662        }
663    }
664    impl super::Bcs {
665        pub const fn const_default() -> Self {
666            Self { name: None, value: None }
667        }
668        #[doc(hidden)]
669        pub fn default_instance() -> &'static Self {
670            static DEFAULT: super::Bcs = super::Bcs::const_default();
671            &DEFAULT
672        }
673        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
674        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
675            self.name.as_mut().map(|field| field as _)
676        }
677        ///Returns a mutable reference to `name`.
678        ///If the field is unset, it is first initialized with the default value.
679        pub fn name_mut(&mut self) -> &mut String {
680            self.name.get_or_insert_default()
681        }
682        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
683        pub fn name_opt(&self) -> Option<&str> {
684            self.name.as_ref().map(|field| field as _)
685        }
686        ///Sets `name` with the provided value.
687        pub fn set_name<T: Into<String>>(&mut self, field: T) {
688            self.name = Some(field.into().into());
689        }
690        ///Sets `name` with the provided value.
691        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
692            self.set_name(field.into());
693            self
694        }
695        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
696        pub fn value_opt(&self) -> Option<&[u8]> {
697            self.value.as_ref().map(|field| field as _)
698        }
699        ///Sets `value` with the provided value.
700        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
701            self.value = Some(field.into().into());
702        }
703        ///Sets `value` with the provided value.
704        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
705            self.set_value(field.into());
706            self
707        }
708    }
709    impl super::CanceledTransaction {
710        pub const fn const_default() -> Self {
711            Self {
712                digest: None,
713                version_assignments: Vec::new(),
714            }
715        }
716        #[doc(hidden)]
717        pub fn default_instance() -> &'static Self {
718            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
719            &DEFAULT
720        }
721        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
722        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
723            self.digest.as_mut().map(|field| field as _)
724        }
725        ///Returns a mutable reference to `digest`.
726        ///If the field is unset, it is first initialized with the default value.
727        pub fn digest_mut(&mut self) -> &mut String {
728            self.digest.get_or_insert_default()
729        }
730        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
731        pub fn digest_opt(&self) -> Option<&str> {
732            self.digest.as_ref().map(|field| field as _)
733        }
734        ///Sets `digest` with the provided value.
735        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
736            self.digest = Some(field.into().into());
737        }
738        ///Sets `digest` with the provided value.
739        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
740            self.set_digest(field.into());
741            self
742        }
743        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
744        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
745            &self.version_assignments
746        }
747        ///Returns a mutable reference to `version_assignments`.
748        ///If the field is unset, it is first initialized with the default value.
749        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
750            &mut self.version_assignments
751        }
752        ///Sets `version_assignments` with the provided value.
753        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
754            self.version_assignments = field;
755        }
756        ///Sets `version_assignments` with the provided value.
757        pub fn with_version_assignments(
758            mut self,
759            field: Vec<super::VersionAssignment>,
760        ) -> Self {
761            self.set_version_assignments(field);
762            self
763        }
764    }
765    impl super::ChangeEpoch {
766        pub const fn const_default() -> Self {
767            Self {
768                epoch: None,
769                protocol_version: None,
770                storage_charge: None,
771                computation_charge: None,
772                storage_rebate: None,
773                non_refundable_storage_fee: None,
774                epoch_start_timestamp: None,
775                system_packages: Vec::new(),
776            }
777        }
778        #[doc(hidden)]
779        pub fn default_instance() -> &'static Self {
780            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
781            &DEFAULT
782        }
783        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
784        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
785            self.epoch.as_mut().map(|field| field as _)
786        }
787        ///Returns a mutable reference to `epoch`.
788        ///If the field is unset, it is first initialized with the default value.
789        pub fn epoch_mut(&mut self) -> &mut u64 {
790            self.epoch.get_or_insert_default()
791        }
792        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
793        pub fn epoch_opt(&self) -> Option<u64> {
794            self.epoch.as_ref().map(|field| *field)
795        }
796        ///Sets `epoch` with the provided value.
797        pub fn set_epoch(&mut self, field: u64) {
798            self.epoch = Some(field);
799        }
800        ///Sets `epoch` with the provided value.
801        pub fn with_epoch(mut self, field: u64) -> Self {
802            self.set_epoch(field);
803            self
804        }
805        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
806        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
807            self.protocol_version.as_mut().map(|field| field as _)
808        }
809        ///Returns a mutable reference to `protocol_version`.
810        ///If the field is unset, it is first initialized with the default value.
811        pub fn protocol_version_mut(&mut self) -> &mut u64 {
812            self.protocol_version.get_or_insert_default()
813        }
814        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
815        pub fn protocol_version_opt(&self) -> Option<u64> {
816            self.protocol_version.as_ref().map(|field| *field)
817        }
818        ///Sets `protocol_version` with the provided value.
819        pub fn set_protocol_version(&mut self, field: u64) {
820            self.protocol_version = Some(field);
821        }
822        ///Sets `protocol_version` with the provided value.
823        pub fn with_protocol_version(mut self, field: u64) -> Self {
824            self.set_protocol_version(field);
825            self
826        }
827        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
828        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
829            self.storage_charge.as_mut().map(|field| field as _)
830        }
831        ///Returns a mutable reference to `storage_charge`.
832        ///If the field is unset, it is first initialized with the default value.
833        pub fn storage_charge_mut(&mut self) -> &mut u64 {
834            self.storage_charge.get_or_insert_default()
835        }
836        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
837        pub fn storage_charge_opt(&self) -> Option<u64> {
838            self.storage_charge.as_ref().map(|field| *field)
839        }
840        ///Sets `storage_charge` with the provided value.
841        pub fn set_storage_charge(&mut self, field: u64) {
842            self.storage_charge = Some(field);
843        }
844        ///Sets `storage_charge` with the provided value.
845        pub fn with_storage_charge(mut self, field: u64) -> Self {
846            self.set_storage_charge(field);
847            self
848        }
849        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
850        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
851            self.computation_charge.as_mut().map(|field| field as _)
852        }
853        ///Returns a mutable reference to `computation_charge`.
854        ///If the field is unset, it is first initialized with the default value.
855        pub fn computation_charge_mut(&mut self) -> &mut u64 {
856            self.computation_charge.get_or_insert_default()
857        }
858        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
859        pub fn computation_charge_opt(&self) -> Option<u64> {
860            self.computation_charge.as_ref().map(|field| *field)
861        }
862        ///Sets `computation_charge` with the provided value.
863        pub fn set_computation_charge(&mut self, field: u64) {
864            self.computation_charge = Some(field);
865        }
866        ///Sets `computation_charge` with the provided value.
867        pub fn with_computation_charge(mut self, field: u64) -> Self {
868            self.set_computation_charge(field);
869            self
870        }
871        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
872        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
873            self.storage_rebate.as_mut().map(|field| field as _)
874        }
875        ///Returns a mutable reference to `storage_rebate`.
876        ///If the field is unset, it is first initialized with the default value.
877        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
878            self.storage_rebate.get_or_insert_default()
879        }
880        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
881        pub fn storage_rebate_opt(&self) -> Option<u64> {
882            self.storage_rebate.as_ref().map(|field| *field)
883        }
884        ///Sets `storage_rebate` with the provided value.
885        pub fn set_storage_rebate(&mut self, field: u64) {
886            self.storage_rebate = Some(field);
887        }
888        ///Sets `storage_rebate` with the provided value.
889        pub fn with_storage_rebate(mut self, field: u64) -> Self {
890            self.set_storage_rebate(field);
891            self
892        }
893        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
894        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
895            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
896        }
897        ///Returns a mutable reference to `non_refundable_storage_fee`.
898        ///If the field is unset, it is first initialized with the default value.
899        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
900            self.non_refundable_storage_fee.get_or_insert_default()
901        }
902        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
903        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
904            self.non_refundable_storage_fee.as_ref().map(|field| *field)
905        }
906        ///Sets `non_refundable_storage_fee` with the provided value.
907        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
908            self.non_refundable_storage_fee = Some(field);
909        }
910        ///Sets `non_refundable_storage_fee` with the provided value.
911        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
912            self.set_non_refundable_storage_fee(field);
913            self
914        }
915        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
916        pub fn epoch_start_timestamp_opt_mut(
917            &mut self,
918        ) -> Option<&mut ::prost_types::Timestamp> {
919            self.epoch_start_timestamp.as_mut().map(|field| field as _)
920        }
921        ///Returns a mutable reference to `epoch_start_timestamp`.
922        ///If the field is unset, it is first initialized with the default value.
923        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
924            self.epoch_start_timestamp.get_or_insert_default()
925        }
926        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
927        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
928            self.epoch_start_timestamp.as_ref().map(|field| field as _)
929        }
930        ///Sets `epoch_start_timestamp` with the provided value.
931        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
932            &mut self,
933            field: T,
934        ) {
935            self.epoch_start_timestamp = Some(field.into().into());
936        }
937        ///Sets `epoch_start_timestamp` with the provided value.
938        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
939            mut self,
940            field: T,
941        ) -> Self {
942            self.set_epoch_start_timestamp(field.into());
943            self
944        }
945        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
946        pub fn system_packages(&self) -> &[super::SystemPackage] {
947            &self.system_packages
948        }
949        ///Returns a mutable reference to `system_packages`.
950        ///If the field is unset, it is first initialized with the default value.
951        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
952            &mut self.system_packages
953        }
954        ///Sets `system_packages` with the provided value.
955        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
956            self.system_packages = field;
957        }
958        ///Sets `system_packages` with the provided value.
959        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
960            self.set_system_packages(field);
961            self
962        }
963    }
964    impl super::ChangedObject {
965        pub const fn const_default() -> Self {
966            Self {
967                object_id: None,
968                input_state: None,
969                input_version: None,
970                input_digest: None,
971                input_owner: None,
972                output_state: None,
973                output_version: None,
974                output_digest: None,
975                output_owner: None,
976                id_operation: None,
977                object_type: None,
978            }
979        }
980        #[doc(hidden)]
981        pub fn default_instance() -> &'static Self {
982            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
983            &DEFAULT
984        }
985        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
986        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
987            self.object_id.as_mut().map(|field| field as _)
988        }
989        ///Returns a mutable reference to `object_id`.
990        ///If the field is unset, it is first initialized with the default value.
991        pub fn object_id_mut(&mut self) -> &mut String {
992            self.object_id.get_or_insert_default()
993        }
994        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
995        pub fn object_id_opt(&self) -> Option<&str> {
996            self.object_id.as_ref().map(|field| field as _)
997        }
998        ///Sets `object_id` with the provided value.
999        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1000            self.object_id = Some(field.into().into());
1001        }
1002        ///Sets `object_id` with the provided value.
1003        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1004            self.set_object_id(field.into());
1005            self
1006        }
1007        ///Sets `input_state` with the provided value.
1008        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1009            mut self,
1010            field: T,
1011        ) -> Self {
1012            self.set_input_state(field.into());
1013            self
1014        }
1015        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1016        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1017            self.input_version.as_mut().map(|field| field as _)
1018        }
1019        ///Returns a mutable reference to `input_version`.
1020        ///If the field is unset, it is first initialized with the default value.
1021        pub fn input_version_mut(&mut self) -> &mut u64 {
1022            self.input_version.get_or_insert_default()
1023        }
1024        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1025        pub fn input_version_opt(&self) -> Option<u64> {
1026            self.input_version.as_ref().map(|field| *field)
1027        }
1028        ///Sets `input_version` with the provided value.
1029        pub fn set_input_version(&mut self, field: u64) {
1030            self.input_version = Some(field);
1031        }
1032        ///Sets `input_version` with the provided value.
1033        pub fn with_input_version(mut self, field: u64) -> Self {
1034            self.set_input_version(field);
1035            self
1036        }
1037        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1038        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1039            self.input_digest.as_mut().map(|field| field as _)
1040        }
1041        ///Returns a mutable reference to `input_digest`.
1042        ///If the field is unset, it is first initialized with the default value.
1043        pub fn input_digest_mut(&mut self) -> &mut String {
1044            self.input_digest.get_or_insert_default()
1045        }
1046        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1047        pub fn input_digest_opt(&self) -> Option<&str> {
1048            self.input_digest.as_ref().map(|field| field as _)
1049        }
1050        ///Sets `input_digest` with the provided value.
1051        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1052            self.input_digest = Some(field.into().into());
1053        }
1054        ///Sets `input_digest` with the provided value.
1055        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1056            self.set_input_digest(field.into());
1057            self
1058        }
1059        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1060        pub fn input_owner(&self) -> &super::Owner {
1061            self.input_owner
1062                .as_ref()
1063                .map(|field| field as _)
1064                .unwrap_or_else(|| super::Owner::default_instance() as _)
1065        }
1066        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1067        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1068            self.input_owner.as_mut().map(|field| field as _)
1069        }
1070        ///Returns a mutable reference to `input_owner`.
1071        ///If the field is unset, it is first initialized with the default value.
1072        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1073            self.input_owner.get_or_insert_default()
1074        }
1075        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1076        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1077            self.input_owner.as_ref().map(|field| field as _)
1078        }
1079        ///Sets `input_owner` with the provided value.
1080        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1081            self.input_owner = Some(field.into().into());
1082        }
1083        ///Sets `input_owner` with the provided value.
1084        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1085            self.set_input_owner(field.into());
1086            self
1087        }
1088        ///Sets `output_state` with the provided value.
1089        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1090            mut self,
1091            field: T,
1092        ) -> Self {
1093            self.set_output_state(field.into());
1094            self
1095        }
1096        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1097        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1098            self.output_version.as_mut().map(|field| field as _)
1099        }
1100        ///Returns a mutable reference to `output_version`.
1101        ///If the field is unset, it is first initialized with the default value.
1102        pub fn output_version_mut(&mut self) -> &mut u64 {
1103            self.output_version.get_or_insert_default()
1104        }
1105        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1106        pub fn output_version_opt(&self) -> Option<u64> {
1107            self.output_version.as_ref().map(|field| *field)
1108        }
1109        ///Sets `output_version` with the provided value.
1110        pub fn set_output_version(&mut self, field: u64) {
1111            self.output_version = Some(field);
1112        }
1113        ///Sets `output_version` with the provided value.
1114        pub fn with_output_version(mut self, field: u64) -> Self {
1115            self.set_output_version(field);
1116            self
1117        }
1118        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1119        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1120            self.output_digest.as_mut().map(|field| field as _)
1121        }
1122        ///Returns a mutable reference to `output_digest`.
1123        ///If the field is unset, it is first initialized with the default value.
1124        pub fn output_digest_mut(&mut self) -> &mut String {
1125            self.output_digest.get_or_insert_default()
1126        }
1127        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1128        pub fn output_digest_opt(&self) -> Option<&str> {
1129            self.output_digest.as_ref().map(|field| field as _)
1130        }
1131        ///Sets `output_digest` with the provided value.
1132        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1133            self.output_digest = Some(field.into().into());
1134        }
1135        ///Sets `output_digest` with the provided value.
1136        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1137            self.set_output_digest(field.into());
1138            self
1139        }
1140        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1141        pub fn output_owner(&self) -> &super::Owner {
1142            self.output_owner
1143                .as_ref()
1144                .map(|field| field as _)
1145                .unwrap_or_else(|| super::Owner::default_instance() as _)
1146        }
1147        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1148        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1149            self.output_owner.as_mut().map(|field| field as _)
1150        }
1151        ///Returns a mutable reference to `output_owner`.
1152        ///If the field is unset, it is first initialized with the default value.
1153        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1154            self.output_owner.get_or_insert_default()
1155        }
1156        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1157        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1158            self.output_owner.as_ref().map(|field| field as _)
1159        }
1160        ///Sets `output_owner` with the provided value.
1161        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1162            self.output_owner = Some(field.into().into());
1163        }
1164        ///Sets `output_owner` with the provided value.
1165        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1166            self.set_output_owner(field.into());
1167            self
1168        }
1169        ///Sets `id_operation` with the provided value.
1170        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1171            mut self,
1172            field: T,
1173        ) -> Self {
1174            self.set_id_operation(field.into());
1175            self
1176        }
1177        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1178        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1179            self.object_type.as_mut().map(|field| field as _)
1180        }
1181        ///Returns a mutable reference to `object_type`.
1182        ///If the field is unset, it is first initialized with the default value.
1183        pub fn object_type_mut(&mut self) -> &mut String {
1184            self.object_type.get_or_insert_default()
1185        }
1186        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1187        pub fn object_type_opt(&self) -> Option<&str> {
1188            self.object_type.as_ref().map(|field| field as _)
1189        }
1190        ///Sets `object_type` with the provided value.
1191        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1192            self.object_type = Some(field.into().into());
1193        }
1194        ///Sets `object_type` with the provided value.
1195        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1196            self.set_object_type(field.into());
1197            self
1198        }
1199    }
1200    impl super::Checkpoint {
1201        pub const fn const_default() -> Self {
1202            Self {
1203                sequence_number: None,
1204                digest: None,
1205                summary: None,
1206                signature: None,
1207                contents: None,
1208                transactions: Vec::new(),
1209                objects: None,
1210            }
1211        }
1212        #[doc(hidden)]
1213        pub fn default_instance() -> &'static Self {
1214            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1215            &DEFAULT
1216        }
1217        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1218        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1219            self.sequence_number.as_mut().map(|field| field as _)
1220        }
1221        ///Returns a mutable reference to `sequence_number`.
1222        ///If the field is unset, it is first initialized with the default value.
1223        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1224            self.sequence_number.get_or_insert_default()
1225        }
1226        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1227        pub fn sequence_number_opt(&self) -> Option<u64> {
1228            self.sequence_number.as_ref().map(|field| *field)
1229        }
1230        ///Sets `sequence_number` with the provided value.
1231        pub fn set_sequence_number(&mut self, field: u64) {
1232            self.sequence_number = Some(field);
1233        }
1234        ///Sets `sequence_number` with the provided value.
1235        pub fn with_sequence_number(mut self, field: u64) -> Self {
1236            self.set_sequence_number(field);
1237            self
1238        }
1239        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1240        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1241            self.digest.as_mut().map(|field| field as _)
1242        }
1243        ///Returns a mutable reference to `digest`.
1244        ///If the field is unset, it is first initialized with the default value.
1245        pub fn digest_mut(&mut self) -> &mut String {
1246            self.digest.get_or_insert_default()
1247        }
1248        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1249        pub fn digest_opt(&self) -> Option<&str> {
1250            self.digest.as_ref().map(|field| field as _)
1251        }
1252        ///Sets `digest` with the provided value.
1253        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1254            self.digest = Some(field.into().into());
1255        }
1256        ///Sets `digest` with the provided value.
1257        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1258            self.set_digest(field.into());
1259            self
1260        }
1261        ///Returns the value of `summary`, or the default value if `summary` is unset.
1262        pub fn summary(&self) -> &super::CheckpointSummary {
1263            self.summary
1264                .as_ref()
1265                .map(|field| field as _)
1266                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1267        }
1268        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1269        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1270            self.summary.as_mut().map(|field| field as _)
1271        }
1272        ///Returns a mutable reference to `summary`.
1273        ///If the field is unset, it is first initialized with the default value.
1274        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1275            self.summary.get_or_insert_default()
1276        }
1277        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1278        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1279            self.summary.as_ref().map(|field| field as _)
1280        }
1281        ///Sets `summary` with the provided value.
1282        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1283            self.summary = Some(field.into().into());
1284        }
1285        ///Sets `summary` with the provided value.
1286        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1287            mut self,
1288            field: T,
1289        ) -> Self {
1290            self.set_summary(field.into());
1291            self
1292        }
1293        ///Returns the value of `signature`, or the default value if `signature` is unset.
1294        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1295            self.signature
1296                .as_ref()
1297                .map(|field| field as _)
1298                .unwrap_or_else(|| {
1299                    super::ValidatorAggregatedSignature::default_instance() as _
1300                })
1301        }
1302        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1303        pub fn signature_opt_mut(
1304            &mut self,
1305        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1306            self.signature.as_mut().map(|field| field as _)
1307        }
1308        ///Returns a mutable reference to `signature`.
1309        ///If the field is unset, it is first initialized with the default value.
1310        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1311            self.signature.get_or_insert_default()
1312        }
1313        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1314        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1315            self.signature.as_ref().map(|field| field as _)
1316        }
1317        ///Sets `signature` with the provided value.
1318        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1319            &mut self,
1320            field: T,
1321        ) {
1322            self.signature = Some(field.into().into());
1323        }
1324        ///Sets `signature` with the provided value.
1325        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1326            mut self,
1327            field: T,
1328        ) -> Self {
1329            self.set_signature(field.into());
1330            self
1331        }
1332        ///Returns the value of `contents`, or the default value if `contents` is unset.
1333        pub fn contents(&self) -> &super::CheckpointContents {
1334            self.contents
1335                .as_ref()
1336                .map(|field| field as _)
1337                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1338        }
1339        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1340        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1341            self.contents.as_mut().map(|field| field as _)
1342        }
1343        ///Returns a mutable reference to `contents`.
1344        ///If the field is unset, it is first initialized with the default value.
1345        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1346            self.contents.get_or_insert_default()
1347        }
1348        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1349        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1350            self.contents.as_ref().map(|field| field as _)
1351        }
1352        ///Sets `contents` with the provided value.
1353        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1354            self.contents = Some(field.into().into());
1355        }
1356        ///Sets `contents` with the provided value.
1357        pub fn with_contents<T: Into<super::CheckpointContents>>(
1358            mut self,
1359            field: T,
1360        ) -> Self {
1361            self.set_contents(field.into());
1362            self
1363        }
1364        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1365        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1366            &self.transactions
1367        }
1368        ///Returns a mutable reference to `transactions`.
1369        ///If the field is unset, it is first initialized with the default value.
1370        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1371            &mut self.transactions
1372        }
1373        ///Sets `transactions` with the provided value.
1374        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1375            self.transactions = field;
1376        }
1377        ///Sets `transactions` with the provided value.
1378        pub fn with_transactions(
1379            mut self,
1380            field: Vec<super::ExecutedTransaction>,
1381        ) -> Self {
1382            self.set_transactions(field);
1383            self
1384        }
1385        ///Returns the value of `objects`, or the default value if `objects` is unset.
1386        pub fn objects(&self) -> &super::ObjectSet {
1387            self.objects
1388                .as_ref()
1389                .map(|field| field as _)
1390                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1391        }
1392        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1393        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1394            self.objects.as_mut().map(|field| field as _)
1395        }
1396        ///Returns a mutable reference to `objects`.
1397        ///If the field is unset, it is first initialized with the default value.
1398        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1399            self.objects.get_or_insert_default()
1400        }
1401        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1402        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1403            self.objects.as_ref().map(|field| field as _)
1404        }
1405        ///Sets `objects` with the provided value.
1406        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1407            self.objects = Some(field.into().into());
1408        }
1409        ///Sets `objects` with the provided value.
1410        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1411            self.set_objects(field.into());
1412            self
1413        }
1414    }
1415    impl super::CheckpointCommitment {
1416        pub const fn const_default() -> Self {
1417            Self { kind: None, digest: None }
1418        }
1419        #[doc(hidden)]
1420        pub fn default_instance() -> &'static Self {
1421            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1422            &DEFAULT
1423        }
1424        ///Sets `kind` with the provided value.
1425        pub fn with_kind<
1426            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1427        >(mut self, field: T) -> Self {
1428            self.set_kind(field.into());
1429            self
1430        }
1431        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1432        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1433            self.digest.as_mut().map(|field| field as _)
1434        }
1435        ///Returns a mutable reference to `digest`.
1436        ///If the field is unset, it is first initialized with the default value.
1437        pub fn digest_mut(&mut self) -> &mut String {
1438            self.digest.get_or_insert_default()
1439        }
1440        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1441        pub fn digest_opt(&self) -> Option<&str> {
1442            self.digest.as_ref().map(|field| field as _)
1443        }
1444        ///Sets `digest` with the provided value.
1445        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1446            self.digest = Some(field.into().into());
1447        }
1448        ///Sets `digest` with the provided value.
1449        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1450            self.set_digest(field.into());
1451            self
1452        }
1453    }
1454    impl super::CheckpointContents {
1455        pub const fn const_default() -> Self {
1456            Self {
1457                bcs: None,
1458                digest: None,
1459                version: None,
1460                transactions: Vec::new(),
1461            }
1462        }
1463        #[doc(hidden)]
1464        pub fn default_instance() -> &'static Self {
1465            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1466            &DEFAULT
1467        }
1468        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1469        pub fn bcs(&self) -> &super::Bcs {
1470            self.bcs
1471                .as_ref()
1472                .map(|field| field as _)
1473                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1474        }
1475        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1476        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1477            self.bcs.as_mut().map(|field| field as _)
1478        }
1479        ///Returns a mutable reference to `bcs`.
1480        ///If the field is unset, it is first initialized with the default value.
1481        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1482            self.bcs.get_or_insert_default()
1483        }
1484        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1485        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1486            self.bcs.as_ref().map(|field| field as _)
1487        }
1488        ///Sets `bcs` with the provided value.
1489        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1490            self.bcs = Some(field.into().into());
1491        }
1492        ///Sets `bcs` with the provided value.
1493        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1494            self.set_bcs(field.into());
1495            self
1496        }
1497        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1498        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1499            self.digest.as_mut().map(|field| field as _)
1500        }
1501        ///Returns a mutable reference to `digest`.
1502        ///If the field is unset, it is first initialized with the default value.
1503        pub fn digest_mut(&mut self) -> &mut String {
1504            self.digest.get_or_insert_default()
1505        }
1506        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1507        pub fn digest_opt(&self) -> Option<&str> {
1508            self.digest.as_ref().map(|field| field as _)
1509        }
1510        ///Sets `digest` with the provided value.
1511        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1512            self.digest = Some(field.into().into());
1513        }
1514        ///Sets `digest` with the provided value.
1515        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1516            self.set_digest(field.into());
1517            self
1518        }
1519        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1520        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1521            self.version.as_mut().map(|field| field as _)
1522        }
1523        ///Returns a mutable reference to `version`.
1524        ///If the field is unset, it is first initialized with the default value.
1525        pub fn version_mut(&mut self) -> &mut i32 {
1526            self.version.get_or_insert_default()
1527        }
1528        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1529        pub fn version_opt(&self) -> Option<i32> {
1530            self.version.as_ref().map(|field| *field)
1531        }
1532        ///Sets `version` with the provided value.
1533        pub fn set_version(&mut self, field: i32) {
1534            self.version = Some(field);
1535        }
1536        ///Sets `version` with the provided value.
1537        pub fn with_version(mut self, field: i32) -> Self {
1538            self.set_version(field);
1539            self
1540        }
1541        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1542        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1543            &self.transactions
1544        }
1545        ///Returns a mutable reference to `transactions`.
1546        ///If the field is unset, it is first initialized with the default value.
1547        pub fn transactions_mut(
1548            &mut self,
1549        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1550            &mut self.transactions
1551        }
1552        ///Sets `transactions` with the provided value.
1553        pub fn set_transactions(
1554            &mut self,
1555            field: Vec<super::CheckpointedTransactionInfo>,
1556        ) {
1557            self.transactions = field;
1558        }
1559        ///Sets `transactions` with the provided value.
1560        pub fn with_transactions(
1561            mut self,
1562            field: Vec<super::CheckpointedTransactionInfo>,
1563        ) -> Self {
1564            self.set_transactions(field);
1565            self
1566        }
1567    }
1568    impl super::CheckpointSummary {
1569        pub const fn const_default() -> Self {
1570            Self {
1571                bcs: None,
1572                digest: None,
1573                epoch: None,
1574                sequence_number: None,
1575                total_network_transactions: None,
1576                content_digest: None,
1577                previous_digest: None,
1578                epoch_rolling_gas_cost_summary: None,
1579                timestamp: None,
1580                commitments: Vec::new(),
1581                end_of_epoch_data: None,
1582                version_specific_data: None,
1583            }
1584        }
1585        #[doc(hidden)]
1586        pub fn default_instance() -> &'static Self {
1587            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1588            &DEFAULT
1589        }
1590        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1591        pub fn bcs(&self) -> &super::Bcs {
1592            self.bcs
1593                .as_ref()
1594                .map(|field| field as _)
1595                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1596        }
1597        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1598        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1599            self.bcs.as_mut().map(|field| field as _)
1600        }
1601        ///Returns a mutable reference to `bcs`.
1602        ///If the field is unset, it is first initialized with the default value.
1603        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1604            self.bcs.get_or_insert_default()
1605        }
1606        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1607        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1608            self.bcs.as_ref().map(|field| field as _)
1609        }
1610        ///Sets `bcs` with the provided value.
1611        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1612            self.bcs = Some(field.into().into());
1613        }
1614        ///Sets `bcs` with the provided value.
1615        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1616            self.set_bcs(field.into());
1617            self
1618        }
1619        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1620        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1621            self.digest.as_mut().map(|field| field as _)
1622        }
1623        ///Returns a mutable reference to `digest`.
1624        ///If the field is unset, it is first initialized with the default value.
1625        pub fn digest_mut(&mut self) -> &mut String {
1626            self.digest.get_or_insert_default()
1627        }
1628        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1629        pub fn digest_opt(&self) -> Option<&str> {
1630            self.digest.as_ref().map(|field| field as _)
1631        }
1632        ///Sets `digest` with the provided value.
1633        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1634            self.digest = Some(field.into().into());
1635        }
1636        ///Sets `digest` with the provided value.
1637        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1638            self.set_digest(field.into());
1639            self
1640        }
1641        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1642        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1643            self.epoch.as_mut().map(|field| field as _)
1644        }
1645        ///Returns a mutable reference to `epoch`.
1646        ///If the field is unset, it is first initialized with the default value.
1647        pub fn epoch_mut(&mut self) -> &mut u64 {
1648            self.epoch.get_or_insert_default()
1649        }
1650        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1651        pub fn epoch_opt(&self) -> Option<u64> {
1652            self.epoch.as_ref().map(|field| *field)
1653        }
1654        ///Sets `epoch` with the provided value.
1655        pub fn set_epoch(&mut self, field: u64) {
1656            self.epoch = Some(field);
1657        }
1658        ///Sets `epoch` with the provided value.
1659        pub fn with_epoch(mut self, field: u64) -> Self {
1660            self.set_epoch(field);
1661            self
1662        }
1663        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1664        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1665            self.sequence_number.as_mut().map(|field| field as _)
1666        }
1667        ///Returns a mutable reference to `sequence_number`.
1668        ///If the field is unset, it is first initialized with the default value.
1669        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1670            self.sequence_number.get_or_insert_default()
1671        }
1672        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1673        pub fn sequence_number_opt(&self) -> Option<u64> {
1674            self.sequence_number.as_ref().map(|field| *field)
1675        }
1676        ///Sets `sequence_number` with the provided value.
1677        pub fn set_sequence_number(&mut self, field: u64) {
1678            self.sequence_number = Some(field);
1679        }
1680        ///Sets `sequence_number` with the provided value.
1681        pub fn with_sequence_number(mut self, field: u64) -> Self {
1682            self.set_sequence_number(field);
1683            self
1684        }
1685        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1686        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1687            self.total_network_transactions.as_mut().map(|field| field as _)
1688        }
1689        ///Returns a mutable reference to `total_network_transactions`.
1690        ///If the field is unset, it is first initialized with the default value.
1691        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1692            self.total_network_transactions.get_or_insert_default()
1693        }
1694        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1695        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1696            self.total_network_transactions.as_ref().map(|field| *field)
1697        }
1698        ///Sets `total_network_transactions` with the provided value.
1699        pub fn set_total_network_transactions(&mut self, field: u64) {
1700            self.total_network_transactions = Some(field);
1701        }
1702        ///Sets `total_network_transactions` with the provided value.
1703        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1704            self.set_total_network_transactions(field);
1705            self
1706        }
1707        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1708        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1709            self.content_digest.as_mut().map(|field| field as _)
1710        }
1711        ///Returns a mutable reference to `content_digest`.
1712        ///If the field is unset, it is first initialized with the default value.
1713        pub fn content_digest_mut(&mut self) -> &mut String {
1714            self.content_digest.get_or_insert_default()
1715        }
1716        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1717        pub fn content_digest_opt(&self) -> Option<&str> {
1718            self.content_digest.as_ref().map(|field| field as _)
1719        }
1720        ///Sets `content_digest` with the provided value.
1721        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1722            self.content_digest = Some(field.into().into());
1723        }
1724        ///Sets `content_digest` with the provided value.
1725        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1726            self.set_content_digest(field.into());
1727            self
1728        }
1729        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1730        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1731            self.previous_digest.as_mut().map(|field| field as _)
1732        }
1733        ///Returns a mutable reference to `previous_digest`.
1734        ///If the field is unset, it is first initialized with the default value.
1735        pub fn previous_digest_mut(&mut self) -> &mut String {
1736            self.previous_digest.get_or_insert_default()
1737        }
1738        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1739        pub fn previous_digest_opt(&self) -> Option<&str> {
1740            self.previous_digest.as_ref().map(|field| field as _)
1741        }
1742        ///Sets `previous_digest` with the provided value.
1743        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1744            self.previous_digest = Some(field.into().into());
1745        }
1746        ///Sets `previous_digest` with the provided value.
1747        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1748            self.set_previous_digest(field.into());
1749            self
1750        }
1751        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
1752        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1753            self.epoch_rolling_gas_cost_summary
1754                .as_ref()
1755                .map(|field| field as _)
1756                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1757        }
1758        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1759        pub fn epoch_rolling_gas_cost_summary_opt_mut(
1760            &mut self,
1761        ) -> Option<&mut super::GasCostSummary> {
1762            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1763        }
1764        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
1765        ///If the field is unset, it is first initialized with the default value.
1766        pub fn epoch_rolling_gas_cost_summary_mut(
1767            &mut self,
1768        ) -> &mut super::GasCostSummary {
1769            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1770        }
1771        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1772        pub fn epoch_rolling_gas_cost_summary_opt(
1773            &self,
1774        ) -> Option<&super::GasCostSummary> {
1775            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1776        }
1777        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1778        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1779            &mut self,
1780            field: T,
1781        ) {
1782            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1783        }
1784        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1785        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1786            mut self,
1787            field: T,
1788        ) -> Self {
1789            self.set_epoch_rolling_gas_cost_summary(field.into());
1790            self
1791        }
1792        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1793        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1794            self.timestamp.as_mut().map(|field| field as _)
1795        }
1796        ///Returns a mutable reference to `timestamp`.
1797        ///If the field is unset, it is first initialized with the default value.
1798        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1799            self.timestamp.get_or_insert_default()
1800        }
1801        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1802        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1803            self.timestamp.as_ref().map(|field| field as _)
1804        }
1805        ///Sets `timestamp` with the provided value.
1806        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1807            self.timestamp = Some(field.into().into());
1808        }
1809        ///Sets `timestamp` with the provided value.
1810        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1811            mut self,
1812            field: T,
1813        ) -> Self {
1814            self.set_timestamp(field.into());
1815            self
1816        }
1817        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
1818        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1819            &self.commitments
1820        }
1821        ///Returns a mutable reference to `commitments`.
1822        ///If the field is unset, it is first initialized with the default value.
1823        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1824            &mut self.commitments
1825        }
1826        ///Sets `commitments` with the provided value.
1827        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1828            self.commitments = field;
1829        }
1830        ///Sets `commitments` with the provided value.
1831        pub fn with_commitments(
1832            mut self,
1833            field: Vec<super::CheckpointCommitment>,
1834        ) -> Self {
1835            self.set_commitments(field);
1836            self
1837        }
1838        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
1839        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1840            self.end_of_epoch_data
1841                .as_ref()
1842                .map(|field| field as _)
1843                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
1844        }
1845        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1846        pub fn end_of_epoch_data_opt_mut(
1847            &mut self,
1848        ) -> Option<&mut super::EndOfEpochData> {
1849            self.end_of_epoch_data.as_mut().map(|field| field as _)
1850        }
1851        ///Returns a mutable reference to `end_of_epoch_data`.
1852        ///If the field is unset, it is first initialized with the default value.
1853        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
1854            self.end_of_epoch_data.get_or_insert_default()
1855        }
1856        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
1857        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
1858            self.end_of_epoch_data.as_ref().map(|field| field as _)
1859        }
1860        ///Sets `end_of_epoch_data` with the provided value.
1861        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1862            &mut self,
1863            field: T,
1864        ) {
1865            self.end_of_epoch_data = Some(field.into().into());
1866        }
1867        ///Sets `end_of_epoch_data` with the provided value.
1868        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1869            mut self,
1870            field: T,
1871        ) -> Self {
1872            self.set_end_of_epoch_data(field.into());
1873            self
1874        }
1875        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
1876        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
1877            self.version_specific_data.as_ref().map(|field| field as _)
1878        }
1879        ///Sets `version_specific_data` with the provided value.
1880        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1881            &mut self,
1882            field: T,
1883        ) {
1884            self.version_specific_data = Some(field.into().into());
1885        }
1886        ///Sets `version_specific_data` with the provided value.
1887        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1888            mut self,
1889            field: T,
1890        ) -> Self {
1891            self.set_version_specific_data(field.into());
1892            self
1893        }
1894    }
1895    impl super::CheckpointedTransactionInfo {
1896        pub const fn const_default() -> Self {
1897            Self {
1898                transaction: None,
1899                effects: None,
1900                signatures: Vec::new(),
1901            }
1902        }
1903        #[doc(hidden)]
1904        pub fn default_instance() -> &'static Self {
1905            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
1906            &DEFAULT
1907        }
1908        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1909        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
1910            self.transaction.as_mut().map(|field| field as _)
1911        }
1912        ///Returns a mutable reference to `transaction`.
1913        ///If the field is unset, it is first initialized with the default value.
1914        pub fn transaction_mut(&mut self) -> &mut String {
1915            self.transaction.get_or_insert_default()
1916        }
1917        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
1918        pub fn transaction_opt(&self) -> Option<&str> {
1919            self.transaction.as_ref().map(|field| field as _)
1920        }
1921        ///Sets `transaction` with the provided value.
1922        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
1923            self.transaction = Some(field.into().into());
1924        }
1925        ///Sets `transaction` with the provided value.
1926        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
1927            self.set_transaction(field.into());
1928            self
1929        }
1930        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1931        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
1932            self.effects.as_mut().map(|field| field as _)
1933        }
1934        ///Returns a mutable reference to `effects`.
1935        ///If the field is unset, it is first initialized with the default value.
1936        pub fn effects_mut(&mut self) -> &mut String {
1937            self.effects.get_or_insert_default()
1938        }
1939        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1940        pub fn effects_opt(&self) -> Option<&str> {
1941            self.effects.as_ref().map(|field| field as _)
1942        }
1943        ///Sets `effects` with the provided value.
1944        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
1945            self.effects = Some(field.into().into());
1946        }
1947        ///Sets `effects` with the provided value.
1948        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
1949            self.set_effects(field.into());
1950            self
1951        }
1952        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
1953        pub fn signatures(&self) -> &[super::UserSignature] {
1954            &self.signatures
1955        }
1956        ///Returns a mutable reference to `signatures`.
1957        ///If the field is unset, it is first initialized with the default value.
1958        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
1959            &mut self.signatures
1960        }
1961        ///Sets `signatures` with the provided value.
1962        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
1963            self.signatures = field;
1964        }
1965        ///Sets `signatures` with the provided value.
1966        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
1967            self.set_signatures(field);
1968            self
1969        }
1970    }
1971    impl super::CircomG1 {
1972        pub const fn const_default() -> Self {
1973            Self {
1974                e0: None,
1975                e1: None,
1976                e2: None,
1977            }
1978        }
1979        #[doc(hidden)]
1980        pub fn default_instance() -> &'static Self {
1981            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
1982            &DEFAULT
1983        }
1984        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1985        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
1986            self.e0.as_mut().map(|field| field as _)
1987        }
1988        ///Returns a mutable reference to `e0`.
1989        ///If the field is unset, it is first initialized with the default value.
1990        pub fn e0_mut(&mut self) -> &mut String {
1991            self.e0.get_or_insert_default()
1992        }
1993        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
1994        pub fn e0_opt(&self) -> Option<&str> {
1995            self.e0.as_ref().map(|field| field as _)
1996        }
1997        ///Sets `e0` with the provided value.
1998        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
1999            self.e0 = Some(field.into().into());
2000        }
2001        ///Sets `e0` with the provided value.
2002        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2003            self.set_e0(field.into());
2004            self
2005        }
2006        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2007        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2008            self.e1.as_mut().map(|field| field as _)
2009        }
2010        ///Returns a mutable reference to `e1`.
2011        ///If the field is unset, it is first initialized with the default value.
2012        pub fn e1_mut(&mut self) -> &mut String {
2013            self.e1.get_or_insert_default()
2014        }
2015        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2016        pub fn e1_opt(&self) -> Option<&str> {
2017            self.e1.as_ref().map(|field| field as _)
2018        }
2019        ///Sets `e1` with the provided value.
2020        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2021            self.e1 = Some(field.into().into());
2022        }
2023        ///Sets `e1` with the provided value.
2024        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2025            self.set_e1(field.into());
2026            self
2027        }
2028        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2029        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2030            self.e2.as_mut().map(|field| field as _)
2031        }
2032        ///Returns a mutable reference to `e2`.
2033        ///If the field is unset, it is first initialized with the default value.
2034        pub fn e2_mut(&mut self) -> &mut String {
2035            self.e2.get_or_insert_default()
2036        }
2037        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2038        pub fn e2_opt(&self) -> Option<&str> {
2039            self.e2.as_ref().map(|field| field as _)
2040        }
2041        ///Sets `e2` with the provided value.
2042        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2043            self.e2 = Some(field.into().into());
2044        }
2045        ///Sets `e2` with the provided value.
2046        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2047            self.set_e2(field.into());
2048            self
2049        }
2050    }
2051    impl super::CircomG2 {
2052        pub const fn const_default() -> Self {
2053            Self {
2054                e00: None,
2055                e01: None,
2056                e10: None,
2057                e11: None,
2058                e20: None,
2059                e21: None,
2060            }
2061        }
2062        #[doc(hidden)]
2063        pub fn default_instance() -> &'static Self {
2064            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2065            &DEFAULT
2066        }
2067        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2068        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2069            self.e00.as_mut().map(|field| field as _)
2070        }
2071        ///Returns a mutable reference to `e00`.
2072        ///If the field is unset, it is first initialized with the default value.
2073        pub fn e00_mut(&mut self) -> &mut String {
2074            self.e00.get_or_insert_default()
2075        }
2076        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2077        pub fn e00_opt(&self) -> Option<&str> {
2078            self.e00.as_ref().map(|field| field as _)
2079        }
2080        ///Sets `e00` with the provided value.
2081        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2082            self.e00 = Some(field.into().into());
2083        }
2084        ///Sets `e00` with the provided value.
2085        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2086            self.set_e00(field.into());
2087            self
2088        }
2089        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2090        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2091            self.e01.as_mut().map(|field| field as _)
2092        }
2093        ///Returns a mutable reference to `e01`.
2094        ///If the field is unset, it is first initialized with the default value.
2095        pub fn e01_mut(&mut self) -> &mut String {
2096            self.e01.get_or_insert_default()
2097        }
2098        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2099        pub fn e01_opt(&self) -> Option<&str> {
2100            self.e01.as_ref().map(|field| field as _)
2101        }
2102        ///Sets `e01` with the provided value.
2103        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2104            self.e01 = Some(field.into().into());
2105        }
2106        ///Sets `e01` with the provided value.
2107        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2108            self.set_e01(field.into());
2109            self
2110        }
2111        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2112        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2113            self.e10.as_mut().map(|field| field as _)
2114        }
2115        ///Returns a mutable reference to `e10`.
2116        ///If the field is unset, it is first initialized with the default value.
2117        pub fn e10_mut(&mut self) -> &mut String {
2118            self.e10.get_or_insert_default()
2119        }
2120        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2121        pub fn e10_opt(&self) -> Option<&str> {
2122            self.e10.as_ref().map(|field| field as _)
2123        }
2124        ///Sets `e10` with the provided value.
2125        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2126            self.e10 = Some(field.into().into());
2127        }
2128        ///Sets `e10` with the provided value.
2129        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2130            self.set_e10(field.into());
2131            self
2132        }
2133        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2134        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2135            self.e11.as_mut().map(|field| field as _)
2136        }
2137        ///Returns a mutable reference to `e11`.
2138        ///If the field is unset, it is first initialized with the default value.
2139        pub fn e11_mut(&mut self) -> &mut String {
2140            self.e11.get_or_insert_default()
2141        }
2142        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2143        pub fn e11_opt(&self) -> Option<&str> {
2144            self.e11.as_ref().map(|field| field as _)
2145        }
2146        ///Sets `e11` with the provided value.
2147        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2148            self.e11 = Some(field.into().into());
2149        }
2150        ///Sets `e11` with the provided value.
2151        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2152            self.set_e11(field.into());
2153            self
2154        }
2155        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2156        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2157            self.e20.as_mut().map(|field| field as _)
2158        }
2159        ///Returns a mutable reference to `e20`.
2160        ///If the field is unset, it is first initialized with the default value.
2161        pub fn e20_mut(&mut self) -> &mut String {
2162            self.e20.get_or_insert_default()
2163        }
2164        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2165        pub fn e20_opt(&self) -> Option<&str> {
2166            self.e20.as_ref().map(|field| field as _)
2167        }
2168        ///Sets `e20` with the provided value.
2169        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2170            self.e20 = Some(field.into().into());
2171        }
2172        ///Sets `e20` with the provided value.
2173        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2174            self.set_e20(field.into());
2175            self
2176        }
2177        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2178        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2179            self.e21.as_mut().map(|field| field as _)
2180        }
2181        ///Returns a mutable reference to `e21`.
2182        ///If the field is unset, it is first initialized with the default value.
2183        pub fn e21_mut(&mut self) -> &mut String {
2184            self.e21.get_or_insert_default()
2185        }
2186        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2187        pub fn e21_opt(&self) -> Option<&str> {
2188            self.e21.as_ref().map(|field| field as _)
2189        }
2190        ///Sets `e21` with the provided value.
2191        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2192            self.e21 = Some(field.into().into());
2193        }
2194        ///Sets `e21` with the provided value.
2195        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2196            self.set_e21(field.into());
2197            self
2198        }
2199    }
2200    impl super::CleverError {
2201        pub const fn const_default() -> Self {
2202            Self {
2203                error_code: None,
2204                line_number: None,
2205                constant_name: None,
2206                constant_type: None,
2207                value: None,
2208            }
2209        }
2210        #[doc(hidden)]
2211        pub fn default_instance() -> &'static Self {
2212            static DEFAULT: super::CleverError = super::CleverError::const_default();
2213            &DEFAULT
2214        }
2215        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2216        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2217            self.error_code.as_mut().map(|field| field as _)
2218        }
2219        ///Returns a mutable reference to `error_code`.
2220        ///If the field is unset, it is first initialized with the default value.
2221        pub fn error_code_mut(&mut self) -> &mut u64 {
2222            self.error_code.get_or_insert_default()
2223        }
2224        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2225        pub fn error_code_opt(&self) -> Option<u64> {
2226            self.error_code.as_ref().map(|field| *field)
2227        }
2228        ///Sets `error_code` with the provided value.
2229        pub fn set_error_code(&mut self, field: u64) {
2230            self.error_code = Some(field);
2231        }
2232        ///Sets `error_code` with the provided value.
2233        pub fn with_error_code(mut self, field: u64) -> Self {
2234            self.set_error_code(field);
2235            self
2236        }
2237        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2238        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2239            self.line_number.as_mut().map(|field| field as _)
2240        }
2241        ///Returns a mutable reference to `line_number`.
2242        ///If the field is unset, it is first initialized with the default value.
2243        pub fn line_number_mut(&mut self) -> &mut u64 {
2244            self.line_number.get_or_insert_default()
2245        }
2246        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2247        pub fn line_number_opt(&self) -> Option<u64> {
2248            self.line_number.as_ref().map(|field| *field)
2249        }
2250        ///Sets `line_number` with the provided value.
2251        pub fn set_line_number(&mut self, field: u64) {
2252            self.line_number = Some(field);
2253        }
2254        ///Sets `line_number` with the provided value.
2255        pub fn with_line_number(mut self, field: u64) -> Self {
2256            self.set_line_number(field);
2257            self
2258        }
2259        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2260        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2261            self.constant_name.as_mut().map(|field| field as _)
2262        }
2263        ///Returns a mutable reference to `constant_name`.
2264        ///If the field is unset, it is first initialized with the default value.
2265        pub fn constant_name_mut(&mut self) -> &mut String {
2266            self.constant_name.get_or_insert_default()
2267        }
2268        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2269        pub fn constant_name_opt(&self) -> Option<&str> {
2270            self.constant_name.as_ref().map(|field| field as _)
2271        }
2272        ///Sets `constant_name` with the provided value.
2273        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2274            self.constant_name = Some(field.into().into());
2275        }
2276        ///Sets `constant_name` with the provided value.
2277        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2278            self.set_constant_name(field.into());
2279            self
2280        }
2281        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2282        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2283            self.constant_type.as_mut().map(|field| field as _)
2284        }
2285        ///Returns a mutable reference to `constant_type`.
2286        ///If the field is unset, it is first initialized with the default value.
2287        pub fn constant_type_mut(&mut self) -> &mut String {
2288            self.constant_type.get_or_insert_default()
2289        }
2290        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2291        pub fn constant_type_opt(&self) -> Option<&str> {
2292            self.constant_type.as_ref().map(|field| field as _)
2293        }
2294        ///Sets `constant_type` with the provided value.
2295        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2296            self.constant_type = Some(field.into().into());
2297        }
2298        ///Sets `constant_type` with the provided value.
2299        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2300            self.set_constant_type(field.into());
2301            self
2302        }
2303        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2304        pub fn rendered(&self) -> &str {
2305            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2306                field as _
2307            } else {
2308                ""
2309            }
2310        }
2311        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2312        pub fn rendered_opt(&self) -> Option<&str> {
2313            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2314                Some(field as _)
2315            } else {
2316                None
2317            }
2318        }
2319        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2320        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2321            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2322                Some(field as _)
2323            } else {
2324                None
2325            }
2326        }
2327        ///Returns a mutable reference to `rendered`.
2328        ///If the field is unset, it is first initialized with the default value.
2329        ///If any other oneof field in the same oneof is set, it will be cleared.
2330        pub fn rendered_mut(&mut self) -> &mut String {
2331            if self.rendered_opt_mut().is_none() {
2332                self.value = Some(
2333                    super::clever_error::Value::Rendered(String::default()),
2334                );
2335            }
2336            self.rendered_opt_mut().unwrap()
2337        }
2338        ///Sets `rendered` with the provided value.
2339        ///If any other oneof field in the same oneof is set, it will be cleared.
2340        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2341            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2342        }
2343        ///Sets `rendered` with the provided value.
2344        ///If any other oneof field in the same oneof is set, it will be cleared.
2345        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2346            self.set_rendered(field.into());
2347            self
2348        }
2349        ///Returns the value of `raw`, or the default value if `raw` is unset.
2350        pub fn raw(&self) -> &[u8] {
2351            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2352                field as _
2353            } else {
2354                &[]
2355            }
2356        }
2357        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2358        pub fn raw_opt(&self) -> Option<&[u8]> {
2359            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2360                Some(field as _)
2361            } else {
2362                None
2363            }
2364        }
2365        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2366        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2367            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2368                Some(field as _)
2369            } else {
2370                None
2371            }
2372        }
2373        ///Returns a mutable reference to `raw`.
2374        ///If the field is unset, it is first initialized with the default value.
2375        ///If any other oneof field in the same oneof is set, it will be cleared.
2376        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2377            if self.raw_opt_mut().is_none() {
2378                self.value = Some(
2379                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2380                );
2381            }
2382            self.raw_opt_mut().unwrap()
2383        }
2384        ///Sets `raw` with the provided value.
2385        ///If any other oneof field in the same oneof is set, it will be cleared.
2386        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2387            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2388        }
2389        ///Sets `raw` with the provided value.
2390        ///If any other oneof field in the same oneof is set, it will be cleared.
2391        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2392            self.set_raw(field.into());
2393            self
2394        }
2395    }
2396    impl super::CoinDenyListError {
2397        pub const fn const_default() -> Self {
2398            Self {
2399                address: None,
2400                coin_type: None,
2401            }
2402        }
2403        #[doc(hidden)]
2404        pub fn default_instance() -> &'static Self {
2405            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2406            &DEFAULT
2407        }
2408        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2409        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2410            self.address.as_mut().map(|field| field as _)
2411        }
2412        ///Returns a mutable reference to `address`.
2413        ///If the field is unset, it is first initialized with the default value.
2414        pub fn address_mut(&mut self) -> &mut String {
2415            self.address.get_or_insert_default()
2416        }
2417        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2418        pub fn address_opt(&self) -> Option<&str> {
2419            self.address.as_ref().map(|field| field as _)
2420        }
2421        ///Sets `address` with the provided value.
2422        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2423            self.address = Some(field.into().into());
2424        }
2425        ///Sets `address` with the provided value.
2426        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2427            self.set_address(field.into());
2428            self
2429        }
2430        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2431        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2432            self.coin_type.as_mut().map(|field| field as _)
2433        }
2434        ///Returns a mutable reference to `coin_type`.
2435        ///If the field is unset, it is first initialized with the default value.
2436        pub fn coin_type_mut(&mut self) -> &mut String {
2437            self.coin_type.get_or_insert_default()
2438        }
2439        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2440        pub fn coin_type_opt(&self) -> Option<&str> {
2441            self.coin_type.as_ref().map(|field| field as _)
2442        }
2443        ///Sets `coin_type` with the provided value.
2444        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2445            self.coin_type = Some(field.into().into());
2446        }
2447        ///Sets `coin_type` with the provided value.
2448        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2449            self.set_coin_type(field.into());
2450            self
2451        }
2452    }
2453    impl super::CoinMetadata {
2454        pub const fn const_default() -> Self {
2455            Self {
2456                id: None,
2457                decimals: None,
2458                name: None,
2459                symbol: None,
2460                description: None,
2461                icon_url: None,
2462                metadata_cap_id: None,
2463                metadata_cap_state: None,
2464            }
2465        }
2466        #[doc(hidden)]
2467        pub fn default_instance() -> &'static Self {
2468            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2469            &DEFAULT
2470        }
2471        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2472        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2473            self.id.as_mut().map(|field| field as _)
2474        }
2475        ///Returns a mutable reference to `id`.
2476        ///If the field is unset, it is first initialized with the default value.
2477        pub fn id_mut(&mut self) -> &mut String {
2478            self.id.get_or_insert_default()
2479        }
2480        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2481        pub fn id_opt(&self) -> Option<&str> {
2482            self.id.as_ref().map(|field| field as _)
2483        }
2484        ///Sets `id` with the provided value.
2485        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2486            self.id = Some(field.into().into());
2487        }
2488        ///Sets `id` with the provided value.
2489        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2490            self.set_id(field.into());
2491            self
2492        }
2493        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2494        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2495            self.decimals.as_mut().map(|field| field as _)
2496        }
2497        ///Returns a mutable reference to `decimals`.
2498        ///If the field is unset, it is first initialized with the default value.
2499        pub fn decimals_mut(&mut self) -> &mut u32 {
2500            self.decimals.get_or_insert_default()
2501        }
2502        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2503        pub fn decimals_opt(&self) -> Option<u32> {
2504            self.decimals.as_ref().map(|field| *field)
2505        }
2506        ///Sets `decimals` with the provided value.
2507        pub fn set_decimals(&mut self, field: u32) {
2508            self.decimals = Some(field);
2509        }
2510        ///Sets `decimals` with the provided value.
2511        pub fn with_decimals(mut self, field: u32) -> Self {
2512            self.set_decimals(field);
2513            self
2514        }
2515        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2516        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2517            self.name.as_mut().map(|field| field as _)
2518        }
2519        ///Returns a mutable reference to `name`.
2520        ///If the field is unset, it is first initialized with the default value.
2521        pub fn name_mut(&mut self) -> &mut String {
2522            self.name.get_or_insert_default()
2523        }
2524        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2525        pub fn name_opt(&self) -> Option<&str> {
2526            self.name.as_ref().map(|field| field as _)
2527        }
2528        ///Sets `name` with the provided value.
2529        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2530            self.name = Some(field.into().into());
2531        }
2532        ///Sets `name` with the provided value.
2533        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2534            self.set_name(field.into());
2535            self
2536        }
2537        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2538        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2539            self.symbol.as_mut().map(|field| field as _)
2540        }
2541        ///Returns a mutable reference to `symbol`.
2542        ///If the field is unset, it is first initialized with the default value.
2543        pub fn symbol_mut(&mut self) -> &mut String {
2544            self.symbol.get_or_insert_default()
2545        }
2546        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2547        pub fn symbol_opt(&self) -> Option<&str> {
2548            self.symbol.as_ref().map(|field| field as _)
2549        }
2550        ///Sets `symbol` with the provided value.
2551        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2552            self.symbol = Some(field.into().into());
2553        }
2554        ///Sets `symbol` with the provided value.
2555        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2556            self.set_symbol(field.into());
2557            self
2558        }
2559        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2560        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2561            self.description.as_mut().map(|field| field as _)
2562        }
2563        ///Returns a mutable reference to `description`.
2564        ///If the field is unset, it is first initialized with the default value.
2565        pub fn description_mut(&mut self) -> &mut String {
2566            self.description.get_or_insert_default()
2567        }
2568        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2569        pub fn description_opt(&self) -> Option<&str> {
2570            self.description.as_ref().map(|field| field as _)
2571        }
2572        ///Sets `description` with the provided value.
2573        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2574            self.description = Some(field.into().into());
2575        }
2576        ///Sets `description` with the provided value.
2577        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2578            self.set_description(field.into());
2579            self
2580        }
2581        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2582        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2583            self.icon_url.as_mut().map(|field| field as _)
2584        }
2585        ///Returns a mutable reference to `icon_url`.
2586        ///If the field is unset, it is first initialized with the default value.
2587        pub fn icon_url_mut(&mut self) -> &mut String {
2588            self.icon_url.get_or_insert_default()
2589        }
2590        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2591        pub fn icon_url_opt(&self) -> Option<&str> {
2592            self.icon_url.as_ref().map(|field| field as _)
2593        }
2594        ///Sets `icon_url` with the provided value.
2595        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2596            self.icon_url = Some(field.into().into());
2597        }
2598        ///Sets `icon_url` with the provided value.
2599        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2600            self.set_icon_url(field.into());
2601            self
2602        }
2603        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2604        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2605            self.metadata_cap_id.as_mut().map(|field| field as _)
2606        }
2607        ///Returns a mutable reference to `metadata_cap_id`.
2608        ///If the field is unset, it is first initialized with the default value.
2609        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2610            self.metadata_cap_id.get_or_insert_default()
2611        }
2612        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2613        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2614            self.metadata_cap_id.as_ref().map(|field| field as _)
2615        }
2616        ///Sets `metadata_cap_id` with the provided value.
2617        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2618            self.metadata_cap_id = Some(field.into().into());
2619        }
2620        ///Sets `metadata_cap_id` with the provided value.
2621        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2622            self.set_metadata_cap_id(field.into());
2623            self
2624        }
2625        ///Sets `metadata_cap_state` with the provided value.
2626        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2627            mut self,
2628            field: T,
2629        ) -> Self {
2630            self.set_metadata_cap_state(field.into());
2631            self
2632        }
2633    }
2634    impl super::CoinTreasury {
2635        pub const fn const_default() -> Self {
2636            Self {
2637                id: None,
2638                total_supply: None,
2639                supply_state: None,
2640            }
2641        }
2642        #[doc(hidden)]
2643        pub fn default_instance() -> &'static Self {
2644            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2645            &DEFAULT
2646        }
2647        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2648        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2649            self.id.as_mut().map(|field| field as _)
2650        }
2651        ///Returns a mutable reference to `id`.
2652        ///If the field is unset, it is first initialized with the default value.
2653        pub fn id_mut(&mut self) -> &mut String {
2654            self.id.get_or_insert_default()
2655        }
2656        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2657        pub fn id_opt(&self) -> Option<&str> {
2658            self.id.as_ref().map(|field| field as _)
2659        }
2660        ///Sets `id` with the provided value.
2661        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2662            self.id = Some(field.into().into());
2663        }
2664        ///Sets `id` with the provided value.
2665        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2666            self.set_id(field.into());
2667            self
2668        }
2669        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2670        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2671            self.total_supply.as_mut().map(|field| field as _)
2672        }
2673        ///Returns a mutable reference to `total_supply`.
2674        ///If the field is unset, it is first initialized with the default value.
2675        pub fn total_supply_mut(&mut self) -> &mut u64 {
2676            self.total_supply.get_or_insert_default()
2677        }
2678        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2679        pub fn total_supply_opt(&self) -> Option<u64> {
2680            self.total_supply.as_ref().map(|field| *field)
2681        }
2682        ///Sets `total_supply` with the provided value.
2683        pub fn set_total_supply(&mut self, field: u64) {
2684            self.total_supply = Some(field);
2685        }
2686        ///Sets `total_supply` with the provided value.
2687        pub fn with_total_supply(mut self, field: u64) -> Self {
2688            self.set_total_supply(field);
2689            self
2690        }
2691        ///Sets `supply_state` with the provided value.
2692        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2693            mut self,
2694            field: T,
2695        ) -> Self {
2696            self.set_supply_state(field.into());
2697            self
2698        }
2699    }
2700    impl super::Command {
2701        pub const fn const_default() -> Self {
2702            Self { command: None }
2703        }
2704        #[doc(hidden)]
2705        pub fn default_instance() -> &'static Self {
2706            static DEFAULT: super::Command = super::Command::const_default();
2707            &DEFAULT
2708        }
2709        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2710        pub fn move_call(&self) -> &super::MoveCall {
2711            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2712                field as _
2713            } else {
2714                super::MoveCall::default_instance() as _
2715            }
2716        }
2717        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
2718        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2719            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2720                Some(field as _)
2721            } else {
2722                None
2723            }
2724        }
2725        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2726        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2727            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2728                Some(field as _)
2729            } else {
2730                None
2731            }
2732        }
2733        ///Returns a mutable reference to `move_call`.
2734        ///If the field is unset, it is first initialized with the default value.
2735        ///If any other oneof field in the same oneof is set, it will be cleared.
2736        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2737            if self.move_call_opt_mut().is_none() {
2738                self.command = Some(
2739                    super::command::Command::MoveCall(super::MoveCall::default()),
2740                );
2741            }
2742            self.move_call_opt_mut().unwrap()
2743        }
2744        ///Sets `move_call` with the provided value.
2745        ///If any other oneof field in the same oneof is set, it will be cleared.
2746        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2747            self.command = Some(super::command::Command::MoveCall(field.into().into()));
2748        }
2749        ///Sets `move_call` with the provided value.
2750        ///If any other oneof field in the same oneof is set, it will be cleared.
2751        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2752            self.set_move_call(field.into());
2753            self
2754        }
2755        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
2756        pub fn transfer_objects(&self) -> &super::TransferObjects {
2757            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2758            {
2759                field as _
2760            } else {
2761                super::TransferObjects::default_instance() as _
2762            }
2763        }
2764        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2765        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2766            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2767            {
2768                Some(field as _)
2769            } else {
2770                None
2771            }
2772        }
2773        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2774        pub fn transfer_objects_opt_mut(
2775            &mut self,
2776        ) -> Option<&mut super::TransferObjects> {
2777            if let Some(super::command::Command::TransferObjects(field)) = &mut self
2778                .command
2779            {
2780                Some(field as _)
2781            } else {
2782                None
2783            }
2784        }
2785        ///Returns a mutable reference to `transfer_objects`.
2786        ///If the field is unset, it is first initialized with the default value.
2787        ///If any other oneof field in the same oneof is set, it will be cleared.
2788        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2789            if self.transfer_objects_opt_mut().is_none() {
2790                self.command = Some(
2791                    super::command::Command::TransferObjects(
2792                        super::TransferObjects::default(),
2793                    ),
2794                );
2795            }
2796            self.transfer_objects_opt_mut().unwrap()
2797        }
2798        ///Sets `transfer_objects` with the provided value.
2799        ///If any other oneof field in the same oneof is set, it will be cleared.
2800        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2801            &mut self,
2802            field: T,
2803        ) {
2804            self.command = Some(
2805                super::command::Command::TransferObjects(field.into().into()),
2806            );
2807        }
2808        ///Sets `transfer_objects` with the provided value.
2809        ///If any other oneof field in the same oneof is set, it will be cleared.
2810        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2811            mut self,
2812            field: T,
2813        ) -> Self {
2814            self.set_transfer_objects(field.into());
2815            self
2816        }
2817        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
2818        pub fn split_coins(&self) -> &super::SplitCoins {
2819            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2820                field as _
2821            } else {
2822                super::SplitCoins::default_instance() as _
2823            }
2824        }
2825        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
2826        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
2827            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2828                Some(field as _)
2829            } else {
2830                None
2831            }
2832        }
2833        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2834        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
2835            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
2836                Some(field as _)
2837            } else {
2838                None
2839            }
2840        }
2841        ///Returns a mutable reference to `split_coins`.
2842        ///If the field is unset, it is first initialized with the default value.
2843        ///If any other oneof field in the same oneof is set, it will be cleared.
2844        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
2845            if self.split_coins_opt_mut().is_none() {
2846                self.command = Some(
2847                    super::command::Command::SplitCoins(super::SplitCoins::default()),
2848                );
2849            }
2850            self.split_coins_opt_mut().unwrap()
2851        }
2852        ///Sets `split_coins` with the provided value.
2853        ///If any other oneof field in the same oneof is set, it will be cleared.
2854        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
2855            self.command = Some(
2856                super::command::Command::SplitCoins(field.into().into()),
2857            );
2858        }
2859        ///Sets `split_coins` with the provided value.
2860        ///If any other oneof field in the same oneof is set, it will be cleared.
2861        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
2862            self.set_split_coins(field.into());
2863            self
2864        }
2865        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
2866        pub fn merge_coins(&self) -> &super::MergeCoins {
2867            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2868                field as _
2869            } else {
2870                super::MergeCoins::default_instance() as _
2871            }
2872        }
2873        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
2874        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
2875            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2876                Some(field as _)
2877            } else {
2878                None
2879            }
2880        }
2881        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2882        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
2883            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
2884                Some(field as _)
2885            } else {
2886                None
2887            }
2888        }
2889        ///Returns a mutable reference to `merge_coins`.
2890        ///If the field is unset, it is first initialized with the default value.
2891        ///If any other oneof field in the same oneof is set, it will be cleared.
2892        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
2893            if self.merge_coins_opt_mut().is_none() {
2894                self.command = Some(
2895                    super::command::Command::MergeCoins(super::MergeCoins::default()),
2896                );
2897            }
2898            self.merge_coins_opt_mut().unwrap()
2899        }
2900        ///Sets `merge_coins` with the provided value.
2901        ///If any other oneof field in the same oneof is set, it will be cleared.
2902        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
2903            self.command = Some(
2904                super::command::Command::MergeCoins(field.into().into()),
2905            );
2906        }
2907        ///Sets `merge_coins` with the provided value.
2908        ///If any other oneof field in the same oneof is set, it will be cleared.
2909        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
2910            self.set_merge_coins(field.into());
2911            self
2912        }
2913        ///Returns the value of `publish`, or the default value if `publish` is unset.
2914        pub fn publish(&self) -> &super::Publish {
2915            if let Some(super::command::Command::Publish(field)) = &self.command {
2916                field as _
2917            } else {
2918                super::Publish::default_instance() as _
2919            }
2920        }
2921        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
2922        pub fn publish_opt(&self) -> Option<&super::Publish> {
2923            if let Some(super::command::Command::Publish(field)) = &self.command {
2924                Some(field as _)
2925            } else {
2926                None
2927            }
2928        }
2929        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2930        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
2931            if let Some(super::command::Command::Publish(field)) = &mut self.command {
2932                Some(field as _)
2933            } else {
2934                None
2935            }
2936        }
2937        ///Returns a mutable reference to `publish`.
2938        ///If the field is unset, it is first initialized with the default value.
2939        ///If any other oneof field in the same oneof is set, it will be cleared.
2940        pub fn publish_mut(&mut self) -> &mut super::Publish {
2941            if self.publish_opt_mut().is_none() {
2942                self.command = Some(
2943                    super::command::Command::Publish(super::Publish::default()),
2944                );
2945            }
2946            self.publish_opt_mut().unwrap()
2947        }
2948        ///Sets `publish` with the provided value.
2949        ///If any other oneof field in the same oneof is set, it will be cleared.
2950        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
2951            self.command = Some(super::command::Command::Publish(field.into().into()));
2952        }
2953        ///Sets `publish` with the provided value.
2954        ///If any other oneof field in the same oneof is set, it will be cleared.
2955        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
2956            self.set_publish(field.into());
2957            self
2958        }
2959        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
2960        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
2961            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2962                field as _
2963            } else {
2964                super::MakeMoveVector::default_instance() as _
2965            }
2966        }
2967        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
2968        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
2969            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2970                Some(field as _)
2971            } else {
2972                None
2973            }
2974        }
2975        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2976        pub fn make_move_vector_opt_mut(
2977            &mut self,
2978        ) -> Option<&mut super::MakeMoveVector> {
2979            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
2980                .command
2981            {
2982                Some(field as _)
2983            } else {
2984                None
2985            }
2986        }
2987        ///Returns a mutable reference to `make_move_vector`.
2988        ///If the field is unset, it is first initialized with the default value.
2989        ///If any other oneof field in the same oneof is set, it will be cleared.
2990        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
2991            if self.make_move_vector_opt_mut().is_none() {
2992                self.command = Some(
2993                    super::command::Command::MakeMoveVector(
2994                        super::MakeMoveVector::default(),
2995                    ),
2996                );
2997            }
2998            self.make_move_vector_opt_mut().unwrap()
2999        }
3000        ///Sets `make_move_vector` with the provided value.
3001        ///If any other oneof field in the same oneof is set, it will be cleared.
3002        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3003            &mut self,
3004            field: T,
3005        ) {
3006            self.command = Some(
3007                super::command::Command::MakeMoveVector(field.into().into()),
3008            );
3009        }
3010        ///Sets `make_move_vector` with the provided value.
3011        ///If any other oneof field in the same oneof is set, it will be cleared.
3012        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3013            mut self,
3014            field: T,
3015        ) -> Self {
3016            self.set_make_move_vector(field.into());
3017            self
3018        }
3019        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3020        pub fn upgrade(&self) -> &super::Upgrade {
3021            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3022                field as _
3023            } else {
3024                super::Upgrade::default_instance() as _
3025            }
3026        }
3027        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3028        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3029            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3030                Some(field as _)
3031            } else {
3032                None
3033            }
3034        }
3035        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3036        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3037            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3038                Some(field as _)
3039            } else {
3040                None
3041            }
3042        }
3043        ///Returns a mutable reference to `upgrade`.
3044        ///If the field is unset, it is first initialized with the default value.
3045        ///If any other oneof field in the same oneof is set, it will be cleared.
3046        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3047            if self.upgrade_opt_mut().is_none() {
3048                self.command = Some(
3049                    super::command::Command::Upgrade(super::Upgrade::default()),
3050                );
3051            }
3052            self.upgrade_opt_mut().unwrap()
3053        }
3054        ///Sets `upgrade` with the provided value.
3055        ///If any other oneof field in the same oneof is set, it will be cleared.
3056        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3057            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3058        }
3059        ///Sets `upgrade` with the provided value.
3060        ///If any other oneof field in the same oneof is set, it will be cleared.
3061        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3062            self.set_upgrade(field.into());
3063            self
3064        }
3065    }
3066    impl super::CommandArgumentError {
3067        pub const fn const_default() -> Self {
3068            Self {
3069                argument: None,
3070                kind: None,
3071                index_error: None,
3072            }
3073        }
3074        #[doc(hidden)]
3075        pub fn default_instance() -> &'static Self {
3076            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3077            &DEFAULT
3078        }
3079        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3080        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3081            self.argument.as_mut().map(|field| field as _)
3082        }
3083        ///Returns a mutable reference to `argument`.
3084        ///If the field is unset, it is first initialized with the default value.
3085        pub fn argument_mut(&mut self) -> &mut u32 {
3086            self.argument.get_or_insert_default()
3087        }
3088        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3089        pub fn argument_opt(&self) -> Option<u32> {
3090            self.argument.as_ref().map(|field| *field)
3091        }
3092        ///Sets `argument` with the provided value.
3093        pub fn set_argument(&mut self, field: u32) {
3094            self.argument = Some(field);
3095        }
3096        ///Sets `argument` with the provided value.
3097        pub fn with_argument(mut self, field: u32) -> Self {
3098            self.set_argument(field);
3099            self
3100        }
3101        ///Sets `kind` with the provided value.
3102        pub fn with_kind<
3103            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3104        >(mut self, field: T) -> Self {
3105            self.set_kind(field.into());
3106            self
3107        }
3108        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3109        pub fn index_error(&self) -> &super::IndexError {
3110            self.index_error
3111                .as_ref()
3112                .map(|field| field as _)
3113                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3114        }
3115        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3116        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3117            self.index_error.as_mut().map(|field| field as _)
3118        }
3119        ///Returns a mutable reference to `index_error`.
3120        ///If the field is unset, it is first initialized with the default value.
3121        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3122            self.index_error.get_or_insert_default()
3123        }
3124        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3125        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3126            self.index_error.as_ref().map(|field| field as _)
3127        }
3128        ///Sets `index_error` with the provided value.
3129        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3130            self.index_error = Some(field.into().into());
3131        }
3132        ///Sets `index_error` with the provided value.
3133        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3134            self.set_index_error(field.into());
3135            self
3136        }
3137    }
3138    impl super::CommandOutput {
3139        pub const fn const_default() -> Self {
3140            Self {
3141                argument: None,
3142                value: None,
3143                json: None,
3144            }
3145        }
3146        #[doc(hidden)]
3147        pub fn default_instance() -> &'static Self {
3148            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3149            &DEFAULT
3150        }
3151        ///Returns the value of `argument`, or the default value if `argument` is unset.
3152        pub fn argument(&self) -> &super::Argument {
3153            self.argument
3154                .as_ref()
3155                .map(|field| field as _)
3156                .unwrap_or_else(|| super::Argument::default_instance() as _)
3157        }
3158        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3159        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3160            self.argument.as_mut().map(|field| field as _)
3161        }
3162        ///Returns a mutable reference to `argument`.
3163        ///If the field is unset, it is first initialized with the default value.
3164        pub fn argument_mut(&mut self) -> &mut super::Argument {
3165            self.argument.get_or_insert_default()
3166        }
3167        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3168        pub fn argument_opt(&self) -> Option<&super::Argument> {
3169            self.argument.as_ref().map(|field| field as _)
3170        }
3171        ///Sets `argument` with the provided value.
3172        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3173            self.argument = Some(field.into().into());
3174        }
3175        ///Sets `argument` with the provided value.
3176        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3177            self.set_argument(field.into());
3178            self
3179        }
3180        ///Returns the value of `value`, or the default value if `value` is unset.
3181        pub fn value(&self) -> &super::Bcs {
3182            self.value
3183                .as_ref()
3184                .map(|field| field as _)
3185                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3186        }
3187        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3188        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3189            self.value.as_mut().map(|field| field as _)
3190        }
3191        ///Returns a mutable reference to `value`.
3192        ///If the field is unset, it is first initialized with the default value.
3193        pub fn value_mut(&mut self) -> &mut super::Bcs {
3194            self.value.get_or_insert_default()
3195        }
3196        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3197        pub fn value_opt(&self) -> Option<&super::Bcs> {
3198            self.value.as_ref().map(|field| field as _)
3199        }
3200        ///Sets `value` with the provided value.
3201        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3202            self.value = Some(field.into().into());
3203        }
3204        ///Sets `value` with the provided value.
3205        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3206            self.set_value(field.into());
3207            self
3208        }
3209        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3210        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3211            self.json.as_mut().map(|field| field as _)
3212        }
3213        ///Returns a mutable reference to `json`.
3214        ///If the field is unset, it is first initialized with the default value.
3215        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3216            self.json.get_or_insert_default()
3217        }
3218        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3219        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3220            self.json.as_ref().map(|field| field as _)
3221        }
3222        ///Sets `json` with the provided value.
3223        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3224            self.json = Some(field.into().into());
3225        }
3226        ///Sets `json` with the provided value.
3227        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3228            self.set_json(field.into());
3229            self
3230        }
3231    }
3232    impl super::CommandResult {
3233        pub const fn const_default() -> Self {
3234            Self {
3235                return_values: Vec::new(),
3236                mutated_by_ref: Vec::new(),
3237            }
3238        }
3239        #[doc(hidden)]
3240        pub fn default_instance() -> &'static Self {
3241            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3242            &DEFAULT
3243        }
3244        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3245        pub fn return_values(&self) -> &[super::CommandOutput] {
3246            &self.return_values
3247        }
3248        ///Returns a mutable reference to `return_values`.
3249        ///If the field is unset, it is first initialized with the default value.
3250        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3251            &mut self.return_values
3252        }
3253        ///Sets `return_values` with the provided value.
3254        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3255            self.return_values = field;
3256        }
3257        ///Sets `return_values` with the provided value.
3258        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3259            self.set_return_values(field);
3260            self
3261        }
3262        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3263        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3264            &self.mutated_by_ref
3265        }
3266        ///Returns a mutable reference to `mutated_by_ref`.
3267        ///If the field is unset, it is first initialized with the default value.
3268        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3269            &mut self.mutated_by_ref
3270        }
3271        ///Sets `mutated_by_ref` with the provided value.
3272        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3273            self.mutated_by_ref = field;
3274        }
3275        ///Sets `mutated_by_ref` with the provided value.
3276        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3277            self.set_mutated_by_ref(field);
3278            self
3279        }
3280    }
3281    impl super::CongestedObjects {
3282        pub const fn const_default() -> Self {
3283            Self { objects: Vec::new() }
3284        }
3285        #[doc(hidden)]
3286        pub fn default_instance() -> &'static Self {
3287            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3288            &DEFAULT
3289        }
3290        ///Returns the value of `objects`, or the default value if `objects` is unset.
3291        pub fn objects(&self) -> &[String] {
3292            &self.objects
3293        }
3294        ///Returns a mutable reference to `objects`.
3295        ///If the field is unset, it is first initialized with the default value.
3296        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3297            &mut self.objects
3298        }
3299        ///Sets `objects` with the provided value.
3300        pub fn set_objects(&mut self, field: Vec<String>) {
3301            self.objects = field;
3302        }
3303        ///Sets `objects` with the provided value.
3304        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3305            self.set_objects(field);
3306            self
3307        }
3308    }
3309    impl super::ConsensusCommitPrologue {
3310        pub const fn const_default() -> Self {
3311            Self {
3312                epoch: None,
3313                round: None,
3314                commit_timestamp: None,
3315                consensus_commit_digest: None,
3316                sub_dag_index: None,
3317                consensus_determined_version_assignments: None,
3318                additional_state_digest: None,
3319            }
3320        }
3321        #[doc(hidden)]
3322        pub fn default_instance() -> &'static Self {
3323            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3324            &DEFAULT
3325        }
3326        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3327        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3328            self.epoch.as_mut().map(|field| field as _)
3329        }
3330        ///Returns a mutable reference to `epoch`.
3331        ///If the field is unset, it is first initialized with the default value.
3332        pub fn epoch_mut(&mut self) -> &mut u64 {
3333            self.epoch.get_or_insert_default()
3334        }
3335        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3336        pub fn epoch_opt(&self) -> Option<u64> {
3337            self.epoch.as_ref().map(|field| *field)
3338        }
3339        ///Sets `epoch` with the provided value.
3340        pub fn set_epoch(&mut self, field: u64) {
3341            self.epoch = Some(field);
3342        }
3343        ///Sets `epoch` with the provided value.
3344        pub fn with_epoch(mut self, field: u64) -> Self {
3345            self.set_epoch(field);
3346            self
3347        }
3348        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3349        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3350            self.round.as_mut().map(|field| field as _)
3351        }
3352        ///Returns a mutable reference to `round`.
3353        ///If the field is unset, it is first initialized with the default value.
3354        pub fn round_mut(&mut self) -> &mut u64 {
3355            self.round.get_or_insert_default()
3356        }
3357        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3358        pub fn round_opt(&self) -> Option<u64> {
3359            self.round.as_ref().map(|field| *field)
3360        }
3361        ///Sets `round` with the provided value.
3362        pub fn set_round(&mut self, field: u64) {
3363            self.round = Some(field);
3364        }
3365        ///Sets `round` with the provided value.
3366        pub fn with_round(mut self, field: u64) -> Self {
3367            self.set_round(field);
3368            self
3369        }
3370        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3371        pub fn commit_timestamp_opt_mut(
3372            &mut self,
3373        ) -> Option<&mut ::prost_types::Timestamp> {
3374            self.commit_timestamp.as_mut().map(|field| field as _)
3375        }
3376        ///Returns a mutable reference to `commit_timestamp`.
3377        ///If the field is unset, it is first initialized with the default value.
3378        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3379            self.commit_timestamp.get_or_insert_default()
3380        }
3381        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3382        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3383            self.commit_timestamp.as_ref().map(|field| field as _)
3384        }
3385        ///Sets `commit_timestamp` with the provided value.
3386        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3387            &mut self,
3388            field: T,
3389        ) {
3390            self.commit_timestamp = Some(field.into().into());
3391        }
3392        ///Sets `commit_timestamp` with the provided value.
3393        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3394            mut self,
3395            field: T,
3396        ) -> Self {
3397            self.set_commit_timestamp(field.into());
3398            self
3399        }
3400        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3401        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3402            self.consensus_commit_digest.as_mut().map(|field| field as _)
3403        }
3404        ///Returns a mutable reference to `consensus_commit_digest`.
3405        ///If the field is unset, it is first initialized with the default value.
3406        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3407            self.consensus_commit_digest.get_or_insert_default()
3408        }
3409        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3410        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3411            self.consensus_commit_digest.as_ref().map(|field| field as _)
3412        }
3413        ///Sets `consensus_commit_digest` with the provided value.
3414        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3415            self.consensus_commit_digest = Some(field.into().into());
3416        }
3417        ///Sets `consensus_commit_digest` with the provided value.
3418        pub fn with_consensus_commit_digest<T: Into<String>>(
3419            mut self,
3420            field: T,
3421        ) -> Self {
3422            self.set_consensus_commit_digest(field.into());
3423            self
3424        }
3425        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3426        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3427            self.sub_dag_index.as_mut().map(|field| field as _)
3428        }
3429        ///Returns a mutable reference to `sub_dag_index`.
3430        ///If the field is unset, it is first initialized with the default value.
3431        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3432            self.sub_dag_index.get_or_insert_default()
3433        }
3434        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3435        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3436            self.sub_dag_index.as_ref().map(|field| *field)
3437        }
3438        ///Sets `sub_dag_index` with the provided value.
3439        pub fn set_sub_dag_index(&mut self, field: u64) {
3440            self.sub_dag_index = Some(field);
3441        }
3442        ///Sets `sub_dag_index` with the provided value.
3443        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3444            self.set_sub_dag_index(field);
3445            self
3446        }
3447        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3448        pub fn consensus_determined_version_assignments(
3449            &self,
3450        ) -> &super::ConsensusDeterminedVersionAssignments {
3451            self.consensus_determined_version_assignments
3452                .as_ref()
3453                .map(|field| field as _)
3454                .unwrap_or_else(|| {
3455                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3456                })
3457        }
3458        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3459        pub fn consensus_determined_version_assignments_opt_mut(
3460            &mut self,
3461        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3462            self.consensus_determined_version_assignments
3463                .as_mut()
3464                .map(|field| field as _)
3465        }
3466        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3467        ///If the field is unset, it is first initialized with the default value.
3468        pub fn consensus_determined_version_assignments_mut(
3469            &mut self,
3470        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3471            self.consensus_determined_version_assignments.get_or_insert_default()
3472        }
3473        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3474        pub fn consensus_determined_version_assignments_opt(
3475            &self,
3476        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3477            self.consensus_determined_version_assignments
3478                .as_ref()
3479                .map(|field| field as _)
3480        }
3481        ///Sets `consensus_determined_version_assignments` with the provided value.
3482        pub fn set_consensus_determined_version_assignments<
3483            T: Into<super::ConsensusDeterminedVersionAssignments>,
3484        >(&mut self, field: T) {
3485            self.consensus_determined_version_assignments = Some(field.into().into());
3486        }
3487        ///Sets `consensus_determined_version_assignments` with the provided value.
3488        pub fn with_consensus_determined_version_assignments<
3489            T: Into<super::ConsensusDeterminedVersionAssignments>,
3490        >(mut self, field: T) -> Self {
3491            self.set_consensus_determined_version_assignments(field.into());
3492            self
3493        }
3494        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3495        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3496            self.additional_state_digest.as_mut().map(|field| field as _)
3497        }
3498        ///Returns a mutable reference to `additional_state_digest`.
3499        ///If the field is unset, it is first initialized with the default value.
3500        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3501            self.additional_state_digest.get_or_insert_default()
3502        }
3503        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3504        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3505            self.additional_state_digest.as_ref().map(|field| field as _)
3506        }
3507        ///Sets `additional_state_digest` with the provided value.
3508        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3509            self.additional_state_digest = Some(field.into().into());
3510        }
3511        ///Sets `additional_state_digest` with the provided value.
3512        pub fn with_additional_state_digest<T: Into<String>>(
3513            mut self,
3514            field: T,
3515        ) -> Self {
3516            self.set_additional_state_digest(field.into());
3517            self
3518        }
3519    }
3520    impl super::ConsensusDeterminedVersionAssignments {
3521        pub const fn const_default() -> Self {
3522            Self {
3523                version: None,
3524                canceled_transactions: Vec::new(),
3525            }
3526        }
3527        #[doc(hidden)]
3528        pub fn default_instance() -> &'static Self {
3529            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3530            &DEFAULT
3531        }
3532        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3533        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3534            self.version.as_mut().map(|field| field as _)
3535        }
3536        ///Returns a mutable reference to `version`.
3537        ///If the field is unset, it is first initialized with the default value.
3538        pub fn version_mut(&mut self) -> &mut i32 {
3539            self.version.get_or_insert_default()
3540        }
3541        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3542        pub fn version_opt(&self) -> Option<i32> {
3543            self.version.as_ref().map(|field| *field)
3544        }
3545        ///Sets `version` with the provided value.
3546        pub fn set_version(&mut self, field: i32) {
3547            self.version = Some(field);
3548        }
3549        ///Sets `version` with the provided value.
3550        pub fn with_version(mut self, field: i32) -> Self {
3551            self.set_version(field);
3552            self
3553        }
3554        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3555        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3556            &self.canceled_transactions
3557        }
3558        ///Returns a mutable reference to `canceled_transactions`.
3559        ///If the field is unset, it is first initialized with the default value.
3560        pub fn canceled_transactions_mut(
3561            &mut self,
3562        ) -> &mut Vec<super::CanceledTransaction> {
3563            &mut self.canceled_transactions
3564        }
3565        ///Sets `canceled_transactions` with the provided value.
3566        pub fn set_canceled_transactions(
3567            &mut self,
3568            field: Vec<super::CanceledTransaction>,
3569        ) {
3570            self.canceled_transactions = field;
3571        }
3572        ///Sets `canceled_transactions` with the provided value.
3573        pub fn with_canceled_transactions(
3574            mut self,
3575            field: Vec<super::CanceledTransaction>,
3576        ) -> Self {
3577            self.set_canceled_transactions(field);
3578            self
3579        }
3580    }
3581    impl super::DatatypeDescriptor {
3582        pub const fn const_default() -> Self {
3583            Self {
3584                type_name: None,
3585                defining_id: None,
3586                module: None,
3587                name: None,
3588                abilities: Vec::new(),
3589                type_parameters: Vec::new(),
3590                kind: None,
3591                fields: Vec::new(),
3592                variants: Vec::new(),
3593            }
3594        }
3595        #[doc(hidden)]
3596        pub fn default_instance() -> &'static Self {
3597            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3598            &DEFAULT
3599        }
3600        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3601        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3602            self.type_name.as_mut().map(|field| field as _)
3603        }
3604        ///Returns a mutable reference to `type_name`.
3605        ///If the field is unset, it is first initialized with the default value.
3606        pub fn type_name_mut(&mut self) -> &mut String {
3607            self.type_name.get_or_insert_default()
3608        }
3609        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3610        pub fn type_name_opt(&self) -> Option<&str> {
3611            self.type_name.as_ref().map(|field| field as _)
3612        }
3613        ///Sets `type_name` with the provided value.
3614        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3615            self.type_name = Some(field.into().into());
3616        }
3617        ///Sets `type_name` with the provided value.
3618        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3619            self.set_type_name(field.into());
3620            self
3621        }
3622        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3623        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3624            self.defining_id.as_mut().map(|field| field as _)
3625        }
3626        ///Returns a mutable reference to `defining_id`.
3627        ///If the field is unset, it is first initialized with the default value.
3628        pub fn defining_id_mut(&mut self) -> &mut String {
3629            self.defining_id.get_or_insert_default()
3630        }
3631        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3632        pub fn defining_id_opt(&self) -> Option<&str> {
3633            self.defining_id.as_ref().map(|field| field as _)
3634        }
3635        ///Sets `defining_id` with the provided value.
3636        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3637            self.defining_id = Some(field.into().into());
3638        }
3639        ///Sets `defining_id` with the provided value.
3640        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3641            self.set_defining_id(field.into());
3642            self
3643        }
3644        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3645        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3646            self.module.as_mut().map(|field| field as _)
3647        }
3648        ///Returns a mutable reference to `module`.
3649        ///If the field is unset, it is first initialized with the default value.
3650        pub fn module_mut(&mut self) -> &mut String {
3651            self.module.get_or_insert_default()
3652        }
3653        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3654        pub fn module_opt(&self) -> Option<&str> {
3655            self.module.as_ref().map(|field| field as _)
3656        }
3657        ///Sets `module` with the provided value.
3658        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3659            self.module = Some(field.into().into());
3660        }
3661        ///Sets `module` with the provided value.
3662        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3663            self.set_module(field.into());
3664            self
3665        }
3666        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3667        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3668            self.name.as_mut().map(|field| field as _)
3669        }
3670        ///Returns a mutable reference to `name`.
3671        ///If the field is unset, it is first initialized with the default value.
3672        pub fn name_mut(&mut self) -> &mut String {
3673            self.name.get_or_insert_default()
3674        }
3675        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3676        pub fn name_opt(&self) -> Option<&str> {
3677            self.name.as_ref().map(|field| field as _)
3678        }
3679        ///Sets `name` with the provided value.
3680        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3681            self.name = Some(field.into().into());
3682        }
3683        ///Sets `name` with the provided value.
3684        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3685            self.set_name(field.into());
3686            self
3687        }
3688        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3689        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3690            &self.type_parameters
3691        }
3692        ///Returns a mutable reference to `type_parameters`.
3693        ///If the field is unset, it is first initialized with the default value.
3694        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3695            &mut self.type_parameters
3696        }
3697        ///Sets `type_parameters` with the provided value.
3698        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3699            self.type_parameters = field;
3700        }
3701        ///Sets `type_parameters` with the provided value.
3702        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3703            self.set_type_parameters(field);
3704            self
3705        }
3706        ///Sets `kind` with the provided value.
3707        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3708            mut self,
3709            field: T,
3710        ) -> Self {
3711            self.set_kind(field.into());
3712            self
3713        }
3714        ///Returns the value of `fields`, or the default value if `fields` is unset.
3715        pub fn fields(&self) -> &[super::FieldDescriptor] {
3716            &self.fields
3717        }
3718        ///Returns a mutable reference to `fields`.
3719        ///If the field is unset, it is first initialized with the default value.
3720        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3721            &mut self.fields
3722        }
3723        ///Sets `fields` with the provided value.
3724        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3725            self.fields = field;
3726        }
3727        ///Sets `fields` with the provided value.
3728        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3729            self.set_fields(field);
3730            self
3731        }
3732        ///Returns the value of `variants`, or the default value if `variants` is unset.
3733        pub fn variants(&self) -> &[super::VariantDescriptor] {
3734            &self.variants
3735        }
3736        ///Returns a mutable reference to `variants`.
3737        ///If the field is unset, it is first initialized with the default value.
3738        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3739            &mut self.variants
3740        }
3741        ///Sets `variants` with the provided value.
3742        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3743            self.variants = field;
3744        }
3745        ///Sets `variants` with the provided value.
3746        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3747            self.set_variants(field);
3748            self
3749        }
3750    }
3751    impl super::DynamicField {
3752        pub const fn const_default() -> Self {
3753            Self {
3754                kind: None,
3755                parent: None,
3756                field_id: None,
3757                field_object: None,
3758                name: None,
3759                value: None,
3760                value_type: None,
3761                child_id: None,
3762                child_object: None,
3763            }
3764        }
3765        #[doc(hidden)]
3766        pub fn default_instance() -> &'static Self {
3767            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3768            &DEFAULT
3769        }
3770        ///Sets `kind` with the provided value.
3771        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3772            mut self,
3773            field: T,
3774        ) -> Self {
3775            self.set_kind(field.into());
3776            self
3777        }
3778        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3779        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3780            self.parent.as_mut().map(|field| field as _)
3781        }
3782        ///Returns a mutable reference to `parent`.
3783        ///If the field is unset, it is first initialized with the default value.
3784        pub fn parent_mut(&mut self) -> &mut String {
3785            self.parent.get_or_insert_default()
3786        }
3787        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
3788        pub fn parent_opt(&self) -> Option<&str> {
3789            self.parent.as_ref().map(|field| field as _)
3790        }
3791        ///Sets `parent` with the provided value.
3792        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3793            self.parent = Some(field.into().into());
3794        }
3795        ///Sets `parent` with the provided value.
3796        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3797            self.set_parent(field.into());
3798            self
3799        }
3800        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3801        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3802            self.field_id.as_mut().map(|field| field as _)
3803        }
3804        ///Returns a mutable reference to `field_id`.
3805        ///If the field is unset, it is first initialized with the default value.
3806        pub fn field_id_mut(&mut self) -> &mut String {
3807            self.field_id.get_or_insert_default()
3808        }
3809        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3810        pub fn field_id_opt(&self) -> Option<&str> {
3811            self.field_id.as_ref().map(|field| field as _)
3812        }
3813        ///Sets `field_id` with the provided value.
3814        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
3815            self.field_id = Some(field.into().into());
3816        }
3817        ///Sets `field_id` with the provided value.
3818        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
3819            self.set_field_id(field.into());
3820            self
3821        }
3822        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
3823        pub fn field_object(&self) -> &super::Object {
3824            self.field_object
3825                .as_ref()
3826                .map(|field| field as _)
3827                .unwrap_or_else(|| super::Object::default_instance() as _)
3828        }
3829        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3830        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3831            self.field_object.as_mut().map(|field| field as _)
3832        }
3833        ///Returns a mutable reference to `field_object`.
3834        ///If the field is unset, it is first initialized with the default value.
3835        pub fn field_object_mut(&mut self) -> &mut super::Object {
3836            self.field_object.get_or_insert_default()
3837        }
3838        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
3839        pub fn field_object_opt(&self) -> Option<&super::Object> {
3840            self.field_object.as_ref().map(|field| field as _)
3841        }
3842        ///Sets `field_object` with the provided value.
3843        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
3844            self.field_object = Some(field.into().into());
3845        }
3846        ///Sets `field_object` with the provided value.
3847        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3848            self.set_field_object(field.into());
3849            self
3850        }
3851        ///Returns the value of `name`, or the default value if `name` is unset.
3852        pub fn name(&self) -> &super::Bcs {
3853            self.name
3854                .as_ref()
3855                .map(|field| field as _)
3856                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3857        }
3858        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3859        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3860            self.name.as_mut().map(|field| field as _)
3861        }
3862        ///Returns a mutable reference to `name`.
3863        ///If the field is unset, it is first initialized with the default value.
3864        pub fn name_mut(&mut self) -> &mut super::Bcs {
3865            self.name.get_or_insert_default()
3866        }
3867        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3868        pub fn name_opt(&self) -> Option<&super::Bcs> {
3869            self.name.as_ref().map(|field| field as _)
3870        }
3871        ///Sets `name` with the provided value.
3872        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
3873            self.name = Some(field.into().into());
3874        }
3875        ///Sets `name` with the provided value.
3876        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3877            self.set_name(field.into());
3878            self
3879        }
3880        ///Returns the value of `value`, or the default value if `value` is unset.
3881        pub fn value(&self) -> &super::Bcs {
3882            self.value
3883                .as_ref()
3884                .map(|field| field as _)
3885                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3886        }
3887        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3888        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3889            self.value.as_mut().map(|field| field as _)
3890        }
3891        ///Returns a mutable reference to `value`.
3892        ///If the field is unset, it is first initialized with the default value.
3893        pub fn value_mut(&mut self) -> &mut super::Bcs {
3894            self.value.get_or_insert_default()
3895        }
3896        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3897        pub fn value_opt(&self) -> Option<&super::Bcs> {
3898            self.value.as_ref().map(|field| field as _)
3899        }
3900        ///Sets `value` with the provided value.
3901        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3902            self.value = Some(field.into().into());
3903        }
3904        ///Sets `value` with the provided value.
3905        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3906            self.set_value(field.into());
3907            self
3908        }
3909        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3910        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
3911            self.value_type.as_mut().map(|field| field as _)
3912        }
3913        ///Returns a mutable reference to `value_type`.
3914        ///If the field is unset, it is first initialized with the default value.
3915        pub fn value_type_mut(&mut self) -> &mut String {
3916            self.value_type.get_or_insert_default()
3917        }
3918        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
3919        pub fn value_type_opt(&self) -> Option<&str> {
3920            self.value_type.as_ref().map(|field| field as _)
3921        }
3922        ///Sets `value_type` with the provided value.
3923        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
3924            self.value_type = Some(field.into().into());
3925        }
3926        ///Sets `value_type` with the provided value.
3927        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
3928            self.set_value_type(field.into());
3929            self
3930        }
3931        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3932        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
3933            self.child_id.as_mut().map(|field| field as _)
3934        }
3935        ///Returns a mutable reference to `child_id`.
3936        ///If the field is unset, it is first initialized with the default value.
3937        pub fn child_id_mut(&mut self) -> &mut String {
3938            self.child_id.get_or_insert_default()
3939        }
3940        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3941        pub fn child_id_opt(&self) -> Option<&str> {
3942            self.child_id.as_ref().map(|field| field as _)
3943        }
3944        ///Sets `child_id` with the provided value.
3945        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
3946            self.child_id = Some(field.into().into());
3947        }
3948        ///Sets `child_id` with the provided value.
3949        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
3950            self.set_child_id(field.into());
3951            self
3952        }
3953        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
3954        pub fn child_object(&self) -> &super::Object {
3955            self.child_object
3956                .as_ref()
3957                .map(|field| field as _)
3958                .unwrap_or_else(|| super::Object::default_instance() as _)
3959        }
3960        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3961        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3962            self.child_object.as_mut().map(|field| field as _)
3963        }
3964        ///Returns a mutable reference to `child_object`.
3965        ///If the field is unset, it is first initialized with the default value.
3966        pub fn child_object_mut(&mut self) -> &mut super::Object {
3967            self.child_object.get_or_insert_default()
3968        }
3969        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
3970        pub fn child_object_opt(&self) -> Option<&super::Object> {
3971            self.child_object.as_ref().map(|field| field as _)
3972        }
3973        ///Sets `child_object` with the provided value.
3974        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
3975            self.child_object = Some(field.into().into());
3976        }
3977        ///Sets `child_object` with the provided value.
3978        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3979            self.set_child_object(field.into());
3980            self
3981        }
3982    }
3983    impl super::EndOfEpochData {
3984        pub const fn const_default() -> Self {
3985            Self {
3986                next_epoch_committee: Vec::new(),
3987                next_epoch_protocol_version: None,
3988                epoch_commitments: Vec::new(),
3989            }
3990        }
3991        #[doc(hidden)]
3992        pub fn default_instance() -> &'static Self {
3993            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
3994            &DEFAULT
3995        }
3996        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
3997        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
3998            &self.next_epoch_committee
3999        }
4000        ///Returns a mutable reference to `next_epoch_committee`.
4001        ///If the field is unset, it is first initialized with the default value.
4002        pub fn next_epoch_committee_mut(
4003            &mut self,
4004        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4005            &mut self.next_epoch_committee
4006        }
4007        ///Sets `next_epoch_committee` with the provided value.
4008        pub fn set_next_epoch_committee(
4009            &mut self,
4010            field: Vec<super::ValidatorCommitteeMember>,
4011        ) {
4012            self.next_epoch_committee = field;
4013        }
4014        ///Sets `next_epoch_committee` with the provided value.
4015        pub fn with_next_epoch_committee(
4016            mut self,
4017            field: Vec<super::ValidatorCommitteeMember>,
4018        ) -> Self {
4019            self.set_next_epoch_committee(field);
4020            self
4021        }
4022        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4023        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4024            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4025        }
4026        ///Returns a mutable reference to `next_epoch_protocol_version`.
4027        ///If the field is unset, it is first initialized with the default value.
4028        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4029            self.next_epoch_protocol_version.get_or_insert_default()
4030        }
4031        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4032        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4033            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4034        }
4035        ///Sets `next_epoch_protocol_version` with the provided value.
4036        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4037            self.next_epoch_protocol_version = Some(field);
4038        }
4039        ///Sets `next_epoch_protocol_version` with the provided value.
4040        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4041            self.set_next_epoch_protocol_version(field);
4042            self
4043        }
4044        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4045        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4046            &self.epoch_commitments
4047        }
4048        ///Returns a mutable reference to `epoch_commitments`.
4049        ///If the field is unset, it is first initialized with the default value.
4050        pub fn epoch_commitments_mut(
4051            &mut self,
4052        ) -> &mut Vec<super::CheckpointCommitment> {
4053            &mut self.epoch_commitments
4054        }
4055        ///Sets `epoch_commitments` with the provided value.
4056        pub fn set_epoch_commitments(
4057            &mut self,
4058            field: Vec<super::CheckpointCommitment>,
4059        ) {
4060            self.epoch_commitments = field;
4061        }
4062        ///Sets `epoch_commitments` with the provided value.
4063        pub fn with_epoch_commitments(
4064            mut self,
4065            field: Vec<super::CheckpointCommitment>,
4066        ) -> Self {
4067            self.set_epoch_commitments(field);
4068            self
4069        }
4070    }
4071    impl super::EndOfEpochTransaction {
4072        pub const fn const_default() -> Self {
4073            Self { transactions: Vec::new() }
4074        }
4075        #[doc(hidden)]
4076        pub fn default_instance() -> &'static Self {
4077            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4078            &DEFAULT
4079        }
4080        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4081        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4082            &self.transactions
4083        }
4084        ///Returns a mutable reference to `transactions`.
4085        ///If the field is unset, it is first initialized with the default value.
4086        pub fn transactions_mut(
4087            &mut self,
4088        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4089            &mut self.transactions
4090        }
4091        ///Sets `transactions` with the provided value.
4092        pub fn set_transactions(
4093            &mut self,
4094            field: Vec<super::EndOfEpochTransactionKind>,
4095        ) {
4096            self.transactions = field;
4097        }
4098        ///Sets `transactions` with the provided value.
4099        pub fn with_transactions(
4100            mut self,
4101            field: Vec<super::EndOfEpochTransactionKind>,
4102        ) -> Self {
4103            self.set_transactions(field);
4104            self
4105        }
4106    }
4107    impl super::EndOfEpochTransactionKind {
4108        pub const fn const_default() -> Self {
4109            Self { kind: None, data: None }
4110        }
4111        #[doc(hidden)]
4112        pub fn default_instance() -> &'static Self {
4113            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4114            &DEFAULT
4115        }
4116        ///Sets `kind` with the provided value.
4117        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4118            mut self,
4119            field: T,
4120        ) -> Self {
4121            self.set_kind(field.into());
4122            self
4123        }
4124        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4125        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4126            if let Some(
4127                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4128            ) = &self.data
4129            {
4130                field as _
4131            } else {
4132                super::ChangeEpoch::default_instance() as _
4133            }
4134        }
4135        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4136        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4137            if let Some(
4138                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4139            ) = &self.data
4140            {
4141                Some(field as _)
4142            } else {
4143                None
4144            }
4145        }
4146        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4147        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4148            if let Some(
4149                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4150            ) = &mut self.data
4151            {
4152                Some(field as _)
4153            } else {
4154                None
4155            }
4156        }
4157        ///Returns a mutable reference to `change_epoch`.
4158        ///If the field is unset, it is first initialized with the default value.
4159        ///If any other oneof field in the same oneof is set, it will be cleared.
4160        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4161            if self.change_epoch_opt_mut().is_none() {
4162                self.data = Some(
4163                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4164                        super::ChangeEpoch::default(),
4165                    ),
4166                );
4167            }
4168            self.change_epoch_opt_mut().unwrap()
4169        }
4170        ///Sets `change_epoch` with the provided value.
4171        ///If any other oneof field in the same oneof is set, it will be cleared.
4172        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4173            self.data = Some(
4174                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4175                    field.into().into(),
4176                ),
4177            );
4178        }
4179        ///Sets `change_epoch` with the provided value.
4180        ///If any other oneof field in the same oneof is set, it will be cleared.
4181        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4182            mut self,
4183            field: T,
4184        ) -> Self {
4185            self.set_change_epoch(field.into());
4186            self
4187        }
4188        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4189        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4190            if let Some(
4191                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4192                    field,
4193                ),
4194            ) = &self.data
4195            {
4196                field as _
4197            } else {
4198                super::AuthenticatorStateExpire::default_instance() as _
4199            }
4200        }
4201        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4202        pub fn authenticator_state_expire_opt(
4203            &self,
4204        ) -> Option<&super::AuthenticatorStateExpire> {
4205            if let Some(
4206                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4207                    field,
4208                ),
4209            ) = &self.data
4210            {
4211                Some(field as _)
4212            } else {
4213                None
4214            }
4215        }
4216        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4217        pub fn authenticator_state_expire_opt_mut(
4218            &mut self,
4219        ) -> Option<&mut super::AuthenticatorStateExpire> {
4220            if let Some(
4221                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4222                    field,
4223                ),
4224            ) = &mut self.data
4225            {
4226                Some(field as _)
4227            } else {
4228                None
4229            }
4230        }
4231        ///Returns a mutable reference to `authenticator_state_expire`.
4232        ///If the field is unset, it is first initialized with the default value.
4233        ///If any other oneof field in the same oneof is set, it will be cleared.
4234        pub fn authenticator_state_expire_mut(
4235            &mut self,
4236        ) -> &mut super::AuthenticatorStateExpire {
4237            if self.authenticator_state_expire_opt_mut().is_none() {
4238                self.data = Some(
4239                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4240                        super::AuthenticatorStateExpire::default(),
4241                    ),
4242                );
4243            }
4244            self.authenticator_state_expire_opt_mut().unwrap()
4245        }
4246        ///Sets `authenticator_state_expire` with the provided value.
4247        ///If any other oneof field in the same oneof is set, it will be cleared.
4248        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4249            &mut self,
4250            field: T,
4251        ) {
4252            self.data = Some(
4253                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4254                    field.into().into(),
4255                ),
4256            );
4257        }
4258        ///Sets `authenticator_state_expire` with the provided value.
4259        ///If any other oneof field in the same oneof is set, it will be cleared.
4260        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4261            mut self,
4262            field: T,
4263        ) -> Self {
4264            self.set_authenticator_state_expire(field.into());
4265            self
4266        }
4267        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4268        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4269            if let Some(
4270                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4271                    field,
4272                ),
4273            ) = &self.data
4274            {
4275                field as _
4276            } else {
4277                super::ExecutionTimeObservations::default_instance() as _
4278            }
4279        }
4280        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4281        pub fn execution_time_observations_opt(
4282            &self,
4283        ) -> Option<&super::ExecutionTimeObservations> {
4284            if let Some(
4285                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4286                    field,
4287                ),
4288            ) = &self.data
4289            {
4290                Some(field as _)
4291            } else {
4292                None
4293            }
4294        }
4295        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4296        pub fn execution_time_observations_opt_mut(
4297            &mut self,
4298        ) -> Option<&mut super::ExecutionTimeObservations> {
4299            if let Some(
4300                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4301                    field,
4302                ),
4303            ) = &mut self.data
4304            {
4305                Some(field as _)
4306            } else {
4307                None
4308            }
4309        }
4310        ///Returns a mutable reference to `execution_time_observations`.
4311        ///If the field is unset, it is first initialized with the default value.
4312        ///If any other oneof field in the same oneof is set, it will be cleared.
4313        pub fn execution_time_observations_mut(
4314            &mut self,
4315        ) -> &mut super::ExecutionTimeObservations {
4316            if self.execution_time_observations_opt_mut().is_none() {
4317                self.data = Some(
4318                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4319                        super::ExecutionTimeObservations::default(),
4320                    ),
4321                );
4322            }
4323            self.execution_time_observations_opt_mut().unwrap()
4324        }
4325        ///Sets `execution_time_observations` with the provided value.
4326        ///If any other oneof field in the same oneof is set, it will be cleared.
4327        pub fn set_execution_time_observations<
4328            T: Into<super::ExecutionTimeObservations>,
4329        >(&mut self, field: T) {
4330            self.data = Some(
4331                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4332                    field.into().into(),
4333                ),
4334            );
4335        }
4336        ///Sets `execution_time_observations` with the provided value.
4337        ///If any other oneof field in the same oneof is set, it will be cleared.
4338        pub fn with_execution_time_observations<
4339            T: Into<super::ExecutionTimeObservations>,
4340        >(mut self, field: T) -> Self {
4341            self.set_execution_time_observations(field.into());
4342            self
4343        }
4344        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4345        pub fn bridge_chain_id(&self) -> &str {
4346            if let Some(
4347                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4348            ) = &self.data
4349            {
4350                field as _
4351            } else {
4352                ""
4353            }
4354        }
4355        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4356        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4357            if let Some(
4358                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4359            ) = &self.data
4360            {
4361                Some(field as _)
4362            } else {
4363                None
4364            }
4365        }
4366        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4367        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4368            if let Some(
4369                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4370            ) = &mut self.data
4371            {
4372                Some(field as _)
4373            } else {
4374                None
4375            }
4376        }
4377        ///Returns a mutable reference to `bridge_chain_id`.
4378        ///If the field is unset, it is first initialized with the default value.
4379        ///If any other oneof field in the same oneof is set, it will be cleared.
4380        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4381            if self.bridge_chain_id_opt_mut().is_none() {
4382                self.data = Some(
4383                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4384                        String::default(),
4385                    ),
4386                );
4387            }
4388            self.bridge_chain_id_opt_mut().unwrap()
4389        }
4390        ///Sets `bridge_chain_id` with the provided value.
4391        ///If any other oneof field in the same oneof is set, it will be cleared.
4392        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4393            self.data = Some(
4394                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4395                    field.into().into(),
4396                ),
4397            );
4398        }
4399        ///Sets `bridge_chain_id` with the provided value.
4400        ///If any other oneof field in the same oneof is set, it will be cleared.
4401        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4402            self.set_bridge_chain_id(field.into());
4403            self
4404        }
4405        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4406        pub fn bridge_object_version(&self) -> u64 {
4407            if let Some(
4408                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4409            ) = &self.data
4410            {
4411                *field
4412            } else {
4413                0u64
4414            }
4415        }
4416        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4417        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4418            if let Some(
4419                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4420            ) = &self.data
4421            {
4422                Some(*field)
4423            } else {
4424                None
4425            }
4426        }
4427        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4428        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4429            if let Some(
4430                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4431            ) = &mut self.data
4432            {
4433                Some(field as _)
4434            } else {
4435                None
4436            }
4437        }
4438        ///Returns a mutable reference to `bridge_object_version`.
4439        ///If the field is unset, it is first initialized with the default value.
4440        ///If any other oneof field in the same oneof is set, it will be cleared.
4441        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4442            if self.bridge_object_version_opt_mut().is_none() {
4443                self.data = Some(
4444                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4445                        u64::default(),
4446                    ),
4447                );
4448            }
4449            self.bridge_object_version_opt_mut().unwrap()
4450        }
4451        ///Sets `bridge_object_version` with the provided value.
4452        ///If any other oneof field in the same oneof is set, it will be cleared.
4453        pub fn set_bridge_object_version(&mut self, field: u64) {
4454            self.data = Some(
4455                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4456            );
4457        }
4458        ///Sets `bridge_object_version` with the provided value.
4459        ///If any other oneof field in the same oneof is set, it will be cleared.
4460        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4461            self.set_bridge_object_version(field);
4462            self
4463        }
4464    }
4465    impl super::Epoch {
4466        pub const fn const_default() -> Self {
4467            Self {
4468                epoch: None,
4469                committee: None,
4470                system_state: None,
4471                first_checkpoint: None,
4472                last_checkpoint: None,
4473                start: None,
4474                end: None,
4475                reference_gas_price: None,
4476                protocol_config: None,
4477            }
4478        }
4479        #[doc(hidden)]
4480        pub fn default_instance() -> &'static Self {
4481            static DEFAULT: super::Epoch = super::Epoch::const_default();
4482            &DEFAULT
4483        }
4484        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4485        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4486            self.epoch.as_mut().map(|field| field as _)
4487        }
4488        ///Returns a mutable reference to `epoch`.
4489        ///If the field is unset, it is first initialized with the default value.
4490        pub fn epoch_mut(&mut self) -> &mut u64 {
4491            self.epoch.get_or_insert_default()
4492        }
4493        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4494        pub fn epoch_opt(&self) -> Option<u64> {
4495            self.epoch.as_ref().map(|field| *field)
4496        }
4497        ///Sets `epoch` with the provided value.
4498        pub fn set_epoch(&mut self, field: u64) {
4499            self.epoch = Some(field);
4500        }
4501        ///Sets `epoch` with the provided value.
4502        pub fn with_epoch(mut self, field: u64) -> Self {
4503            self.set_epoch(field);
4504            self
4505        }
4506        ///Returns the value of `committee`, or the default value if `committee` is unset.
4507        pub fn committee(&self) -> &super::ValidatorCommittee {
4508            self.committee
4509                .as_ref()
4510                .map(|field| field as _)
4511                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4512        }
4513        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4514        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4515            self.committee.as_mut().map(|field| field as _)
4516        }
4517        ///Returns a mutable reference to `committee`.
4518        ///If the field is unset, it is first initialized with the default value.
4519        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4520            self.committee.get_or_insert_default()
4521        }
4522        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4523        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4524            self.committee.as_ref().map(|field| field as _)
4525        }
4526        ///Sets `committee` with the provided value.
4527        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4528            self.committee = Some(field.into().into());
4529        }
4530        ///Sets `committee` with the provided value.
4531        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4532            mut self,
4533            field: T,
4534        ) -> Self {
4535            self.set_committee(field.into());
4536            self
4537        }
4538        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4539        pub fn system_state(&self) -> &super::SystemState {
4540            self.system_state
4541                .as_ref()
4542                .map(|field| field as _)
4543                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4544        }
4545        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4546        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4547            self.system_state.as_mut().map(|field| field as _)
4548        }
4549        ///Returns a mutable reference to `system_state`.
4550        ///If the field is unset, it is first initialized with the default value.
4551        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4552            self.system_state.get_or_insert_default()
4553        }
4554        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4555        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4556            self.system_state.as_ref().map(|field| field as _)
4557        }
4558        ///Sets `system_state` with the provided value.
4559        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4560            self.system_state = Some(field.into().into());
4561        }
4562        ///Sets `system_state` with the provided value.
4563        pub fn with_system_state<T: Into<super::SystemState>>(
4564            mut self,
4565            field: T,
4566        ) -> Self {
4567            self.set_system_state(field.into());
4568            self
4569        }
4570        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4571        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4572            self.first_checkpoint.as_mut().map(|field| field as _)
4573        }
4574        ///Returns a mutable reference to `first_checkpoint`.
4575        ///If the field is unset, it is first initialized with the default value.
4576        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4577            self.first_checkpoint.get_or_insert_default()
4578        }
4579        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4580        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4581            self.first_checkpoint.as_ref().map(|field| *field)
4582        }
4583        ///Sets `first_checkpoint` with the provided value.
4584        pub fn set_first_checkpoint(&mut self, field: u64) {
4585            self.first_checkpoint = Some(field);
4586        }
4587        ///Sets `first_checkpoint` with the provided value.
4588        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4589            self.set_first_checkpoint(field);
4590            self
4591        }
4592        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4593        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4594            self.last_checkpoint.as_mut().map(|field| field as _)
4595        }
4596        ///Returns a mutable reference to `last_checkpoint`.
4597        ///If the field is unset, it is first initialized with the default value.
4598        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4599            self.last_checkpoint.get_or_insert_default()
4600        }
4601        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4602        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4603            self.last_checkpoint.as_ref().map(|field| *field)
4604        }
4605        ///Sets `last_checkpoint` with the provided value.
4606        pub fn set_last_checkpoint(&mut self, field: u64) {
4607            self.last_checkpoint = Some(field);
4608        }
4609        ///Sets `last_checkpoint` with the provided value.
4610        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4611            self.set_last_checkpoint(field);
4612            self
4613        }
4614        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4615        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4616            self.start.as_mut().map(|field| field as _)
4617        }
4618        ///Returns a mutable reference to `start`.
4619        ///If the field is unset, it is first initialized with the default value.
4620        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4621            self.start.get_or_insert_default()
4622        }
4623        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4624        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4625            self.start.as_ref().map(|field| field as _)
4626        }
4627        ///Sets `start` with the provided value.
4628        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4629            self.start = Some(field.into().into());
4630        }
4631        ///Sets `start` with the provided value.
4632        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4633            mut self,
4634            field: T,
4635        ) -> Self {
4636            self.set_start(field.into());
4637            self
4638        }
4639        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4640        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4641            self.end.as_mut().map(|field| field as _)
4642        }
4643        ///Returns a mutable reference to `end`.
4644        ///If the field is unset, it is first initialized with the default value.
4645        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4646            self.end.get_or_insert_default()
4647        }
4648        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4649        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4650            self.end.as_ref().map(|field| field as _)
4651        }
4652        ///Sets `end` with the provided value.
4653        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4654            self.end = Some(field.into().into());
4655        }
4656        ///Sets `end` with the provided value.
4657        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4658            self.set_end(field.into());
4659            self
4660        }
4661        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4662        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4663            self.reference_gas_price.as_mut().map(|field| field as _)
4664        }
4665        ///Returns a mutable reference to `reference_gas_price`.
4666        ///If the field is unset, it is first initialized with the default value.
4667        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4668            self.reference_gas_price.get_or_insert_default()
4669        }
4670        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
4671        pub fn reference_gas_price_opt(&self) -> Option<u64> {
4672            self.reference_gas_price.as_ref().map(|field| *field)
4673        }
4674        ///Sets `reference_gas_price` with the provided value.
4675        pub fn set_reference_gas_price(&mut self, field: u64) {
4676            self.reference_gas_price = Some(field);
4677        }
4678        ///Sets `reference_gas_price` with the provided value.
4679        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4680            self.set_reference_gas_price(field);
4681            self
4682        }
4683        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
4684        pub fn protocol_config(&self) -> &super::ProtocolConfig {
4685            self.protocol_config
4686                .as_ref()
4687                .map(|field| field as _)
4688                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4689        }
4690        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4691        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4692            self.protocol_config.as_mut().map(|field| field as _)
4693        }
4694        ///Returns a mutable reference to `protocol_config`.
4695        ///If the field is unset, it is first initialized with the default value.
4696        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4697            self.protocol_config.get_or_insert_default()
4698        }
4699        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
4700        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4701            self.protocol_config.as_ref().map(|field| field as _)
4702        }
4703        ///Sets `protocol_config` with the provided value.
4704        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4705            self.protocol_config = Some(field.into().into());
4706        }
4707        ///Sets `protocol_config` with the provided value.
4708        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4709            mut self,
4710            field: T,
4711        ) -> Self {
4712            self.set_protocol_config(field.into());
4713            self
4714        }
4715    }
4716    impl super::Event {
4717        pub const fn const_default() -> Self {
4718            Self {
4719                package_id: None,
4720                module: None,
4721                sender: None,
4722                event_type: None,
4723                contents: None,
4724                json: None,
4725            }
4726        }
4727        #[doc(hidden)]
4728        pub fn default_instance() -> &'static Self {
4729            static DEFAULT: super::Event = super::Event::const_default();
4730            &DEFAULT
4731        }
4732        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4733        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4734            self.package_id.as_mut().map(|field| field as _)
4735        }
4736        ///Returns a mutable reference to `package_id`.
4737        ///If the field is unset, it is first initialized with the default value.
4738        pub fn package_id_mut(&mut self) -> &mut String {
4739            self.package_id.get_or_insert_default()
4740        }
4741        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4742        pub fn package_id_opt(&self) -> Option<&str> {
4743            self.package_id.as_ref().map(|field| field as _)
4744        }
4745        ///Sets `package_id` with the provided value.
4746        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4747            self.package_id = Some(field.into().into());
4748        }
4749        ///Sets `package_id` with the provided value.
4750        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4751            self.set_package_id(field.into());
4752            self
4753        }
4754        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4755        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4756            self.module.as_mut().map(|field| field as _)
4757        }
4758        ///Returns a mutable reference to `module`.
4759        ///If the field is unset, it is first initialized with the default value.
4760        pub fn module_mut(&mut self) -> &mut String {
4761            self.module.get_or_insert_default()
4762        }
4763        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4764        pub fn module_opt(&self) -> Option<&str> {
4765            self.module.as_ref().map(|field| field as _)
4766        }
4767        ///Sets `module` with the provided value.
4768        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4769            self.module = Some(field.into().into());
4770        }
4771        ///Sets `module` with the provided value.
4772        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4773            self.set_module(field.into());
4774            self
4775        }
4776        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4777        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4778            self.sender.as_mut().map(|field| field as _)
4779        }
4780        ///Returns a mutable reference to `sender`.
4781        ///If the field is unset, it is first initialized with the default value.
4782        pub fn sender_mut(&mut self) -> &mut String {
4783            self.sender.get_or_insert_default()
4784        }
4785        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
4786        pub fn sender_opt(&self) -> Option<&str> {
4787            self.sender.as_ref().map(|field| field as _)
4788        }
4789        ///Sets `sender` with the provided value.
4790        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4791            self.sender = Some(field.into().into());
4792        }
4793        ///Sets `sender` with the provided value.
4794        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4795            self.set_sender(field.into());
4796            self
4797        }
4798        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4799        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4800            self.event_type.as_mut().map(|field| field as _)
4801        }
4802        ///Returns a mutable reference to `event_type`.
4803        ///If the field is unset, it is first initialized with the default value.
4804        pub fn event_type_mut(&mut self) -> &mut String {
4805            self.event_type.get_or_insert_default()
4806        }
4807        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4808        pub fn event_type_opt(&self) -> Option<&str> {
4809            self.event_type.as_ref().map(|field| field as _)
4810        }
4811        ///Sets `event_type` with the provided value.
4812        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4813            self.event_type = Some(field.into().into());
4814        }
4815        ///Sets `event_type` with the provided value.
4816        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
4817            self.set_event_type(field.into());
4818            self
4819        }
4820        ///Returns the value of `contents`, or the default value if `contents` is unset.
4821        pub fn contents(&self) -> &super::Bcs {
4822            self.contents
4823                .as_ref()
4824                .map(|field| field as _)
4825                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4826        }
4827        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4828        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4829            self.contents.as_mut().map(|field| field as _)
4830        }
4831        ///Returns a mutable reference to `contents`.
4832        ///If the field is unset, it is first initialized with the default value.
4833        pub fn contents_mut(&mut self) -> &mut super::Bcs {
4834            self.contents.get_or_insert_default()
4835        }
4836        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
4837        pub fn contents_opt(&self) -> Option<&super::Bcs> {
4838            self.contents.as_ref().map(|field| field as _)
4839        }
4840        ///Sets `contents` with the provided value.
4841        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
4842            self.contents = Some(field.into().into());
4843        }
4844        ///Sets `contents` with the provided value.
4845        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4846            self.set_contents(field.into());
4847            self
4848        }
4849        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4850        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4851            self.json.as_mut().map(|field| field as _)
4852        }
4853        ///Returns a mutable reference to `json`.
4854        ///If the field is unset, it is first initialized with the default value.
4855        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
4856            self.json.get_or_insert_default()
4857        }
4858        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
4859        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
4860            self.json.as_ref().map(|field| field as _)
4861        }
4862        ///Sets `json` with the provided value.
4863        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
4864            self.json = Some(field.into().into());
4865        }
4866        ///Sets `json` with the provided value.
4867        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4868            self.set_json(field.into());
4869            self
4870        }
4871    }
4872    impl super::ExecuteTransactionRequest {
4873        pub const fn const_default() -> Self {
4874            Self {
4875                transaction: None,
4876                signatures: Vec::new(),
4877                read_mask: None,
4878            }
4879        }
4880        #[doc(hidden)]
4881        pub fn default_instance() -> &'static Self {
4882            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
4883            &DEFAULT
4884        }
4885        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
4886        pub fn transaction(&self) -> &super::Transaction {
4887            self.transaction
4888                .as_ref()
4889                .map(|field| field as _)
4890                .unwrap_or_else(|| super::Transaction::default_instance() as _)
4891        }
4892        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4893        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
4894            self.transaction.as_mut().map(|field| field as _)
4895        }
4896        ///Returns a mutable reference to `transaction`.
4897        ///If the field is unset, it is first initialized with the default value.
4898        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
4899            self.transaction.get_or_insert_default()
4900        }
4901        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
4902        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
4903            self.transaction.as_ref().map(|field| field as _)
4904        }
4905        ///Sets `transaction` with the provided value.
4906        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
4907            self.transaction = Some(field.into().into());
4908        }
4909        ///Sets `transaction` with the provided value.
4910        pub fn with_transaction<T: Into<super::Transaction>>(
4911            mut self,
4912            field: T,
4913        ) -> Self {
4914            self.set_transaction(field.into());
4915            self
4916        }
4917        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
4918        pub fn signatures(&self) -> &[super::UserSignature] {
4919            &self.signatures
4920        }
4921        ///Returns a mutable reference to `signatures`.
4922        ///If the field is unset, it is first initialized with the default value.
4923        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
4924            &mut self.signatures
4925        }
4926        ///Sets `signatures` with the provided value.
4927        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
4928            self.signatures = field;
4929        }
4930        ///Sets `signatures` with the provided value.
4931        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
4932            self.set_signatures(field);
4933            self
4934        }
4935        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4936        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
4937            self.read_mask.as_mut().map(|field| field as _)
4938        }
4939        ///Returns a mutable reference to `read_mask`.
4940        ///If the field is unset, it is first initialized with the default value.
4941        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
4942            self.read_mask.get_or_insert_default()
4943        }
4944        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
4945        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
4946            self.read_mask.as_ref().map(|field| field as _)
4947        }
4948        ///Sets `read_mask` with the provided value.
4949        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
4950            self.read_mask = Some(field.into().into());
4951        }
4952        ///Sets `read_mask` with the provided value.
4953        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
4954            mut self,
4955            field: T,
4956        ) -> Self {
4957            self.set_read_mask(field.into());
4958            self
4959        }
4960    }
4961    impl super::ExecuteTransactionResponse {
4962        pub const fn const_default() -> Self {
4963            Self { transaction: None }
4964        }
4965        #[doc(hidden)]
4966        pub fn default_instance() -> &'static Self {
4967            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
4968            &DEFAULT
4969        }
4970        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
4971        pub fn transaction(&self) -> &super::ExecutedTransaction {
4972            self.transaction
4973                .as_ref()
4974                .map(|field| field as _)
4975                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
4976        }
4977        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4978        pub fn transaction_opt_mut(
4979            &mut self,
4980        ) -> Option<&mut super::ExecutedTransaction> {
4981            self.transaction.as_mut().map(|field| field as _)
4982        }
4983        ///Returns a mutable reference to `transaction`.
4984        ///If the field is unset, it is first initialized with the default value.
4985        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
4986            self.transaction.get_or_insert_default()
4987        }
4988        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
4989        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
4990            self.transaction.as_ref().map(|field| field as _)
4991        }
4992        ///Sets `transaction` with the provided value.
4993        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
4994            &mut self,
4995            field: T,
4996        ) {
4997            self.transaction = Some(field.into().into());
4998        }
4999        ///Sets `transaction` with the provided value.
5000        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5001            mut self,
5002            field: T,
5003        ) -> Self {
5004            self.set_transaction(field.into());
5005            self
5006        }
5007    }
5008    impl super::ExecutedTransaction {
5009        pub const fn const_default() -> Self {
5010            Self {
5011                digest: None,
5012                transaction: None,
5013                signatures: Vec::new(),
5014                effects: None,
5015                events: None,
5016                checkpoint: None,
5017                timestamp: None,
5018                balance_changes: Vec::new(),
5019                objects: None,
5020            }
5021        }
5022        #[doc(hidden)]
5023        pub fn default_instance() -> &'static Self {
5024            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5025            &DEFAULT
5026        }
5027        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5028        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5029            self.digest.as_mut().map(|field| field as _)
5030        }
5031        ///Returns a mutable reference to `digest`.
5032        ///If the field is unset, it is first initialized with the default value.
5033        pub fn digest_mut(&mut self) -> &mut String {
5034            self.digest.get_or_insert_default()
5035        }
5036        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5037        pub fn digest_opt(&self) -> Option<&str> {
5038            self.digest.as_ref().map(|field| field as _)
5039        }
5040        ///Sets `digest` with the provided value.
5041        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5042            self.digest = Some(field.into().into());
5043        }
5044        ///Sets `digest` with the provided value.
5045        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5046            self.set_digest(field.into());
5047            self
5048        }
5049        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5050        pub fn transaction(&self) -> &super::Transaction {
5051            self.transaction
5052                .as_ref()
5053                .map(|field| field as _)
5054                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5055        }
5056        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5057        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5058            self.transaction.as_mut().map(|field| field as _)
5059        }
5060        ///Returns a mutable reference to `transaction`.
5061        ///If the field is unset, it is first initialized with the default value.
5062        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5063            self.transaction.get_or_insert_default()
5064        }
5065        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5066        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5067            self.transaction.as_ref().map(|field| field as _)
5068        }
5069        ///Sets `transaction` with the provided value.
5070        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5071            self.transaction = Some(field.into().into());
5072        }
5073        ///Sets `transaction` with the provided value.
5074        pub fn with_transaction<T: Into<super::Transaction>>(
5075            mut self,
5076            field: T,
5077        ) -> Self {
5078            self.set_transaction(field.into());
5079            self
5080        }
5081        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5082        pub fn signatures(&self) -> &[super::UserSignature] {
5083            &self.signatures
5084        }
5085        ///Returns a mutable reference to `signatures`.
5086        ///If the field is unset, it is first initialized with the default value.
5087        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5088            &mut self.signatures
5089        }
5090        ///Sets `signatures` with the provided value.
5091        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5092            self.signatures = field;
5093        }
5094        ///Sets `signatures` with the provided value.
5095        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5096            self.set_signatures(field);
5097            self
5098        }
5099        ///Returns the value of `effects`, or the default value if `effects` is unset.
5100        pub fn effects(&self) -> &super::TransactionEffects {
5101            self.effects
5102                .as_ref()
5103                .map(|field| field as _)
5104                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5105        }
5106        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5107        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5108            self.effects.as_mut().map(|field| field as _)
5109        }
5110        ///Returns a mutable reference to `effects`.
5111        ///If the field is unset, it is first initialized with the default value.
5112        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5113            self.effects.get_or_insert_default()
5114        }
5115        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5116        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5117            self.effects.as_ref().map(|field| field as _)
5118        }
5119        ///Sets `effects` with the provided value.
5120        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5121            self.effects = Some(field.into().into());
5122        }
5123        ///Sets `effects` with the provided value.
5124        pub fn with_effects<T: Into<super::TransactionEffects>>(
5125            mut self,
5126            field: T,
5127        ) -> Self {
5128            self.set_effects(field.into());
5129            self
5130        }
5131        ///Returns the value of `events`, or the default value if `events` is unset.
5132        pub fn events(&self) -> &super::TransactionEvents {
5133            self.events
5134                .as_ref()
5135                .map(|field| field as _)
5136                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5137        }
5138        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5139        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5140            self.events.as_mut().map(|field| field as _)
5141        }
5142        ///Returns a mutable reference to `events`.
5143        ///If the field is unset, it is first initialized with the default value.
5144        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5145            self.events.get_or_insert_default()
5146        }
5147        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5148        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5149            self.events.as_ref().map(|field| field as _)
5150        }
5151        ///Sets `events` with the provided value.
5152        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5153            self.events = Some(field.into().into());
5154        }
5155        ///Sets `events` with the provided value.
5156        pub fn with_events<T: Into<super::TransactionEvents>>(
5157            mut self,
5158            field: T,
5159        ) -> Self {
5160            self.set_events(field.into());
5161            self
5162        }
5163        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5164        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5165            self.checkpoint.as_mut().map(|field| field as _)
5166        }
5167        ///Returns a mutable reference to `checkpoint`.
5168        ///If the field is unset, it is first initialized with the default value.
5169        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5170            self.checkpoint.get_or_insert_default()
5171        }
5172        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5173        pub fn checkpoint_opt(&self) -> Option<u64> {
5174            self.checkpoint.as_ref().map(|field| *field)
5175        }
5176        ///Sets `checkpoint` with the provided value.
5177        pub fn set_checkpoint(&mut self, field: u64) {
5178            self.checkpoint = Some(field);
5179        }
5180        ///Sets `checkpoint` with the provided value.
5181        pub fn with_checkpoint(mut self, field: u64) -> Self {
5182            self.set_checkpoint(field);
5183            self
5184        }
5185        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5186        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5187            self.timestamp.as_mut().map(|field| field as _)
5188        }
5189        ///Returns a mutable reference to `timestamp`.
5190        ///If the field is unset, it is first initialized with the default value.
5191        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5192            self.timestamp.get_or_insert_default()
5193        }
5194        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5195        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5196            self.timestamp.as_ref().map(|field| field as _)
5197        }
5198        ///Sets `timestamp` with the provided value.
5199        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5200            self.timestamp = Some(field.into().into());
5201        }
5202        ///Sets `timestamp` with the provided value.
5203        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5204            mut self,
5205            field: T,
5206        ) -> Self {
5207            self.set_timestamp(field.into());
5208            self
5209        }
5210        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5211        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5212            &self.balance_changes
5213        }
5214        ///Returns a mutable reference to `balance_changes`.
5215        ///If the field is unset, it is first initialized with the default value.
5216        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5217            &mut self.balance_changes
5218        }
5219        ///Sets `balance_changes` with the provided value.
5220        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5221            self.balance_changes = field;
5222        }
5223        ///Sets `balance_changes` with the provided value.
5224        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5225            self.set_balance_changes(field);
5226            self
5227        }
5228        ///Returns the value of `objects`, or the default value if `objects` is unset.
5229        pub fn objects(&self) -> &super::ObjectSet {
5230            self.objects
5231                .as_ref()
5232                .map(|field| field as _)
5233                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5234        }
5235        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5236        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5237            self.objects.as_mut().map(|field| field as _)
5238        }
5239        ///Returns a mutable reference to `objects`.
5240        ///If the field is unset, it is first initialized with the default value.
5241        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5242            self.objects.get_or_insert_default()
5243        }
5244        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5245        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5246            self.objects.as_ref().map(|field| field as _)
5247        }
5248        ///Sets `objects` with the provided value.
5249        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5250            self.objects = Some(field.into().into());
5251        }
5252        ///Sets `objects` with the provided value.
5253        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5254            self.set_objects(field.into());
5255            self
5256        }
5257    }
5258    impl super::ExecutionError {
5259        pub const fn const_default() -> Self {
5260            Self {
5261                description: None,
5262                command: None,
5263                kind: None,
5264                error_details: None,
5265            }
5266        }
5267        #[doc(hidden)]
5268        pub fn default_instance() -> &'static Self {
5269            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5270            &DEFAULT
5271        }
5272        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5273        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5274            self.description.as_mut().map(|field| field as _)
5275        }
5276        ///Returns a mutable reference to `description`.
5277        ///If the field is unset, it is first initialized with the default value.
5278        pub fn description_mut(&mut self) -> &mut String {
5279            self.description.get_or_insert_default()
5280        }
5281        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5282        pub fn description_opt(&self) -> Option<&str> {
5283            self.description.as_ref().map(|field| field as _)
5284        }
5285        ///Sets `description` with the provided value.
5286        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5287            self.description = Some(field.into().into());
5288        }
5289        ///Sets `description` with the provided value.
5290        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5291            self.set_description(field.into());
5292            self
5293        }
5294        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5295        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5296            self.command.as_mut().map(|field| field as _)
5297        }
5298        ///Returns a mutable reference to `command`.
5299        ///If the field is unset, it is first initialized with the default value.
5300        pub fn command_mut(&mut self) -> &mut u64 {
5301            self.command.get_or_insert_default()
5302        }
5303        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5304        pub fn command_opt(&self) -> Option<u64> {
5305            self.command.as_ref().map(|field| *field)
5306        }
5307        ///Sets `command` with the provided value.
5308        pub fn set_command(&mut self, field: u64) {
5309            self.command = Some(field);
5310        }
5311        ///Sets `command` with the provided value.
5312        pub fn with_command(mut self, field: u64) -> Self {
5313            self.set_command(field);
5314            self
5315        }
5316        ///Sets `kind` with the provided value.
5317        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5318            mut self,
5319            field: T,
5320        ) -> Self {
5321            self.set_kind(field.into());
5322            self
5323        }
5324        ///Returns the value of `abort`, or the default value if `abort` is unset.
5325        pub fn abort(&self) -> &super::MoveAbort {
5326            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5327                .error_details
5328            {
5329                field as _
5330            } else {
5331                super::MoveAbort::default_instance() as _
5332            }
5333        }
5334        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5335        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5336            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5337                .error_details
5338            {
5339                Some(field as _)
5340            } else {
5341                None
5342            }
5343        }
5344        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5345        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5346            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5347                .error_details
5348            {
5349                Some(field as _)
5350            } else {
5351                None
5352            }
5353        }
5354        ///Returns a mutable reference to `abort`.
5355        ///If the field is unset, it is first initialized with the default value.
5356        ///If any other oneof field in the same oneof is set, it will be cleared.
5357        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5358            if self.abort_opt_mut().is_none() {
5359                self.error_details = Some(
5360                    super::execution_error::ErrorDetails::Abort(
5361                        super::MoveAbort::default(),
5362                    ),
5363                );
5364            }
5365            self.abort_opt_mut().unwrap()
5366        }
5367        ///Sets `abort` with the provided value.
5368        ///If any other oneof field in the same oneof is set, it will be cleared.
5369        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5370            self.error_details = Some(
5371                super::execution_error::ErrorDetails::Abort(field.into().into()),
5372            );
5373        }
5374        ///Sets `abort` with the provided value.
5375        ///If any other oneof field in the same oneof is set, it will be cleared.
5376        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5377            self.set_abort(field.into());
5378            self
5379        }
5380        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5381        pub fn size_error(&self) -> &super::SizeError {
5382            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5383                .error_details
5384            {
5385                field as _
5386            } else {
5387                super::SizeError::default_instance() as _
5388            }
5389        }
5390        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5391        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5392            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5393                .error_details
5394            {
5395                Some(field as _)
5396            } else {
5397                None
5398            }
5399        }
5400        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5401        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5402            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5403                .error_details
5404            {
5405                Some(field as _)
5406            } else {
5407                None
5408            }
5409        }
5410        ///Returns a mutable reference to `size_error`.
5411        ///If the field is unset, it is first initialized with the default value.
5412        ///If any other oneof field in the same oneof is set, it will be cleared.
5413        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5414            if self.size_error_opt_mut().is_none() {
5415                self.error_details = Some(
5416                    super::execution_error::ErrorDetails::SizeError(
5417                        super::SizeError::default(),
5418                    ),
5419                );
5420            }
5421            self.size_error_opt_mut().unwrap()
5422        }
5423        ///Sets `size_error` with the provided value.
5424        ///If any other oneof field in the same oneof is set, it will be cleared.
5425        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5426            self.error_details = Some(
5427                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5428            );
5429        }
5430        ///Sets `size_error` with the provided value.
5431        ///If any other oneof field in the same oneof is set, it will be cleared.
5432        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5433            self.set_size_error(field.into());
5434            self
5435        }
5436        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5437        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5438            if let Some(
5439                super::execution_error::ErrorDetails::CommandArgumentError(field),
5440            ) = &self.error_details
5441            {
5442                field as _
5443            } else {
5444                super::CommandArgumentError::default_instance() as _
5445            }
5446        }
5447        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5448        pub fn command_argument_error_opt(
5449            &self,
5450        ) -> Option<&super::CommandArgumentError> {
5451            if let Some(
5452                super::execution_error::ErrorDetails::CommandArgumentError(field),
5453            ) = &self.error_details
5454            {
5455                Some(field as _)
5456            } else {
5457                None
5458            }
5459        }
5460        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5461        pub fn command_argument_error_opt_mut(
5462            &mut self,
5463        ) -> Option<&mut super::CommandArgumentError> {
5464            if let Some(
5465                super::execution_error::ErrorDetails::CommandArgumentError(field),
5466            ) = &mut self.error_details
5467            {
5468                Some(field as _)
5469            } else {
5470                None
5471            }
5472        }
5473        ///Returns a mutable reference to `command_argument_error`.
5474        ///If the field is unset, it is first initialized with the default value.
5475        ///If any other oneof field in the same oneof is set, it will be cleared.
5476        pub fn command_argument_error_mut(
5477            &mut self,
5478        ) -> &mut super::CommandArgumentError {
5479            if self.command_argument_error_opt_mut().is_none() {
5480                self.error_details = Some(
5481                    super::execution_error::ErrorDetails::CommandArgumentError(
5482                        super::CommandArgumentError::default(),
5483                    ),
5484                );
5485            }
5486            self.command_argument_error_opt_mut().unwrap()
5487        }
5488        ///Sets `command_argument_error` with the provided value.
5489        ///If any other oneof field in the same oneof is set, it will be cleared.
5490        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5491            &mut self,
5492            field: T,
5493        ) {
5494            self.error_details = Some(
5495                super::execution_error::ErrorDetails::CommandArgumentError(
5496                    field.into().into(),
5497                ),
5498            );
5499        }
5500        ///Sets `command_argument_error` with the provided value.
5501        ///If any other oneof field in the same oneof is set, it will be cleared.
5502        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5503            mut self,
5504            field: T,
5505        ) -> Self {
5506            self.set_command_argument_error(field.into());
5507            self
5508        }
5509        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5510        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5511            if let Some(
5512                super::execution_error::ErrorDetails::TypeArgumentError(field),
5513            ) = &self.error_details
5514            {
5515                field as _
5516            } else {
5517                super::TypeArgumentError::default_instance() as _
5518            }
5519        }
5520        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5521        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5522            if let Some(
5523                super::execution_error::ErrorDetails::TypeArgumentError(field),
5524            ) = &self.error_details
5525            {
5526                Some(field as _)
5527            } else {
5528                None
5529            }
5530        }
5531        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5532        pub fn type_argument_error_opt_mut(
5533            &mut self,
5534        ) -> Option<&mut super::TypeArgumentError> {
5535            if let Some(
5536                super::execution_error::ErrorDetails::TypeArgumentError(field),
5537            ) = &mut self.error_details
5538            {
5539                Some(field as _)
5540            } else {
5541                None
5542            }
5543        }
5544        ///Returns a mutable reference to `type_argument_error`.
5545        ///If the field is unset, it is first initialized with the default value.
5546        ///If any other oneof field in the same oneof is set, it will be cleared.
5547        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5548            if self.type_argument_error_opt_mut().is_none() {
5549                self.error_details = Some(
5550                    super::execution_error::ErrorDetails::TypeArgumentError(
5551                        super::TypeArgumentError::default(),
5552                    ),
5553                );
5554            }
5555            self.type_argument_error_opt_mut().unwrap()
5556        }
5557        ///Sets `type_argument_error` with the provided value.
5558        ///If any other oneof field in the same oneof is set, it will be cleared.
5559        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5560            &mut self,
5561            field: T,
5562        ) {
5563            self.error_details = Some(
5564                super::execution_error::ErrorDetails::TypeArgumentError(
5565                    field.into().into(),
5566                ),
5567            );
5568        }
5569        ///Sets `type_argument_error` with the provided value.
5570        ///If any other oneof field in the same oneof is set, it will be cleared.
5571        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5572            mut self,
5573            field: T,
5574        ) -> Self {
5575            self.set_type_argument_error(field.into());
5576            self
5577        }
5578        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5579        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5580            if let Some(
5581                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5582            ) = &self.error_details
5583            {
5584                field as _
5585            } else {
5586                super::PackageUpgradeError::default_instance() as _
5587            }
5588        }
5589        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5590        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5591            if let Some(
5592                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5593            ) = &self.error_details
5594            {
5595                Some(field as _)
5596            } else {
5597                None
5598            }
5599        }
5600        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5601        pub fn package_upgrade_error_opt_mut(
5602            &mut self,
5603        ) -> Option<&mut super::PackageUpgradeError> {
5604            if let Some(
5605                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5606            ) = &mut self.error_details
5607            {
5608                Some(field as _)
5609            } else {
5610                None
5611            }
5612        }
5613        ///Returns a mutable reference to `package_upgrade_error`.
5614        ///If the field is unset, it is first initialized with the default value.
5615        ///If any other oneof field in the same oneof is set, it will be cleared.
5616        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5617            if self.package_upgrade_error_opt_mut().is_none() {
5618                self.error_details = Some(
5619                    super::execution_error::ErrorDetails::PackageUpgradeError(
5620                        super::PackageUpgradeError::default(),
5621                    ),
5622                );
5623            }
5624            self.package_upgrade_error_opt_mut().unwrap()
5625        }
5626        ///Sets `package_upgrade_error` with the provided value.
5627        ///If any other oneof field in the same oneof is set, it will be cleared.
5628        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5629            &mut self,
5630            field: T,
5631        ) {
5632            self.error_details = Some(
5633                super::execution_error::ErrorDetails::PackageUpgradeError(
5634                    field.into().into(),
5635                ),
5636            );
5637        }
5638        ///Sets `package_upgrade_error` with the provided value.
5639        ///If any other oneof field in the same oneof is set, it will be cleared.
5640        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5641            mut self,
5642            field: T,
5643        ) -> Self {
5644            self.set_package_upgrade_error(field.into());
5645            self
5646        }
5647        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5648        pub fn index_error(&self) -> &super::IndexError {
5649            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5650                .error_details
5651            {
5652                field as _
5653            } else {
5654                super::IndexError::default_instance() as _
5655            }
5656        }
5657        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5658        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5659            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5660                .error_details
5661            {
5662                Some(field as _)
5663            } else {
5664                None
5665            }
5666        }
5667        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5668        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5669            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5670                .error_details
5671            {
5672                Some(field as _)
5673            } else {
5674                None
5675            }
5676        }
5677        ///Returns a mutable reference to `index_error`.
5678        ///If the field is unset, it is first initialized with the default value.
5679        ///If any other oneof field in the same oneof is set, it will be cleared.
5680        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5681            if self.index_error_opt_mut().is_none() {
5682                self.error_details = Some(
5683                    super::execution_error::ErrorDetails::IndexError(
5684                        super::IndexError::default(),
5685                    ),
5686                );
5687            }
5688            self.index_error_opt_mut().unwrap()
5689        }
5690        ///Sets `index_error` with the provided value.
5691        ///If any other oneof field in the same oneof is set, it will be cleared.
5692        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5693            self.error_details = Some(
5694                super::execution_error::ErrorDetails::IndexError(field.into().into()),
5695            );
5696        }
5697        ///Sets `index_error` with the provided value.
5698        ///If any other oneof field in the same oneof is set, it will be cleared.
5699        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5700            self.set_index_error(field.into());
5701            self
5702        }
5703        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
5704        pub fn object_id(&self) -> &str {
5705            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5706                .error_details
5707            {
5708                field as _
5709            } else {
5710                ""
5711            }
5712        }
5713        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5714        pub fn object_id_opt(&self) -> Option<&str> {
5715            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5716                .error_details
5717            {
5718                Some(field as _)
5719            } else {
5720                None
5721            }
5722        }
5723        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5724        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5725            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5726                .error_details
5727            {
5728                Some(field as _)
5729            } else {
5730                None
5731            }
5732        }
5733        ///Returns a mutable reference to `object_id`.
5734        ///If the field is unset, it is first initialized with the default value.
5735        ///If any other oneof field in the same oneof is set, it will be cleared.
5736        pub fn object_id_mut(&mut self) -> &mut String {
5737            if self.object_id_opt_mut().is_none() {
5738                self.error_details = Some(
5739                    super::execution_error::ErrorDetails::ObjectId(String::default()),
5740                );
5741            }
5742            self.object_id_opt_mut().unwrap()
5743        }
5744        ///Sets `object_id` with the provided value.
5745        ///If any other oneof field in the same oneof is set, it will be cleared.
5746        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5747            self.error_details = Some(
5748                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5749            );
5750        }
5751        ///Sets `object_id` with the provided value.
5752        ///If any other oneof field in the same oneof is set, it will be cleared.
5753        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5754            self.set_object_id(field.into());
5755            self
5756        }
5757        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
5758        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5759            if let Some(
5760                super::execution_error::ErrorDetails::CoinDenyListError(field),
5761            ) = &self.error_details
5762            {
5763                field as _
5764            } else {
5765                super::CoinDenyListError::default_instance() as _
5766            }
5767        }
5768        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5769        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5770            if let Some(
5771                super::execution_error::ErrorDetails::CoinDenyListError(field),
5772            ) = &self.error_details
5773            {
5774                Some(field as _)
5775            } else {
5776                None
5777            }
5778        }
5779        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5780        pub fn coin_deny_list_error_opt_mut(
5781            &mut self,
5782        ) -> Option<&mut super::CoinDenyListError> {
5783            if let Some(
5784                super::execution_error::ErrorDetails::CoinDenyListError(field),
5785            ) = &mut self.error_details
5786            {
5787                Some(field as _)
5788            } else {
5789                None
5790            }
5791        }
5792        ///Returns a mutable reference to `coin_deny_list_error`.
5793        ///If the field is unset, it is first initialized with the default value.
5794        ///If any other oneof field in the same oneof is set, it will be cleared.
5795        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5796            if self.coin_deny_list_error_opt_mut().is_none() {
5797                self.error_details = Some(
5798                    super::execution_error::ErrorDetails::CoinDenyListError(
5799                        super::CoinDenyListError::default(),
5800                    ),
5801                );
5802            }
5803            self.coin_deny_list_error_opt_mut().unwrap()
5804        }
5805        ///Sets `coin_deny_list_error` with the provided value.
5806        ///If any other oneof field in the same oneof is set, it will be cleared.
5807        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5808            &mut self,
5809            field: T,
5810        ) {
5811            self.error_details = Some(
5812                super::execution_error::ErrorDetails::CoinDenyListError(
5813                    field.into().into(),
5814                ),
5815            );
5816        }
5817        ///Sets `coin_deny_list_error` with the provided value.
5818        ///If any other oneof field in the same oneof is set, it will be cleared.
5819        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5820            mut self,
5821            field: T,
5822        ) -> Self {
5823            self.set_coin_deny_list_error(field.into());
5824            self
5825        }
5826        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
5827        pub fn congested_objects(&self) -> &super::CongestedObjects {
5828            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5829                .error_details
5830            {
5831                field as _
5832            } else {
5833                super::CongestedObjects::default_instance() as _
5834            }
5835        }
5836        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5837        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
5838            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5839                .error_details
5840            {
5841                Some(field as _)
5842            } else {
5843                None
5844            }
5845        }
5846        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5847        pub fn congested_objects_opt_mut(
5848            &mut self,
5849        ) -> Option<&mut super::CongestedObjects> {
5850            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
5851                .error_details
5852            {
5853                Some(field as _)
5854            } else {
5855                None
5856            }
5857        }
5858        ///Returns a mutable reference to `congested_objects`.
5859        ///If the field is unset, it is first initialized with the default value.
5860        ///If any other oneof field in the same oneof is set, it will be cleared.
5861        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
5862            if self.congested_objects_opt_mut().is_none() {
5863                self.error_details = Some(
5864                    super::execution_error::ErrorDetails::CongestedObjects(
5865                        super::CongestedObjects::default(),
5866                    ),
5867                );
5868            }
5869            self.congested_objects_opt_mut().unwrap()
5870        }
5871        ///Sets `congested_objects` with the provided value.
5872        ///If any other oneof field in the same oneof is set, it will be cleared.
5873        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
5874            &mut self,
5875            field: T,
5876        ) {
5877            self.error_details = Some(
5878                super::execution_error::ErrorDetails::CongestedObjects(
5879                    field.into().into(),
5880                ),
5881            );
5882        }
5883        ///Sets `congested_objects` with the provided value.
5884        ///If any other oneof field in the same oneof is set, it will be cleared.
5885        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
5886            mut self,
5887            field: T,
5888        ) -> Self {
5889            self.set_congested_objects(field.into());
5890            self
5891        }
5892    }
5893    impl super::ExecutionStatus {
5894        pub const fn const_default() -> Self {
5895            Self { success: None, error: None }
5896        }
5897        #[doc(hidden)]
5898        pub fn default_instance() -> &'static Self {
5899            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
5900            &DEFAULT
5901        }
5902        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5903        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
5904            self.success.as_mut().map(|field| field as _)
5905        }
5906        ///Returns a mutable reference to `success`.
5907        ///If the field is unset, it is first initialized with the default value.
5908        pub fn success_mut(&mut self) -> &mut bool {
5909            self.success.get_or_insert_default()
5910        }
5911        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
5912        pub fn success_opt(&self) -> Option<bool> {
5913            self.success.as_ref().map(|field| *field)
5914        }
5915        ///Sets `success` with the provided value.
5916        pub fn set_success(&mut self, field: bool) {
5917            self.success = Some(field);
5918        }
5919        ///Sets `success` with the provided value.
5920        pub fn with_success(mut self, field: bool) -> Self {
5921            self.set_success(field);
5922            self
5923        }
5924        ///Returns the value of `error`, or the default value if `error` is unset.
5925        pub fn error(&self) -> &super::ExecutionError {
5926            self.error
5927                .as_ref()
5928                .map(|field| field as _)
5929                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
5930        }
5931        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5932        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
5933            self.error.as_mut().map(|field| field as _)
5934        }
5935        ///Returns a mutable reference to `error`.
5936        ///If the field is unset, it is first initialized with the default value.
5937        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
5938            self.error.get_or_insert_default()
5939        }
5940        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5941        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
5942            self.error.as_ref().map(|field| field as _)
5943        }
5944        ///Sets `error` with the provided value.
5945        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
5946            self.error = Some(field.into().into());
5947        }
5948        ///Sets `error` with the provided value.
5949        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
5950            self.set_error(field.into());
5951            self
5952        }
5953    }
5954    impl super::ExecutionTimeObservation {
5955        pub const fn const_default() -> Self {
5956            Self {
5957                kind: None,
5958                move_entry_point: None,
5959                validator_observations: Vec::new(),
5960            }
5961        }
5962        #[doc(hidden)]
5963        pub fn default_instance() -> &'static Self {
5964            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
5965            &DEFAULT
5966        }
5967        ///Sets `kind` with the provided value.
5968        pub fn with_kind<
5969            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
5970        >(mut self, field: T) -> Self {
5971            self.set_kind(field.into());
5972            self
5973        }
5974        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
5975        pub fn move_entry_point(&self) -> &super::MoveCall {
5976            self.move_entry_point
5977                .as_ref()
5978                .map(|field| field as _)
5979                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
5980        }
5981        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5982        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
5983            self.move_entry_point.as_mut().map(|field| field as _)
5984        }
5985        ///Returns a mutable reference to `move_entry_point`.
5986        ///If the field is unset, it is first initialized with the default value.
5987        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
5988            self.move_entry_point.get_or_insert_default()
5989        }
5990        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
5991        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
5992            self.move_entry_point.as_ref().map(|field| field as _)
5993        }
5994        ///Sets `move_entry_point` with the provided value.
5995        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
5996            self.move_entry_point = Some(field.into().into());
5997        }
5998        ///Sets `move_entry_point` with the provided value.
5999        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6000            mut self,
6001            field: T,
6002        ) -> Self {
6003            self.set_move_entry_point(field.into());
6004            self
6005        }
6006        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6007        pub fn validator_observations(
6008            &self,
6009        ) -> &[super::ValidatorExecutionTimeObservation] {
6010            &self.validator_observations
6011        }
6012        ///Returns a mutable reference to `validator_observations`.
6013        ///If the field is unset, it is first initialized with the default value.
6014        pub fn validator_observations_mut(
6015            &mut self,
6016        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6017            &mut self.validator_observations
6018        }
6019        ///Sets `validator_observations` with the provided value.
6020        pub fn set_validator_observations(
6021            &mut self,
6022            field: Vec<super::ValidatorExecutionTimeObservation>,
6023        ) {
6024            self.validator_observations = field;
6025        }
6026        ///Sets `validator_observations` with the provided value.
6027        pub fn with_validator_observations(
6028            mut self,
6029            field: Vec<super::ValidatorExecutionTimeObservation>,
6030        ) -> Self {
6031            self.set_validator_observations(field);
6032            self
6033        }
6034    }
6035    impl super::ExecutionTimeObservations {
6036        pub const fn const_default() -> Self {
6037            Self {
6038                version: None,
6039                observations: Vec::new(),
6040            }
6041        }
6042        #[doc(hidden)]
6043        pub fn default_instance() -> &'static Self {
6044            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6045            &DEFAULT
6046        }
6047        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6048        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6049            self.version.as_mut().map(|field| field as _)
6050        }
6051        ///Returns a mutable reference to `version`.
6052        ///If the field is unset, it is first initialized with the default value.
6053        pub fn version_mut(&mut self) -> &mut i32 {
6054            self.version.get_or_insert_default()
6055        }
6056        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6057        pub fn version_opt(&self) -> Option<i32> {
6058            self.version.as_ref().map(|field| *field)
6059        }
6060        ///Sets `version` with the provided value.
6061        pub fn set_version(&mut self, field: i32) {
6062            self.version = Some(field);
6063        }
6064        ///Sets `version` with the provided value.
6065        pub fn with_version(mut self, field: i32) -> Self {
6066            self.set_version(field);
6067            self
6068        }
6069        ///Returns the value of `observations`, or the default value if `observations` is unset.
6070        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6071            &self.observations
6072        }
6073        ///Returns a mutable reference to `observations`.
6074        ///If the field is unset, it is first initialized with the default value.
6075        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6076            &mut self.observations
6077        }
6078        ///Sets `observations` with the provided value.
6079        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6080            self.observations = field;
6081        }
6082        ///Sets `observations` with the provided value.
6083        pub fn with_observations(
6084            mut self,
6085            field: Vec<super::ExecutionTimeObservation>,
6086        ) -> Self {
6087            self.set_observations(field);
6088            self
6089        }
6090    }
6091    impl super::FieldDescriptor {
6092        pub const fn const_default() -> Self {
6093            Self {
6094                name: None,
6095                position: None,
6096                r#type: None,
6097            }
6098        }
6099        #[doc(hidden)]
6100        pub fn default_instance() -> &'static Self {
6101            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6102            &DEFAULT
6103        }
6104        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6105        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6106            self.name.as_mut().map(|field| field as _)
6107        }
6108        ///Returns a mutable reference to `name`.
6109        ///If the field is unset, it is first initialized with the default value.
6110        pub fn name_mut(&mut self) -> &mut String {
6111            self.name.get_or_insert_default()
6112        }
6113        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6114        pub fn name_opt(&self) -> Option<&str> {
6115            self.name.as_ref().map(|field| field as _)
6116        }
6117        ///Sets `name` with the provided value.
6118        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6119            self.name = Some(field.into().into());
6120        }
6121        ///Sets `name` with the provided value.
6122        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6123            self.set_name(field.into());
6124            self
6125        }
6126        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6127        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6128            self.position.as_mut().map(|field| field as _)
6129        }
6130        ///Returns a mutable reference to `position`.
6131        ///If the field is unset, it is first initialized with the default value.
6132        pub fn position_mut(&mut self) -> &mut u32 {
6133            self.position.get_or_insert_default()
6134        }
6135        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6136        pub fn position_opt(&self) -> Option<u32> {
6137            self.position.as_ref().map(|field| *field)
6138        }
6139        ///Sets `position` with the provided value.
6140        pub fn set_position(&mut self, field: u32) {
6141            self.position = Some(field);
6142        }
6143        ///Sets `position` with the provided value.
6144        pub fn with_position(mut self, field: u32) -> Self {
6145            self.set_position(field);
6146            self
6147        }
6148        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6149        pub fn r#type(&self) -> &super::OpenSignatureBody {
6150            self.r#type
6151                .as_ref()
6152                .map(|field| field as _)
6153                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6154        }
6155        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6156        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6157            self.r#type.as_mut().map(|field| field as _)
6158        }
6159        ///Returns a mutable reference to `r#type`.
6160        ///If the field is unset, it is first initialized with the default value.
6161        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6162            self.r#type.get_or_insert_default()
6163        }
6164        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6165        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6166            self.r#type.as_ref().map(|field| field as _)
6167        }
6168        ///Sets `r#type` with the provided value.
6169        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6170            self.r#type = Some(field.into().into());
6171        }
6172        ///Sets `r#type` with the provided value.
6173        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6174            self.set_type(field.into());
6175            self
6176        }
6177    }
6178    impl super::FunctionDescriptor {
6179        pub const fn const_default() -> Self {
6180            Self {
6181                name: None,
6182                visibility: None,
6183                is_entry: None,
6184                type_parameters: Vec::new(),
6185                parameters: Vec::new(),
6186                returns: Vec::new(),
6187            }
6188        }
6189        #[doc(hidden)]
6190        pub fn default_instance() -> &'static Self {
6191            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6192            &DEFAULT
6193        }
6194        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6195        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6196            self.name.as_mut().map(|field| field as _)
6197        }
6198        ///Returns a mutable reference to `name`.
6199        ///If the field is unset, it is first initialized with the default value.
6200        pub fn name_mut(&mut self) -> &mut String {
6201            self.name.get_or_insert_default()
6202        }
6203        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6204        pub fn name_opt(&self) -> Option<&str> {
6205            self.name.as_ref().map(|field| field as _)
6206        }
6207        ///Sets `name` with the provided value.
6208        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6209            self.name = Some(field.into().into());
6210        }
6211        ///Sets `name` with the provided value.
6212        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6213            self.set_name(field.into());
6214            self
6215        }
6216        ///Sets `visibility` with the provided value.
6217        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6218            mut self,
6219            field: T,
6220        ) -> Self {
6221            self.set_visibility(field.into());
6222            self
6223        }
6224        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6225        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6226            self.is_entry.as_mut().map(|field| field as _)
6227        }
6228        ///Returns a mutable reference to `is_entry`.
6229        ///If the field is unset, it is first initialized with the default value.
6230        pub fn is_entry_mut(&mut self) -> &mut bool {
6231            self.is_entry.get_or_insert_default()
6232        }
6233        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6234        pub fn is_entry_opt(&self) -> Option<bool> {
6235            self.is_entry.as_ref().map(|field| *field)
6236        }
6237        ///Sets `is_entry` with the provided value.
6238        pub fn set_is_entry(&mut self, field: bool) {
6239            self.is_entry = Some(field);
6240        }
6241        ///Sets `is_entry` with the provided value.
6242        pub fn with_is_entry(mut self, field: bool) -> Self {
6243            self.set_is_entry(field);
6244            self
6245        }
6246        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6247        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6248            &self.type_parameters
6249        }
6250        ///Returns a mutable reference to `type_parameters`.
6251        ///If the field is unset, it is first initialized with the default value.
6252        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6253            &mut self.type_parameters
6254        }
6255        ///Sets `type_parameters` with the provided value.
6256        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6257            self.type_parameters = field;
6258        }
6259        ///Sets `type_parameters` with the provided value.
6260        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6261            self.set_type_parameters(field);
6262            self
6263        }
6264        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6265        pub fn parameters(&self) -> &[super::OpenSignature] {
6266            &self.parameters
6267        }
6268        ///Returns a mutable reference to `parameters`.
6269        ///If the field is unset, it is first initialized with the default value.
6270        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6271            &mut self.parameters
6272        }
6273        ///Sets `parameters` with the provided value.
6274        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6275            self.parameters = field;
6276        }
6277        ///Sets `parameters` with the provided value.
6278        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6279            self.set_parameters(field);
6280            self
6281        }
6282        ///Returns the value of `returns`, or the default value if `returns` is unset.
6283        pub fn returns(&self) -> &[super::OpenSignature] {
6284            &self.returns
6285        }
6286        ///Returns a mutable reference to `returns`.
6287        ///If the field is unset, it is first initialized with the default value.
6288        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6289            &mut self.returns
6290        }
6291        ///Sets `returns` with the provided value.
6292        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6293            self.returns = field;
6294        }
6295        ///Sets `returns` with the provided value.
6296        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6297            self.set_returns(field);
6298            self
6299        }
6300    }
6301    impl super::GasCostSummary {
6302        pub const fn const_default() -> Self {
6303            Self {
6304                computation_cost: None,
6305                storage_cost: None,
6306                storage_rebate: None,
6307                non_refundable_storage_fee: None,
6308            }
6309        }
6310        #[doc(hidden)]
6311        pub fn default_instance() -> &'static Self {
6312            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6313            &DEFAULT
6314        }
6315        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6316        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6317            self.computation_cost.as_mut().map(|field| field as _)
6318        }
6319        ///Returns a mutable reference to `computation_cost`.
6320        ///If the field is unset, it is first initialized with the default value.
6321        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6322            self.computation_cost.get_or_insert_default()
6323        }
6324        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6325        pub fn computation_cost_opt(&self) -> Option<u64> {
6326            self.computation_cost.as_ref().map(|field| *field)
6327        }
6328        ///Sets `computation_cost` with the provided value.
6329        pub fn set_computation_cost(&mut self, field: u64) {
6330            self.computation_cost = Some(field);
6331        }
6332        ///Sets `computation_cost` with the provided value.
6333        pub fn with_computation_cost(mut self, field: u64) -> Self {
6334            self.set_computation_cost(field);
6335            self
6336        }
6337        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6338        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6339            self.storage_cost.as_mut().map(|field| field as _)
6340        }
6341        ///Returns a mutable reference to `storage_cost`.
6342        ///If the field is unset, it is first initialized with the default value.
6343        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6344            self.storage_cost.get_or_insert_default()
6345        }
6346        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6347        pub fn storage_cost_opt(&self) -> Option<u64> {
6348            self.storage_cost.as_ref().map(|field| *field)
6349        }
6350        ///Sets `storage_cost` with the provided value.
6351        pub fn set_storage_cost(&mut self, field: u64) {
6352            self.storage_cost = Some(field);
6353        }
6354        ///Sets `storage_cost` with the provided value.
6355        pub fn with_storage_cost(mut self, field: u64) -> Self {
6356            self.set_storage_cost(field);
6357            self
6358        }
6359        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6360        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6361            self.storage_rebate.as_mut().map(|field| field as _)
6362        }
6363        ///Returns a mutable reference to `storage_rebate`.
6364        ///If the field is unset, it is first initialized with the default value.
6365        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6366            self.storage_rebate.get_or_insert_default()
6367        }
6368        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6369        pub fn storage_rebate_opt(&self) -> Option<u64> {
6370            self.storage_rebate.as_ref().map(|field| *field)
6371        }
6372        ///Sets `storage_rebate` with the provided value.
6373        pub fn set_storage_rebate(&mut self, field: u64) {
6374            self.storage_rebate = Some(field);
6375        }
6376        ///Sets `storage_rebate` with the provided value.
6377        pub fn with_storage_rebate(mut self, field: u64) -> Self {
6378            self.set_storage_rebate(field);
6379            self
6380        }
6381        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6382        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6383            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6384        }
6385        ///Returns a mutable reference to `non_refundable_storage_fee`.
6386        ///If the field is unset, it is first initialized with the default value.
6387        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6388            self.non_refundable_storage_fee.get_or_insert_default()
6389        }
6390        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6391        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6392            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6393        }
6394        ///Sets `non_refundable_storage_fee` with the provided value.
6395        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6396            self.non_refundable_storage_fee = Some(field);
6397        }
6398        ///Sets `non_refundable_storage_fee` with the provided value.
6399        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6400            self.set_non_refundable_storage_fee(field);
6401            self
6402        }
6403    }
6404    impl super::GasPayment {
6405        pub const fn const_default() -> Self {
6406            Self {
6407                objects: Vec::new(),
6408                owner: None,
6409                price: None,
6410                budget: None,
6411            }
6412        }
6413        #[doc(hidden)]
6414        pub fn default_instance() -> &'static Self {
6415            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6416            &DEFAULT
6417        }
6418        ///Returns the value of `objects`, or the default value if `objects` is unset.
6419        pub fn objects(&self) -> &[super::ObjectReference] {
6420            &self.objects
6421        }
6422        ///Returns a mutable reference to `objects`.
6423        ///If the field is unset, it is first initialized with the default value.
6424        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6425            &mut self.objects
6426        }
6427        ///Sets `objects` with the provided value.
6428        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6429            self.objects = field;
6430        }
6431        ///Sets `objects` with the provided value.
6432        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6433            self.set_objects(field);
6434            self
6435        }
6436        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6437        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6438            self.owner.as_mut().map(|field| field as _)
6439        }
6440        ///Returns a mutable reference to `owner`.
6441        ///If the field is unset, it is first initialized with the default value.
6442        pub fn owner_mut(&mut self) -> &mut String {
6443            self.owner.get_or_insert_default()
6444        }
6445        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6446        pub fn owner_opt(&self) -> Option<&str> {
6447            self.owner.as_ref().map(|field| field as _)
6448        }
6449        ///Sets `owner` with the provided value.
6450        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6451            self.owner = Some(field.into().into());
6452        }
6453        ///Sets `owner` with the provided value.
6454        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6455            self.set_owner(field.into());
6456            self
6457        }
6458        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6459        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6460            self.price.as_mut().map(|field| field as _)
6461        }
6462        ///Returns a mutable reference to `price`.
6463        ///If the field is unset, it is first initialized with the default value.
6464        pub fn price_mut(&mut self) -> &mut u64 {
6465            self.price.get_or_insert_default()
6466        }
6467        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6468        pub fn price_opt(&self) -> Option<u64> {
6469            self.price.as_ref().map(|field| *field)
6470        }
6471        ///Sets `price` with the provided value.
6472        pub fn set_price(&mut self, field: u64) {
6473            self.price = Some(field);
6474        }
6475        ///Sets `price` with the provided value.
6476        pub fn with_price(mut self, field: u64) -> Self {
6477            self.set_price(field);
6478            self
6479        }
6480        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6481        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6482            self.budget.as_mut().map(|field| field as _)
6483        }
6484        ///Returns a mutable reference to `budget`.
6485        ///If the field is unset, it is first initialized with the default value.
6486        pub fn budget_mut(&mut self) -> &mut u64 {
6487            self.budget.get_or_insert_default()
6488        }
6489        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6490        pub fn budget_opt(&self) -> Option<u64> {
6491            self.budget.as_ref().map(|field| *field)
6492        }
6493        ///Sets `budget` with the provided value.
6494        pub fn set_budget(&mut self, field: u64) {
6495            self.budget = Some(field);
6496        }
6497        ///Sets `budget` with the provided value.
6498        pub fn with_budget(mut self, field: u64) -> Self {
6499            self.set_budget(field);
6500            self
6501        }
6502    }
6503    impl super::GenesisTransaction {
6504        pub const fn const_default() -> Self {
6505            Self { objects: Vec::new() }
6506        }
6507        #[doc(hidden)]
6508        pub fn default_instance() -> &'static Self {
6509            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6510            &DEFAULT
6511        }
6512        ///Returns the value of `objects`, or the default value if `objects` is unset.
6513        pub fn objects(&self) -> &[super::Object] {
6514            &self.objects
6515        }
6516        ///Returns a mutable reference to `objects`.
6517        ///If the field is unset, it is first initialized with the default value.
6518        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6519            &mut self.objects
6520        }
6521        ///Sets `objects` with the provided value.
6522        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6523            self.objects = field;
6524        }
6525        ///Sets `objects` with the provided value.
6526        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6527            self.set_objects(field);
6528            self
6529        }
6530    }
6531    impl super::GetBalanceRequest {
6532        pub const fn const_default() -> Self {
6533            Self {
6534                owner: None,
6535                coin_type: None,
6536            }
6537        }
6538        #[doc(hidden)]
6539        pub fn default_instance() -> &'static Self {
6540            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6541            &DEFAULT
6542        }
6543        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6544        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6545            self.owner.as_mut().map(|field| field as _)
6546        }
6547        ///Returns a mutable reference to `owner`.
6548        ///If the field is unset, it is first initialized with the default value.
6549        pub fn owner_mut(&mut self) -> &mut String {
6550            self.owner.get_or_insert_default()
6551        }
6552        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6553        pub fn owner_opt(&self) -> Option<&str> {
6554            self.owner.as_ref().map(|field| field as _)
6555        }
6556        ///Sets `owner` with the provided value.
6557        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6558            self.owner = Some(field.into().into());
6559        }
6560        ///Sets `owner` with the provided value.
6561        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6562            self.set_owner(field.into());
6563            self
6564        }
6565        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6566        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6567            self.coin_type.as_mut().map(|field| field as _)
6568        }
6569        ///Returns a mutable reference to `coin_type`.
6570        ///If the field is unset, it is first initialized with the default value.
6571        pub fn coin_type_mut(&mut self) -> &mut String {
6572            self.coin_type.get_or_insert_default()
6573        }
6574        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6575        pub fn coin_type_opt(&self) -> Option<&str> {
6576            self.coin_type.as_ref().map(|field| field as _)
6577        }
6578        ///Sets `coin_type` with the provided value.
6579        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6580            self.coin_type = Some(field.into().into());
6581        }
6582        ///Sets `coin_type` with the provided value.
6583        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6584            self.set_coin_type(field.into());
6585            self
6586        }
6587    }
6588    impl super::GetBalanceResponse {
6589        pub const fn const_default() -> Self {
6590            Self { balance: None }
6591        }
6592        #[doc(hidden)]
6593        pub fn default_instance() -> &'static Self {
6594            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6595            &DEFAULT
6596        }
6597        ///Returns the value of `balance`, or the default value if `balance` is unset.
6598        pub fn balance(&self) -> &super::Balance {
6599            self.balance
6600                .as_ref()
6601                .map(|field| field as _)
6602                .unwrap_or_else(|| super::Balance::default_instance() as _)
6603        }
6604        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6605        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6606            self.balance.as_mut().map(|field| field as _)
6607        }
6608        ///Returns a mutable reference to `balance`.
6609        ///If the field is unset, it is first initialized with the default value.
6610        pub fn balance_mut(&mut self) -> &mut super::Balance {
6611            self.balance.get_or_insert_default()
6612        }
6613        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
6614        pub fn balance_opt(&self) -> Option<&super::Balance> {
6615            self.balance.as_ref().map(|field| field as _)
6616        }
6617        ///Sets `balance` with the provided value.
6618        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6619            self.balance = Some(field.into().into());
6620        }
6621        ///Sets `balance` with the provided value.
6622        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6623            self.set_balance(field.into());
6624            self
6625        }
6626    }
6627    impl super::GetCheckpointRequest {
6628        pub const fn const_default() -> Self {
6629            Self {
6630                read_mask: None,
6631                checkpoint_id: None,
6632            }
6633        }
6634        #[doc(hidden)]
6635        pub fn default_instance() -> &'static Self {
6636            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6637            &DEFAULT
6638        }
6639        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6640        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6641            self.read_mask.as_mut().map(|field| field as _)
6642        }
6643        ///Returns a mutable reference to `read_mask`.
6644        ///If the field is unset, it is first initialized with the default value.
6645        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6646            self.read_mask.get_or_insert_default()
6647        }
6648        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6649        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6650            self.read_mask.as_ref().map(|field| field as _)
6651        }
6652        ///Sets `read_mask` with the provided value.
6653        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6654            self.read_mask = Some(field.into().into());
6655        }
6656        ///Sets `read_mask` with the provided value.
6657        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6658            mut self,
6659            field: T,
6660        ) -> Self {
6661            self.set_read_mask(field.into());
6662            self
6663        }
6664        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
6665        pub fn sequence_number(&self) -> u64 {
6666            if let Some(
6667                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6668            ) = &self.checkpoint_id
6669            {
6670                *field
6671            } else {
6672                0u64
6673            }
6674        }
6675        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
6676        pub fn sequence_number_opt(&self) -> Option<u64> {
6677            if let Some(
6678                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6679            ) = &self.checkpoint_id
6680            {
6681                Some(*field)
6682            } else {
6683                None
6684            }
6685        }
6686        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6687        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6688            if let Some(
6689                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6690            ) = &mut self.checkpoint_id
6691            {
6692                Some(field as _)
6693            } else {
6694                None
6695            }
6696        }
6697        ///Returns a mutable reference to `sequence_number`.
6698        ///If the field is unset, it is first initialized with the default value.
6699        ///If any other oneof field in the same oneof is set, it will be cleared.
6700        pub fn sequence_number_mut(&mut self) -> &mut u64 {
6701            if self.sequence_number_opt_mut().is_none() {
6702                self.checkpoint_id = Some(
6703                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
6704                        u64::default(),
6705                    ),
6706                );
6707            }
6708            self.sequence_number_opt_mut().unwrap()
6709        }
6710        ///Sets `sequence_number` with the provided value.
6711        ///If any other oneof field in the same oneof is set, it will be cleared.
6712        pub fn set_sequence_number(&mut self, field: u64) {
6713            self.checkpoint_id = Some(
6714                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6715            );
6716        }
6717        ///Sets `sequence_number` with the provided value.
6718        ///If any other oneof field in the same oneof is set, it will be cleared.
6719        pub fn with_sequence_number(mut self, field: u64) -> Self {
6720            self.set_sequence_number(field);
6721            self
6722        }
6723        ///Returns the value of `digest`, or the default value if `digest` is unset.
6724        pub fn digest(&self) -> &str {
6725            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6726                .checkpoint_id
6727            {
6728                field as _
6729            } else {
6730                ""
6731            }
6732        }
6733        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6734        pub fn digest_opt(&self) -> Option<&str> {
6735            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6736                .checkpoint_id
6737            {
6738                Some(field as _)
6739            } else {
6740                None
6741            }
6742        }
6743        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6744        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6745            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6746                .checkpoint_id
6747            {
6748                Some(field as _)
6749            } else {
6750                None
6751            }
6752        }
6753        ///Returns a mutable reference to `digest`.
6754        ///If the field is unset, it is first initialized with the default value.
6755        ///If any other oneof field in the same oneof is set, it will be cleared.
6756        pub fn digest_mut(&mut self) -> &mut String {
6757            if self.digest_opt_mut().is_none() {
6758                self.checkpoint_id = Some(
6759                    super::get_checkpoint_request::CheckpointId::Digest(
6760                        String::default(),
6761                    ),
6762                );
6763            }
6764            self.digest_opt_mut().unwrap()
6765        }
6766        ///Sets `digest` with the provided value.
6767        ///If any other oneof field in the same oneof is set, it will be cleared.
6768        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6769            self.checkpoint_id = Some(
6770                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
6771            );
6772        }
6773        ///Sets `digest` with the provided value.
6774        ///If any other oneof field in the same oneof is set, it will be cleared.
6775        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6776            self.set_digest(field.into());
6777            self
6778        }
6779    }
6780    impl super::GetCheckpointResponse {
6781        pub const fn const_default() -> Self {
6782            Self { checkpoint: None }
6783        }
6784        #[doc(hidden)]
6785        pub fn default_instance() -> &'static Self {
6786            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
6787            &DEFAULT
6788        }
6789        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
6790        pub fn checkpoint(&self) -> &super::Checkpoint {
6791            self.checkpoint
6792                .as_ref()
6793                .map(|field| field as _)
6794                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
6795        }
6796        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6797        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
6798            self.checkpoint.as_mut().map(|field| field as _)
6799        }
6800        ///Returns a mutable reference to `checkpoint`.
6801        ///If the field is unset, it is first initialized with the default value.
6802        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
6803            self.checkpoint.get_or_insert_default()
6804        }
6805        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
6806        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
6807            self.checkpoint.as_ref().map(|field| field as _)
6808        }
6809        ///Sets `checkpoint` with the provided value.
6810        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
6811            self.checkpoint = Some(field.into().into());
6812        }
6813        ///Sets `checkpoint` with the provided value.
6814        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
6815            self.set_checkpoint(field.into());
6816            self
6817        }
6818    }
6819    impl super::GetCoinInfoRequest {
6820        pub const fn const_default() -> Self {
6821            Self { coin_type: None }
6822        }
6823        #[doc(hidden)]
6824        pub fn default_instance() -> &'static Self {
6825            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
6826            &DEFAULT
6827        }
6828        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6829        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6830            self.coin_type.as_mut().map(|field| field as _)
6831        }
6832        ///Returns a mutable reference to `coin_type`.
6833        ///If the field is unset, it is first initialized with the default value.
6834        pub fn coin_type_mut(&mut self) -> &mut String {
6835            self.coin_type.get_or_insert_default()
6836        }
6837        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6838        pub fn coin_type_opt(&self) -> Option<&str> {
6839            self.coin_type.as_ref().map(|field| field as _)
6840        }
6841        ///Sets `coin_type` with the provided value.
6842        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6843            self.coin_type = Some(field.into().into());
6844        }
6845        ///Sets `coin_type` with the provided value.
6846        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6847            self.set_coin_type(field.into());
6848            self
6849        }
6850    }
6851    impl super::GetCoinInfoResponse {
6852        pub const fn const_default() -> Self {
6853            Self {
6854                coin_type: None,
6855                metadata: None,
6856                treasury: None,
6857                regulated_metadata: None,
6858            }
6859        }
6860        #[doc(hidden)]
6861        pub fn default_instance() -> &'static Self {
6862            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
6863            &DEFAULT
6864        }
6865        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6866        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6867            self.coin_type.as_mut().map(|field| field as _)
6868        }
6869        ///Returns a mutable reference to `coin_type`.
6870        ///If the field is unset, it is first initialized with the default value.
6871        pub fn coin_type_mut(&mut self) -> &mut String {
6872            self.coin_type.get_or_insert_default()
6873        }
6874        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6875        pub fn coin_type_opt(&self) -> Option<&str> {
6876            self.coin_type.as_ref().map(|field| field as _)
6877        }
6878        ///Sets `coin_type` with the provided value.
6879        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6880            self.coin_type = Some(field.into().into());
6881        }
6882        ///Sets `coin_type` with the provided value.
6883        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6884            self.set_coin_type(field.into());
6885            self
6886        }
6887        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
6888        pub fn metadata(&self) -> &super::CoinMetadata {
6889            self.metadata
6890                .as_ref()
6891                .map(|field| field as _)
6892                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
6893        }
6894        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6895        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
6896            self.metadata.as_mut().map(|field| field as _)
6897        }
6898        ///Returns a mutable reference to `metadata`.
6899        ///If the field is unset, it is first initialized with the default value.
6900        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
6901            self.metadata.get_or_insert_default()
6902        }
6903        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
6904        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
6905            self.metadata.as_ref().map(|field| field as _)
6906        }
6907        ///Sets `metadata` with the provided value.
6908        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
6909            self.metadata = Some(field.into().into());
6910        }
6911        ///Sets `metadata` with the provided value.
6912        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
6913            self.set_metadata(field.into());
6914            self
6915        }
6916        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
6917        pub fn treasury(&self) -> &super::CoinTreasury {
6918            self.treasury
6919                .as_ref()
6920                .map(|field| field as _)
6921                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
6922        }
6923        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6924        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
6925            self.treasury.as_mut().map(|field| field as _)
6926        }
6927        ///Returns a mutable reference to `treasury`.
6928        ///If the field is unset, it is first initialized with the default value.
6929        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
6930            self.treasury.get_or_insert_default()
6931        }
6932        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
6933        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
6934            self.treasury.as_ref().map(|field| field as _)
6935        }
6936        ///Sets `treasury` with the provided value.
6937        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
6938            self.treasury = Some(field.into().into());
6939        }
6940        ///Sets `treasury` with the provided value.
6941        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
6942            self.set_treasury(field.into());
6943            self
6944        }
6945        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
6946        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
6947            self.regulated_metadata
6948                .as_ref()
6949                .map(|field| field as _)
6950                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
6951        }
6952        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6953        pub fn regulated_metadata_opt_mut(
6954            &mut self,
6955        ) -> Option<&mut super::RegulatedCoinMetadata> {
6956            self.regulated_metadata.as_mut().map(|field| field as _)
6957        }
6958        ///Returns a mutable reference to `regulated_metadata`.
6959        ///If the field is unset, it is first initialized with the default value.
6960        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
6961            self.regulated_metadata.get_or_insert_default()
6962        }
6963        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
6964        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
6965            self.regulated_metadata.as_ref().map(|field| field as _)
6966        }
6967        ///Sets `regulated_metadata` with the provided value.
6968        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6969            &mut self,
6970            field: T,
6971        ) {
6972            self.regulated_metadata = Some(field.into().into());
6973        }
6974        ///Sets `regulated_metadata` with the provided value.
6975        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6976            mut self,
6977            field: T,
6978        ) -> Self {
6979            self.set_regulated_metadata(field.into());
6980            self
6981        }
6982    }
6983    impl super::GetDatatypeRequest {
6984        pub const fn const_default() -> Self {
6985            Self {
6986                package_id: None,
6987                module_name: None,
6988                name: None,
6989            }
6990        }
6991        #[doc(hidden)]
6992        pub fn default_instance() -> &'static Self {
6993            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
6994            &DEFAULT
6995        }
6996        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6997        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
6998            self.package_id.as_mut().map(|field| field as _)
6999        }
7000        ///Returns a mutable reference to `package_id`.
7001        ///If the field is unset, it is first initialized with the default value.
7002        pub fn package_id_mut(&mut self) -> &mut String {
7003            self.package_id.get_or_insert_default()
7004        }
7005        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7006        pub fn package_id_opt(&self) -> Option<&str> {
7007            self.package_id.as_ref().map(|field| field as _)
7008        }
7009        ///Sets `package_id` with the provided value.
7010        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7011            self.package_id = Some(field.into().into());
7012        }
7013        ///Sets `package_id` with the provided value.
7014        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7015            self.set_package_id(field.into());
7016            self
7017        }
7018        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7019        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7020            self.module_name.as_mut().map(|field| field as _)
7021        }
7022        ///Returns a mutable reference to `module_name`.
7023        ///If the field is unset, it is first initialized with the default value.
7024        pub fn module_name_mut(&mut self) -> &mut String {
7025            self.module_name.get_or_insert_default()
7026        }
7027        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7028        pub fn module_name_opt(&self) -> Option<&str> {
7029            self.module_name.as_ref().map(|field| field as _)
7030        }
7031        ///Sets `module_name` with the provided value.
7032        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7033            self.module_name = Some(field.into().into());
7034        }
7035        ///Sets `module_name` with the provided value.
7036        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7037            self.set_module_name(field.into());
7038            self
7039        }
7040        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7041        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7042            self.name.as_mut().map(|field| field as _)
7043        }
7044        ///Returns a mutable reference to `name`.
7045        ///If the field is unset, it is first initialized with the default value.
7046        pub fn name_mut(&mut self) -> &mut String {
7047            self.name.get_or_insert_default()
7048        }
7049        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7050        pub fn name_opt(&self) -> Option<&str> {
7051            self.name.as_ref().map(|field| field as _)
7052        }
7053        ///Sets `name` with the provided value.
7054        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7055            self.name = Some(field.into().into());
7056        }
7057        ///Sets `name` with the provided value.
7058        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7059            self.set_name(field.into());
7060            self
7061        }
7062    }
7063    impl super::GetDatatypeResponse {
7064        pub const fn const_default() -> Self {
7065            Self { datatype: None }
7066        }
7067        #[doc(hidden)]
7068        pub fn default_instance() -> &'static Self {
7069            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7070            &DEFAULT
7071        }
7072        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7073        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7074            self.datatype
7075                .as_ref()
7076                .map(|field| field as _)
7077                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7078        }
7079        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7080        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7081            self.datatype.as_mut().map(|field| field as _)
7082        }
7083        ///Returns a mutable reference to `datatype`.
7084        ///If the field is unset, it is first initialized with the default value.
7085        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7086            self.datatype.get_or_insert_default()
7087        }
7088        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7089        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7090            self.datatype.as_ref().map(|field| field as _)
7091        }
7092        ///Sets `datatype` with the provided value.
7093        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7094            self.datatype = Some(field.into().into());
7095        }
7096        ///Sets `datatype` with the provided value.
7097        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7098            mut self,
7099            field: T,
7100        ) -> Self {
7101            self.set_datatype(field.into());
7102            self
7103        }
7104    }
7105    impl super::GetEpochRequest {
7106        pub const fn const_default() -> Self {
7107            Self {
7108                epoch: None,
7109                read_mask: None,
7110            }
7111        }
7112        #[doc(hidden)]
7113        pub fn default_instance() -> &'static Self {
7114            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7115            &DEFAULT
7116        }
7117        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7118        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7119            self.epoch.as_mut().map(|field| field as _)
7120        }
7121        ///Returns a mutable reference to `epoch`.
7122        ///If the field is unset, it is first initialized with the default value.
7123        pub fn epoch_mut(&mut self) -> &mut u64 {
7124            self.epoch.get_or_insert_default()
7125        }
7126        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7127        pub fn epoch_opt(&self) -> Option<u64> {
7128            self.epoch.as_ref().map(|field| *field)
7129        }
7130        ///Sets `epoch` with the provided value.
7131        pub fn set_epoch(&mut self, field: u64) {
7132            self.epoch = Some(field);
7133        }
7134        ///Sets `epoch` with the provided value.
7135        pub fn with_epoch(mut self, field: u64) -> Self {
7136            self.set_epoch(field);
7137            self
7138        }
7139        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7140        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7141            self.read_mask.as_mut().map(|field| field as _)
7142        }
7143        ///Returns a mutable reference to `read_mask`.
7144        ///If the field is unset, it is first initialized with the default value.
7145        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7146            self.read_mask.get_or_insert_default()
7147        }
7148        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7149        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7150            self.read_mask.as_ref().map(|field| field as _)
7151        }
7152        ///Sets `read_mask` with the provided value.
7153        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7154            self.read_mask = Some(field.into().into());
7155        }
7156        ///Sets `read_mask` with the provided value.
7157        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7158            mut self,
7159            field: T,
7160        ) -> Self {
7161            self.set_read_mask(field.into());
7162            self
7163        }
7164    }
7165    impl super::GetEpochResponse {
7166        pub const fn const_default() -> Self {
7167            Self { epoch: None }
7168        }
7169        #[doc(hidden)]
7170        pub fn default_instance() -> &'static Self {
7171            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7172            &DEFAULT
7173        }
7174        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7175        pub fn epoch(&self) -> &super::Epoch {
7176            self.epoch
7177                .as_ref()
7178                .map(|field| field as _)
7179                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7180        }
7181        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7182        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7183            self.epoch.as_mut().map(|field| field as _)
7184        }
7185        ///Returns a mutable reference to `epoch`.
7186        ///If the field is unset, it is first initialized with the default value.
7187        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7188            self.epoch.get_or_insert_default()
7189        }
7190        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7191        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7192            self.epoch.as_ref().map(|field| field as _)
7193        }
7194        ///Sets `epoch` with the provided value.
7195        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7196            self.epoch = Some(field.into().into());
7197        }
7198        ///Sets `epoch` with the provided value.
7199        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7200            self.set_epoch(field.into());
7201            self
7202        }
7203    }
7204    impl super::GetFunctionRequest {
7205        pub const fn const_default() -> Self {
7206            Self {
7207                package_id: None,
7208                module_name: None,
7209                name: None,
7210            }
7211        }
7212        #[doc(hidden)]
7213        pub fn default_instance() -> &'static Self {
7214            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7215            &DEFAULT
7216        }
7217        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7218        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7219            self.package_id.as_mut().map(|field| field as _)
7220        }
7221        ///Returns a mutable reference to `package_id`.
7222        ///If the field is unset, it is first initialized with the default value.
7223        pub fn package_id_mut(&mut self) -> &mut String {
7224            self.package_id.get_or_insert_default()
7225        }
7226        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7227        pub fn package_id_opt(&self) -> Option<&str> {
7228            self.package_id.as_ref().map(|field| field as _)
7229        }
7230        ///Sets `package_id` with the provided value.
7231        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7232            self.package_id = Some(field.into().into());
7233        }
7234        ///Sets `package_id` with the provided value.
7235        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7236            self.set_package_id(field.into());
7237            self
7238        }
7239        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7240        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7241            self.module_name.as_mut().map(|field| field as _)
7242        }
7243        ///Returns a mutable reference to `module_name`.
7244        ///If the field is unset, it is first initialized with the default value.
7245        pub fn module_name_mut(&mut self) -> &mut String {
7246            self.module_name.get_or_insert_default()
7247        }
7248        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7249        pub fn module_name_opt(&self) -> Option<&str> {
7250            self.module_name.as_ref().map(|field| field as _)
7251        }
7252        ///Sets `module_name` with the provided value.
7253        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7254            self.module_name = Some(field.into().into());
7255        }
7256        ///Sets `module_name` with the provided value.
7257        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7258            self.set_module_name(field.into());
7259            self
7260        }
7261        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7262        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7263            self.name.as_mut().map(|field| field as _)
7264        }
7265        ///Returns a mutable reference to `name`.
7266        ///If the field is unset, it is first initialized with the default value.
7267        pub fn name_mut(&mut self) -> &mut String {
7268            self.name.get_or_insert_default()
7269        }
7270        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7271        pub fn name_opt(&self) -> Option<&str> {
7272            self.name.as_ref().map(|field| field as _)
7273        }
7274        ///Sets `name` with the provided value.
7275        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7276            self.name = Some(field.into().into());
7277        }
7278        ///Sets `name` with the provided value.
7279        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7280            self.set_name(field.into());
7281            self
7282        }
7283    }
7284    impl super::GetFunctionResponse {
7285        pub const fn const_default() -> Self {
7286            Self { function: None }
7287        }
7288        #[doc(hidden)]
7289        pub fn default_instance() -> &'static Self {
7290            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7291            &DEFAULT
7292        }
7293        ///Returns the value of `function`, or the default value if `function` is unset.
7294        pub fn function(&self) -> &super::FunctionDescriptor {
7295            self.function
7296                .as_ref()
7297                .map(|field| field as _)
7298                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7299        }
7300        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7301        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7302            self.function.as_mut().map(|field| field as _)
7303        }
7304        ///Returns a mutable reference to `function`.
7305        ///If the field is unset, it is first initialized with the default value.
7306        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7307            self.function.get_or_insert_default()
7308        }
7309        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7310        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7311            self.function.as_ref().map(|field| field as _)
7312        }
7313        ///Sets `function` with the provided value.
7314        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7315            self.function = Some(field.into().into());
7316        }
7317        ///Sets `function` with the provided value.
7318        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7319            mut self,
7320            field: T,
7321        ) -> Self {
7322            self.set_function(field.into());
7323            self
7324        }
7325    }
7326    impl super::GetObjectRequest {
7327        pub const fn const_default() -> Self {
7328            Self {
7329                object_id: None,
7330                version: None,
7331                read_mask: None,
7332            }
7333        }
7334        #[doc(hidden)]
7335        pub fn default_instance() -> &'static Self {
7336            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7337            &DEFAULT
7338        }
7339        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7340        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7341            self.object_id.as_mut().map(|field| field as _)
7342        }
7343        ///Returns a mutable reference to `object_id`.
7344        ///If the field is unset, it is first initialized with the default value.
7345        pub fn object_id_mut(&mut self) -> &mut String {
7346            self.object_id.get_or_insert_default()
7347        }
7348        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7349        pub fn object_id_opt(&self) -> Option<&str> {
7350            self.object_id.as_ref().map(|field| field as _)
7351        }
7352        ///Sets `object_id` with the provided value.
7353        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7354            self.object_id = Some(field.into().into());
7355        }
7356        ///Sets `object_id` with the provided value.
7357        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7358            self.set_object_id(field.into());
7359            self
7360        }
7361        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7362        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7363            self.version.as_mut().map(|field| field as _)
7364        }
7365        ///Returns a mutable reference to `version`.
7366        ///If the field is unset, it is first initialized with the default value.
7367        pub fn version_mut(&mut self) -> &mut u64 {
7368            self.version.get_or_insert_default()
7369        }
7370        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7371        pub fn version_opt(&self) -> Option<u64> {
7372            self.version.as_ref().map(|field| *field)
7373        }
7374        ///Sets `version` with the provided value.
7375        pub fn set_version(&mut self, field: u64) {
7376            self.version = Some(field);
7377        }
7378        ///Sets `version` with the provided value.
7379        pub fn with_version(mut self, field: u64) -> Self {
7380            self.set_version(field);
7381            self
7382        }
7383        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7384        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7385            self.read_mask.as_mut().map(|field| field as _)
7386        }
7387        ///Returns a mutable reference to `read_mask`.
7388        ///If the field is unset, it is first initialized with the default value.
7389        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7390            self.read_mask.get_or_insert_default()
7391        }
7392        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7393        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7394            self.read_mask.as_ref().map(|field| field as _)
7395        }
7396        ///Sets `read_mask` with the provided value.
7397        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7398            self.read_mask = Some(field.into().into());
7399        }
7400        ///Sets `read_mask` with the provided value.
7401        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7402            mut self,
7403            field: T,
7404        ) -> Self {
7405            self.set_read_mask(field.into());
7406            self
7407        }
7408    }
7409    impl super::GetObjectResponse {
7410        pub const fn const_default() -> Self {
7411            Self { object: None }
7412        }
7413        #[doc(hidden)]
7414        pub fn default_instance() -> &'static Self {
7415            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7416            &DEFAULT
7417        }
7418        ///Returns the value of `object`, or the default value if `object` is unset.
7419        pub fn object(&self) -> &super::Object {
7420            self.object
7421                .as_ref()
7422                .map(|field| field as _)
7423                .unwrap_or_else(|| super::Object::default_instance() as _)
7424        }
7425        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7426        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7427            self.object.as_mut().map(|field| field as _)
7428        }
7429        ///Returns a mutable reference to `object`.
7430        ///If the field is unset, it is first initialized with the default value.
7431        pub fn object_mut(&mut self) -> &mut super::Object {
7432            self.object.get_or_insert_default()
7433        }
7434        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7435        pub fn object_opt(&self) -> Option<&super::Object> {
7436            self.object.as_ref().map(|field| field as _)
7437        }
7438        ///Sets `object` with the provided value.
7439        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7440            self.object = Some(field.into().into());
7441        }
7442        ///Sets `object` with the provided value.
7443        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7444            self.set_object(field.into());
7445            self
7446        }
7447    }
7448    impl super::GetObjectResult {
7449        pub const fn const_default() -> Self {
7450            Self { result: None }
7451        }
7452        #[doc(hidden)]
7453        pub fn default_instance() -> &'static Self {
7454            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7455            &DEFAULT
7456        }
7457        ///Returns the value of `object`, or the default value if `object` is unset.
7458        pub fn object(&self) -> &super::Object {
7459            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7460                field as _
7461            } else {
7462                super::Object::default_instance() as _
7463            }
7464        }
7465        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7466        pub fn object_opt(&self) -> Option<&super::Object> {
7467            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7468                Some(field as _)
7469            } else {
7470                None
7471            }
7472        }
7473        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7474        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7475            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7476                .result
7477            {
7478                Some(field as _)
7479            } else {
7480                None
7481            }
7482        }
7483        ///Returns a mutable reference to `object`.
7484        ///If the field is unset, it is first initialized with the default value.
7485        ///If any other oneof field in the same oneof is set, it will be cleared.
7486        pub fn object_mut(&mut self) -> &mut super::Object {
7487            if self.object_opt_mut().is_none() {
7488                self.result = Some(
7489                    super::get_object_result::Result::Object(super::Object::default()),
7490                );
7491            }
7492            self.object_opt_mut().unwrap()
7493        }
7494        ///Sets `object` with the provided value.
7495        ///If any other oneof field in the same oneof is set, it will be cleared.
7496        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7497            self.result = Some(
7498                super::get_object_result::Result::Object(field.into().into()),
7499            );
7500        }
7501        ///Sets `object` with the provided value.
7502        ///If any other oneof field in the same oneof is set, it will be cleared.
7503        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7504            self.set_object(field.into());
7505            self
7506        }
7507        ///Returns the value of `error`, or the default value if `error` is unset.
7508        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7509            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7510                field as _
7511            } else {
7512                super::super::super::super::google::rpc::Status::default_instance() as _
7513            }
7514        }
7515        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7516        pub fn error_opt(
7517            &self,
7518        ) -> Option<&super::super::super::super::google::rpc::Status> {
7519            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7520                Some(field as _)
7521            } else {
7522                None
7523            }
7524        }
7525        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7526        pub fn error_opt_mut(
7527            &mut self,
7528        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7529            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7530                .result
7531            {
7532                Some(field as _)
7533            } else {
7534                None
7535            }
7536        }
7537        ///Returns a mutable reference to `error`.
7538        ///If the field is unset, it is first initialized with the default value.
7539        ///If any other oneof field in the same oneof is set, it will be cleared.
7540        pub fn error_mut(
7541            &mut self,
7542        ) -> &mut super::super::super::super::google::rpc::Status {
7543            if self.error_opt_mut().is_none() {
7544                self.result = Some(
7545                    super::get_object_result::Result::Error(
7546                        super::super::super::super::google::rpc::Status::default(),
7547                    ),
7548                );
7549            }
7550            self.error_opt_mut().unwrap()
7551        }
7552        ///Sets `error` with the provided value.
7553        ///If any other oneof field in the same oneof is set, it will be cleared.
7554        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7555            &mut self,
7556            field: T,
7557        ) {
7558            self.result = Some(
7559                super::get_object_result::Result::Error(field.into().into()),
7560            );
7561        }
7562        ///Sets `error` with the provided value.
7563        ///If any other oneof field in the same oneof is set, it will be cleared.
7564        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7565            mut self,
7566            field: T,
7567        ) -> Self {
7568            self.set_error(field.into());
7569            self
7570        }
7571    }
7572    impl super::GetPackageRequest {
7573        pub const fn const_default() -> Self {
7574            Self { package_id: None }
7575        }
7576        #[doc(hidden)]
7577        pub fn default_instance() -> &'static Self {
7578            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7579            &DEFAULT
7580        }
7581        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7582        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7583            self.package_id.as_mut().map(|field| field as _)
7584        }
7585        ///Returns a mutable reference to `package_id`.
7586        ///If the field is unset, it is first initialized with the default value.
7587        pub fn package_id_mut(&mut self) -> &mut String {
7588            self.package_id.get_or_insert_default()
7589        }
7590        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7591        pub fn package_id_opt(&self) -> Option<&str> {
7592            self.package_id.as_ref().map(|field| field as _)
7593        }
7594        ///Sets `package_id` with the provided value.
7595        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7596            self.package_id = Some(field.into().into());
7597        }
7598        ///Sets `package_id` with the provided value.
7599        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7600            self.set_package_id(field.into());
7601            self
7602        }
7603    }
7604    impl super::GetPackageResponse {
7605        pub const fn const_default() -> Self {
7606            Self { package: None }
7607        }
7608        #[doc(hidden)]
7609        pub fn default_instance() -> &'static Self {
7610            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7611            &DEFAULT
7612        }
7613        ///Returns the value of `package`, or the default value if `package` is unset.
7614        pub fn package(&self) -> &super::Package {
7615            self.package
7616                .as_ref()
7617                .map(|field| field as _)
7618                .unwrap_or_else(|| super::Package::default_instance() as _)
7619        }
7620        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7621        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7622            self.package.as_mut().map(|field| field as _)
7623        }
7624        ///Returns a mutable reference to `package`.
7625        ///If the field is unset, it is first initialized with the default value.
7626        pub fn package_mut(&mut self) -> &mut super::Package {
7627            self.package.get_or_insert_default()
7628        }
7629        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
7630        pub fn package_opt(&self) -> Option<&super::Package> {
7631            self.package.as_ref().map(|field| field as _)
7632        }
7633        ///Sets `package` with the provided value.
7634        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7635            self.package = Some(field.into().into());
7636        }
7637        ///Sets `package` with the provided value.
7638        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7639            self.set_package(field.into());
7640            self
7641        }
7642    }
7643    impl super::GetServiceInfoRequest {
7644        pub const fn const_default() -> Self {
7645            Self {}
7646        }
7647        #[doc(hidden)]
7648        pub fn default_instance() -> &'static Self {
7649            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7650            &DEFAULT
7651        }
7652    }
7653    impl super::GetServiceInfoResponse {
7654        pub const fn const_default() -> Self {
7655            Self {
7656                chain_id: None,
7657                chain: None,
7658                epoch: None,
7659                checkpoint_height: None,
7660                timestamp: None,
7661                lowest_available_checkpoint: None,
7662                lowest_available_checkpoint_objects: None,
7663                server: None,
7664            }
7665        }
7666        #[doc(hidden)]
7667        pub fn default_instance() -> &'static Self {
7668            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7669            &DEFAULT
7670        }
7671        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7672        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7673            self.chain_id.as_mut().map(|field| field as _)
7674        }
7675        ///Returns a mutable reference to `chain_id`.
7676        ///If the field is unset, it is first initialized with the default value.
7677        pub fn chain_id_mut(&mut self) -> &mut String {
7678            self.chain_id.get_or_insert_default()
7679        }
7680        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7681        pub fn chain_id_opt(&self) -> Option<&str> {
7682            self.chain_id.as_ref().map(|field| field as _)
7683        }
7684        ///Sets `chain_id` with the provided value.
7685        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7686            self.chain_id = Some(field.into().into());
7687        }
7688        ///Sets `chain_id` with the provided value.
7689        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7690            self.set_chain_id(field.into());
7691            self
7692        }
7693        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7694        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7695            self.chain.as_mut().map(|field| field as _)
7696        }
7697        ///Returns a mutable reference to `chain`.
7698        ///If the field is unset, it is first initialized with the default value.
7699        pub fn chain_mut(&mut self) -> &mut String {
7700            self.chain.get_or_insert_default()
7701        }
7702        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
7703        pub fn chain_opt(&self) -> Option<&str> {
7704            self.chain.as_ref().map(|field| field as _)
7705        }
7706        ///Sets `chain` with the provided value.
7707        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7708            self.chain = Some(field.into().into());
7709        }
7710        ///Sets `chain` with the provided value.
7711        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7712            self.set_chain(field.into());
7713            self
7714        }
7715        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7716        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7717            self.epoch.as_mut().map(|field| field as _)
7718        }
7719        ///Returns a mutable reference to `epoch`.
7720        ///If the field is unset, it is first initialized with the default value.
7721        pub fn epoch_mut(&mut self) -> &mut u64 {
7722            self.epoch.get_or_insert_default()
7723        }
7724        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7725        pub fn epoch_opt(&self) -> Option<u64> {
7726            self.epoch.as_ref().map(|field| *field)
7727        }
7728        ///Sets `epoch` with the provided value.
7729        pub fn set_epoch(&mut self, field: u64) {
7730            self.epoch = Some(field);
7731        }
7732        ///Sets `epoch` with the provided value.
7733        pub fn with_epoch(mut self, field: u64) -> Self {
7734            self.set_epoch(field);
7735            self
7736        }
7737        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7738        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7739            self.checkpoint_height.as_mut().map(|field| field as _)
7740        }
7741        ///Returns a mutable reference to `checkpoint_height`.
7742        ///If the field is unset, it is first initialized with the default value.
7743        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7744            self.checkpoint_height.get_or_insert_default()
7745        }
7746        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
7747        pub fn checkpoint_height_opt(&self) -> Option<u64> {
7748            self.checkpoint_height.as_ref().map(|field| *field)
7749        }
7750        ///Sets `checkpoint_height` with the provided value.
7751        pub fn set_checkpoint_height(&mut self, field: u64) {
7752            self.checkpoint_height = Some(field);
7753        }
7754        ///Sets `checkpoint_height` with the provided value.
7755        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
7756            self.set_checkpoint_height(field);
7757            self
7758        }
7759        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7760        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
7761            self.timestamp.as_mut().map(|field| field as _)
7762        }
7763        ///Returns a mutable reference to `timestamp`.
7764        ///If the field is unset, it is first initialized with the default value.
7765        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
7766            self.timestamp.get_or_insert_default()
7767        }
7768        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
7769        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
7770            self.timestamp.as_ref().map(|field| field as _)
7771        }
7772        ///Sets `timestamp` with the provided value.
7773        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
7774            self.timestamp = Some(field.into().into());
7775        }
7776        ///Sets `timestamp` with the provided value.
7777        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
7778            mut self,
7779            field: T,
7780        ) -> Self {
7781            self.set_timestamp(field.into());
7782            self
7783        }
7784        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7785        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
7786            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
7787        }
7788        ///Returns a mutable reference to `lowest_available_checkpoint`.
7789        ///If the field is unset, it is first initialized with the default value.
7790        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
7791            self.lowest_available_checkpoint.get_or_insert_default()
7792        }
7793        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7794        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
7795            self.lowest_available_checkpoint.as_ref().map(|field| *field)
7796        }
7797        ///Sets `lowest_available_checkpoint` with the provided value.
7798        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
7799            self.lowest_available_checkpoint = Some(field);
7800        }
7801        ///Sets `lowest_available_checkpoint` with the provided value.
7802        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
7803            self.set_lowest_available_checkpoint(field);
7804            self
7805        }
7806        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7807        pub fn lowest_available_checkpoint_objects_opt_mut(
7808            &mut self,
7809        ) -> Option<&mut u64> {
7810            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
7811        }
7812        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
7813        ///If the field is unset, it is first initialized with the default value.
7814        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
7815            self.lowest_available_checkpoint_objects.get_or_insert_default()
7816        }
7817        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
7818        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
7819            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
7820        }
7821        ///Sets `lowest_available_checkpoint_objects` with the provided value.
7822        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
7823            self.lowest_available_checkpoint_objects = Some(field);
7824        }
7825        ///Sets `lowest_available_checkpoint_objects` with the provided value.
7826        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
7827            self.set_lowest_available_checkpoint_objects(field);
7828            self
7829        }
7830        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7831        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
7832            self.server.as_mut().map(|field| field as _)
7833        }
7834        ///Returns a mutable reference to `server`.
7835        ///If the field is unset, it is first initialized with the default value.
7836        pub fn server_mut(&mut self) -> &mut String {
7837            self.server.get_or_insert_default()
7838        }
7839        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
7840        pub fn server_opt(&self) -> Option<&str> {
7841            self.server.as_ref().map(|field| field as _)
7842        }
7843        ///Sets `server` with the provided value.
7844        pub fn set_server<T: Into<String>>(&mut self, field: T) {
7845            self.server = Some(field.into().into());
7846        }
7847        ///Sets `server` with the provided value.
7848        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
7849            self.set_server(field.into());
7850            self
7851        }
7852    }
7853    impl super::GetTransactionRequest {
7854        pub const fn const_default() -> Self {
7855            Self {
7856                digest: None,
7857                read_mask: None,
7858            }
7859        }
7860        #[doc(hidden)]
7861        pub fn default_instance() -> &'static Self {
7862            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
7863            &DEFAULT
7864        }
7865        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7866        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7867            self.digest.as_mut().map(|field| field as _)
7868        }
7869        ///Returns a mutable reference to `digest`.
7870        ///If the field is unset, it is first initialized with the default value.
7871        pub fn digest_mut(&mut self) -> &mut String {
7872            self.digest.get_or_insert_default()
7873        }
7874        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7875        pub fn digest_opt(&self) -> Option<&str> {
7876            self.digest.as_ref().map(|field| field as _)
7877        }
7878        ///Sets `digest` with the provided value.
7879        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7880            self.digest = Some(field.into().into());
7881        }
7882        ///Sets `digest` with the provided value.
7883        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7884            self.set_digest(field.into());
7885            self
7886        }
7887        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7888        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7889            self.read_mask.as_mut().map(|field| field as _)
7890        }
7891        ///Returns a mutable reference to `read_mask`.
7892        ///If the field is unset, it is first initialized with the default value.
7893        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7894            self.read_mask.get_or_insert_default()
7895        }
7896        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7897        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7898            self.read_mask.as_ref().map(|field| field as _)
7899        }
7900        ///Sets `read_mask` with the provided value.
7901        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7902            self.read_mask = Some(field.into().into());
7903        }
7904        ///Sets `read_mask` with the provided value.
7905        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7906            mut self,
7907            field: T,
7908        ) -> Self {
7909            self.set_read_mask(field.into());
7910            self
7911        }
7912    }
7913    impl super::GetTransactionResponse {
7914        pub const fn const_default() -> Self {
7915            Self { transaction: None }
7916        }
7917        #[doc(hidden)]
7918        pub fn default_instance() -> &'static Self {
7919            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
7920            &DEFAULT
7921        }
7922        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
7923        pub fn transaction(&self) -> &super::ExecutedTransaction {
7924            self.transaction
7925                .as_ref()
7926                .map(|field| field as _)
7927                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
7928        }
7929        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7930        pub fn transaction_opt_mut(
7931            &mut self,
7932        ) -> Option<&mut super::ExecutedTransaction> {
7933            self.transaction.as_mut().map(|field| field as _)
7934        }
7935        ///Returns a mutable reference to `transaction`.
7936        ///If the field is unset, it is first initialized with the default value.
7937        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
7938            self.transaction.get_or_insert_default()
7939        }
7940        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
7941        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7942            self.transaction.as_ref().map(|field| field as _)
7943        }
7944        ///Sets `transaction` with the provided value.
7945        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
7946            &mut self,
7947            field: T,
7948        ) {
7949            self.transaction = Some(field.into().into());
7950        }
7951        ///Sets `transaction` with the provided value.
7952        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
7953            mut self,
7954            field: T,
7955        ) -> Self {
7956            self.set_transaction(field.into());
7957            self
7958        }
7959    }
7960    impl super::GetTransactionResult {
7961        pub const fn const_default() -> Self {
7962            Self { result: None }
7963        }
7964        #[doc(hidden)]
7965        pub fn default_instance() -> &'static Self {
7966            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
7967            &DEFAULT
7968        }
7969        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
7970        pub fn transaction(&self) -> &super::ExecutedTransaction {
7971            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
7972                .result
7973            {
7974                field as _
7975            } else {
7976                super::ExecutedTransaction::default_instance() as _
7977            }
7978        }
7979        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
7980        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7981            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
7982                .result
7983            {
7984                Some(field as _)
7985            } else {
7986                None
7987            }
7988        }
7989        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7990        pub fn transaction_opt_mut(
7991            &mut self,
7992        ) -> Option<&mut super::ExecutedTransaction> {
7993            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
7994                .result
7995            {
7996                Some(field as _)
7997            } else {
7998                None
7999            }
8000        }
8001        ///Returns a mutable reference to `transaction`.
8002        ///If the field is unset, it is first initialized with the default value.
8003        ///If any other oneof field in the same oneof is set, it will be cleared.
8004        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8005            if self.transaction_opt_mut().is_none() {
8006                self.result = Some(
8007                    super::get_transaction_result::Result::Transaction(
8008                        super::ExecutedTransaction::default(),
8009                    ),
8010                );
8011            }
8012            self.transaction_opt_mut().unwrap()
8013        }
8014        ///Sets `transaction` with the provided value.
8015        ///If any other oneof field in the same oneof is set, it will be cleared.
8016        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8017            &mut self,
8018            field: T,
8019        ) {
8020            self.result = Some(
8021                super::get_transaction_result::Result::Transaction(field.into().into()),
8022            );
8023        }
8024        ///Sets `transaction` with the provided value.
8025        ///If any other oneof field in the same oneof is set, it will be cleared.
8026        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8027            mut self,
8028            field: T,
8029        ) -> Self {
8030            self.set_transaction(field.into());
8031            self
8032        }
8033        ///Returns the value of `error`, or the default value if `error` is unset.
8034        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8035            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8036                .result
8037            {
8038                field as _
8039            } else {
8040                super::super::super::super::google::rpc::Status::default_instance() as _
8041            }
8042        }
8043        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8044        pub fn error_opt(
8045            &self,
8046        ) -> Option<&super::super::super::super::google::rpc::Status> {
8047            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8048                .result
8049            {
8050                Some(field as _)
8051            } else {
8052                None
8053            }
8054        }
8055        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8056        pub fn error_opt_mut(
8057            &mut self,
8058        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8059            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8060                .result
8061            {
8062                Some(field as _)
8063            } else {
8064                None
8065            }
8066        }
8067        ///Returns a mutable reference to `error`.
8068        ///If the field is unset, it is first initialized with the default value.
8069        ///If any other oneof field in the same oneof is set, it will be cleared.
8070        pub fn error_mut(
8071            &mut self,
8072        ) -> &mut super::super::super::super::google::rpc::Status {
8073            if self.error_opt_mut().is_none() {
8074                self.result = Some(
8075                    super::get_transaction_result::Result::Error(
8076                        super::super::super::super::google::rpc::Status::default(),
8077                    ),
8078                );
8079            }
8080            self.error_opt_mut().unwrap()
8081        }
8082        ///Sets `error` with the provided value.
8083        ///If any other oneof field in the same oneof is set, it will be cleared.
8084        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8085            &mut self,
8086            field: T,
8087        ) {
8088            self.result = Some(
8089                super::get_transaction_result::Result::Error(field.into().into()),
8090            );
8091        }
8092        ///Sets `error` with the provided value.
8093        ///If any other oneof field in the same oneof is set, it will be cleared.
8094        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8095            mut self,
8096            field: T,
8097        ) -> Self {
8098            self.set_error(field.into());
8099            self
8100        }
8101    }
8102    impl super::IndexError {
8103        pub const fn const_default() -> Self {
8104            Self {
8105                index: None,
8106                subresult: None,
8107            }
8108        }
8109        #[doc(hidden)]
8110        pub fn default_instance() -> &'static Self {
8111            static DEFAULT: super::IndexError = super::IndexError::const_default();
8112            &DEFAULT
8113        }
8114        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8115        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8116            self.index.as_mut().map(|field| field as _)
8117        }
8118        ///Returns a mutable reference to `index`.
8119        ///If the field is unset, it is first initialized with the default value.
8120        pub fn index_mut(&mut self) -> &mut u32 {
8121            self.index.get_or_insert_default()
8122        }
8123        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8124        pub fn index_opt(&self) -> Option<u32> {
8125            self.index.as_ref().map(|field| *field)
8126        }
8127        ///Sets `index` with the provided value.
8128        pub fn set_index(&mut self, field: u32) {
8129            self.index = Some(field);
8130        }
8131        ///Sets `index` with the provided value.
8132        pub fn with_index(mut self, field: u32) -> Self {
8133            self.set_index(field);
8134            self
8135        }
8136        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8137        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8138            self.subresult.as_mut().map(|field| field as _)
8139        }
8140        ///Returns a mutable reference to `subresult`.
8141        ///If the field is unset, it is first initialized with the default value.
8142        pub fn subresult_mut(&mut self) -> &mut u32 {
8143            self.subresult.get_or_insert_default()
8144        }
8145        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8146        pub fn subresult_opt(&self) -> Option<u32> {
8147            self.subresult.as_ref().map(|field| *field)
8148        }
8149        ///Sets `subresult` with the provided value.
8150        pub fn set_subresult(&mut self, field: u32) {
8151            self.subresult = Some(field);
8152        }
8153        ///Sets `subresult` with the provided value.
8154        pub fn with_subresult(mut self, field: u32) -> Self {
8155            self.set_subresult(field);
8156            self
8157        }
8158    }
8159    impl super::Input {
8160        pub const fn const_default() -> Self {
8161            Self {
8162                kind: None,
8163                pure: None,
8164                object_id: None,
8165                version: None,
8166                digest: None,
8167                mutable: None,
8168                literal: None,
8169            }
8170        }
8171        #[doc(hidden)]
8172        pub fn default_instance() -> &'static Self {
8173            static DEFAULT: super::Input = super::Input::const_default();
8174            &DEFAULT
8175        }
8176        ///Sets `kind` with the provided value.
8177        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8178            self.set_kind(field.into());
8179            self
8180        }
8181        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8182        pub fn pure_opt(&self) -> Option<&[u8]> {
8183            self.pure.as_ref().map(|field| field as _)
8184        }
8185        ///Sets `pure` with the provided value.
8186        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8187            self.pure = Some(field.into().into());
8188        }
8189        ///Sets `pure` with the provided value.
8190        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8191            self.set_pure(field.into());
8192            self
8193        }
8194        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8195        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8196            self.object_id.as_mut().map(|field| field as _)
8197        }
8198        ///Returns a mutable reference to `object_id`.
8199        ///If the field is unset, it is first initialized with the default value.
8200        pub fn object_id_mut(&mut self) -> &mut String {
8201            self.object_id.get_or_insert_default()
8202        }
8203        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8204        pub fn object_id_opt(&self) -> Option<&str> {
8205            self.object_id.as_ref().map(|field| field as _)
8206        }
8207        ///Sets `object_id` with the provided value.
8208        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8209            self.object_id = Some(field.into().into());
8210        }
8211        ///Sets `object_id` with the provided value.
8212        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8213            self.set_object_id(field.into());
8214            self
8215        }
8216        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8217        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8218            self.version.as_mut().map(|field| field as _)
8219        }
8220        ///Returns a mutable reference to `version`.
8221        ///If the field is unset, it is first initialized with the default value.
8222        pub fn version_mut(&mut self) -> &mut u64 {
8223            self.version.get_or_insert_default()
8224        }
8225        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8226        pub fn version_opt(&self) -> Option<u64> {
8227            self.version.as_ref().map(|field| *field)
8228        }
8229        ///Sets `version` with the provided value.
8230        pub fn set_version(&mut self, field: u64) {
8231            self.version = Some(field);
8232        }
8233        ///Sets `version` with the provided value.
8234        pub fn with_version(mut self, field: u64) -> Self {
8235            self.set_version(field);
8236            self
8237        }
8238        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8239        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8240            self.digest.as_mut().map(|field| field as _)
8241        }
8242        ///Returns a mutable reference to `digest`.
8243        ///If the field is unset, it is first initialized with the default value.
8244        pub fn digest_mut(&mut self) -> &mut String {
8245            self.digest.get_or_insert_default()
8246        }
8247        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8248        pub fn digest_opt(&self) -> Option<&str> {
8249            self.digest.as_ref().map(|field| field as _)
8250        }
8251        ///Sets `digest` with the provided value.
8252        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8253            self.digest = Some(field.into().into());
8254        }
8255        ///Sets `digest` with the provided value.
8256        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8257            self.set_digest(field.into());
8258            self
8259        }
8260        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8261        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8262            self.mutable.as_mut().map(|field| field as _)
8263        }
8264        ///Returns a mutable reference to `mutable`.
8265        ///If the field is unset, it is first initialized with the default value.
8266        pub fn mutable_mut(&mut self) -> &mut bool {
8267            self.mutable.get_or_insert_default()
8268        }
8269        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8270        pub fn mutable_opt(&self) -> Option<bool> {
8271            self.mutable.as_ref().map(|field| *field)
8272        }
8273        ///Sets `mutable` with the provided value.
8274        pub fn set_mutable(&mut self, field: bool) {
8275            self.mutable = Some(field);
8276        }
8277        ///Sets `mutable` with the provided value.
8278        pub fn with_mutable(mut self, field: bool) -> Self {
8279            self.set_mutable(field);
8280            self
8281        }
8282        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8283        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8284            self.literal.as_mut().map(|field| field as _)
8285        }
8286        ///Returns a mutable reference to `literal`.
8287        ///If the field is unset, it is first initialized with the default value.
8288        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8289            self.literal.get_or_insert_default()
8290        }
8291        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8292        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8293            self.literal.as_ref().map(|field| field as _)
8294        }
8295        ///Sets `literal` with the provided value.
8296        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8297            self.literal = Some(field.into().into());
8298        }
8299        ///Sets `literal` with the provided value.
8300        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8301            self.set_literal(field.into());
8302            self
8303        }
8304    }
8305    impl super::Jwk {
8306        pub const fn const_default() -> Self {
8307            Self {
8308                kty: None,
8309                e: None,
8310                n: None,
8311                alg: None,
8312            }
8313        }
8314        #[doc(hidden)]
8315        pub fn default_instance() -> &'static Self {
8316            static DEFAULT: super::Jwk = super::Jwk::const_default();
8317            &DEFAULT
8318        }
8319        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8320        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8321            self.kty.as_mut().map(|field| field as _)
8322        }
8323        ///Returns a mutable reference to `kty`.
8324        ///If the field is unset, it is first initialized with the default value.
8325        pub fn kty_mut(&mut self) -> &mut String {
8326            self.kty.get_or_insert_default()
8327        }
8328        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8329        pub fn kty_opt(&self) -> Option<&str> {
8330            self.kty.as_ref().map(|field| field as _)
8331        }
8332        ///Sets `kty` with the provided value.
8333        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8334            self.kty = Some(field.into().into());
8335        }
8336        ///Sets `kty` with the provided value.
8337        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8338            self.set_kty(field.into());
8339            self
8340        }
8341        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8342        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8343            self.e.as_mut().map(|field| field as _)
8344        }
8345        ///Returns a mutable reference to `e`.
8346        ///If the field is unset, it is first initialized with the default value.
8347        pub fn e_mut(&mut self) -> &mut String {
8348            self.e.get_or_insert_default()
8349        }
8350        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8351        pub fn e_opt(&self) -> Option<&str> {
8352            self.e.as_ref().map(|field| field as _)
8353        }
8354        ///Sets `e` with the provided value.
8355        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8356            self.e = Some(field.into().into());
8357        }
8358        ///Sets `e` with the provided value.
8359        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8360            self.set_e(field.into());
8361            self
8362        }
8363        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8364        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8365            self.n.as_mut().map(|field| field as _)
8366        }
8367        ///Returns a mutable reference to `n`.
8368        ///If the field is unset, it is first initialized with the default value.
8369        pub fn n_mut(&mut self) -> &mut String {
8370            self.n.get_or_insert_default()
8371        }
8372        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8373        pub fn n_opt(&self) -> Option<&str> {
8374            self.n.as_ref().map(|field| field as _)
8375        }
8376        ///Sets `n` with the provided value.
8377        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8378            self.n = Some(field.into().into());
8379        }
8380        ///Sets `n` with the provided value.
8381        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8382            self.set_n(field.into());
8383            self
8384        }
8385        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8386        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8387            self.alg.as_mut().map(|field| field as _)
8388        }
8389        ///Returns a mutable reference to `alg`.
8390        ///If the field is unset, it is first initialized with the default value.
8391        pub fn alg_mut(&mut self) -> &mut String {
8392            self.alg.get_or_insert_default()
8393        }
8394        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8395        pub fn alg_opt(&self) -> Option<&str> {
8396            self.alg.as_ref().map(|field| field as _)
8397        }
8398        ///Sets `alg` with the provided value.
8399        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8400            self.alg = Some(field.into().into());
8401        }
8402        ///Sets `alg` with the provided value.
8403        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8404            self.set_alg(field.into());
8405            self
8406        }
8407    }
8408    impl super::JwkId {
8409        pub const fn const_default() -> Self {
8410            Self { iss: None, kid: None }
8411        }
8412        #[doc(hidden)]
8413        pub fn default_instance() -> &'static Self {
8414            static DEFAULT: super::JwkId = super::JwkId::const_default();
8415            &DEFAULT
8416        }
8417        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8418        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8419            self.iss.as_mut().map(|field| field as _)
8420        }
8421        ///Returns a mutable reference to `iss`.
8422        ///If the field is unset, it is first initialized with the default value.
8423        pub fn iss_mut(&mut self) -> &mut String {
8424            self.iss.get_or_insert_default()
8425        }
8426        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8427        pub fn iss_opt(&self) -> Option<&str> {
8428            self.iss.as_ref().map(|field| field as _)
8429        }
8430        ///Sets `iss` with the provided value.
8431        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8432            self.iss = Some(field.into().into());
8433        }
8434        ///Sets `iss` with the provided value.
8435        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8436            self.set_iss(field.into());
8437            self
8438        }
8439        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8440        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8441            self.kid.as_mut().map(|field| field as _)
8442        }
8443        ///Returns a mutable reference to `kid`.
8444        ///If the field is unset, it is first initialized with the default value.
8445        pub fn kid_mut(&mut self) -> &mut String {
8446            self.kid.get_or_insert_default()
8447        }
8448        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8449        pub fn kid_opt(&self) -> Option<&str> {
8450            self.kid.as_ref().map(|field| field as _)
8451        }
8452        ///Sets `kid` with the provided value.
8453        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8454            self.kid = Some(field.into().into());
8455        }
8456        ///Sets `kid` with the provided value.
8457        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8458            self.set_kid(field.into());
8459            self
8460        }
8461    }
8462    impl super::Linkage {
8463        pub const fn const_default() -> Self {
8464            Self {
8465                original_id: None,
8466                upgraded_id: None,
8467                upgraded_version: None,
8468            }
8469        }
8470        #[doc(hidden)]
8471        pub fn default_instance() -> &'static Self {
8472            static DEFAULT: super::Linkage = super::Linkage::const_default();
8473            &DEFAULT
8474        }
8475        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8476        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8477            self.original_id.as_mut().map(|field| field as _)
8478        }
8479        ///Returns a mutable reference to `original_id`.
8480        ///If the field is unset, it is first initialized with the default value.
8481        pub fn original_id_mut(&mut self) -> &mut String {
8482            self.original_id.get_or_insert_default()
8483        }
8484        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8485        pub fn original_id_opt(&self) -> Option<&str> {
8486            self.original_id.as_ref().map(|field| field as _)
8487        }
8488        ///Sets `original_id` with the provided value.
8489        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8490            self.original_id = Some(field.into().into());
8491        }
8492        ///Sets `original_id` with the provided value.
8493        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8494            self.set_original_id(field.into());
8495            self
8496        }
8497        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8498        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8499            self.upgraded_id.as_mut().map(|field| field as _)
8500        }
8501        ///Returns a mutable reference to `upgraded_id`.
8502        ///If the field is unset, it is first initialized with the default value.
8503        pub fn upgraded_id_mut(&mut self) -> &mut String {
8504            self.upgraded_id.get_or_insert_default()
8505        }
8506        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8507        pub fn upgraded_id_opt(&self) -> Option<&str> {
8508            self.upgraded_id.as_ref().map(|field| field as _)
8509        }
8510        ///Sets `upgraded_id` with the provided value.
8511        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8512            self.upgraded_id = Some(field.into().into());
8513        }
8514        ///Sets `upgraded_id` with the provided value.
8515        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8516            self.set_upgraded_id(field.into());
8517            self
8518        }
8519        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8520        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8521            self.upgraded_version.as_mut().map(|field| field as _)
8522        }
8523        ///Returns a mutable reference to `upgraded_version`.
8524        ///If the field is unset, it is first initialized with the default value.
8525        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8526            self.upgraded_version.get_or_insert_default()
8527        }
8528        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8529        pub fn upgraded_version_opt(&self) -> Option<u64> {
8530            self.upgraded_version.as_ref().map(|field| *field)
8531        }
8532        ///Sets `upgraded_version` with the provided value.
8533        pub fn set_upgraded_version(&mut self, field: u64) {
8534            self.upgraded_version = Some(field);
8535        }
8536        ///Sets `upgraded_version` with the provided value.
8537        pub fn with_upgraded_version(mut self, field: u64) -> Self {
8538            self.set_upgraded_version(field);
8539            self
8540        }
8541    }
8542    impl super::ListBalancesRequest {
8543        pub const fn const_default() -> Self {
8544            Self {
8545                owner: None,
8546                page_size: None,
8547                page_token: None,
8548            }
8549        }
8550        #[doc(hidden)]
8551        pub fn default_instance() -> &'static Self {
8552            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8553            &DEFAULT
8554        }
8555        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8556        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8557            self.owner.as_mut().map(|field| field as _)
8558        }
8559        ///Returns a mutable reference to `owner`.
8560        ///If the field is unset, it is first initialized with the default value.
8561        pub fn owner_mut(&mut self) -> &mut String {
8562            self.owner.get_or_insert_default()
8563        }
8564        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8565        pub fn owner_opt(&self) -> Option<&str> {
8566            self.owner.as_ref().map(|field| field as _)
8567        }
8568        ///Sets `owner` with the provided value.
8569        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8570            self.owner = Some(field.into().into());
8571        }
8572        ///Sets `owner` with the provided value.
8573        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8574            self.set_owner(field.into());
8575            self
8576        }
8577        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8578        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8579            self.page_size.as_mut().map(|field| field as _)
8580        }
8581        ///Returns a mutable reference to `page_size`.
8582        ///If the field is unset, it is first initialized with the default value.
8583        pub fn page_size_mut(&mut self) -> &mut u32 {
8584            self.page_size.get_or_insert_default()
8585        }
8586        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8587        pub fn page_size_opt(&self) -> Option<u32> {
8588            self.page_size.as_ref().map(|field| *field)
8589        }
8590        ///Sets `page_size` with the provided value.
8591        pub fn set_page_size(&mut self, field: u32) {
8592            self.page_size = Some(field);
8593        }
8594        ///Sets `page_size` with the provided value.
8595        pub fn with_page_size(mut self, field: u32) -> Self {
8596            self.set_page_size(field);
8597            self
8598        }
8599        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8600        pub fn page_token_opt(&self) -> Option<&[u8]> {
8601            self.page_token.as_ref().map(|field| field as _)
8602        }
8603        ///Sets `page_token` with the provided value.
8604        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8605            self.page_token = Some(field.into().into());
8606        }
8607        ///Sets `page_token` with the provided value.
8608        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8609            mut self,
8610            field: T,
8611        ) -> Self {
8612            self.set_page_token(field.into());
8613            self
8614        }
8615    }
8616    impl super::ListBalancesResponse {
8617        pub const fn const_default() -> Self {
8618            Self {
8619                balances: Vec::new(),
8620                next_page_token: None,
8621            }
8622        }
8623        #[doc(hidden)]
8624        pub fn default_instance() -> &'static Self {
8625            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8626            &DEFAULT
8627        }
8628        ///Returns the value of `balances`, or the default value if `balances` is unset.
8629        pub fn balances(&self) -> &[super::Balance] {
8630            &self.balances
8631        }
8632        ///Returns a mutable reference to `balances`.
8633        ///If the field is unset, it is first initialized with the default value.
8634        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8635            &mut self.balances
8636        }
8637        ///Sets `balances` with the provided value.
8638        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8639            self.balances = field;
8640        }
8641        ///Sets `balances` with the provided value.
8642        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8643            self.set_balances(field);
8644            self
8645        }
8646        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8647        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8648            self.next_page_token.as_ref().map(|field| field as _)
8649        }
8650        ///Sets `next_page_token` with the provided value.
8651        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8652            self.next_page_token = Some(field.into().into());
8653        }
8654        ///Sets `next_page_token` with the provided value.
8655        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8656            mut self,
8657            field: T,
8658        ) -> Self {
8659            self.set_next_page_token(field.into());
8660            self
8661        }
8662    }
8663    impl super::ListDynamicFieldsRequest {
8664        pub const fn const_default() -> Self {
8665            Self {
8666                parent: None,
8667                page_size: None,
8668                page_token: None,
8669                read_mask: None,
8670            }
8671        }
8672        #[doc(hidden)]
8673        pub fn default_instance() -> &'static Self {
8674            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8675            &DEFAULT
8676        }
8677        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8678        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8679            self.parent.as_mut().map(|field| field as _)
8680        }
8681        ///Returns a mutable reference to `parent`.
8682        ///If the field is unset, it is first initialized with the default value.
8683        pub fn parent_mut(&mut self) -> &mut String {
8684            self.parent.get_or_insert_default()
8685        }
8686        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
8687        pub fn parent_opt(&self) -> Option<&str> {
8688            self.parent.as_ref().map(|field| field as _)
8689        }
8690        ///Sets `parent` with the provided value.
8691        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8692            self.parent = Some(field.into().into());
8693        }
8694        ///Sets `parent` with the provided value.
8695        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8696            self.set_parent(field.into());
8697            self
8698        }
8699        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8700        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8701            self.page_size.as_mut().map(|field| field as _)
8702        }
8703        ///Returns a mutable reference to `page_size`.
8704        ///If the field is unset, it is first initialized with the default value.
8705        pub fn page_size_mut(&mut self) -> &mut u32 {
8706            self.page_size.get_or_insert_default()
8707        }
8708        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8709        pub fn page_size_opt(&self) -> Option<u32> {
8710            self.page_size.as_ref().map(|field| *field)
8711        }
8712        ///Sets `page_size` with the provided value.
8713        pub fn set_page_size(&mut self, field: u32) {
8714            self.page_size = Some(field);
8715        }
8716        ///Sets `page_size` with the provided value.
8717        pub fn with_page_size(mut self, field: u32) -> Self {
8718            self.set_page_size(field);
8719            self
8720        }
8721        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8722        pub fn page_token_opt(&self) -> Option<&[u8]> {
8723            self.page_token.as_ref().map(|field| field as _)
8724        }
8725        ///Sets `page_token` with the provided value.
8726        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8727            self.page_token = Some(field.into().into());
8728        }
8729        ///Sets `page_token` with the provided value.
8730        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8731            mut self,
8732            field: T,
8733        ) -> Self {
8734            self.set_page_token(field.into());
8735            self
8736        }
8737        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8738        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8739            self.read_mask.as_mut().map(|field| field as _)
8740        }
8741        ///Returns a mutable reference to `read_mask`.
8742        ///If the field is unset, it is first initialized with the default value.
8743        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8744            self.read_mask.get_or_insert_default()
8745        }
8746        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8747        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8748            self.read_mask.as_ref().map(|field| field as _)
8749        }
8750        ///Sets `read_mask` with the provided value.
8751        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8752            self.read_mask = Some(field.into().into());
8753        }
8754        ///Sets `read_mask` with the provided value.
8755        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8756            mut self,
8757            field: T,
8758        ) -> Self {
8759            self.set_read_mask(field.into());
8760            self
8761        }
8762    }
8763    impl super::ListDynamicFieldsResponse {
8764        pub const fn const_default() -> Self {
8765            Self {
8766                dynamic_fields: Vec::new(),
8767                next_page_token: None,
8768            }
8769        }
8770        #[doc(hidden)]
8771        pub fn default_instance() -> &'static Self {
8772            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
8773            &DEFAULT
8774        }
8775        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
8776        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
8777            &self.dynamic_fields
8778        }
8779        ///Returns a mutable reference to `dynamic_fields`.
8780        ///If the field is unset, it is first initialized with the default value.
8781        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
8782            &mut self.dynamic_fields
8783        }
8784        ///Sets `dynamic_fields` with the provided value.
8785        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
8786            self.dynamic_fields = field;
8787        }
8788        ///Sets `dynamic_fields` with the provided value.
8789        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
8790            self.set_dynamic_fields(field);
8791            self
8792        }
8793        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8794        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8795            self.next_page_token.as_ref().map(|field| field as _)
8796        }
8797        ///Sets `next_page_token` with the provided value.
8798        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8799            self.next_page_token = Some(field.into().into());
8800        }
8801        ///Sets `next_page_token` with the provided value.
8802        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8803            mut self,
8804            field: T,
8805        ) -> Self {
8806            self.set_next_page_token(field.into());
8807            self
8808        }
8809    }
8810    impl super::ListOwnedObjectsRequest {
8811        pub const fn const_default() -> Self {
8812            Self {
8813                owner: None,
8814                page_size: None,
8815                page_token: None,
8816                read_mask: None,
8817                object_type: None,
8818            }
8819        }
8820        #[doc(hidden)]
8821        pub fn default_instance() -> &'static Self {
8822            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
8823            &DEFAULT
8824        }
8825        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8826        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8827            self.owner.as_mut().map(|field| field as _)
8828        }
8829        ///Returns a mutable reference to `owner`.
8830        ///If the field is unset, it is first initialized with the default value.
8831        pub fn owner_mut(&mut self) -> &mut String {
8832            self.owner.get_or_insert_default()
8833        }
8834        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8835        pub fn owner_opt(&self) -> Option<&str> {
8836            self.owner.as_ref().map(|field| field as _)
8837        }
8838        ///Sets `owner` with the provided value.
8839        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8840            self.owner = Some(field.into().into());
8841        }
8842        ///Sets `owner` with the provided value.
8843        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8844            self.set_owner(field.into());
8845            self
8846        }
8847        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8848        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8849            self.page_size.as_mut().map(|field| field as _)
8850        }
8851        ///Returns a mutable reference to `page_size`.
8852        ///If the field is unset, it is first initialized with the default value.
8853        pub fn page_size_mut(&mut self) -> &mut u32 {
8854            self.page_size.get_or_insert_default()
8855        }
8856        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8857        pub fn page_size_opt(&self) -> Option<u32> {
8858            self.page_size.as_ref().map(|field| *field)
8859        }
8860        ///Sets `page_size` with the provided value.
8861        pub fn set_page_size(&mut self, field: u32) {
8862            self.page_size = Some(field);
8863        }
8864        ///Sets `page_size` with the provided value.
8865        pub fn with_page_size(mut self, field: u32) -> Self {
8866            self.set_page_size(field);
8867            self
8868        }
8869        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8870        pub fn page_token_opt(&self) -> Option<&[u8]> {
8871            self.page_token.as_ref().map(|field| field as _)
8872        }
8873        ///Sets `page_token` with the provided value.
8874        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8875            self.page_token = Some(field.into().into());
8876        }
8877        ///Sets `page_token` with the provided value.
8878        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8879            mut self,
8880            field: T,
8881        ) -> Self {
8882            self.set_page_token(field.into());
8883            self
8884        }
8885        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8886        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8887            self.read_mask.as_mut().map(|field| field as _)
8888        }
8889        ///Returns a mutable reference to `read_mask`.
8890        ///If the field is unset, it is first initialized with the default value.
8891        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8892            self.read_mask.get_or_insert_default()
8893        }
8894        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8895        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8896            self.read_mask.as_ref().map(|field| field as _)
8897        }
8898        ///Sets `read_mask` with the provided value.
8899        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8900            self.read_mask = Some(field.into().into());
8901        }
8902        ///Sets `read_mask` with the provided value.
8903        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8904            mut self,
8905            field: T,
8906        ) -> Self {
8907            self.set_read_mask(field.into());
8908            self
8909        }
8910        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8911        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
8912            self.object_type.as_mut().map(|field| field as _)
8913        }
8914        ///Returns a mutable reference to `object_type`.
8915        ///If the field is unset, it is first initialized with the default value.
8916        pub fn object_type_mut(&mut self) -> &mut String {
8917            self.object_type.get_or_insert_default()
8918        }
8919        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8920        pub fn object_type_opt(&self) -> Option<&str> {
8921            self.object_type.as_ref().map(|field| field as _)
8922        }
8923        ///Sets `object_type` with the provided value.
8924        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
8925            self.object_type = Some(field.into().into());
8926        }
8927        ///Sets `object_type` with the provided value.
8928        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
8929            self.set_object_type(field.into());
8930            self
8931        }
8932    }
8933    impl super::ListOwnedObjectsResponse {
8934        pub const fn const_default() -> Self {
8935            Self {
8936                objects: Vec::new(),
8937                next_page_token: None,
8938            }
8939        }
8940        #[doc(hidden)]
8941        pub fn default_instance() -> &'static Self {
8942            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
8943            &DEFAULT
8944        }
8945        ///Returns the value of `objects`, or the default value if `objects` is unset.
8946        pub fn objects(&self) -> &[super::Object] {
8947            &self.objects
8948        }
8949        ///Returns a mutable reference to `objects`.
8950        ///If the field is unset, it is first initialized with the default value.
8951        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
8952            &mut self.objects
8953        }
8954        ///Sets `objects` with the provided value.
8955        pub fn set_objects(&mut self, field: Vec<super::Object>) {
8956            self.objects = field;
8957        }
8958        ///Sets `objects` with the provided value.
8959        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
8960            self.set_objects(field);
8961            self
8962        }
8963        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8964        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8965            self.next_page_token.as_ref().map(|field| field as _)
8966        }
8967        ///Sets `next_page_token` with the provided value.
8968        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8969            self.next_page_token = Some(field.into().into());
8970        }
8971        ///Sets `next_page_token` with the provided value.
8972        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8973            mut self,
8974            field: T,
8975        ) -> Self {
8976            self.set_next_page_token(field.into());
8977            self
8978        }
8979    }
8980    impl super::ListPackageVersionsRequest {
8981        pub const fn const_default() -> Self {
8982            Self {
8983                package_id: None,
8984                page_size: None,
8985                page_token: None,
8986            }
8987        }
8988        #[doc(hidden)]
8989        pub fn default_instance() -> &'static Self {
8990            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
8991            &DEFAULT
8992        }
8993        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8994        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8995            self.package_id.as_mut().map(|field| field as _)
8996        }
8997        ///Returns a mutable reference to `package_id`.
8998        ///If the field is unset, it is first initialized with the default value.
8999        pub fn package_id_mut(&mut self) -> &mut String {
9000            self.package_id.get_or_insert_default()
9001        }
9002        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9003        pub fn package_id_opt(&self) -> Option<&str> {
9004            self.package_id.as_ref().map(|field| field as _)
9005        }
9006        ///Sets `package_id` with the provided value.
9007        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9008            self.package_id = Some(field.into().into());
9009        }
9010        ///Sets `package_id` with the provided value.
9011        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9012            self.set_package_id(field.into());
9013            self
9014        }
9015        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9016        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9017            self.page_size.as_mut().map(|field| field as _)
9018        }
9019        ///Returns a mutable reference to `page_size`.
9020        ///If the field is unset, it is first initialized with the default value.
9021        pub fn page_size_mut(&mut self) -> &mut u32 {
9022            self.page_size.get_or_insert_default()
9023        }
9024        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9025        pub fn page_size_opt(&self) -> Option<u32> {
9026            self.page_size.as_ref().map(|field| *field)
9027        }
9028        ///Sets `page_size` with the provided value.
9029        pub fn set_page_size(&mut self, field: u32) {
9030            self.page_size = Some(field);
9031        }
9032        ///Sets `page_size` with the provided value.
9033        pub fn with_page_size(mut self, field: u32) -> Self {
9034            self.set_page_size(field);
9035            self
9036        }
9037        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9038        pub fn page_token_opt(&self) -> Option<&[u8]> {
9039            self.page_token.as_ref().map(|field| field as _)
9040        }
9041        ///Sets `page_token` with the provided value.
9042        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9043            self.page_token = Some(field.into().into());
9044        }
9045        ///Sets `page_token` with the provided value.
9046        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9047            mut self,
9048            field: T,
9049        ) -> Self {
9050            self.set_page_token(field.into());
9051            self
9052        }
9053    }
9054    impl super::ListPackageVersionsResponse {
9055        pub const fn const_default() -> Self {
9056            Self {
9057                versions: Vec::new(),
9058                next_page_token: None,
9059            }
9060        }
9061        #[doc(hidden)]
9062        pub fn default_instance() -> &'static Self {
9063            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9064            &DEFAULT
9065        }
9066        ///Returns the value of `versions`, or the default value if `versions` is unset.
9067        pub fn versions(&self) -> &[super::PackageVersion] {
9068            &self.versions
9069        }
9070        ///Returns a mutable reference to `versions`.
9071        ///If the field is unset, it is first initialized with the default value.
9072        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9073            &mut self.versions
9074        }
9075        ///Sets `versions` with the provided value.
9076        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9077            self.versions = field;
9078        }
9079        ///Sets `versions` with the provided value.
9080        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9081            self.set_versions(field);
9082            self
9083        }
9084        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9085        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9086            self.next_page_token.as_ref().map(|field| field as _)
9087        }
9088        ///Sets `next_page_token` with the provided value.
9089        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9090            self.next_page_token = Some(field.into().into());
9091        }
9092        ///Sets `next_page_token` with the provided value.
9093        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9094            mut self,
9095            field: T,
9096        ) -> Self {
9097            self.set_next_page_token(field.into());
9098            self
9099        }
9100    }
9101    impl super::LookupNameRequest {
9102        pub const fn const_default() -> Self {
9103            Self { name: None }
9104        }
9105        #[doc(hidden)]
9106        pub fn default_instance() -> &'static Self {
9107            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9108            &DEFAULT
9109        }
9110        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9111        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9112            self.name.as_mut().map(|field| field as _)
9113        }
9114        ///Returns a mutable reference to `name`.
9115        ///If the field is unset, it is first initialized with the default value.
9116        pub fn name_mut(&mut self) -> &mut String {
9117            self.name.get_or_insert_default()
9118        }
9119        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9120        pub fn name_opt(&self) -> Option<&str> {
9121            self.name.as_ref().map(|field| field as _)
9122        }
9123        ///Sets `name` with the provided value.
9124        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9125            self.name = Some(field.into().into());
9126        }
9127        ///Sets `name` with the provided value.
9128        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9129            self.set_name(field.into());
9130            self
9131        }
9132    }
9133    impl super::LookupNameResponse {
9134        pub const fn const_default() -> Self {
9135            Self { record: None }
9136        }
9137        #[doc(hidden)]
9138        pub fn default_instance() -> &'static Self {
9139            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9140            &DEFAULT
9141        }
9142        ///Returns the value of `record`, or the default value if `record` is unset.
9143        pub fn record(&self) -> &super::NameRecord {
9144            self.record
9145                .as_ref()
9146                .map(|field| field as _)
9147                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9148        }
9149        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9150        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9151            self.record.as_mut().map(|field| field as _)
9152        }
9153        ///Returns a mutable reference to `record`.
9154        ///If the field is unset, it is first initialized with the default value.
9155        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9156            self.record.get_or_insert_default()
9157        }
9158        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9159        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9160            self.record.as_ref().map(|field| field as _)
9161        }
9162        ///Sets `record` with the provided value.
9163        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9164            self.record = Some(field.into().into());
9165        }
9166        ///Sets `record` with the provided value.
9167        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9168            self.set_record(field.into());
9169            self
9170        }
9171    }
9172    impl super::MakeMoveVector {
9173        pub const fn const_default() -> Self {
9174            Self {
9175                element_type: None,
9176                elements: Vec::new(),
9177            }
9178        }
9179        #[doc(hidden)]
9180        pub fn default_instance() -> &'static Self {
9181            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9182            &DEFAULT
9183        }
9184        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9185        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9186            self.element_type.as_mut().map(|field| field as _)
9187        }
9188        ///Returns a mutable reference to `element_type`.
9189        ///If the field is unset, it is first initialized with the default value.
9190        pub fn element_type_mut(&mut self) -> &mut String {
9191            self.element_type.get_or_insert_default()
9192        }
9193        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9194        pub fn element_type_opt(&self) -> Option<&str> {
9195            self.element_type.as_ref().map(|field| field as _)
9196        }
9197        ///Sets `element_type` with the provided value.
9198        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9199            self.element_type = Some(field.into().into());
9200        }
9201        ///Sets `element_type` with the provided value.
9202        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9203            self.set_element_type(field.into());
9204            self
9205        }
9206        ///Returns the value of `elements`, or the default value if `elements` is unset.
9207        pub fn elements(&self) -> &[super::Argument] {
9208            &self.elements
9209        }
9210        ///Returns a mutable reference to `elements`.
9211        ///If the field is unset, it is first initialized with the default value.
9212        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9213            &mut self.elements
9214        }
9215        ///Sets `elements` with the provided value.
9216        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9217            self.elements = field;
9218        }
9219        ///Sets `elements` with the provided value.
9220        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9221            self.set_elements(field);
9222            self
9223        }
9224    }
9225    impl super::MergeCoins {
9226        pub const fn const_default() -> Self {
9227            Self {
9228                coin: None,
9229                coins_to_merge: Vec::new(),
9230            }
9231        }
9232        #[doc(hidden)]
9233        pub fn default_instance() -> &'static Self {
9234            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9235            &DEFAULT
9236        }
9237        ///Returns the value of `coin`, or the default value if `coin` is unset.
9238        pub fn coin(&self) -> &super::Argument {
9239            self.coin
9240                .as_ref()
9241                .map(|field| field as _)
9242                .unwrap_or_else(|| super::Argument::default_instance() as _)
9243        }
9244        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9245        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9246            self.coin.as_mut().map(|field| field as _)
9247        }
9248        ///Returns a mutable reference to `coin`.
9249        ///If the field is unset, it is first initialized with the default value.
9250        pub fn coin_mut(&mut self) -> &mut super::Argument {
9251            self.coin.get_or_insert_default()
9252        }
9253        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9254        pub fn coin_opt(&self) -> Option<&super::Argument> {
9255            self.coin.as_ref().map(|field| field as _)
9256        }
9257        ///Sets `coin` with the provided value.
9258        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9259            self.coin = Some(field.into().into());
9260        }
9261        ///Sets `coin` with the provided value.
9262        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9263            self.set_coin(field.into());
9264            self
9265        }
9266        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9267        pub fn coins_to_merge(&self) -> &[super::Argument] {
9268            &self.coins_to_merge
9269        }
9270        ///Returns a mutable reference to `coins_to_merge`.
9271        ///If the field is unset, it is first initialized with the default value.
9272        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9273            &mut self.coins_to_merge
9274        }
9275        ///Sets `coins_to_merge` with the provided value.
9276        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9277            self.coins_to_merge = field;
9278        }
9279        ///Sets `coins_to_merge` with the provided value.
9280        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9281            self.set_coins_to_merge(field);
9282            self
9283        }
9284    }
9285    impl super::Module {
9286        pub const fn const_default() -> Self {
9287            Self {
9288                name: None,
9289                contents: None,
9290                datatypes: Vec::new(),
9291                functions: Vec::new(),
9292            }
9293        }
9294        #[doc(hidden)]
9295        pub fn default_instance() -> &'static Self {
9296            static DEFAULT: super::Module = super::Module::const_default();
9297            &DEFAULT
9298        }
9299        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9300        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9301            self.name.as_mut().map(|field| field as _)
9302        }
9303        ///Returns a mutable reference to `name`.
9304        ///If the field is unset, it is first initialized with the default value.
9305        pub fn name_mut(&mut self) -> &mut String {
9306            self.name.get_or_insert_default()
9307        }
9308        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9309        pub fn name_opt(&self) -> Option<&str> {
9310            self.name.as_ref().map(|field| field as _)
9311        }
9312        ///Sets `name` with the provided value.
9313        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9314            self.name = Some(field.into().into());
9315        }
9316        ///Sets `name` with the provided value.
9317        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9318            self.set_name(field.into());
9319            self
9320        }
9321        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9322        pub fn contents_opt(&self) -> Option<&[u8]> {
9323            self.contents.as_ref().map(|field| field as _)
9324        }
9325        ///Sets `contents` with the provided value.
9326        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9327            self.contents = Some(field.into().into());
9328        }
9329        ///Sets `contents` with the provided value.
9330        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9331            mut self,
9332            field: T,
9333        ) -> Self {
9334            self.set_contents(field.into());
9335            self
9336        }
9337        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9338        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9339            &self.datatypes
9340        }
9341        ///Returns a mutable reference to `datatypes`.
9342        ///If the field is unset, it is first initialized with the default value.
9343        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9344            &mut self.datatypes
9345        }
9346        ///Sets `datatypes` with the provided value.
9347        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9348            self.datatypes = field;
9349        }
9350        ///Sets `datatypes` with the provided value.
9351        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9352            self.set_datatypes(field);
9353            self
9354        }
9355        ///Returns the value of `functions`, or the default value if `functions` is unset.
9356        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9357            &self.functions
9358        }
9359        ///Returns a mutable reference to `functions`.
9360        ///If the field is unset, it is first initialized with the default value.
9361        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9362            &mut self.functions
9363        }
9364        ///Sets `functions` with the provided value.
9365        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9366            self.functions = field;
9367        }
9368        ///Sets `functions` with the provided value.
9369        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9370            self.set_functions(field);
9371            self
9372        }
9373    }
9374    impl super::MoveAbort {
9375        pub const fn const_default() -> Self {
9376            Self {
9377                abort_code: None,
9378                location: None,
9379                clever_error: None,
9380            }
9381        }
9382        #[doc(hidden)]
9383        pub fn default_instance() -> &'static Self {
9384            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9385            &DEFAULT
9386        }
9387        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9388        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9389            self.abort_code.as_mut().map(|field| field as _)
9390        }
9391        ///Returns a mutable reference to `abort_code`.
9392        ///If the field is unset, it is first initialized with the default value.
9393        pub fn abort_code_mut(&mut self) -> &mut u64 {
9394            self.abort_code.get_or_insert_default()
9395        }
9396        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9397        pub fn abort_code_opt(&self) -> Option<u64> {
9398            self.abort_code.as_ref().map(|field| *field)
9399        }
9400        ///Sets `abort_code` with the provided value.
9401        pub fn set_abort_code(&mut self, field: u64) {
9402            self.abort_code = Some(field);
9403        }
9404        ///Sets `abort_code` with the provided value.
9405        pub fn with_abort_code(mut self, field: u64) -> Self {
9406            self.set_abort_code(field);
9407            self
9408        }
9409        ///Returns the value of `location`, or the default value if `location` is unset.
9410        pub fn location(&self) -> &super::MoveLocation {
9411            self.location
9412                .as_ref()
9413                .map(|field| field as _)
9414                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9415        }
9416        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9417        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9418            self.location.as_mut().map(|field| field as _)
9419        }
9420        ///Returns a mutable reference to `location`.
9421        ///If the field is unset, it is first initialized with the default value.
9422        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9423            self.location.get_or_insert_default()
9424        }
9425        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9426        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9427            self.location.as_ref().map(|field| field as _)
9428        }
9429        ///Sets `location` with the provided value.
9430        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9431            self.location = Some(field.into().into());
9432        }
9433        ///Sets `location` with the provided value.
9434        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9435            self.set_location(field.into());
9436            self
9437        }
9438        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9439        pub fn clever_error(&self) -> &super::CleverError {
9440            self.clever_error
9441                .as_ref()
9442                .map(|field| field as _)
9443                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9444        }
9445        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9446        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9447            self.clever_error.as_mut().map(|field| field as _)
9448        }
9449        ///Returns a mutable reference to `clever_error`.
9450        ///If the field is unset, it is first initialized with the default value.
9451        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9452            self.clever_error.get_or_insert_default()
9453        }
9454        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9455        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9456            self.clever_error.as_ref().map(|field| field as _)
9457        }
9458        ///Sets `clever_error` with the provided value.
9459        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9460            self.clever_error = Some(field.into().into());
9461        }
9462        ///Sets `clever_error` with the provided value.
9463        pub fn with_clever_error<T: Into<super::CleverError>>(
9464            mut self,
9465            field: T,
9466        ) -> Self {
9467            self.set_clever_error(field.into());
9468            self
9469        }
9470    }
9471    impl super::MoveCall {
9472        pub const fn const_default() -> Self {
9473            Self {
9474                package: None,
9475                module: None,
9476                function: None,
9477                type_arguments: Vec::new(),
9478                arguments: Vec::new(),
9479            }
9480        }
9481        #[doc(hidden)]
9482        pub fn default_instance() -> &'static Self {
9483            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9484            &DEFAULT
9485        }
9486        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9487        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9488            self.package.as_mut().map(|field| field as _)
9489        }
9490        ///Returns a mutable reference to `package`.
9491        ///If the field is unset, it is first initialized with the default value.
9492        pub fn package_mut(&mut self) -> &mut String {
9493            self.package.get_or_insert_default()
9494        }
9495        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9496        pub fn package_opt(&self) -> Option<&str> {
9497            self.package.as_ref().map(|field| field as _)
9498        }
9499        ///Sets `package` with the provided value.
9500        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9501            self.package = Some(field.into().into());
9502        }
9503        ///Sets `package` with the provided value.
9504        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9505            self.set_package(field.into());
9506            self
9507        }
9508        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9509        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9510            self.module.as_mut().map(|field| field as _)
9511        }
9512        ///Returns a mutable reference to `module`.
9513        ///If the field is unset, it is first initialized with the default value.
9514        pub fn module_mut(&mut self) -> &mut String {
9515            self.module.get_or_insert_default()
9516        }
9517        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9518        pub fn module_opt(&self) -> Option<&str> {
9519            self.module.as_ref().map(|field| field as _)
9520        }
9521        ///Sets `module` with the provided value.
9522        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9523            self.module = Some(field.into().into());
9524        }
9525        ///Sets `module` with the provided value.
9526        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9527            self.set_module(field.into());
9528            self
9529        }
9530        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9531        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9532            self.function.as_mut().map(|field| field as _)
9533        }
9534        ///Returns a mutable reference to `function`.
9535        ///If the field is unset, it is first initialized with the default value.
9536        pub fn function_mut(&mut self) -> &mut String {
9537            self.function.get_or_insert_default()
9538        }
9539        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9540        pub fn function_opt(&self) -> Option<&str> {
9541            self.function.as_ref().map(|field| field as _)
9542        }
9543        ///Sets `function` with the provided value.
9544        pub fn set_function<T: Into<String>>(&mut self, field: T) {
9545            self.function = Some(field.into().into());
9546        }
9547        ///Sets `function` with the provided value.
9548        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9549            self.set_function(field.into());
9550            self
9551        }
9552        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
9553        pub fn type_arguments(&self) -> &[String] {
9554            &self.type_arguments
9555        }
9556        ///Returns a mutable reference to `type_arguments`.
9557        ///If the field is unset, it is first initialized with the default value.
9558        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9559            &mut self.type_arguments
9560        }
9561        ///Sets `type_arguments` with the provided value.
9562        pub fn set_type_arguments(&mut self, field: Vec<String>) {
9563            self.type_arguments = field;
9564        }
9565        ///Sets `type_arguments` with the provided value.
9566        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9567            self.set_type_arguments(field);
9568            self
9569        }
9570        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
9571        pub fn arguments(&self) -> &[super::Argument] {
9572            &self.arguments
9573        }
9574        ///Returns a mutable reference to `arguments`.
9575        ///If the field is unset, it is first initialized with the default value.
9576        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9577            &mut self.arguments
9578        }
9579        ///Sets `arguments` with the provided value.
9580        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9581            self.arguments = field;
9582        }
9583        ///Sets `arguments` with the provided value.
9584        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9585            self.set_arguments(field);
9586            self
9587        }
9588    }
9589    impl super::MoveLocation {
9590        pub const fn const_default() -> Self {
9591            Self {
9592                package: None,
9593                module: None,
9594                function: None,
9595                instruction: None,
9596                function_name: None,
9597            }
9598        }
9599        #[doc(hidden)]
9600        pub fn default_instance() -> &'static Self {
9601            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9602            &DEFAULT
9603        }
9604        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9605        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9606            self.package.as_mut().map(|field| field as _)
9607        }
9608        ///Returns a mutable reference to `package`.
9609        ///If the field is unset, it is first initialized with the default value.
9610        pub fn package_mut(&mut self) -> &mut String {
9611            self.package.get_or_insert_default()
9612        }
9613        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9614        pub fn package_opt(&self) -> Option<&str> {
9615            self.package.as_ref().map(|field| field as _)
9616        }
9617        ///Sets `package` with the provided value.
9618        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9619            self.package = Some(field.into().into());
9620        }
9621        ///Sets `package` with the provided value.
9622        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9623            self.set_package(field.into());
9624            self
9625        }
9626        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9627        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9628            self.module.as_mut().map(|field| field as _)
9629        }
9630        ///Returns a mutable reference to `module`.
9631        ///If the field is unset, it is first initialized with the default value.
9632        pub fn module_mut(&mut self) -> &mut String {
9633            self.module.get_or_insert_default()
9634        }
9635        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9636        pub fn module_opt(&self) -> Option<&str> {
9637            self.module.as_ref().map(|field| field as _)
9638        }
9639        ///Sets `module` with the provided value.
9640        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9641            self.module = Some(field.into().into());
9642        }
9643        ///Sets `module` with the provided value.
9644        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9645            self.set_module(field.into());
9646            self
9647        }
9648        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9649        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9650            self.function.as_mut().map(|field| field as _)
9651        }
9652        ///Returns a mutable reference to `function`.
9653        ///If the field is unset, it is first initialized with the default value.
9654        pub fn function_mut(&mut self) -> &mut u32 {
9655            self.function.get_or_insert_default()
9656        }
9657        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9658        pub fn function_opt(&self) -> Option<u32> {
9659            self.function.as_ref().map(|field| *field)
9660        }
9661        ///Sets `function` with the provided value.
9662        pub fn set_function(&mut self, field: u32) {
9663            self.function = Some(field);
9664        }
9665        ///Sets `function` with the provided value.
9666        pub fn with_function(mut self, field: u32) -> Self {
9667            self.set_function(field);
9668            self
9669        }
9670        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9671        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9672            self.instruction.as_mut().map(|field| field as _)
9673        }
9674        ///Returns a mutable reference to `instruction`.
9675        ///If the field is unset, it is first initialized with the default value.
9676        pub fn instruction_mut(&mut self) -> &mut u32 {
9677            self.instruction.get_or_insert_default()
9678        }
9679        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9680        pub fn instruction_opt(&self) -> Option<u32> {
9681            self.instruction.as_ref().map(|field| *field)
9682        }
9683        ///Sets `instruction` with the provided value.
9684        pub fn set_instruction(&mut self, field: u32) {
9685            self.instruction = Some(field);
9686        }
9687        ///Sets `instruction` with the provided value.
9688        pub fn with_instruction(mut self, field: u32) -> Self {
9689            self.set_instruction(field);
9690            self
9691        }
9692        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9693        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9694            self.function_name.as_mut().map(|field| field as _)
9695        }
9696        ///Returns a mutable reference to `function_name`.
9697        ///If the field is unset, it is first initialized with the default value.
9698        pub fn function_name_mut(&mut self) -> &mut String {
9699            self.function_name.get_or_insert_default()
9700        }
9701        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9702        pub fn function_name_opt(&self) -> Option<&str> {
9703            self.function_name.as_ref().map(|field| field as _)
9704        }
9705        ///Sets `function_name` with the provided value.
9706        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
9707            self.function_name = Some(field.into().into());
9708        }
9709        ///Sets `function_name` with the provided value.
9710        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
9711            self.set_function_name(field.into());
9712            self
9713        }
9714    }
9715    impl super::MoveTable {
9716        pub const fn const_default() -> Self {
9717            Self { id: None, size: None }
9718        }
9719        #[doc(hidden)]
9720        pub fn default_instance() -> &'static Self {
9721            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
9722            &DEFAULT
9723        }
9724        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9725        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
9726            self.id.as_mut().map(|field| field as _)
9727        }
9728        ///Returns a mutable reference to `id`.
9729        ///If the field is unset, it is first initialized with the default value.
9730        pub fn id_mut(&mut self) -> &mut String {
9731            self.id.get_or_insert_default()
9732        }
9733        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9734        pub fn id_opt(&self) -> Option<&str> {
9735            self.id.as_ref().map(|field| field as _)
9736        }
9737        ///Sets `id` with the provided value.
9738        pub fn set_id<T: Into<String>>(&mut self, field: T) {
9739            self.id = Some(field.into().into());
9740        }
9741        ///Sets `id` with the provided value.
9742        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
9743            self.set_id(field.into());
9744            self
9745        }
9746        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9747        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
9748            self.size.as_mut().map(|field| field as _)
9749        }
9750        ///Returns a mutable reference to `size`.
9751        ///If the field is unset, it is first initialized with the default value.
9752        pub fn size_mut(&mut self) -> &mut u64 {
9753            self.size.get_or_insert_default()
9754        }
9755        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9756        pub fn size_opt(&self) -> Option<u64> {
9757            self.size.as_ref().map(|field| *field)
9758        }
9759        ///Sets `size` with the provided value.
9760        pub fn set_size(&mut self, field: u64) {
9761            self.size = Some(field);
9762        }
9763        ///Sets `size` with the provided value.
9764        pub fn with_size(mut self, field: u64) -> Self {
9765            self.set_size(field);
9766            self
9767        }
9768    }
9769    impl super::MultisigAggregatedSignature {
9770        pub const fn const_default() -> Self {
9771            Self {
9772                signatures: Vec::new(),
9773                bitmap: None,
9774                legacy_bitmap: None,
9775                committee: None,
9776            }
9777        }
9778        #[doc(hidden)]
9779        pub fn default_instance() -> &'static Self {
9780            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
9781            &DEFAULT
9782        }
9783        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
9784        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
9785            &self.signatures
9786        }
9787        ///Returns a mutable reference to `signatures`.
9788        ///If the field is unset, it is first initialized with the default value.
9789        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
9790            &mut self.signatures
9791        }
9792        ///Sets `signatures` with the provided value.
9793        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
9794            self.signatures = field;
9795        }
9796        ///Sets `signatures` with the provided value.
9797        pub fn with_signatures(
9798            mut self,
9799            field: Vec<super::MultisigMemberSignature>,
9800        ) -> Self {
9801            self.set_signatures(field);
9802            self
9803        }
9804        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9805        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
9806            self.bitmap.as_mut().map(|field| field as _)
9807        }
9808        ///Returns a mutable reference to `bitmap`.
9809        ///If the field is unset, it is first initialized with the default value.
9810        pub fn bitmap_mut(&mut self) -> &mut u32 {
9811            self.bitmap.get_or_insert_default()
9812        }
9813        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
9814        pub fn bitmap_opt(&self) -> Option<u32> {
9815            self.bitmap.as_ref().map(|field| *field)
9816        }
9817        ///Sets `bitmap` with the provided value.
9818        pub fn set_bitmap(&mut self, field: u32) {
9819            self.bitmap = Some(field);
9820        }
9821        ///Sets `bitmap` with the provided value.
9822        pub fn with_bitmap(mut self, field: u32) -> Self {
9823            self.set_bitmap(field);
9824            self
9825        }
9826        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
9827        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
9828            self.legacy_bitmap.as_ref().map(|field| field as _)
9829        }
9830        ///Sets `legacy_bitmap` with the provided value.
9831        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9832            self.legacy_bitmap = Some(field.into().into());
9833        }
9834        ///Sets `legacy_bitmap` with the provided value.
9835        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
9836            mut self,
9837            field: T,
9838        ) -> Self {
9839            self.set_legacy_bitmap(field.into());
9840            self
9841        }
9842        ///Returns the value of `committee`, or the default value if `committee` is unset.
9843        pub fn committee(&self) -> &super::MultisigCommittee {
9844            self.committee
9845                .as_ref()
9846                .map(|field| field as _)
9847                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
9848        }
9849        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9850        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
9851            self.committee.as_mut().map(|field| field as _)
9852        }
9853        ///Returns a mutable reference to `committee`.
9854        ///If the field is unset, it is first initialized with the default value.
9855        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
9856            self.committee.get_or_insert_default()
9857        }
9858        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
9859        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
9860            self.committee.as_ref().map(|field| field as _)
9861        }
9862        ///Sets `committee` with the provided value.
9863        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
9864            self.committee = Some(field.into().into());
9865        }
9866        ///Sets `committee` with the provided value.
9867        pub fn with_committee<T: Into<super::MultisigCommittee>>(
9868            mut self,
9869            field: T,
9870        ) -> Self {
9871            self.set_committee(field.into());
9872            self
9873        }
9874    }
9875    impl super::MultisigCommittee {
9876        pub const fn const_default() -> Self {
9877            Self {
9878                members: Vec::new(),
9879                threshold: None,
9880            }
9881        }
9882        #[doc(hidden)]
9883        pub fn default_instance() -> &'static Self {
9884            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
9885            &DEFAULT
9886        }
9887        ///Returns the value of `members`, or the default value if `members` is unset.
9888        pub fn members(&self) -> &[super::MultisigMember] {
9889            &self.members
9890        }
9891        ///Returns a mutable reference to `members`.
9892        ///If the field is unset, it is first initialized with the default value.
9893        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
9894            &mut self.members
9895        }
9896        ///Sets `members` with the provided value.
9897        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
9898            self.members = field;
9899        }
9900        ///Sets `members` with the provided value.
9901        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
9902            self.set_members(field);
9903            self
9904        }
9905        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9906        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
9907            self.threshold.as_mut().map(|field| field as _)
9908        }
9909        ///Returns a mutable reference to `threshold`.
9910        ///If the field is unset, it is first initialized with the default value.
9911        pub fn threshold_mut(&mut self) -> &mut u32 {
9912            self.threshold.get_or_insert_default()
9913        }
9914        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
9915        pub fn threshold_opt(&self) -> Option<u32> {
9916            self.threshold.as_ref().map(|field| *field)
9917        }
9918        ///Sets `threshold` with the provided value.
9919        pub fn set_threshold(&mut self, field: u32) {
9920            self.threshold = Some(field);
9921        }
9922        ///Sets `threshold` with the provided value.
9923        pub fn with_threshold(mut self, field: u32) -> Self {
9924            self.set_threshold(field);
9925            self
9926        }
9927    }
9928    impl super::MultisigMember {
9929        pub const fn const_default() -> Self {
9930            Self {
9931                public_key: None,
9932                weight: None,
9933            }
9934        }
9935        #[doc(hidden)]
9936        pub fn default_instance() -> &'static Self {
9937            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
9938            &DEFAULT
9939        }
9940        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
9941        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
9942            self.public_key
9943                .as_ref()
9944                .map(|field| field as _)
9945                .unwrap_or_else(|| {
9946                    super::MultisigMemberPublicKey::default_instance() as _
9947                })
9948        }
9949        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9950        pub fn public_key_opt_mut(
9951            &mut self,
9952        ) -> Option<&mut super::MultisigMemberPublicKey> {
9953            self.public_key.as_mut().map(|field| field as _)
9954        }
9955        ///Returns a mutable reference to `public_key`.
9956        ///If the field is unset, it is first initialized with the default value.
9957        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
9958            self.public_key.get_or_insert_default()
9959        }
9960        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
9961        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
9962            self.public_key.as_ref().map(|field| field as _)
9963        }
9964        ///Sets `public_key` with the provided value.
9965        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
9966            &mut self,
9967            field: T,
9968        ) {
9969            self.public_key = Some(field.into().into());
9970        }
9971        ///Sets `public_key` with the provided value.
9972        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
9973            mut self,
9974            field: T,
9975        ) -> Self {
9976            self.set_public_key(field.into());
9977            self
9978        }
9979        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9980        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
9981            self.weight.as_mut().map(|field| field as _)
9982        }
9983        ///Returns a mutable reference to `weight`.
9984        ///If the field is unset, it is first initialized with the default value.
9985        pub fn weight_mut(&mut self) -> &mut u32 {
9986            self.weight.get_or_insert_default()
9987        }
9988        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
9989        pub fn weight_opt(&self) -> Option<u32> {
9990            self.weight.as_ref().map(|field| *field)
9991        }
9992        ///Sets `weight` with the provided value.
9993        pub fn set_weight(&mut self, field: u32) {
9994            self.weight = Some(field);
9995        }
9996        ///Sets `weight` with the provided value.
9997        pub fn with_weight(mut self, field: u32) -> Self {
9998            self.set_weight(field);
9999            self
10000        }
10001    }
10002    impl super::MultisigMemberPublicKey {
10003        pub const fn const_default() -> Self {
10004            Self {
10005                scheme: None,
10006                public_key: None,
10007                zklogin: None,
10008            }
10009        }
10010        #[doc(hidden)]
10011        pub fn default_instance() -> &'static Self {
10012            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10013            &DEFAULT
10014        }
10015        ///Sets `scheme` with the provided value.
10016        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10017            self.set_scheme(field.into());
10018            self
10019        }
10020        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10021        pub fn public_key_opt(&self) -> Option<&[u8]> {
10022            self.public_key.as_ref().map(|field| field as _)
10023        }
10024        ///Sets `public_key` with the provided value.
10025        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10026            self.public_key = Some(field.into().into());
10027        }
10028        ///Sets `public_key` with the provided value.
10029        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10030            mut self,
10031            field: T,
10032        ) -> Self {
10033            self.set_public_key(field.into());
10034            self
10035        }
10036        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10037        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10038            self.zklogin
10039                .as_ref()
10040                .map(|field| field as _)
10041                .unwrap_or_else(|| {
10042                    super::ZkLoginPublicIdentifier::default_instance() as _
10043                })
10044        }
10045        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10046        pub fn zklogin_opt_mut(
10047            &mut self,
10048        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10049            self.zklogin.as_mut().map(|field| field as _)
10050        }
10051        ///Returns a mutable reference to `zklogin`.
10052        ///If the field is unset, it is first initialized with the default value.
10053        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10054            self.zklogin.get_or_insert_default()
10055        }
10056        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10057        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10058            self.zklogin.as_ref().map(|field| field as _)
10059        }
10060        ///Sets `zklogin` with the provided value.
10061        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10062            &mut self,
10063            field: T,
10064        ) {
10065            self.zklogin = Some(field.into().into());
10066        }
10067        ///Sets `zklogin` with the provided value.
10068        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10069            mut self,
10070            field: T,
10071        ) -> Self {
10072            self.set_zklogin(field.into());
10073            self
10074        }
10075    }
10076    impl super::MultisigMemberSignature {
10077        pub const fn const_default() -> Self {
10078            Self {
10079                scheme: None,
10080                signature: None,
10081                zklogin: None,
10082                passkey: None,
10083            }
10084        }
10085        #[doc(hidden)]
10086        pub fn default_instance() -> &'static Self {
10087            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10088            &DEFAULT
10089        }
10090        ///Sets `scheme` with the provided value.
10091        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10092            self.set_scheme(field.into());
10093            self
10094        }
10095        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10096        pub fn signature_opt(&self) -> Option<&[u8]> {
10097            self.signature.as_ref().map(|field| field as _)
10098        }
10099        ///Sets `signature` with the provided value.
10100        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10101            self.signature = Some(field.into().into());
10102        }
10103        ///Sets `signature` with the provided value.
10104        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10105            mut self,
10106            field: T,
10107        ) -> Self {
10108            self.set_signature(field.into());
10109            self
10110        }
10111        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10112        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10113            self.zklogin
10114                .as_ref()
10115                .map(|field| field as _)
10116                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10117        }
10118        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10119        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10120            self.zklogin.as_mut().map(|field| field as _)
10121        }
10122        ///Returns a mutable reference to `zklogin`.
10123        ///If the field is unset, it is first initialized with the default value.
10124        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10125            self.zklogin.get_or_insert_default()
10126        }
10127        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10128        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10129            self.zklogin.as_ref().map(|field| field as _)
10130        }
10131        ///Sets `zklogin` with the provided value.
10132        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10133            self.zklogin = Some(field.into().into());
10134        }
10135        ///Sets `zklogin` with the provided value.
10136        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10137            mut self,
10138            field: T,
10139        ) -> Self {
10140            self.set_zklogin(field.into());
10141            self
10142        }
10143        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10144        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10145            self.passkey
10146                .as_ref()
10147                .map(|field| field as _)
10148                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10149        }
10150        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10151        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10152            self.passkey.as_mut().map(|field| field as _)
10153        }
10154        ///Returns a mutable reference to `passkey`.
10155        ///If the field is unset, it is first initialized with the default value.
10156        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10157            self.passkey.get_or_insert_default()
10158        }
10159        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10160        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10161            self.passkey.as_ref().map(|field| field as _)
10162        }
10163        ///Sets `passkey` with the provided value.
10164        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10165            self.passkey = Some(field.into().into());
10166        }
10167        ///Sets `passkey` with the provided value.
10168        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10169            mut self,
10170            field: T,
10171        ) -> Self {
10172            self.set_passkey(field.into());
10173            self
10174        }
10175    }
10176    impl super::NameRecord {
10177        pub const fn const_default() -> Self {
10178            Self {
10179                id: None,
10180                name: None,
10181                registration_nft_id: None,
10182                expiration_timestamp: None,
10183                target_address: None,
10184                data: std::collections::BTreeMap::new(),
10185            }
10186        }
10187        #[doc(hidden)]
10188        pub fn default_instance() -> &'static Self {
10189            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10190            &DEFAULT
10191        }
10192        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10193        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10194            self.id.as_mut().map(|field| field as _)
10195        }
10196        ///Returns a mutable reference to `id`.
10197        ///If the field is unset, it is first initialized with the default value.
10198        pub fn id_mut(&mut self) -> &mut String {
10199            self.id.get_or_insert_default()
10200        }
10201        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10202        pub fn id_opt(&self) -> Option<&str> {
10203            self.id.as_ref().map(|field| field as _)
10204        }
10205        ///Sets `id` with the provided value.
10206        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10207            self.id = Some(field.into().into());
10208        }
10209        ///Sets `id` with the provided value.
10210        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10211            self.set_id(field.into());
10212            self
10213        }
10214        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10215        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10216            self.name.as_mut().map(|field| field as _)
10217        }
10218        ///Returns a mutable reference to `name`.
10219        ///If the field is unset, it is first initialized with the default value.
10220        pub fn name_mut(&mut self) -> &mut String {
10221            self.name.get_or_insert_default()
10222        }
10223        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10224        pub fn name_opt(&self) -> Option<&str> {
10225            self.name.as_ref().map(|field| field as _)
10226        }
10227        ///Sets `name` with the provided value.
10228        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10229            self.name = Some(field.into().into());
10230        }
10231        ///Sets `name` with the provided value.
10232        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10233            self.set_name(field.into());
10234            self
10235        }
10236        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10237        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10238            self.registration_nft_id.as_mut().map(|field| field as _)
10239        }
10240        ///Returns a mutable reference to `registration_nft_id`.
10241        ///If the field is unset, it is first initialized with the default value.
10242        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10243            self.registration_nft_id.get_or_insert_default()
10244        }
10245        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10246        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10247            self.registration_nft_id.as_ref().map(|field| field as _)
10248        }
10249        ///Sets `registration_nft_id` with the provided value.
10250        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10251            self.registration_nft_id = Some(field.into().into());
10252        }
10253        ///Sets `registration_nft_id` with the provided value.
10254        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10255            self.set_registration_nft_id(field.into());
10256            self
10257        }
10258        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10259        pub fn expiration_timestamp_opt_mut(
10260            &mut self,
10261        ) -> Option<&mut ::prost_types::Timestamp> {
10262            self.expiration_timestamp.as_mut().map(|field| field as _)
10263        }
10264        ///Returns a mutable reference to `expiration_timestamp`.
10265        ///If the field is unset, it is first initialized with the default value.
10266        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10267            self.expiration_timestamp.get_or_insert_default()
10268        }
10269        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10270        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10271            self.expiration_timestamp.as_ref().map(|field| field as _)
10272        }
10273        ///Sets `expiration_timestamp` with the provided value.
10274        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10275            &mut self,
10276            field: T,
10277        ) {
10278            self.expiration_timestamp = Some(field.into().into());
10279        }
10280        ///Sets `expiration_timestamp` with the provided value.
10281        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10282            mut self,
10283            field: T,
10284        ) -> Self {
10285            self.set_expiration_timestamp(field.into());
10286            self
10287        }
10288        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10289        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10290            self.target_address.as_mut().map(|field| field as _)
10291        }
10292        ///Returns a mutable reference to `target_address`.
10293        ///If the field is unset, it is first initialized with the default value.
10294        pub fn target_address_mut(&mut self) -> &mut String {
10295            self.target_address.get_or_insert_default()
10296        }
10297        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10298        pub fn target_address_opt(&self) -> Option<&str> {
10299            self.target_address.as_ref().map(|field| field as _)
10300        }
10301        ///Sets `target_address` with the provided value.
10302        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10303            self.target_address = Some(field.into().into());
10304        }
10305        ///Sets `target_address` with the provided value.
10306        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10307            self.set_target_address(field.into());
10308            self
10309        }
10310        ///Returns the value of `data`, or the default value if `data` is unset.
10311        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10312            &self.data
10313        }
10314        ///Returns a mutable reference to `data`.
10315        ///If the field is unset, it is first initialized with the default value.
10316        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10317            &mut self.data
10318        }
10319        ///Sets `data` with the provided value.
10320        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10321            self.data = field;
10322        }
10323        ///Sets `data` with the provided value.
10324        pub fn with_data(
10325            mut self,
10326            field: ::std::collections::BTreeMap<String, String>,
10327        ) -> Self {
10328            self.set_data(field);
10329            self
10330        }
10331    }
10332    impl super::Object {
10333        pub const fn const_default() -> Self {
10334            Self {
10335                bcs: None,
10336                object_id: None,
10337                version: None,
10338                digest: None,
10339                owner: None,
10340                object_type: None,
10341                has_public_transfer: None,
10342                contents: None,
10343                package: None,
10344                previous_transaction: None,
10345                storage_rebate: None,
10346                json: None,
10347                balance: None,
10348            }
10349        }
10350        #[doc(hidden)]
10351        pub fn default_instance() -> &'static Self {
10352            static DEFAULT: super::Object = super::Object::const_default();
10353            &DEFAULT
10354        }
10355        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10356        pub fn bcs(&self) -> &super::Bcs {
10357            self.bcs
10358                .as_ref()
10359                .map(|field| field as _)
10360                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10361        }
10362        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10363        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10364            self.bcs.as_mut().map(|field| field as _)
10365        }
10366        ///Returns a mutable reference to `bcs`.
10367        ///If the field is unset, it is first initialized with the default value.
10368        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10369            self.bcs.get_or_insert_default()
10370        }
10371        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10372        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10373            self.bcs.as_ref().map(|field| field as _)
10374        }
10375        ///Sets `bcs` with the provided value.
10376        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10377            self.bcs = Some(field.into().into());
10378        }
10379        ///Sets `bcs` with the provided value.
10380        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10381            self.set_bcs(field.into());
10382            self
10383        }
10384        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10385        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10386            self.object_id.as_mut().map(|field| field as _)
10387        }
10388        ///Returns a mutable reference to `object_id`.
10389        ///If the field is unset, it is first initialized with the default value.
10390        pub fn object_id_mut(&mut self) -> &mut String {
10391            self.object_id.get_or_insert_default()
10392        }
10393        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10394        pub fn object_id_opt(&self) -> Option<&str> {
10395            self.object_id.as_ref().map(|field| field as _)
10396        }
10397        ///Sets `object_id` with the provided value.
10398        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10399            self.object_id = Some(field.into().into());
10400        }
10401        ///Sets `object_id` with the provided value.
10402        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10403            self.set_object_id(field.into());
10404            self
10405        }
10406        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10407        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10408            self.version.as_mut().map(|field| field as _)
10409        }
10410        ///Returns a mutable reference to `version`.
10411        ///If the field is unset, it is first initialized with the default value.
10412        pub fn version_mut(&mut self) -> &mut u64 {
10413            self.version.get_or_insert_default()
10414        }
10415        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10416        pub fn version_opt(&self) -> Option<u64> {
10417            self.version.as_ref().map(|field| *field)
10418        }
10419        ///Sets `version` with the provided value.
10420        pub fn set_version(&mut self, field: u64) {
10421            self.version = Some(field);
10422        }
10423        ///Sets `version` with the provided value.
10424        pub fn with_version(mut self, field: u64) -> Self {
10425            self.set_version(field);
10426            self
10427        }
10428        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10429        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10430            self.digest.as_mut().map(|field| field as _)
10431        }
10432        ///Returns a mutable reference to `digest`.
10433        ///If the field is unset, it is first initialized with the default value.
10434        pub fn digest_mut(&mut self) -> &mut String {
10435            self.digest.get_or_insert_default()
10436        }
10437        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10438        pub fn digest_opt(&self) -> Option<&str> {
10439            self.digest.as_ref().map(|field| field as _)
10440        }
10441        ///Sets `digest` with the provided value.
10442        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10443            self.digest = Some(field.into().into());
10444        }
10445        ///Sets `digest` with the provided value.
10446        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10447            self.set_digest(field.into());
10448            self
10449        }
10450        ///Returns the value of `owner`, or the default value if `owner` is unset.
10451        pub fn owner(&self) -> &super::Owner {
10452            self.owner
10453                .as_ref()
10454                .map(|field| field as _)
10455                .unwrap_or_else(|| super::Owner::default_instance() as _)
10456        }
10457        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10458        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10459            self.owner.as_mut().map(|field| field as _)
10460        }
10461        ///Returns a mutable reference to `owner`.
10462        ///If the field is unset, it is first initialized with the default value.
10463        pub fn owner_mut(&mut self) -> &mut super::Owner {
10464            self.owner.get_or_insert_default()
10465        }
10466        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10467        pub fn owner_opt(&self) -> Option<&super::Owner> {
10468            self.owner.as_ref().map(|field| field as _)
10469        }
10470        ///Sets `owner` with the provided value.
10471        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10472            self.owner = Some(field.into().into());
10473        }
10474        ///Sets `owner` with the provided value.
10475        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10476            self.set_owner(field.into());
10477            self
10478        }
10479        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10480        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10481            self.object_type.as_mut().map(|field| field as _)
10482        }
10483        ///Returns a mutable reference to `object_type`.
10484        ///If the field is unset, it is first initialized with the default value.
10485        pub fn object_type_mut(&mut self) -> &mut String {
10486            self.object_type.get_or_insert_default()
10487        }
10488        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10489        pub fn object_type_opt(&self) -> Option<&str> {
10490            self.object_type.as_ref().map(|field| field as _)
10491        }
10492        ///Sets `object_type` with the provided value.
10493        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10494            self.object_type = Some(field.into().into());
10495        }
10496        ///Sets `object_type` with the provided value.
10497        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10498            self.set_object_type(field.into());
10499            self
10500        }
10501        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10502        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10503            self.has_public_transfer.as_mut().map(|field| field as _)
10504        }
10505        ///Returns a mutable reference to `has_public_transfer`.
10506        ///If the field is unset, it is first initialized with the default value.
10507        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10508            self.has_public_transfer.get_or_insert_default()
10509        }
10510        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10511        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10512            self.has_public_transfer.as_ref().map(|field| *field)
10513        }
10514        ///Sets `has_public_transfer` with the provided value.
10515        pub fn set_has_public_transfer(&mut self, field: bool) {
10516            self.has_public_transfer = Some(field);
10517        }
10518        ///Sets `has_public_transfer` with the provided value.
10519        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10520            self.set_has_public_transfer(field);
10521            self
10522        }
10523        ///Returns the value of `contents`, or the default value if `contents` is unset.
10524        pub fn contents(&self) -> &super::Bcs {
10525            self.contents
10526                .as_ref()
10527                .map(|field| field as _)
10528                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10529        }
10530        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10531        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10532            self.contents.as_mut().map(|field| field as _)
10533        }
10534        ///Returns a mutable reference to `contents`.
10535        ///If the field is unset, it is first initialized with the default value.
10536        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10537            self.contents.get_or_insert_default()
10538        }
10539        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10540        pub fn contents_opt(&self) -> Option<&super::Bcs> {
10541            self.contents.as_ref().map(|field| field as _)
10542        }
10543        ///Sets `contents` with the provided value.
10544        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10545            self.contents = Some(field.into().into());
10546        }
10547        ///Sets `contents` with the provided value.
10548        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10549            self.set_contents(field.into());
10550            self
10551        }
10552        ///Returns the value of `package`, or the default value if `package` is unset.
10553        pub fn package(&self) -> &super::Package {
10554            self.package
10555                .as_ref()
10556                .map(|field| field as _)
10557                .unwrap_or_else(|| super::Package::default_instance() as _)
10558        }
10559        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10560        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10561            self.package.as_mut().map(|field| field as _)
10562        }
10563        ///Returns a mutable reference to `package`.
10564        ///If the field is unset, it is first initialized with the default value.
10565        pub fn package_mut(&mut self) -> &mut super::Package {
10566            self.package.get_or_insert_default()
10567        }
10568        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10569        pub fn package_opt(&self) -> Option<&super::Package> {
10570            self.package.as_ref().map(|field| field as _)
10571        }
10572        ///Sets `package` with the provided value.
10573        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10574            self.package = Some(field.into().into());
10575        }
10576        ///Sets `package` with the provided value.
10577        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10578            self.set_package(field.into());
10579            self
10580        }
10581        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10582        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10583            self.previous_transaction.as_mut().map(|field| field as _)
10584        }
10585        ///Returns a mutable reference to `previous_transaction`.
10586        ///If the field is unset, it is first initialized with the default value.
10587        pub fn previous_transaction_mut(&mut self) -> &mut String {
10588            self.previous_transaction.get_or_insert_default()
10589        }
10590        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10591        pub fn previous_transaction_opt(&self) -> Option<&str> {
10592            self.previous_transaction.as_ref().map(|field| field as _)
10593        }
10594        ///Sets `previous_transaction` with the provided value.
10595        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10596            self.previous_transaction = Some(field.into().into());
10597        }
10598        ///Sets `previous_transaction` with the provided value.
10599        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10600            self.set_previous_transaction(field.into());
10601            self
10602        }
10603        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10604        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10605            self.storage_rebate.as_mut().map(|field| field as _)
10606        }
10607        ///Returns a mutable reference to `storage_rebate`.
10608        ///If the field is unset, it is first initialized with the default value.
10609        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10610            self.storage_rebate.get_or_insert_default()
10611        }
10612        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
10613        pub fn storage_rebate_opt(&self) -> Option<u64> {
10614            self.storage_rebate.as_ref().map(|field| *field)
10615        }
10616        ///Sets `storage_rebate` with the provided value.
10617        pub fn set_storage_rebate(&mut self, field: u64) {
10618            self.storage_rebate = Some(field);
10619        }
10620        ///Sets `storage_rebate` with the provided value.
10621        pub fn with_storage_rebate(mut self, field: u64) -> Self {
10622            self.set_storage_rebate(field);
10623            self
10624        }
10625        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10626        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10627            self.json.as_mut().map(|field| field as _)
10628        }
10629        ///Returns a mutable reference to `json`.
10630        ///If the field is unset, it is first initialized with the default value.
10631        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10632            self.json.get_or_insert_default()
10633        }
10634        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
10635        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10636            self.json.as_ref().map(|field| field as _)
10637        }
10638        ///Sets `json` with the provided value.
10639        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10640            self.json = Some(field.into().into());
10641        }
10642        ///Sets `json` with the provided value.
10643        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10644            self.set_json(field.into());
10645            self
10646        }
10647        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10648        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10649            self.balance.as_mut().map(|field| field as _)
10650        }
10651        ///Returns a mutable reference to `balance`.
10652        ///If the field is unset, it is first initialized with the default value.
10653        pub fn balance_mut(&mut self) -> &mut u64 {
10654            self.balance.get_or_insert_default()
10655        }
10656        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
10657        pub fn balance_opt(&self) -> Option<u64> {
10658            self.balance.as_ref().map(|field| *field)
10659        }
10660        ///Sets `balance` with the provided value.
10661        pub fn set_balance(&mut self, field: u64) {
10662            self.balance = Some(field);
10663        }
10664        ///Sets `balance` with the provided value.
10665        pub fn with_balance(mut self, field: u64) -> Self {
10666            self.set_balance(field);
10667            self
10668        }
10669    }
10670    impl super::ObjectReference {
10671        pub const fn const_default() -> Self {
10672            Self {
10673                object_id: None,
10674                version: None,
10675                digest: None,
10676            }
10677        }
10678        #[doc(hidden)]
10679        pub fn default_instance() -> &'static Self {
10680            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10681            &DEFAULT
10682        }
10683        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10684        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10685            self.object_id.as_mut().map(|field| field as _)
10686        }
10687        ///Returns a mutable reference to `object_id`.
10688        ///If the field is unset, it is first initialized with the default value.
10689        pub fn object_id_mut(&mut self) -> &mut String {
10690            self.object_id.get_or_insert_default()
10691        }
10692        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10693        pub fn object_id_opt(&self) -> Option<&str> {
10694            self.object_id.as_ref().map(|field| field as _)
10695        }
10696        ///Sets `object_id` with the provided value.
10697        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10698            self.object_id = Some(field.into().into());
10699        }
10700        ///Sets `object_id` with the provided value.
10701        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10702            self.set_object_id(field.into());
10703            self
10704        }
10705        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10706        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10707            self.version.as_mut().map(|field| field as _)
10708        }
10709        ///Returns a mutable reference to `version`.
10710        ///If the field is unset, it is first initialized with the default value.
10711        pub fn version_mut(&mut self) -> &mut u64 {
10712            self.version.get_or_insert_default()
10713        }
10714        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10715        pub fn version_opt(&self) -> Option<u64> {
10716            self.version.as_ref().map(|field| *field)
10717        }
10718        ///Sets `version` with the provided value.
10719        pub fn set_version(&mut self, field: u64) {
10720            self.version = Some(field);
10721        }
10722        ///Sets `version` with the provided value.
10723        pub fn with_version(mut self, field: u64) -> Self {
10724            self.set_version(field);
10725            self
10726        }
10727        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10728        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10729            self.digest.as_mut().map(|field| field as _)
10730        }
10731        ///Returns a mutable reference to `digest`.
10732        ///If the field is unset, it is first initialized with the default value.
10733        pub fn digest_mut(&mut self) -> &mut String {
10734            self.digest.get_or_insert_default()
10735        }
10736        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10737        pub fn digest_opt(&self) -> Option<&str> {
10738            self.digest.as_ref().map(|field| field as _)
10739        }
10740        ///Sets `digest` with the provided value.
10741        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10742            self.digest = Some(field.into().into());
10743        }
10744        ///Sets `digest` with the provided value.
10745        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10746            self.set_digest(field.into());
10747            self
10748        }
10749    }
10750    impl super::ObjectSet {
10751        pub const fn const_default() -> Self {
10752            Self { objects: Vec::new() }
10753        }
10754        #[doc(hidden)]
10755        pub fn default_instance() -> &'static Self {
10756            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
10757            &DEFAULT
10758        }
10759        ///Returns the value of `objects`, or the default value if `objects` is unset.
10760        pub fn objects(&self) -> &[super::Object] {
10761            &self.objects
10762        }
10763        ///Returns a mutable reference to `objects`.
10764        ///If the field is unset, it is first initialized with the default value.
10765        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10766            &mut self.objects
10767        }
10768        ///Sets `objects` with the provided value.
10769        pub fn set_objects(&mut self, field: Vec<super::Object>) {
10770            self.objects = field;
10771        }
10772        ///Sets `objects` with the provided value.
10773        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10774            self.set_objects(field);
10775            self
10776        }
10777    }
10778    impl super::OpenSignature {
10779        pub const fn const_default() -> Self {
10780            Self {
10781                reference: None,
10782                body: None,
10783            }
10784        }
10785        #[doc(hidden)]
10786        pub fn default_instance() -> &'static Self {
10787            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
10788            &DEFAULT
10789        }
10790        ///Sets `reference` with the provided value.
10791        pub fn with_reference<T: Into<super::open_signature::Reference>>(
10792            mut self,
10793            field: T,
10794        ) -> Self {
10795            self.set_reference(field.into());
10796            self
10797        }
10798        ///Returns the value of `body`, or the default value if `body` is unset.
10799        pub fn body(&self) -> &super::OpenSignatureBody {
10800            self.body
10801                .as_ref()
10802                .map(|field| field as _)
10803                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
10804        }
10805        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10806        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
10807            self.body.as_mut().map(|field| field as _)
10808        }
10809        ///Returns a mutable reference to `body`.
10810        ///If the field is unset, it is first initialized with the default value.
10811        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
10812            self.body.get_or_insert_default()
10813        }
10814        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
10815        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
10816            self.body.as_ref().map(|field| field as _)
10817        }
10818        ///Sets `body` with the provided value.
10819        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
10820            self.body = Some(field.into().into());
10821        }
10822        ///Sets `body` with the provided value.
10823        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
10824            self.set_body(field.into());
10825            self
10826        }
10827    }
10828    impl super::OpenSignatureBody {
10829        pub const fn const_default() -> Self {
10830            Self {
10831                r#type: None,
10832                type_name: None,
10833                type_parameter_instantiation: Vec::new(),
10834                type_parameter: None,
10835            }
10836        }
10837        #[doc(hidden)]
10838        pub fn default_instance() -> &'static Self {
10839            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
10840            &DEFAULT
10841        }
10842        ///Sets `r#type` with the provided value.
10843        pub fn with_type<T: Into<super::open_signature_body::Type>>(
10844            mut self,
10845            field: T,
10846        ) -> Self {
10847            self.set_type(field.into());
10848            self
10849        }
10850        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10851        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
10852            self.type_name.as_mut().map(|field| field as _)
10853        }
10854        ///Returns a mutable reference to `type_name`.
10855        ///If the field is unset, it is first initialized with the default value.
10856        pub fn type_name_mut(&mut self) -> &mut String {
10857            self.type_name.get_or_insert_default()
10858        }
10859        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10860        pub fn type_name_opt(&self) -> Option<&str> {
10861            self.type_name.as_ref().map(|field| field as _)
10862        }
10863        ///Sets `type_name` with the provided value.
10864        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
10865            self.type_name = Some(field.into().into());
10866        }
10867        ///Sets `type_name` with the provided value.
10868        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
10869            self.set_type_name(field.into());
10870            self
10871        }
10872        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
10873        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
10874            &self.type_parameter_instantiation
10875        }
10876        ///Returns a mutable reference to `type_parameter_instantiation`.
10877        ///If the field is unset, it is first initialized with the default value.
10878        pub fn type_parameter_instantiation_mut(
10879            &mut self,
10880        ) -> &mut Vec<super::OpenSignatureBody> {
10881            &mut self.type_parameter_instantiation
10882        }
10883        ///Sets `type_parameter_instantiation` with the provided value.
10884        pub fn set_type_parameter_instantiation(
10885            &mut self,
10886            field: Vec<super::OpenSignatureBody>,
10887        ) {
10888            self.type_parameter_instantiation = field;
10889        }
10890        ///Sets `type_parameter_instantiation` with the provided value.
10891        pub fn with_type_parameter_instantiation(
10892            mut self,
10893            field: Vec<super::OpenSignatureBody>,
10894        ) -> Self {
10895            self.set_type_parameter_instantiation(field);
10896            self
10897        }
10898        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10899        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
10900            self.type_parameter.as_mut().map(|field| field as _)
10901        }
10902        ///Returns a mutable reference to `type_parameter`.
10903        ///If the field is unset, it is first initialized with the default value.
10904        pub fn type_parameter_mut(&mut self) -> &mut u32 {
10905            self.type_parameter.get_or_insert_default()
10906        }
10907        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10908        pub fn type_parameter_opt(&self) -> Option<u32> {
10909            self.type_parameter.as_ref().map(|field| *field)
10910        }
10911        ///Sets `type_parameter` with the provided value.
10912        pub fn set_type_parameter(&mut self, field: u32) {
10913            self.type_parameter = Some(field);
10914        }
10915        ///Sets `type_parameter` with the provided value.
10916        pub fn with_type_parameter(mut self, field: u32) -> Self {
10917            self.set_type_parameter(field);
10918            self
10919        }
10920    }
10921    impl super::Owner {
10922        pub const fn const_default() -> Self {
10923            Self {
10924                kind: None,
10925                address: None,
10926                version: None,
10927            }
10928        }
10929        #[doc(hidden)]
10930        pub fn default_instance() -> &'static Self {
10931            static DEFAULT: super::Owner = super::Owner::const_default();
10932            &DEFAULT
10933        }
10934        ///Sets `kind` with the provided value.
10935        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
10936            self.set_kind(field.into());
10937            self
10938        }
10939        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10940        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
10941            self.address.as_mut().map(|field| field as _)
10942        }
10943        ///Returns a mutable reference to `address`.
10944        ///If the field is unset, it is first initialized with the default value.
10945        pub fn address_mut(&mut self) -> &mut String {
10946            self.address.get_or_insert_default()
10947        }
10948        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10949        pub fn address_opt(&self) -> Option<&str> {
10950            self.address.as_ref().map(|field| field as _)
10951        }
10952        ///Sets `address` with the provided value.
10953        pub fn set_address<T: Into<String>>(&mut self, field: T) {
10954            self.address = Some(field.into().into());
10955        }
10956        ///Sets `address` with the provided value.
10957        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
10958            self.set_address(field.into());
10959            self
10960        }
10961        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10962        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10963            self.version.as_mut().map(|field| field as _)
10964        }
10965        ///Returns a mutable reference to `version`.
10966        ///If the field is unset, it is first initialized with the default value.
10967        pub fn version_mut(&mut self) -> &mut u64 {
10968            self.version.get_or_insert_default()
10969        }
10970        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10971        pub fn version_opt(&self) -> Option<u64> {
10972            self.version.as_ref().map(|field| *field)
10973        }
10974        ///Sets `version` with the provided value.
10975        pub fn set_version(&mut self, field: u64) {
10976            self.version = Some(field);
10977        }
10978        ///Sets `version` with the provided value.
10979        pub fn with_version(mut self, field: u64) -> Self {
10980            self.set_version(field);
10981            self
10982        }
10983    }
10984    impl super::Package {
10985        pub const fn const_default() -> Self {
10986            Self {
10987                storage_id: None,
10988                original_id: None,
10989                version: None,
10990                modules: Vec::new(),
10991                type_origins: Vec::new(),
10992                linkage: Vec::new(),
10993            }
10994        }
10995        #[doc(hidden)]
10996        pub fn default_instance() -> &'static Self {
10997            static DEFAULT: super::Package = super::Package::const_default();
10998            &DEFAULT
10999        }
11000        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11001        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11002            self.storage_id.as_mut().map(|field| field as _)
11003        }
11004        ///Returns a mutable reference to `storage_id`.
11005        ///If the field is unset, it is first initialized with the default value.
11006        pub fn storage_id_mut(&mut self) -> &mut String {
11007            self.storage_id.get_or_insert_default()
11008        }
11009        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11010        pub fn storage_id_opt(&self) -> Option<&str> {
11011            self.storage_id.as_ref().map(|field| field as _)
11012        }
11013        ///Sets `storage_id` with the provided value.
11014        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11015            self.storage_id = Some(field.into().into());
11016        }
11017        ///Sets `storage_id` with the provided value.
11018        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11019            self.set_storage_id(field.into());
11020            self
11021        }
11022        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11023        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11024            self.original_id.as_mut().map(|field| field as _)
11025        }
11026        ///Returns a mutable reference to `original_id`.
11027        ///If the field is unset, it is first initialized with the default value.
11028        pub fn original_id_mut(&mut self) -> &mut String {
11029            self.original_id.get_or_insert_default()
11030        }
11031        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11032        pub fn original_id_opt(&self) -> Option<&str> {
11033            self.original_id.as_ref().map(|field| field as _)
11034        }
11035        ///Sets `original_id` with the provided value.
11036        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11037            self.original_id = Some(field.into().into());
11038        }
11039        ///Sets `original_id` with the provided value.
11040        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11041            self.set_original_id(field.into());
11042            self
11043        }
11044        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11045        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11046            self.version.as_mut().map(|field| field as _)
11047        }
11048        ///Returns a mutable reference to `version`.
11049        ///If the field is unset, it is first initialized with the default value.
11050        pub fn version_mut(&mut self) -> &mut u64 {
11051            self.version.get_or_insert_default()
11052        }
11053        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11054        pub fn version_opt(&self) -> Option<u64> {
11055            self.version.as_ref().map(|field| *field)
11056        }
11057        ///Sets `version` with the provided value.
11058        pub fn set_version(&mut self, field: u64) {
11059            self.version = Some(field);
11060        }
11061        ///Sets `version` with the provided value.
11062        pub fn with_version(mut self, field: u64) -> Self {
11063            self.set_version(field);
11064            self
11065        }
11066        ///Returns the value of `modules`, or the default value if `modules` is unset.
11067        pub fn modules(&self) -> &[super::Module] {
11068            &self.modules
11069        }
11070        ///Returns a mutable reference to `modules`.
11071        ///If the field is unset, it is first initialized with the default value.
11072        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11073            &mut self.modules
11074        }
11075        ///Sets `modules` with the provided value.
11076        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11077            self.modules = field;
11078        }
11079        ///Sets `modules` with the provided value.
11080        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11081            self.set_modules(field);
11082            self
11083        }
11084        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11085        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11086            &self.type_origins
11087        }
11088        ///Returns a mutable reference to `type_origins`.
11089        ///If the field is unset, it is first initialized with the default value.
11090        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11091            &mut self.type_origins
11092        }
11093        ///Sets `type_origins` with the provided value.
11094        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11095            self.type_origins = field;
11096        }
11097        ///Sets `type_origins` with the provided value.
11098        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11099            self.set_type_origins(field);
11100            self
11101        }
11102        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11103        pub fn linkage(&self) -> &[super::Linkage] {
11104            &self.linkage
11105        }
11106        ///Returns a mutable reference to `linkage`.
11107        ///If the field is unset, it is first initialized with the default value.
11108        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11109            &mut self.linkage
11110        }
11111        ///Sets `linkage` with the provided value.
11112        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11113            self.linkage = field;
11114        }
11115        ///Sets `linkage` with the provided value.
11116        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11117            self.set_linkage(field);
11118            self
11119        }
11120    }
11121    impl super::PackageUpgradeError {
11122        pub const fn const_default() -> Self {
11123            Self {
11124                kind: None,
11125                package_id: None,
11126                digest: None,
11127                policy: None,
11128                ticket_id: None,
11129            }
11130        }
11131        #[doc(hidden)]
11132        pub fn default_instance() -> &'static Self {
11133            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11134            &DEFAULT
11135        }
11136        ///Sets `kind` with the provided value.
11137        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11138            mut self,
11139            field: T,
11140        ) -> Self {
11141            self.set_kind(field.into());
11142            self
11143        }
11144        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11145        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11146            self.package_id.as_mut().map(|field| field as _)
11147        }
11148        ///Returns a mutable reference to `package_id`.
11149        ///If the field is unset, it is first initialized with the default value.
11150        pub fn package_id_mut(&mut self) -> &mut String {
11151            self.package_id.get_or_insert_default()
11152        }
11153        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11154        pub fn package_id_opt(&self) -> Option<&str> {
11155            self.package_id.as_ref().map(|field| field as _)
11156        }
11157        ///Sets `package_id` with the provided value.
11158        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11159            self.package_id = Some(field.into().into());
11160        }
11161        ///Sets `package_id` with the provided value.
11162        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11163            self.set_package_id(field.into());
11164            self
11165        }
11166        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11167        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11168            self.digest.as_mut().map(|field| field as _)
11169        }
11170        ///Returns a mutable reference to `digest`.
11171        ///If the field is unset, it is first initialized with the default value.
11172        pub fn digest_mut(&mut self) -> &mut String {
11173            self.digest.get_or_insert_default()
11174        }
11175        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11176        pub fn digest_opt(&self) -> Option<&str> {
11177            self.digest.as_ref().map(|field| field as _)
11178        }
11179        ///Sets `digest` with the provided value.
11180        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11181            self.digest = Some(field.into().into());
11182        }
11183        ///Sets `digest` with the provided value.
11184        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11185            self.set_digest(field.into());
11186            self
11187        }
11188        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11189        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11190            self.policy.as_mut().map(|field| field as _)
11191        }
11192        ///Returns a mutable reference to `policy`.
11193        ///If the field is unset, it is first initialized with the default value.
11194        pub fn policy_mut(&mut self) -> &mut u32 {
11195            self.policy.get_or_insert_default()
11196        }
11197        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11198        pub fn policy_opt(&self) -> Option<u32> {
11199            self.policy.as_ref().map(|field| *field)
11200        }
11201        ///Sets `policy` with the provided value.
11202        pub fn set_policy(&mut self, field: u32) {
11203            self.policy = Some(field);
11204        }
11205        ///Sets `policy` with the provided value.
11206        pub fn with_policy(mut self, field: u32) -> Self {
11207            self.set_policy(field);
11208            self
11209        }
11210        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11211        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11212            self.ticket_id.as_mut().map(|field| field as _)
11213        }
11214        ///Returns a mutable reference to `ticket_id`.
11215        ///If the field is unset, it is first initialized with the default value.
11216        pub fn ticket_id_mut(&mut self) -> &mut String {
11217            self.ticket_id.get_or_insert_default()
11218        }
11219        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11220        pub fn ticket_id_opt(&self) -> Option<&str> {
11221            self.ticket_id.as_ref().map(|field| field as _)
11222        }
11223        ///Sets `ticket_id` with the provided value.
11224        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11225            self.ticket_id = Some(field.into().into());
11226        }
11227        ///Sets `ticket_id` with the provided value.
11228        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11229            self.set_ticket_id(field.into());
11230            self
11231        }
11232    }
11233    impl super::PackageVersion {
11234        pub const fn const_default() -> Self {
11235            Self {
11236                package_id: None,
11237                version: None,
11238            }
11239        }
11240        #[doc(hidden)]
11241        pub fn default_instance() -> &'static Self {
11242            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11243            &DEFAULT
11244        }
11245        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11246        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11247            self.package_id.as_mut().map(|field| field as _)
11248        }
11249        ///Returns a mutable reference to `package_id`.
11250        ///If the field is unset, it is first initialized with the default value.
11251        pub fn package_id_mut(&mut self) -> &mut String {
11252            self.package_id.get_or_insert_default()
11253        }
11254        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11255        pub fn package_id_opt(&self) -> Option<&str> {
11256            self.package_id.as_ref().map(|field| field as _)
11257        }
11258        ///Sets `package_id` with the provided value.
11259        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11260            self.package_id = Some(field.into().into());
11261        }
11262        ///Sets `package_id` with the provided value.
11263        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11264            self.set_package_id(field.into());
11265            self
11266        }
11267        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11268        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11269            self.version.as_mut().map(|field| field as _)
11270        }
11271        ///Returns a mutable reference to `version`.
11272        ///If the field is unset, it is first initialized with the default value.
11273        pub fn version_mut(&mut self) -> &mut u64 {
11274            self.version.get_or_insert_default()
11275        }
11276        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11277        pub fn version_opt(&self) -> Option<u64> {
11278            self.version.as_ref().map(|field| *field)
11279        }
11280        ///Sets `version` with the provided value.
11281        pub fn set_version(&mut self, field: u64) {
11282            self.version = Some(field);
11283        }
11284        ///Sets `version` with the provided value.
11285        pub fn with_version(mut self, field: u64) -> Self {
11286            self.set_version(field);
11287            self
11288        }
11289    }
11290    impl super::PasskeyAuthenticator {
11291        pub const fn const_default() -> Self {
11292            Self {
11293                authenticator_data: None,
11294                client_data_json: None,
11295                signature: None,
11296            }
11297        }
11298        #[doc(hidden)]
11299        pub fn default_instance() -> &'static Self {
11300            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11301            &DEFAULT
11302        }
11303        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11304        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11305            self.authenticator_data.as_ref().map(|field| field as _)
11306        }
11307        ///Sets `authenticator_data` with the provided value.
11308        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11309            &mut self,
11310            field: T,
11311        ) {
11312            self.authenticator_data = Some(field.into().into());
11313        }
11314        ///Sets `authenticator_data` with the provided value.
11315        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11316            mut self,
11317            field: T,
11318        ) -> Self {
11319            self.set_authenticator_data(field.into());
11320            self
11321        }
11322        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11323        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11324            self.client_data_json.as_mut().map(|field| field as _)
11325        }
11326        ///Returns a mutable reference to `client_data_json`.
11327        ///If the field is unset, it is first initialized with the default value.
11328        pub fn client_data_json_mut(&mut self) -> &mut String {
11329            self.client_data_json.get_or_insert_default()
11330        }
11331        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11332        pub fn client_data_json_opt(&self) -> Option<&str> {
11333            self.client_data_json.as_ref().map(|field| field as _)
11334        }
11335        ///Sets `client_data_json` with the provided value.
11336        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11337            self.client_data_json = Some(field.into().into());
11338        }
11339        ///Sets `client_data_json` with the provided value.
11340        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11341            self.set_client_data_json(field.into());
11342            self
11343        }
11344        ///Returns the value of `signature`, or the default value if `signature` is unset.
11345        pub fn signature(&self) -> &super::SimpleSignature {
11346            self.signature
11347                .as_ref()
11348                .map(|field| field as _)
11349                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11350        }
11351        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11352        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11353            self.signature.as_mut().map(|field| field as _)
11354        }
11355        ///Returns a mutable reference to `signature`.
11356        ///If the field is unset, it is first initialized with the default value.
11357        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11358            self.signature.get_or_insert_default()
11359        }
11360        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11361        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11362            self.signature.as_ref().map(|field| field as _)
11363        }
11364        ///Sets `signature` with the provided value.
11365        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11366            self.signature = Some(field.into().into());
11367        }
11368        ///Sets `signature` with the provided value.
11369        pub fn with_signature<T: Into<super::SimpleSignature>>(
11370            mut self,
11371            field: T,
11372        ) -> Self {
11373            self.set_signature(field.into());
11374            self
11375        }
11376    }
11377    impl super::ProgrammableTransaction {
11378        pub const fn const_default() -> Self {
11379            Self {
11380                inputs: Vec::new(),
11381                commands: Vec::new(),
11382            }
11383        }
11384        #[doc(hidden)]
11385        pub fn default_instance() -> &'static Self {
11386            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11387            &DEFAULT
11388        }
11389        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11390        pub fn inputs(&self) -> &[super::Input] {
11391            &self.inputs
11392        }
11393        ///Returns a mutable reference to `inputs`.
11394        ///If the field is unset, it is first initialized with the default value.
11395        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11396            &mut self.inputs
11397        }
11398        ///Sets `inputs` with the provided value.
11399        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11400            self.inputs = field;
11401        }
11402        ///Sets `inputs` with the provided value.
11403        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11404            self.set_inputs(field);
11405            self
11406        }
11407        ///Returns the value of `commands`, or the default value if `commands` is unset.
11408        pub fn commands(&self) -> &[super::Command] {
11409            &self.commands
11410        }
11411        ///Returns a mutable reference to `commands`.
11412        ///If the field is unset, it is first initialized with the default value.
11413        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11414            &mut self.commands
11415        }
11416        ///Sets `commands` with the provided value.
11417        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11418            self.commands = field;
11419        }
11420        ///Sets `commands` with the provided value.
11421        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11422            self.set_commands(field);
11423            self
11424        }
11425    }
11426    impl super::ProtocolConfig {
11427        pub const fn const_default() -> Self {
11428            Self {
11429                protocol_version: None,
11430                feature_flags: std::collections::BTreeMap::new(),
11431                attributes: std::collections::BTreeMap::new(),
11432            }
11433        }
11434        #[doc(hidden)]
11435        pub fn default_instance() -> &'static Self {
11436            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11437            &DEFAULT
11438        }
11439        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11440        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11441            self.protocol_version.as_mut().map(|field| field as _)
11442        }
11443        ///Returns a mutable reference to `protocol_version`.
11444        ///If the field is unset, it is first initialized with the default value.
11445        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11446            self.protocol_version.get_or_insert_default()
11447        }
11448        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11449        pub fn protocol_version_opt(&self) -> Option<u64> {
11450            self.protocol_version.as_ref().map(|field| *field)
11451        }
11452        ///Sets `protocol_version` with the provided value.
11453        pub fn set_protocol_version(&mut self, field: u64) {
11454            self.protocol_version = Some(field);
11455        }
11456        ///Sets `protocol_version` with the provided value.
11457        pub fn with_protocol_version(mut self, field: u64) -> Self {
11458            self.set_protocol_version(field);
11459            self
11460        }
11461        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11462        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11463            &self.feature_flags
11464        }
11465        ///Returns a mutable reference to `feature_flags`.
11466        ///If the field is unset, it is first initialized with the default value.
11467        pub fn feature_flags_mut(
11468            &mut self,
11469        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11470            &mut self.feature_flags
11471        }
11472        ///Sets `feature_flags` with the provided value.
11473        pub fn set_feature_flags(
11474            &mut self,
11475            field: ::std::collections::BTreeMap<String, bool>,
11476        ) {
11477            self.feature_flags = field;
11478        }
11479        ///Sets `feature_flags` with the provided value.
11480        pub fn with_feature_flags(
11481            mut self,
11482            field: ::std::collections::BTreeMap<String, bool>,
11483        ) -> Self {
11484            self.set_feature_flags(field);
11485            self
11486        }
11487        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11488        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11489            &self.attributes
11490        }
11491        ///Returns a mutable reference to `attributes`.
11492        ///If the field is unset, it is first initialized with the default value.
11493        pub fn attributes_mut(
11494            &mut self,
11495        ) -> &mut ::std::collections::BTreeMap<String, String> {
11496            &mut self.attributes
11497        }
11498        ///Sets `attributes` with the provided value.
11499        pub fn set_attributes(
11500            &mut self,
11501            field: ::std::collections::BTreeMap<String, String>,
11502        ) {
11503            self.attributes = field;
11504        }
11505        ///Sets `attributes` with the provided value.
11506        pub fn with_attributes(
11507            mut self,
11508            field: ::std::collections::BTreeMap<String, String>,
11509        ) -> Self {
11510            self.set_attributes(field);
11511            self
11512        }
11513    }
11514    impl super::Publish {
11515        pub const fn const_default() -> Self {
11516            Self {
11517                modules: Vec::new(),
11518                dependencies: Vec::new(),
11519            }
11520        }
11521        #[doc(hidden)]
11522        pub fn default_instance() -> &'static Self {
11523            static DEFAULT: super::Publish = super::Publish::const_default();
11524            &DEFAULT
11525        }
11526        ///Returns the value of `modules`, or the default value if `modules` is unset.
11527        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11528            &self.modules
11529        }
11530        ///Returns a mutable reference to `modules`.
11531        ///If the field is unset, it is first initialized with the default value.
11532        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11533            &mut self.modules
11534        }
11535        ///Sets `modules` with the provided value.
11536        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11537            self.modules = field;
11538        }
11539        ///Sets `modules` with the provided value.
11540        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11541            self.set_modules(field);
11542            self
11543        }
11544        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
11545        pub fn dependencies(&self) -> &[String] {
11546            &self.dependencies
11547        }
11548        ///Returns a mutable reference to `dependencies`.
11549        ///If the field is unset, it is first initialized with the default value.
11550        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11551            &mut self.dependencies
11552        }
11553        ///Sets `dependencies` with the provided value.
11554        pub fn set_dependencies(&mut self, field: Vec<String>) {
11555            self.dependencies = field;
11556        }
11557        ///Sets `dependencies` with the provided value.
11558        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11559            self.set_dependencies(field);
11560            self
11561        }
11562    }
11563    impl super::RandomnessStateUpdate {
11564        pub const fn const_default() -> Self {
11565            Self {
11566                epoch: None,
11567                randomness_round: None,
11568                random_bytes: None,
11569                randomness_object_initial_shared_version: None,
11570            }
11571        }
11572        #[doc(hidden)]
11573        pub fn default_instance() -> &'static Self {
11574            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11575            &DEFAULT
11576        }
11577        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11578        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11579            self.epoch.as_mut().map(|field| field as _)
11580        }
11581        ///Returns a mutable reference to `epoch`.
11582        ///If the field is unset, it is first initialized with the default value.
11583        pub fn epoch_mut(&mut self) -> &mut u64 {
11584            self.epoch.get_or_insert_default()
11585        }
11586        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
11587        pub fn epoch_opt(&self) -> Option<u64> {
11588            self.epoch.as_ref().map(|field| *field)
11589        }
11590        ///Sets `epoch` with the provided value.
11591        pub fn set_epoch(&mut self, field: u64) {
11592            self.epoch = Some(field);
11593        }
11594        ///Sets `epoch` with the provided value.
11595        pub fn with_epoch(mut self, field: u64) -> Self {
11596            self.set_epoch(field);
11597            self
11598        }
11599        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11600        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11601            self.randomness_round.as_mut().map(|field| field as _)
11602        }
11603        ///Returns a mutable reference to `randomness_round`.
11604        ///If the field is unset, it is first initialized with the default value.
11605        pub fn randomness_round_mut(&mut self) -> &mut u64 {
11606            self.randomness_round.get_or_insert_default()
11607        }
11608        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
11609        pub fn randomness_round_opt(&self) -> Option<u64> {
11610            self.randomness_round.as_ref().map(|field| *field)
11611        }
11612        ///Sets `randomness_round` with the provided value.
11613        pub fn set_randomness_round(&mut self, field: u64) {
11614            self.randomness_round = Some(field);
11615        }
11616        ///Sets `randomness_round` with the provided value.
11617        pub fn with_randomness_round(mut self, field: u64) -> Self {
11618            self.set_randomness_round(field);
11619            self
11620        }
11621        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
11622        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11623            self.random_bytes.as_ref().map(|field| field as _)
11624        }
11625        ///Sets `random_bytes` with the provided value.
11626        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11627            self.random_bytes = Some(field.into().into());
11628        }
11629        ///Sets `random_bytes` with the provided value.
11630        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11631            mut self,
11632            field: T,
11633        ) -> Self {
11634            self.set_random_bytes(field.into());
11635            self
11636        }
11637        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11638        pub fn randomness_object_initial_shared_version_opt_mut(
11639            &mut self,
11640        ) -> Option<&mut u64> {
11641            self.randomness_object_initial_shared_version
11642                .as_mut()
11643                .map(|field| field as _)
11644        }
11645        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
11646        ///If the field is unset, it is first initialized with the default value.
11647        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11648            self.randomness_object_initial_shared_version.get_or_insert_default()
11649        }
11650        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11651        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11652            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11653        }
11654        ///Sets `randomness_object_initial_shared_version` with the provided value.
11655        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
11656            self.randomness_object_initial_shared_version = Some(field);
11657        }
11658        ///Sets `randomness_object_initial_shared_version` with the provided value.
11659        pub fn with_randomness_object_initial_shared_version(
11660            mut self,
11661            field: u64,
11662        ) -> Self {
11663            self.set_randomness_object_initial_shared_version(field);
11664            self
11665        }
11666    }
11667    impl super::RegulatedCoinMetadata {
11668        pub const fn const_default() -> Self {
11669            Self {
11670                id: None,
11671                coin_metadata_object: None,
11672                deny_cap_object: None,
11673                allow_global_pause: None,
11674                variant: None,
11675                coin_regulated_state: None,
11676            }
11677        }
11678        #[doc(hidden)]
11679        pub fn default_instance() -> &'static Self {
11680            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11681            &DEFAULT
11682        }
11683        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11684        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11685            self.id.as_mut().map(|field| field as _)
11686        }
11687        ///Returns a mutable reference to `id`.
11688        ///If the field is unset, it is first initialized with the default value.
11689        pub fn id_mut(&mut self) -> &mut String {
11690            self.id.get_or_insert_default()
11691        }
11692        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11693        pub fn id_opt(&self) -> Option<&str> {
11694            self.id.as_ref().map(|field| field as _)
11695        }
11696        ///Sets `id` with the provided value.
11697        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11698            self.id = Some(field.into().into());
11699        }
11700        ///Sets `id` with the provided value.
11701        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11702            self.set_id(field.into());
11703            self
11704        }
11705        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11706        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
11707            self.coin_metadata_object.as_mut().map(|field| field as _)
11708        }
11709        ///Returns a mutable reference to `coin_metadata_object`.
11710        ///If the field is unset, it is first initialized with the default value.
11711        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
11712            self.coin_metadata_object.get_or_insert_default()
11713        }
11714        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11715        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
11716            self.coin_metadata_object.as_ref().map(|field| field as _)
11717        }
11718        ///Sets `coin_metadata_object` with the provided value.
11719        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
11720            self.coin_metadata_object = Some(field.into().into());
11721        }
11722        ///Sets `coin_metadata_object` with the provided value.
11723        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
11724            self.set_coin_metadata_object(field.into());
11725            self
11726        }
11727        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11728        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
11729            self.deny_cap_object.as_mut().map(|field| field as _)
11730        }
11731        ///Returns a mutable reference to `deny_cap_object`.
11732        ///If the field is unset, it is first initialized with the default value.
11733        pub fn deny_cap_object_mut(&mut self) -> &mut String {
11734            self.deny_cap_object.get_or_insert_default()
11735        }
11736        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11737        pub fn deny_cap_object_opt(&self) -> Option<&str> {
11738            self.deny_cap_object.as_ref().map(|field| field as _)
11739        }
11740        ///Sets `deny_cap_object` with the provided value.
11741        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
11742            self.deny_cap_object = Some(field.into().into());
11743        }
11744        ///Sets `deny_cap_object` with the provided value.
11745        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
11746            self.set_deny_cap_object(field.into());
11747            self
11748        }
11749        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11750        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
11751            self.allow_global_pause.as_mut().map(|field| field as _)
11752        }
11753        ///Returns a mutable reference to `allow_global_pause`.
11754        ///If the field is unset, it is first initialized with the default value.
11755        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
11756            self.allow_global_pause.get_or_insert_default()
11757        }
11758        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
11759        pub fn allow_global_pause_opt(&self) -> Option<bool> {
11760            self.allow_global_pause.as_ref().map(|field| *field)
11761        }
11762        ///Sets `allow_global_pause` with the provided value.
11763        pub fn set_allow_global_pause(&mut self, field: bool) {
11764            self.allow_global_pause = Some(field);
11765        }
11766        ///Sets `allow_global_pause` with the provided value.
11767        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
11768            self.set_allow_global_pause(field);
11769            self
11770        }
11771        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11772        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
11773            self.variant.as_mut().map(|field| field as _)
11774        }
11775        ///Returns a mutable reference to `variant`.
11776        ///If the field is unset, it is first initialized with the default value.
11777        pub fn variant_mut(&mut self) -> &mut u32 {
11778            self.variant.get_or_insert_default()
11779        }
11780        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
11781        pub fn variant_opt(&self) -> Option<u32> {
11782            self.variant.as_ref().map(|field| *field)
11783        }
11784        ///Sets `variant` with the provided value.
11785        pub fn set_variant(&mut self, field: u32) {
11786            self.variant = Some(field);
11787        }
11788        ///Sets `variant` with the provided value.
11789        pub fn with_variant(mut self, field: u32) -> Self {
11790            self.set_variant(field);
11791            self
11792        }
11793        ///Sets `coin_regulated_state` with the provided value.
11794        pub fn with_coin_regulated_state<
11795            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
11796        >(mut self, field: T) -> Self {
11797            self.set_coin_regulated_state(field.into());
11798            self
11799        }
11800    }
11801    impl super::ReverseLookupNameRequest {
11802        pub const fn const_default() -> Self {
11803            Self { address: None }
11804        }
11805        #[doc(hidden)]
11806        pub fn default_instance() -> &'static Self {
11807            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
11808            &DEFAULT
11809        }
11810        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11811        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11812            self.address.as_mut().map(|field| field as _)
11813        }
11814        ///Returns a mutable reference to `address`.
11815        ///If the field is unset, it is first initialized with the default value.
11816        pub fn address_mut(&mut self) -> &mut String {
11817            self.address.get_or_insert_default()
11818        }
11819        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11820        pub fn address_opt(&self) -> Option<&str> {
11821            self.address.as_ref().map(|field| field as _)
11822        }
11823        ///Sets `address` with the provided value.
11824        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11825            self.address = Some(field.into().into());
11826        }
11827        ///Sets `address` with the provided value.
11828        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11829            self.set_address(field.into());
11830            self
11831        }
11832    }
11833    impl super::ReverseLookupNameResponse {
11834        pub const fn const_default() -> Self {
11835            Self { record: None }
11836        }
11837        #[doc(hidden)]
11838        pub fn default_instance() -> &'static Self {
11839            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
11840            &DEFAULT
11841        }
11842        ///Returns the value of `record`, or the default value if `record` is unset.
11843        pub fn record(&self) -> &super::NameRecord {
11844            self.record
11845                .as_ref()
11846                .map(|field| field as _)
11847                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11848        }
11849        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11850        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11851            self.record.as_mut().map(|field| field as _)
11852        }
11853        ///Returns a mutable reference to `record`.
11854        ///If the field is unset, it is first initialized with the default value.
11855        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11856            self.record.get_or_insert_default()
11857        }
11858        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11859        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11860            self.record.as_ref().map(|field| field as _)
11861        }
11862        ///Sets `record` with the provided value.
11863        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11864            self.record = Some(field.into().into());
11865        }
11866        ///Sets `record` with the provided value.
11867        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11868            self.set_record(field.into());
11869            self
11870        }
11871    }
11872    impl super::SimpleSignature {
11873        pub const fn const_default() -> Self {
11874            Self {
11875                scheme: None,
11876                signature: None,
11877                public_key: None,
11878            }
11879        }
11880        #[doc(hidden)]
11881        pub fn default_instance() -> &'static Self {
11882            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
11883            &DEFAULT
11884        }
11885        ///Sets `scheme` with the provided value.
11886        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11887            self.set_scheme(field.into());
11888            self
11889        }
11890        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11891        pub fn signature_opt(&self) -> Option<&[u8]> {
11892            self.signature.as_ref().map(|field| field as _)
11893        }
11894        ///Sets `signature` with the provided value.
11895        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11896            self.signature = Some(field.into().into());
11897        }
11898        ///Sets `signature` with the provided value.
11899        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
11900            mut self,
11901            field: T,
11902        ) -> Self {
11903            self.set_signature(field.into());
11904            self
11905        }
11906        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11907        pub fn public_key_opt(&self) -> Option<&[u8]> {
11908            self.public_key.as_ref().map(|field| field as _)
11909        }
11910        ///Sets `public_key` with the provided value.
11911        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11912            self.public_key = Some(field.into().into());
11913        }
11914        ///Sets `public_key` with the provided value.
11915        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11916            mut self,
11917            field: T,
11918        ) -> Self {
11919            self.set_public_key(field.into());
11920            self
11921        }
11922    }
11923    impl super::SimulateTransactionRequest {
11924        pub const fn const_default() -> Self {
11925            Self {
11926                transaction: None,
11927                read_mask: None,
11928                checks: None,
11929                do_gas_selection: None,
11930            }
11931        }
11932        #[doc(hidden)]
11933        pub fn default_instance() -> &'static Self {
11934            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
11935            &DEFAULT
11936        }
11937        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
11938        pub fn transaction(&self) -> &super::Transaction {
11939            self.transaction
11940                .as_ref()
11941                .map(|field| field as _)
11942                .unwrap_or_else(|| super::Transaction::default_instance() as _)
11943        }
11944        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11945        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
11946            self.transaction.as_mut().map(|field| field as _)
11947        }
11948        ///Returns a mutable reference to `transaction`.
11949        ///If the field is unset, it is first initialized with the default value.
11950        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
11951            self.transaction.get_or_insert_default()
11952        }
11953        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11954        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
11955            self.transaction.as_ref().map(|field| field as _)
11956        }
11957        ///Sets `transaction` with the provided value.
11958        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
11959            self.transaction = Some(field.into().into());
11960        }
11961        ///Sets `transaction` with the provided value.
11962        pub fn with_transaction<T: Into<super::Transaction>>(
11963            mut self,
11964            field: T,
11965        ) -> Self {
11966            self.set_transaction(field.into());
11967            self
11968        }
11969        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11970        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11971            self.read_mask.as_mut().map(|field| field as _)
11972        }
11973        ///Returns a mutable reference to `read_mask`.
11974        ///If the field is unset, it is first initialized with the default value.
11975        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11976            self.read_mask.get_or_insert_default()
11977        }
11978        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
11979        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11980            self.read_mask.as_ref().map(|field| field as _)
11981        }
11982        ///Sets `read_mask` with the provided value.
11983        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11984            self.read_mask = Some(field.into().into());
11985        }
11986        ///Sets `read_mask` with the provided value.
11987        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11988            mut self,
11989            field: T,
11990        ) -> Self {
11991            self.set_read_mask(field.into());
11992            self
11993        }
11994        ///Sets `checks` with the provided value.
11995        pub fn with_checks<
11996            T: Into<super::simulate_transaction_request::TransactionChecks>,
11997        >(mut self, field: T) -> Self {
11998            self.set_checks(field.into());
11999            self
12000        }
12001        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12002        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12003            self.do_gas_selection.as_mut().map(|field| field as _)
12004        }
12005        ///Returns a mutable reference to `do_gas_selection`.
12006        ///If the field is unset, it is first initialized with the default value.
12007        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12008            self.do_gas_selection.get_or_insert_default()
12009        }
12010        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12011        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12012            self.do_gas_selection.as_ref().map(|field| *field)
12013        }
12014        ///Sets `do_gas_selection` with the provided value.
12015        pub fn set_do_gas_selection(&mut self, field: bool) {
12016            self.do_gas_selection = Some(field);
12017        }
12018        ///Sets `do_gas_selection` with the provided value.
12019        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12020            self.set_do_gas_selection(field);
12021            self
12022        }
12023    }
12024    impl super::SimulateTransactionResponse {
12025        pub const fn const_default() -> Self {
12026            Self {
12027                transaction: None,
12028                command_outputs: Vec::new(),
12029            }
12030        }
12031        #[doc(hidden)]
12032        pub fn default_instance() -> &'static Self {
12033            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12034            &DEFAULT
12035        }
12036        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12037        pub fn transaction(&self) -> &super::ExecutedTransaction {
12038            self.transaction
12039                .as_ref()
12040                .map(|field| field as _)
12041                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12042        }
12043        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12044        pub fn transaction_opt_mut(
12045            &mut self,
12046        ) -> Option<&mut super::ExecutedTransaction> {
12047            self.transaction.as_mut().map(|field| field as _)
12048        }
12049        ///Returns a mutable reference to `transaction`.
12050        ///If the field is unset, it is first initialized with the default value.
12051        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12052            self.transaction.get_or_insert_default()
12053        }
12054        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12055        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12056            self.transaction.as_ref().map(|field| field as _)
12057        }
12058        ///Sets `transaction` with the provided value.
12059        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12060            &mut self,
12061            field: T,
12062        ) {
12063            self.transaction = Some(field.into().into());
12064        }
12065        ///Sets `transaction` with the provided value.
12066        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12067            mut self,
12068            field: T,
12069        ) -> Self {
12070            self.set_transaction(field.into());
12071            self
12072        }
12073        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12074        pub fn command_outputs(&self) -> &[super::CommandResult] {
12075            &self.command_outputs
12076        }
12077        ///Returns a mutable reference to `command_outputs`.
12078        ///If the field is unset, it is first initialized with the default value.
12079        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12080            &mut self.command_outputs
12081        }
12082        ///Sets `command_outputs` with the provided value.
12083        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12084            self.command_outputs = field;
12085        }
12086        ///Sets `command_outputs` with the provided value.
12087        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12088            self.set_command_outputs(field);
12089            self
12090        }
12091    }
12092    impl super::SizeError {
12093        pub const fn const_default() -> Self {
12094            Self { size: None, max_size: None }
12095        }
12096        #[doc(hidden)]
12097        pub fn default_instance() -> &'static Self {
12098            static DEFAULT: super::SizeError = super::SizeError::const_default();
12099            &DEFAULT
12100        }
12101        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12102        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12103            self.size.as_mut().map(|field| field as _)
12104        }
12105        ///Returns a mutable reference to `size`.
12106        ///If the field is unset, it is first initialized with the default value.
12107        pub fn size_mut(&mut self) -> &mut u64 {
12108            self.size.get_or_insert_default()
12109        }
12110        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12111        pub fn size_opt(&self) -> Option<u64> {
12112            self.size.as_ref().map(|field| *field)
12113        }
12114        ///Sets `size` with the provided value.
12115        pub fn set_size(&mut self, field: u64) {
12116            self.size = Some(field);
12117        }
12118        ///Sets `size` with the provided value.
12119        pub fn with_size(mut self, field: u64) -> Self {
12120            self.set_size(field);
12121            self
12122        }
12123        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12124        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12125            self.max_size.as_mut().map(|field| field as _)
12126        }
12127        ///Returns a mutable reference to `max_size`.
12128        ///If the field is unset, it is first initialized with the default value.
12129        pub fn max_size_mut(&mut self) -> &mut u64 {
12130            self.max_size.get_or_insert_default()
12131        }
12132        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12133        pub fn max_size_opt(&self) -> Option<u64> {
12134            self.max_size.as_ref().map(|field| *field)
12135        }
12136        ///Sets `max_size` with the provided value.
12137        pub fn set_max_size(&mut self, field: u64) {
12138            self.max_size = Some(field);
12139        }
12140        ///Sets `max_size` with the provided value.
12141        pub fn with_max_size(mut self, field: u64) -> Self {
12142            self.set_max_size(field);
12143            self
12144        }
12145    }
12146    impl super::SplitCoins {
12147        pub const fn const_default() -> Self {
12148            Self {
12149                coin: None,
12150                amounts: Vec::new(),
12151            }
12152        }
12153        #[doc(hidden)]
12154        pub fn default_instance() -> &'static Self {
12155            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12156            &DEFAULT
12157        }
12158        ///Returns the value of `coin`, or the default value if `coin` is unset.
12159        pub fn coin(&self) -> &super::Argument {
12160            self.coin
12161                .as_ref()
12162                .map(|field| field as _)
12163                .unwrap_or_else(|| super::Argument::default_instance() as _)
12164        }
12165        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12166        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12167            self.coin.as_mut().map(|field| field as _)
12168        }
12169        ///Returns a mutable reference to `coin`.
12170        ///If the field is unset, it is first initialized with the default value.
12171        pub fn coin_mut(&mut self) -> &mut super::Argument {
12172            self.coin.get_or_insert_default()
12173        }
12174        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12175        pub fn coin_opt(&self) -> Option<&super::Argument> {
12176            self.coin.as_ref().map(|field| field as _)
12177        }
12178        ///Sets `coin` with the provided value.
12179        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12180            self.coin = Some(field.into().into());
12181        }
12182        ///Sets `coin` with the provided value.
12183        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12184            self.set_coin(field.into());
12185            self
12186        }
12187        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12188        pub fn amounts(&self) -> &[super::Argument] {
12189            &self.amounts
12190        }
12191        ///Returns a mutable reference to `amounts`.
12192        ///If the field is unset, it is first initialized with the default value.
12193        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12194            &mut self.amounts
12195        }
12196        ///Sets `amounts` with the provided value.
12197        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12198            self.amounts = field;
12199        }
12200        ///Sets `amounts` with the provided value.
12201        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12202            self.set_amounts(field);
12203            self
12204        }
12205    }
12206    impl super::StakeSubsidy {
12207        pub const fn const_default() -> Self {
12208            Self {
12209                balance: None,
12210                distribution_counter: None,
12211                current_distribution_amount: None,
12212                stake_subsidy_period_length: None,
12213                stake_subsidy_decrease_rate: None,
12214                extra_fields: None,
12215            }
12216        }
12217        #[doc(hidden)]
12218        pub fn default_instance() -> &'static Self {
12219            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12220            &DEFAULT
12221        }
12222        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12223        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12224            self.balance.as_mut().map(|field| field as _)
12225        }
12226        ///Returns a mutable reference to `balance`.
12227        ///If the field is unset, it is first initialized with the default value.
12228        pub fn balance_mut(&mut self) -> &mut u64 {
12229            self.balance.get_or_insert_default()
12230        }
12231        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12232        pub fn balance_opt(&self) -> Option<u64> {
12233            self.balance.as_ref().map(|field| *field)
12234        }
12235        ///Sets `balance` with the provided value.
12236        pub fn set_balance(&mut self, field: u64) {
12237            self.balance = Some(field);
12238        }
12239        ///Sets `balance` with the provided value.
12240        pub fn with_balance(mut self, field: u64) -> Self {
12241            self.set_balance(field);
12242            self
12243        }
12244        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12245        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12246            self.distribution_counter.as_mut().map(|field| field as _)
12247        }
12248        ///Returns a mutable reference to `distribution_counter`.
12249        ///If the field is unset, it is first initialized with the default value.
12250        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12251            self.distribution_counter.get_or_insert_default()
12252        }
12253        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12254        pub fn distribution_counter_opt(&self) -> Option<u64> {
12255            self.distribution_counter.as_ref().map(|field| *field)
12256        }
12257        ///Sets `distribution_counter` with the provided value.
12258        pub fn set_distribution_counter(&mut self, field: u64) {
12259            self.distribution_counter = Some(field);
12260        }
12261        ///Sets `distribution_counter` with the provided value.
12262        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12263            self.set_distribution_counter(field);
12264            self
12265        }
12266        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12267        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12268            self.current_distribution_amount.as_mut().map(|field| field as _)
12269        }
12270        ///Returns a mutable reference to `current_distribution_amount`.
12271        ///If the field is unset, it is first initialized with the default value.
12272        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12273            self.current_distribution_amount.get_or_insert_default()
12274        }
12275        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12276        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12277            self.current_distribution_amount.as_ref().map(|field| *field)
12278        }
12279        ///Sets `current_distribution_amount` with the provided value.
12280        pub fn set_current_distribution_amount(&mut self, field: u64) {
12281            self.current_distribution_amount = Some(field);
12282        }
12283        ///Sets `current_distribution_amount` with the provided value.
12284        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12285            self.set_current_distribution_amount(field);
12286            self
12287        }
12288        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12289        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12290            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12291        }
12292        ///Returns a mutable reference to `stake_subsidy_period_length`.
12293        ///If the field is unset, it is first initialized with the default value.
12294        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12295            self.stake_subsidy_period_length.get_or_insert_default()
12296        }
12297        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12298        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12299            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12300        }
12301        ///Sets `stake_subsidy_period_length` with the provided value.
12302        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12303            self.stake_subsidy_period_length = Some(field);
12304        }
12305        ///Sets `stake_subsidy_period_length` with the provided value.
12306        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12307            self.set_stake_subsidy_period_length(field);
12308            self
12309        }
12310        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12311        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12312            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12313        }
12314        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12315        ///If the field is unset, it is first initialized with the default value.
12316        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12317            self.stake_subsidy_decrease_rate.get_or_insert_default()
12318        }
12319        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12320        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12321            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12322        }
12323        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12324        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12325            self.stake_subsidy_decrease_rate = Some(field);
12326        }
12327        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12328        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12329            self.set_stake_subsidy_decrease_rate(field);
12330            self
12331        }
12332        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12333        pub fn extra_fields(&self) -> &super::MoveTable {
12334            self.extra_fields
12335                .as_ref()
12336                .map(|field| field as _)
12337                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12338        }
12339        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12340        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12341            self.extra_fields.as_mut().map(|field| field as _)
12342        }
12343        ///Returns a mutable reference to `extra_fields`.
12344        ///If the field is unset, it is first initialized with the default value.
12345        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12346            self.extra_fields.get_or_insert_default()
12347        }
12348        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12349        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12350            self.extra_fields.as_ref().map(|field| field as _)
12351        }
12352        ///Sets `extra_fields` with the provided value.
12353        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12354            self.extra_fields = Some(field.into().into());
12355        }
12356        ///Sets `extra_fields` with the provided value.
12357        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12358            self.set_extra_fields(field.into());
12359            self
12360        }
12361    }
12362    impl super::StakingPool {
12363        pub const fn const_default() -> Self {
12364            Self {
12365                id: None,
12366                activation_epoch: None,
12367                deactivation_epoch: None,
12368                sui_balance: None,
12369                rewards_pool: None,
12370                pool_token_balance: None,
12371                exchange_rates: None,
12372                pending_stake: None,
12373                pending_total_sui_withdraw: None,
12374                pending_pool_token_withdraw: None,
12375                extra_fields: None,
12376            }
12377        }
12378        #[doc(hidden)]
12379        pub fn default_instance() -> &'static Self {
12380            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12381            &DEFAULT
12382        }
12383        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12384        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12385            self.id.as_mut().map(|field| field as _)
12386        }
12387        ///Returns a mutable reference to `id`.
12388        ///If the field is unset, it is first initialized with the default value.
12389        pub fn id_mut(&mut self) -> &mut String {
12390            self.id.get_or_insert_default()
12391        }
12392        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12393        pub fn id_opt(&self) -> Option<&str> {
12394            self.id.as_ref().map(|field| field as _)
12395        }
12396        ///Sets `id` with the provided value.
12397        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12398            self.id = Some(field.into().into());
12399        }
12400        ///Sets `id` with the provided value.
12401        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12402            self.set_id(field.into());
12403            self
12404        }
12405        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12406        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12407            self.activation_epoch.as_mut().map(|field| field as _)
12408        }
12409        ///Returns a mutable reference to `activation_epoch`.
12410        ///If the field is unset, it is first initialized with the default value.
12411        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12412            self.activation_epoch.get_or_insert_default()
12413        }
12414        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12415        pub fn activation_epoch_opt(&self) -> Option<u64> {
12416            self.activation_epoch.as_ref().map(|field| *field)
12417        }
12418        ///Sets `activation_epoch` with the provided value.
12419        pub fn set_activation_epoch(&mut self, field: u64) {
12420            self.activation_epoch = Some(field);
12421        }
12422        ///Sets `activation_epoch` with the provided value.
12423        pub fn with_activation_epoch(mut self, field: u64) -> Self {
12424            self.set_activation_epoch(field);
12425            self
12426        }
12427        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12428        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12429            self.deactivation_epoch.as_mut().map(|field| field as _)
12430        }
12431        ///Returns a mutable reference to `deactivation_epoch`.
12432        ///If the field is unset, it is first initialized with the default value.
12433        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12434            self.deactivation_epoch.get_or_insert_default()
12435        }
12436        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12437        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12438            self.deactivation_epoch.as_ref().map(|field| *field)
12439        }
12440        ///Sets `deactivation_epoch` with the provided value.
12441        pub fn set_deactivation_epoch(&mut self, field: u64) {
12442            self.deactivation_epoch = Some(field);
12443        }
12444        ///Sets `deactivation_epoch` with the provided value.
12445        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12446            self.set_deactivation_epoch(field);
12447            self
12448        }
12449        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12450        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12451            self.sui_balance.as_mut().map(|field| field as _)
12452        }
12453        ///Returns a mutable reference to `sui_balance`.
12454        ///If the field is unset, it is first initialized with the default value.
12455        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12456            self.sui_balance.get_or_insert_default()
12457        }
12458        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12459        pub fn sui_balance_opt(&self) -> Option<u64> {
12460            self.sui_balance.as_ref().map(|field| *field)
12461        }
12462        ///Sets `sui_balance` with the provided value.
12463        pub fn set_sui_balance(&mut self, field: u64) {
12464            self.sui_balance = Some(field);
12465        }
12466        ///Sets `sui_balance` with the provided value.
12467        pub fn with_sui_balance(mut self, field: u64) -> Self {
12468            self.set_sui_balance(field);
12469            self
12470        }
12471        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12472        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12473            self.rewards_pool.as_mut().map(|field| field as _)
12474        }
12475        ///Returns a mutable reference to `rewards_pool`.
12476        ///If the field is unset, it is first initialized with the default value.
12477        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12478            self.rewards_pool.get_or_insert_default()
12479        }
12480        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12481        pub fn rewards_pool_opt(&self) -> Option<u64> {
12482            self.rewards_pool.as_ref().map(|field| *field)
12483        }
12484        ///Sets `rewards_pool` with the provided value.
12485        pub fn set_rewards_pool(&mut self, field: u64) {
12486            self.rewards_pool = Some(field);
12487        }
12488        ///Sets `rewards_pool` with the provided value.
12489        pub fn with_rewards_pool(mut self, field: u64) -> Self {
12490            self.set_rewards_pool(field);
12491            self
12492        }
12493        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12494        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12495            self.pool_token_balance.as_mut().map(|field| field as _)
12496        }
12497        ///Returns a mutable reference to `pool_token_balance`.
12498        ///If the field is unset, it is first initialized with the default value.
12499        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12500            self.pool_token_balance.get_or_insert_default()
12501        }
12502        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12503        pub fn pool_token_balance_opt(&self) -> Option<u64> {
12504            self.pool_token_balance.as_ref().map(|field| *field)
12505        }
12506        ///Sets `pool_token_balance` with the provided value.
12507        pub fn set_pool_token_balance(&mut self, field: u64) {
12508            self.pool_token_balance = Some(field);
12509        }
12510        ///Sets `pool_token_balance` with the provided value.
12511        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12512            self.set_pool_token_balance(field);
12513            self
12514        }
12515        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
12516        pub fn exchange_rates(&self) -> &super::MoveTable {
12517            self.exchange_rates
12518                .as_ref()
12519                .map(|field| field as _)
12520                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12521        }
12522        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12523        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12524            self.exchange_rates.as_mut().map(|field| field as _)
12525        }
12526        ///Returns a mutable reference to `exchange_rates`.
12527        ///If the field is unset, it is first initialized with the default value.
12528        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12529            self.exchange_rates.get_or_insert_default()
12530        }
12531        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12532        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12533            self.exchange_rates.as_ref().map(|field| field as _)
12534        }
12535        ///Sets `exchange_rates` with the provided value.
12536        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12537            self.exchange_rates = Some(field.into().into());
12538        }
12539        ///Sets `exchange_rates` with the provided value.
12540        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12541            mut self,
12542            field: T,
12543        ) -> Self {
12544            self.set_exchange_rates(field.into());
12545            self
12546        }
12547        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12548        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12549            self.pending_stake.as_mut().map(|field| field as _)
12550        }
12551        ///Returns a mutable reference to `pending_stake`.
12552        ///If the field is unset, it is first initialized with the default value.
12553        pub fn pending_stake_mut(&mut self) -> &mut u64 {
12554            self.pending_stake.get_or_insert_default()
12555        }
12556        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12557        pub fn pending_stake_opt(&self) -> Option<u64> {
12558            self.pending_stake.as_ref().map(|field| *field)
12559        }
12560        ///Sets `pending_stake` with the provided value.
12561        pub fn set_pending_stake(&mut self, field: u64) {
12562            self.pending_stake = Some(field);
12563        }
12564        ///Sets `pending_stake` with the provided value.
12565        pub fn with_pending_stake(mut self, field: u64) -> Self {
12566            self.set_pending_stake(field);
12567            self
12568        }
12569        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12570        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12571            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12572        }
12573        ///Returns a mutable reference to `pending_total_sui_withdraw`.
12574        ///If the field is unset, it is first initialized with the default value.
12575        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12576            self.pending_total_sui_withdraw.get_or_insert_default()
12577        }
12578        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12579        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12580            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12581        }
12582        ///Sets `pending_total_sui_withdraw` with the provided value.
12583        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12584            self.pending_total_sui_withdraw = Some(field);
12585        }
12586        ///Sets `pending_total_sui_withdraw` with the provided value.
12587        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12588            self.set_pending_total_sui_withdraw(field);
12589            self
12590        }
12591        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12592        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12593            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12594        }
12595        ///Returns a mutable reference to `pending_pool_token_withdraw`.
12596        ///If the field is unset, it is first initialized with the default value.
12597        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12598            self.pending_pool_token_withdraw.get_or_insert_default()
12599        }
12600        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12601        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12602            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12603        }
12604        ///Sets `pending_pool_token_withdraw` with the provided value.
12605        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
12606            self.pending_pool_token_withdraw = Some(field);
12607        }
12608        ///Sets `pending_pool_token_withdraw` with the provided value.
12609        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
12610            self.set_pending_pool_token_withdraw(field);
12611            self
12612        }
12613        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12614        pub fn extra_fields(&self) -> &super::MoveTable {
12615            self.extra_fields
12616                .as_ref()
12617                .map(|field| field as _)
12618                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12619        }
12620        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12621        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12622            self.extra_fields.as_mut().map(|field| field as _)
12623        }
12624        ///Returns a mutable reference to `extra_fields`.
12625        ///If the field is unset, it is first initialized with the default value.
12626        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12627            self.extra_fields.get_or_insert_default()
12628        }
12629        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12630        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12631            self.extra_fields.as_ref().map(|field| field as _)
12632        }
12633        ///Sets `extra_fields` with the provided value.
12634        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12635            self.extra_fields = Some(field.into().into());
12636        }
12637        ///Sets `extra_fields` with the provided value.
12638        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12639            self.set_extra_fields(field.into());
12640            self
12641        }
12642    }
12643    impl super::StorageFund {
12644        pub const fn const_default() -> Self {
12645            Self {
12646                total_object_storage_rebates: None,
12647                non_refundable_balance: None,
12648            }
12649        }
12650        #[doc(hidden)]
12651        pub fn default_instance() -> &'static Self {
12652            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12653            &DEFAULT
12654        }
12655        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12656        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12657            self.total_object_storage_rebates.as_mut().map(|field| field as _)
12658        }
12659        ///Returns a mutable reference to `total_object_storage_rebates`.
12660        ///If the field is unset, it is first initialized with the default value.
12661        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12662            self.total_object_storage_rebates.get_or_insert_default()
12663        }
12664        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12665        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12666            self.total_object_storage_rebates.as_ref().map(|field| *field)
12667        }
12668        ///Sets `total_object_storage_rebates` with the provided value.
12669        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
12670            self.total_object_storage_rebates = Some(field);
12671        }
12672        ///Sets `total_object_storage_rebates` with the provided value.
12673        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
12674            self.set_total_object_storage_rebates(field);
12675            self
12676        }
12677        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12678        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12679            self.non_refundable_balance.as_mut().map(|field| field as _)
12680        }
12681        ///Returns a mutable reference to `non_refundable_balance`.
12682        ///If the field is unset, it is first initialized with the default value.
12683        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12684            self.non_refundable_balance.get_or_insert_default()
12685        }
12686        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12687        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12688            self.non_refundable_balance.as_ref().map(|field| *field)
12689        }
12690        ///Sets `non_refundable_balance` with the provided value.
12691        pub fn set_non_refundable_balance(&mut self, field: u64) {
12692            self.non_refundable_balance = Some(field);
12693        }
12694        ///Sets `non_refundable_balance` with the provided value.
12695        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
12696            self.set_non_refundable_balance(field);
12697            self
12698        }
12699    }
12700    impl super::SubscribeCheckpointsRequest {
12701        pub const fn const_default() -> Self {
12702            Self { read_mask: None }
12703        }
12704        #[doc(hidden)]
12705        pub fn default_instance() -> &'static Self {
12706            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
12707            &DEFAULT
12708        }
12709        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12710        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12711            self.read_mask.as_mut().map(|field| field as _)
12712        }
12713        ///Returns a mutable reference to `read_mask`.
12714        ///If the field is unset, it is first initialized with the default value.
12715        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12716            self.read_mask.get_or_insert_default()
12717        }
12718        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12719        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12720            self.read_mask.as_ref().map(|field| field as _)
12721        }
12722        ///Sets `read_mask` with the provided value.
12723        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12724            self.read_mask = Some(field.into().into());
12725        }
12726        ///Sets `read_mask` with the provided value.
12727        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12728            mut self,
12729            field: T,
12730        ) -> Self {
12731            self.set_read_mask(field.into());
12732            self
12733        }
12734    }
12735    impl super::SubscribeCheckpointsResponse {
12736        pub const fn const_default() -> Self {
12737            Self {
12738                cursor: None,
12739                checkpoint: None,
12740            }
12741        }
12742        #[doc(hidden)]
12743        pub fn default_instance() -> &'static Self {
12744            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
12745            &DEFAULT
12746        }
12747        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12748        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
12749            self.cursor.as_mut().map(|field| field as _)
12750        }
12751        ///Returns a mutable reference to `cursor`.
12752        ///If the field is unset, it is first initialized with the default value.
12753        pub fn cursor_mut(&mut self) -> &mut u64 {
12754            self.cursor.get_or_insert_default()
12755        }
12756        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
12757        pub fn cursor_opt(&self) -> Option<u64> {
12758            self.cursor.as_ref().map(|field| *field)
12759        }
12760        ///Sets `cursor` with the provided value.
12761        pub fn set_cursor(&mut self, field: u64) {
12762            self.cursor = Some(field);
12763        }
12764        ///Sets `cursor` with the provided value.
12765        pub fn with_cursor(mut self, field: u64) -> Self {
12766            self.set_cursor(field);
12767            self
12768        }
12769        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
12770        pub fn checkpoint(&self) -> &super::Checkpoint {
12771            self.checkpoint
12772                .as_ref()
12773                .map(|field| field as _)
12774                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
12775        }
12776        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12777        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
12778            self.checkpoint.as_mut().map(|field| field as _)
12779        }
12780        ///Returns a mutable reference to `checkpoint`.
12781        ///If the field is unset, it is first initialized with the default value.
12782        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
12783            self.checkpoint.get_or_insert_default()
12784        }
12785        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
12786        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
12787            self.checkpoint.as_ref().map(|field| field as _)
12788        }
12789        ///Sets `checkpoint` with the provided value.
12790        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
12791            self.checkpoint = Some(field.into().into());
12792        }
12793        ///Sets `checkpoint` with the provided value.
12794        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
12795            self.set_checkpoint(field.into());
12796            self
12797        }
12798    }
12799    impl super::SystemPackage {
12800        pub const fn const_default() -> Self {
12801            Self {
12802                version: None,
12803                modules: Vec::new(),
12804                dependencies: Vec::new(),
12805            }
12806        }
12807        #[doc(hidden)]
12808        pub fn default_instance() -> &'static Self {
12809            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
12810            &DEFAULT
12811        }
12812        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12813        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12814            self.version.as_mut().map(|field| field as _)
12815        }
12816        ///Returns a mutable reference to `version`.
12817        ///If the field is unset, it is first initialized with the default value.
12818        pub fn version_mut(&mut self) -> &mut u64 {
12819            self.version.get_or_insert_default()
12820        }
12821        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12822        pub fn version_opt(&self) -> Option<u64> {
12823            self.version.as_ref().map(|field| *field)
12824        }
12825        ///Sets `version` with the provided value.
12826        pub fn set_version(&mut self, field: u64) {
12827            self.version = Some(field);
12828        }
12829        ///Sets `version` with the provided value.
12830        pub fn with_version(mut self, field: u64) -> Self {
12831            self.set_version(field);
12832            self
12833        }
12834        ///Returns the value of `modules`, or the default value if `modules` is unset.
12835        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12836            &self.modules
12837        }
12838        ///Returns a mutable reference to `modules`.
12839        ///If the field is unset, it is first initialized with the default value.
12840        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12841            &mut self.modules
12842        }
12843        ///Sets `modules` with the provided value.
12844        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12845            self.modules = field;
12846        }
12847        ///Sets `modules` with the provided value.
12848        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12849            self.set_modules(field);
12850            self
12851        }
12852        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
12853        pub fn dependencies(&self) -> &[String] {
12854            &self.dependencies
12855        }
12856        ///Returns a mutable reference to `dependencies`.
12857        ///If the field is unset, it is first initialized with the default value.
12858        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12859            &mut self.dependencies
12860        }
12861        ///Sets `dependencies` with the provided value.
12862        pub fn set_dependencies(&mut self, field: Vec<String>) {
12863            self.dependencies = field;
12864        }
12865        ///Sets `dependencies` with the provided value.
12866        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12867            self.set_dependencies(field);
12868            self
12869        }
12870    }
12871    impl super::SystemParameters {
12872        pub const fn const_default() -> Self {
12873            Self {
12874                epoch_duration_ms: None,
12875                stake_subsidy_start_epoch: None,
12876                min_validator_count: None,
12877                max_validator_count: None,
12878                min_validator_joining_stake: None,
12879                validator_low_stake_threshold: None,
12880                validator_very_low_stake_threshold: None,
12881                validator_low_stake_grace_period: None,
12882                extra_fields: None,
12883            }
12884        }
12885        #[doc(hidden)]
12886        pub fn default_instance() -> &'static Self {
12887            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
12888            &DEFAULT
12889        }
12890        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12891        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
12892            self.epoch_duration_ms.as_mut().map(|field| field as _)
12893        }
12894        ///Returns a mutable reference to `epoch_duration_ms`.
12895        ///If the field is unset, it is first initialized with the default value.
12896        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
12897            self.epoch_duration_ms.get_or_insert_default()
12898        }
12899        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
12900        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
12901            self.epoch_duration_ms.as_ref().map(|field| *field)
12902        }
12903        ///Sets `epoch_duration_ms` with the provided value.
12904        pub fn set_epoch_duration_ms(&mut self, field: u64) {
12905            self.epoch_duration_ms = Some(field);
12906        }
12907        ///Sets `epoch_duration_ms` with the provided value.
12908        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
12909            self.set_epoch_duration_ms(field);
12910            self
12911        }
12912        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12913        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12914            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
12915        }
12916        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
12917        ///If the field is unset, it is first initialized with the default value.
12918        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
12919            self.stake_subsidy_start_epoch.get_or_insert_default()
12920        }
12921        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12922        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
12923            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
12924        }
12925        ///Sets `stake_subsidy_start_epoch` with the provided value.
12926        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
12927            self.stake_subsidy_start_epoch = Some(field);
12928        }
12929        ///Sets `stake_subsidy_start_epoch` with the provided value.
12930        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
12931            self.set_stake_subsidy_start_epoch(field);
12932            self
12933        }
12934        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12935        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12936            self.min_validator_count.as_mut().map(|field| field as _)
12937        }
12938        ///Returns a mutable reference to `min_validator_count`.
12939        ///If the field is unset, it is first initialized with the default value.
12940        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
12941            self.min_validator_count.get_or_insert_default()
12942        }
12943        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
12944        pub fn min_validator_count_opt(&self) -> Option<u64> {
12945            self.min_validator_count.as_ref().map(|field| *field)
12946        }
12947        ///Sets `min_validator_count` with the provided value.
12948        pub fn set_min_validator_count(&mut self, field: u64) {
12949            self.min_validator_count = Some(field);
12950        }
12951        ///Sets `min_validator_count` with the provided value.
12952        pub fn with_min_validator_count(mut self, field: u64) -> Self {
12953            self.set_min_validator_count(field);
12954            self
12955        }
12956        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12957        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12958            self.max_validator_count.as_mut().map(|field| field as _)
12959        }
12960        ///Returns a mutable reference to `max_validator_count`.
12961        ///If the field is unset, it is first initialized with the default value.
12962        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
12963            self.max_validator_count.get_or_insert_default()
12964        }
12965        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
12966        pub fn max_validator_count_opt(&self) -> Option<u64> {
12967            self.max_validator_count.as_ref().map(|field| *field)
12968        }
12969        ///Sets `max_validator_count` with the provided value.
12970        pub fn set_max_validator_count(&mut self, field: u64) {
12971            self.max_validator_count = Some(field);
12972        }
12973        ///Sets `max_validator_count` with the provided value.
12974        pub fn with_max_validator_count(mut self, field: u64) -> Self {
12975            self.set_max_validator_count(field);
12976            self
12977        }
12978        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12979        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
12980            self.min_validator_joining_stake.as_mut().map(|field| field as _)
12981        }
12982        ///Returns a mutable reference to `min_validator_joining_stake`.
12983        ///If the field is unset, it is first initialized with the default value.
12984        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
12985            self.min_validator_joining_stake.get_or_insert_default()
12986        }
12987        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12988        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
12989            self.min_validator_joining_stake.as_ref().map(|field| *field)
12990        }
12991        ///Sets `min_validator_joining_stake` with the provided value.
12992        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
12993            self.min_validator_joining_stake = Some(field);
12994        }
12995        ///Sets `min_validator_joining_stake` with the provided value.
12996        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
12997            self.set_min_validator_joining_stake(field);
12998            self
12999        }
13000        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13001        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13002            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13003        }
13004        ///Returns a mutable reference to `validator_low_stake_threshold`.
13005        ///If the field is unset, it is first initialized with the default value.
13006        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13007            self.validator_low_stake_threshold.get_or_insert_default()
13008        }
13009        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13010        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13011            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13012        }
13013        ///Sets `validator_low_stake_threshold` with the provided value.
13014        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13015            self.validator_low_stake_threshold = Some(field);
13016        }
13017        ///Sets `validator_low_stake_threshold` with the provided value.
13018        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13019            self.set_validator_low_stake_threshold(field);
13020            self
13021        }
13022        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13023        pub fn validator_very_low_stake_threshold_opt_mut(
13024            &mut self,
13025        ) -> Option<&mut u64> {
13026            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13027        }
13028        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13029        ///If the field is unset, it is first initialized with the default value.
13030        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13031            self.validator_very_low_stake_threshold.get_or_insert_default()
13032        }
13033        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13034        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13035            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13036        }
13037        ///Sets `validator_very_low_stake_threshold` with the provided value.
13038        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13039            self.validator_very_low_stake_threshold = Some(field);
13040        }
13041        ///Sets `validator_very_low_stake_threshold` with the provided value.
13042        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13043            self.set_validator_very_low_stake_threshold(field);
13044            self
13045        }
13046        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13047        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13048            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13049        }
13050        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13051        ///If the field is unset, it is first initialized with the default value.
13052        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13053            self.validator_low_stake_grace_period.get_or_insert_default()
13054        }
13055        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13056        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13057            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13058        }
13059        ///Sets `validator_low_stake_grace_period` with the provided value.
13060        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13061            self.validator_low_stake_grace_period = Some(field);
13062        }
13063        ///Sets `validator_low_stake_grace_period` with the provided value.
13064        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13065            self.set_validator_low_stake_grace_period(field);
13066            self
13067        }
13068        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13069        pub fn extra_fields(&self) -> &super::MoveTable {
13070            self.extra_fields
13071                .as_ref()
13072                .map(|field| field as _)
13073                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13074        }
13075        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13076        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13077            self.extra_fields.as_mut().map(|field| field as _)
13078        }
13079        ///Returns a mutable reference to `extra_fields`.
13080        ///If the field is unset, it is first initialized with the default value.
13081        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13082            self.extra_fields.get_or_insert_default()
13083        }
13084        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13085        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13086            self.extra_fields.as_ref().map(|field| field as _)
13087        }
13088        ///Sets `extra_fields` with the provided value.
13089        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13090            self.extra_fields = Some(field.into().into());
13091        }
13092        ///Sets `extra_fields` with the provided value.
13093        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13094            self.set_extra_fields(field.into());
13095            self
13096        }
13097    }
13098    impl super::SystemState {
13099        pub const fn const_default() -> Self {
13100            Self {
13101                version: None,
13102                epoch: None,
13103                protocol_version: None,
13104                validators: None,
13105                storage_fund: None,
13106                parameters: None,
13107                reference_gas_price: None,
13108                validator_report_records: Vec::new(),
13109                stake_subsidy: None,
13110                safe_mode: None,
13111                safe_mode_storage_rewards: None,
13112                safe_mode_computation_rewards: None,
13113                safe_mode_storage_rebates: None,
13114                safe_mode_non_refundable_storage_fee: None,
13115                epoch_start_timestamp_ms: None,
13116                extra_fields: None,
13117            }
13118        }
13119        #[doc(hidden)]
13120        pub fn default_instance() -> &'static Self {
13121            static DEFAULT: super::SystemState = super::SystemState::const_default();
13122            &DEFAULT
13123        }
13124        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13125        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13126            self.version.as_mut().map(|field| field as _)
13127        }
13128        ///Returns a mutable reference to `version`.
13129        ///If the field is unset, it is first initialized with the default value.
13130        pub fn version_mut(&mut self) -> &mut u64 {
13131            self.version.get_or_insert_default()
13132        }
13133        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13134        pub fn version_opt(&self) -> Option<u64> {
13135            self.version.as_ref().map(|field| *field)
13136        }
13137        ///Sets `version` with the provided value.
13138        pub fn set_version(&mut self, field: u64) {
13139            self.version = Some(field);
13140        }
13141        ///Sets `version` with the provided value.
13142        pub fn with_version(mut self, field: u64) -> Self {
13143            self.set_version(field);
13144            self
13145        }
13146        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13147        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13148            self.epoch.as_mut().map(|field| field as _)
13149        }
13150        ///Returns a mutable reference to `epoch`.
13151        ///If the field is unset, it is first initialized with the default value.
13152        pub fn epoch_mut(&mut self) -> &mut u64 {
13153            self.epoch.get_or_insert_default()
13154        }
13155        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13156        pub fn epoch_opt(&self) -> Option<u64> {
13157            self.epoch.as_ref().map(|field| *field)
13158        }
13159        ///Sets `epoch` with the provided value.
13160        pub fn set_epoch(&mut self, field: u64) {
13161            self.epoch = Some(field);
13162        }
13163        ///Sets `epoch` with the provided value.
13164        pub fn with_epoch(mut self, field: u64) -> Self {
13165            self.set_epoch(field);
13166            self
13167        }
13168        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13169        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13170            self.protocol_version.as_mut().map(|field| field as _)
13171        }
13172        ///Returns a mutable reference to `protocol_version`.
13173        ///If the field is unset, it is first initialized with the default value.
13174        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13175            self.protocol_version.get_or_insert_default()
13176        }
13177        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13178        pub fn protocol_version_opt(&self) -> Option<u64> {
13179            self.protocol_version.as_ref().map(|field| *field)
13180        }
13181        ///Sets `protocol_version` with the provided value.
13182        pub fn set_protocol_version(&mut self, field: u64) {
13183            self.protocol_version = Some(field);
13184        }
13185        ///Sets `protocol_version` with the provided value.
13186        pub fn with_protocol_version(mut self, field: u64) -> Self {
13187            self.set_protocol_version(field);
13188            self
13189        }
13190        ///Returns the value of `validators`, or the default value if `validators` is unset.
13191        pub fn validators(&self) -> &super::ValidatorSet {
13192            self.validators
13193                .as_ref()
13194                .map(|field| field as _)
13195                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13196        }
13197        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13198        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13199            self.validators.as_mut().map(|field| field as _)
13200        }
13201        ///Returns a mutable reference to `validators`.
13202        ///If the field is unset, it is first initialized with the default value.
13203        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13204            self.validators.get_or_insert_default()
13205        }
13206        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13207        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13208            self.validators.as_ref().map(|field| field as _)
13209        }
13210        ///Sets `validators` with the provided value.
13211        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13212            self.validators = Some(field.into().into());
13213        }
13214        ///Sets `validators` with the provided value.
13215        pub fn with_validators<T: Into<super::ValidatorSet>>(
13216            mut self,
13217            field: T,
13218        ) -> Self {
13219            self.set_validators(field.into());
13220            self
13221        }
13222        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13223        pub fn storage_fund(&self) -> &super::StorageFund {
13224            self.storage_fund
13225                .as_ref()
13226                .map(|field| field as _)
13227                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13228        }
13229        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13230        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13231            self.storage_fund.as_mut().map(|field| field as _)
13232        }
13233        ///Returns a mutable reference to `storage_fund`.
13234        ///If the field is unset, it is first initialized with the default value.
13235        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13236            self.storage_fund.get_or_insert_default()
13237        }
13238        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13239        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13240            self.storage_fund.as_ref().map(|field| field as _)
13241        }
13242        ///Sets `storage_fund` with the provided value.
13243        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13244            self.storage_fund = Some(field.into().into());
13245        }
13246        ///Sets `storage_fund` with the provided value.
13247        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13248            mut self,
13249            field: T,
13250        ) -> Self {
13251            self.set_storage_fund(field.into());
13252            self
13253        }
13254        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13255        pub fn parameters(&self) -> &super::SystemParameters {
13256            self.parameters
13257                .as_ref()
13258                .map(|field| field as _)
13259                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13260        }
13261        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13262        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13263            self.parameters.as_mut().map(|field| field as _)
13264        }
13265        ///Returns a mutable reference to `parameters`.
13266        ///If the field is unset, it is first initialized with the default value.
13267        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13268            self.parameters.get_or_insert_default()
13269        }
13270        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13271        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13272            self.parameters.as_ref().map(|field| field as _)
13273        }
13274        ///Sets `parameters` with the provided value.
13275        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13276            self.parameters = Some(field.into().into());
13277        }
13278        ///Sets `parameters` with the provided value.
13279        pub fn with_parameters<T: Into<super::SystemParameters>>(
13280            mut self,
13281            field: T,
13282        ) -> Self {
13283            self.set_parameters(field.into());
13284            self
13285        }
13286        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13287        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13288            self.reference_gas_price.as_mut().map(|field| field as _)
13289        }
13290        ///Returns a mutable reference to `reference_gas_price`.
13291        ///If the field is unset, it is first initialized with the default value.
13292        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13293            self.reference_gas_price.get_or_insert_default()
13294        }
13295        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13296        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13297            self.reference_gas_price.as_ref().map(|field| *field)
13298        }
13299        ///Sets `reference_gas_price` with the provided value.
13300        pub fn set_reference_gas_price(&mut self, field: u64) {
13301            self.reference_gas_price = Some(field);
13302        }
13303        ///Sets `reference_gas_price` with the provided value.
13304        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13305            self.set_reference_gas_price(field);
13306            self
13307        }
13308        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13309        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13310            &self.validator_report_records
13311        }
13312        ///Returns a mutable reference to `validator_report_records`.
13313        ///If the field is unset, it is first initialized with the default value.
13314        pub fn validator_report_records_mut(
13315            &mut self,
13316        ) -> &mut Vec<super::ValidatorReportRecord> {
13317            &mut self.validator_report_records
13318        }
13319        ///Sets `validator_report_records` with the provided value.
13320        pub fn set_validator_report_records(
13321            &mut self,
13322            field: Vec<super::ValidatorReportRecord>,
13323        ) {
13324            self.validator_report_records = field;
13325        }
13326        ///Sets `validator_report_records` with the provided value.
13327        pub fn with_validator_report_records(
13328            mut self,
13329            field: Vec<super::ValidatorReportRecord>,
13330        ) -> Self {
13331            self.set_validator_report_records(field);
13332            self
13333        }
13334        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13335        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13336            self.stake_subsidy
13337                .as_ref()
13338                .map(|field| field as _)
13339                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13340        }
13341        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13342        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13343            self.stake_subsidy.as_mut().map(|field| field as _)
13344        }
13345        ///Returns a mutable reference to `stake_subsidy`.
13346        ///If the field is unset, it is first initialized with the default value.
13347        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13348            self.stake_subsidy.get_or_insert_default()
13349        }
13350        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13351        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13352            self.stake_subsidy.as_ref().map(|field| field as _)
13353        }
13354        ///Sets `stake_subsidy` with the provided value.
13355        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13356            self.stake_subsidy = Some(field.into().into());
13357        }
13358        ///Sets `stake_subsidy` with the provided value.
13359        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13360            mut self,
13361            field: T,
13362        ) -> Self {
13363            self.set_stake_subsidy(field.into());
13364            self
13365        }
13366        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13367        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13368            self.safe_mode.as_mut().map(|field| field as _)
13369        }
13370        ///Returns a mutable reference to `safe_mode`.
13371        ///If the field is unset, it is first initialized with the default value.
13372        pub fn safe_mode_mut(&mut self) -> &mut bool {
13373            self.safe_mode.get_or_insert_default()
13374        }
13375        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13376        pub fn safe_mode_opt(&self) -> Option<bool> {
13377            self.safe_mode.as_ref().map(|field| *field)
13378        }
13379        ///Sets `safe_mode` with the provided value.
13380        pub fn set_safe_mode(&mut self, field: bool) {
13381            self.safe_mode = Some(field);
13382        }
13383        ///Sets `safe_mode` with the provided value.
13384        pub fn with_safe_mode(mut self, field: bool) -> Self {
13385            self.set_safe_mode(field);
13386            self
13387        }
13388        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13389        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13390            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13391        }
13392        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13393        ///If the field is unset, it is first initialized with the default value.
13394        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13395            self.safe_mode_storage_rewards.get_or_insert_default()
13396        }
13397        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13398        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13399            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13400        }
13401        ///Sets `safe_mode_storage_rewards` with the provided value.
13402        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13403            self.safe_mode_storage_rewards = Some(field);
13404        }
13405        ///Sets `safe_mode_storage_rewards` with the provided value.
13406        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13407            self.set_safe_mode_storage_rewards(field);
13408            self
13409        }
13410        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13411        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13412            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13413        }
13414        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13415        ///If the field is unset, it is first initialized with the default value.
13416        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13417            self.safe_mode_computation_rewards.get_or_insert_default()
13418        }
13419        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13420        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13421            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13422        }
13423        ///Sets `safe_mode_computation_rewards` with the provided value.
13424        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13425            self.safe_mode_computation_rewards = Some(field);
13426        }
13427        ///Sets `safe_mode_computation_rewards` with the provided value.
13428        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13429            self.set_safe_mode_computation_rewards(field);
13430            self
13431        }
13432        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13433        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13434            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13435        }
13436        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13437        ///If the field is unset, it is first initialized with the default value.
13438        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13439            self.safe_mode_storage_rebates.get_or_insert_default()
13440        }
13441        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13442        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13443            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13444        }
13445        ///Sets `safe_mode_storage_rebates` with the provided value.
13446        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13447            self.safe_mode_storage_rebates = Some(field);
13448        }
13449        ///Sets `safe_mode_storage_rebates` with the provided value.
13450        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13451            self.set_safe_mode_storage_rebates(field);
13452            self
13453        }
13454        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13455        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13456            &mut self,
13457        ) -> Option<&mut u64> {
13458            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13459        }
13460        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13461        ///If the field is unset, it is first initialized with the default value.
13462        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13463            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13464        }
13465        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13466        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13467            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13468        }
13469        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13470        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13471            self.safe_mode_non_refundable_storage_fee = Some(field);
13472        }
13473        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13474        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13475            self.set_safe_mode_non_refundable_storage_fee(field);
13476            self
13477        }
13478        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13479        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13480            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13481        }
13482        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13483        ///If the field is unset, it is first initialized with the default value.
13484        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13485            self.epoch_start_timestamp_ms.get_or_insert_default()
13486        }
13487        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13488        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13489            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13490        }
13491        ///Sets `epoch_start_timestamp_ms` with the provided value.
13492        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13493            self.epoch_start_timestamp_ms = Some(field);
13494        }
13495        ///Sets `epoch_start_timestamp_ms` with the provided value.
13496        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13497            self.set_epoch_start_timestamp_ms(field);
13498            self
13499        }
13500        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13501        pub fn extra_fields(&self) -> &super::MoveTable {
13502            self.extra_fields
13503                .as_ref()
13504                .map(|field| field as _)
13505                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13506        }
13507        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13508        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13509            self.extra_fields.as_mut().map(|field| field as _)
13510        }
13511        ///Returns a mutable reference to `extra_fields`.
13512        ///If the field is unset, it is first initialized with the default value.
13513        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13514            self.extra_fields.get_or_insert_default()
13515        }
13516        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13517        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13518            self.extra_fields.as_ref().map(|field| field as _)
13519        }
13520        ///Sets `extra_fields` with the provided value.
13521        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13522            self.extra_fields = Some(field.into().into());
13523        }
13524        ///Sets `extra_fields` with the provided value.
13525        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13526            self.set_extra_fields(field.into());
13527            self
13528        }
13529    }
13530    impl super::Transaction {
13531        pub const fn const_default() -> Self {
13532            Self {
13533                bcs: None,
13534                digest: None,
13535                version: None,
13536                kind: None,
13537                sender: None,
13538                gas_payment: None,
13539                expiration: None,
13540            }
13541        }
13542        #[doc(hidden)]
13543        pub fn default_instance() -> &'static Self {
13544            static DEFAULT: super::Transaction = super::Transaction::const_default();
13545            &DEFAULT
13546        }
13547        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13548        pub fn bcs(&self) -> &super::Bcs {
13549            self.bcs
13550                .as_ref()
13551                .map(|field| field as _)
13552                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13553        }
13554        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13555        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13556            self.bcs.as_mut().map(|field| field as _)
13557        }
13558        ///Returns a mutable reference to `bcs`.
13559        ///If the field is unset, it is first initialized with the default value.
13560        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13561            self.bcs.get_or_insert_default()
13562        }
13563        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13564        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13565            self.bcs.as_ref().map(|field| field as _)
13566        }
13567        ///Sets `bcs` with the provided value.
13568        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13569            self.bcs = Some(field.into().into());
13570        }
13571        ///Sets `bcs` with the provided value.
13572        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13573            self.set_bcs(field.into());
13574            self
13575        }
13576        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13577        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13578            self.digest.as_mut().map(|field| field as _)
13579        }
13580        ///Returns a mutable reference to `digest`.
13581        ///If the field is unset, it is first initialized with the default value.
13582        pub fn digest_mut(&mut self) -> &mut String {
13583            self.digest.get_or_insert_default()
13584        }
13585        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13586        pub fn digest_opt(&self) -> Option<&str> {
13587            self.digest.as_ref().map(|field| field as _)
13588        }
13589        ///Sets `digest` with the provided value.
13590        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13591            self.digest = Some(field.into().into());
13592        }
13593        ///Sets `digest` with the provided value.
13594        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13595            self.set_digest(field.into());
13596            self
13597        }
13598        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13599        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13600            self.version.as_mut().map(|field| field as _)
13601        }
13602        ///Returns a mutable reference to `version`.
13603        ///If the field is unset, it is first initialized with the default value.
13604        pub fn version_mut(&mut self) -> &mut i32 {
13605            self.version.get_or_insert_default()
13606        }
13607        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13608        pub fn version_opt(&self) -> Option<i32> {
13609            self.version.as_ref().map(|field| *field)
13610        }
13611        ///Sets `version` with the provided value.
13612        pub fn set_version(&mut self, field: i32) {
13613            self.version = Some(field);
13614        }
13615        ///Sets `version` with the provided value.
13616        pub fn with_version(mut self, field: i32) -> Self {
13617            self.set_version(field);
13618            self
13619        }
13620        ///Returns the value of `kind`, or the default value if `kind` is unset.
13621        pub fn kind(&self) -> &super::TransactionKind {
13622            self.kind
13623                .as_ref()
13624                .map(|field| field as _)
13625                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13626        }
13627        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13628        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13629            self.kind.as_mut().map(|field| field as _)
13630        }
13631        ///Returns a mutable reference to `kind`.
13632        ///If the field is unset, it is first initialized with the default value.
13633        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13634            self.kind.get_or_insert_default()
13635        }
13636        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
13637        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13638            self.kind.as_ref().map(|field| field as _)
13639        }
13640        ///Sets `kind` with the provided value.
13641        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13642            self.kind = Some(field.into().into());
13643        }
13644        ///Sets `kind` with the provided value.
13645        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13646            self.set_kind(field.into());
13647            self
13648        }
13649        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13650        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13651            self.sender.as_mut().map(|field| field as _)
13652        }
13653        ///Returns a mutable reference to `sender`.
13654        ///If the field is unset, it is first initialized with the default value.
13655        pub fn sender_mut(&mut self) -> &mut String {
13656            self.sender.get_or_insert_default()
13657        }
13658        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
13659        pub fn sender_opt(&self) -> Option<&str> {
13660            self.sender.as_ref().map(|field| field as _)
13661        }
13662        ///Sets `sender` with the provided value.
13663        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13664            self.sender = Some(field.into().into());
13665        }
13666        ///Sets `sender` with the provided value.
13667        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13668            self.set_sender(field.into());
13669            self
13670        }
13671        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
13672        pub fn gas_payment(&self) -> &super::GasPayment {
13673            self.gas_payment
13674                .as_ref()
13675                .map(|field| field as _)
13676                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13677        }
13678        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13679        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13680            self.gas_payment.as_mut().map(|field| field as _)
13681        }
13682        ///Returns a mutable reference to `gas_payment`.
13683        ///If the field is unset, it is first initialized with the default value.
13684        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13685            self.gas_payment.get_or_insert_default()
13686        }
13687        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
13688        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13689            self.gas_payment.as_ref().map(|field| field as _)
13690        }
13691        ///Sets `gas_payment` with the provided value.
13692        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13693            self.gas_payment = Some(field.into().into());
13694        }
13695        ///Sets `gas_payment` with the provided value.
13696        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13697            self.set_gas_payment(field.into());
13698            self
13699        }
13700        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
13701        pub fn expiration(&self) -> &super::TransactionExpiration {
13702            self.expiration
13703                .as_ref()
13704                .map(|field| field as _)
13705                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
13706        }
13707        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13708        pub fn expiration_opt_mut(
13709            &mut self,
13710        ) -> Option<&mut super::TransactionExpiration> {
13711            self.expiration.as_mut().map(|field| field as _)
13712        }
13713        ///Returns a mutable reference to `expiration`.
13714        ///If the field is unset, it is first initialized with the default value.
13715        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
13716            self.expiration.get_or_insert_default()
13717        }
13718        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
13719        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
13720            self.expiration.as_ref().map(|field| field as _)
13721        }
13722        ///Sets `expiration` with the provided value.
13723        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
13724            &mut self,
13725            field: T,
13726        ) {
13727            self.expiration = Some(field.into().into());
13728        }
13729        ///Sets `expiration` with the provided value.
13730        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
13731            mut self,
13732            field: T,
13733        ) -> Self {
13734            self.set_expiration(field.into());
13735            self
13736        }
13737    }
13738    impl super::TransactionEffects {
13739        pub const fn const_default() -> Self {
13740            Self {
13741                bcs: None,
13742                digest: None,
13743                version: None,
13744                status: None,
13745                epoch: None,
13746                gas_used: None,
13747                transaction_digest: None,
13748                gas_object: None,
13749                events_digest: None,
13750                dependencies: Vec::new(),
13751                lamport_version: None,
13752                changed_objects: Vec::new(),
13753                unchanged_consensus_objects: Vec::new(),
13754                auxiliary_data_digest: None,
13755                unchanged_loaded_runtime_objects: Vec::new(),
13756            }
13757        }
13758        #[doc(hidden)]
13759        pub fn default_instance() -> &'static Self {
13760            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
13761            &DEFAULT
13762        }
13763        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13764        pub fn bcs(&self) -> &super::Bcs {
13765            self.bcs
13766                .as_ref()
13767                .map(|field| field as _)
13768                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13769        }
13770        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13771        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13772            self.bcs.as_mut().map(|field| field as _)
13773        }
13774        ///Returns a mutable reference to `bcs`.
13775        ///If the field is unset, it is first initialized with the default value.
13776        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13777            self.bcs.get_or_insert_default()
13778        }
13779        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13780        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13781            self.bcs.as_ref().map(|field| field as _)
13782        }
13783        ///Sets `bcs` with the provided value.
13784        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13785            self.bcs = Some(field.into().into());
13786        }
13787        ///Sets `bcs` with the provided value.
13788        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13789            self.set_bcs(field.into());
13790            self
13791        }
13792        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13793        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13794            self.digest.as_mut().map(|field| field as _)
13795        }
13796        ///Returns a mutable reference to `digest`.
13797        ///If the field is unset, it is first initialized with the default value.
13798        pub fn digest_mut(&mut self) -> &mut String {
13799            self.digest.get_or_insert_default()
13800        }
13801        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13802        pub fn digest_opt(&self) -> Option<&str> {
13803            self.digest.as_ref().map(|field| field as _)
13804        }
13805        ///Sets `digest` with the provided value.
13806        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13807            self.digest = Some(field.into().into());
13808        }
13809        ///Sets `digest` with the provided value.
13810        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13811            self.set_digest(field.into());
13812            self
13813        }
13814        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13815        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13816            self.version.as_mut().map(|field| field as _)
13817        }
13818        ///Returns a mutable reference to `version`.
13819        ///If the field is unset, it is first initialized with the default value.
13820        pub fn version_mut(&mut self) -> &mut i32 {
13821            self.version.get_or_insert_default()
13822        }
13823        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13824        pub fn version_opt(&self) -> Option<i32> {
13825            self.version.as_ref().map(|field| *field)
13826        }
13827        ///Sets `version` with the provided value.
13828        pub fn set_version(&mut self, field: i32) {
13829            self.version = Some(field);
13830        }
13831        ///Sets `version` with the provided value.
13832        pub fn with_version(mut self, field: i32) -> Self {
13833            self.set_version(field);
13834            self
13835        }
13836        ///Returns the value of `status`, or the default value if `status` is unset.
13837        pub fn status(&self) -> &super::ExecutionStatus {
13838            self.status
13839                .as_ref()
13840                .map(|field| field as _)
13841                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
13842        }
13843        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13844        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
13845            self.status.as_mut().map(|field| field as _)
13846        }
13847        ///Returns a mutable reference to `status`.
13848        ///If the field is unset, it is first initialized with the default value.
13849        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
13850            self.status.get_or_insert_default()
13851        }
13852        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
13853        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
13854            self.status.as_ref().map(|field| field as _)
13855        }
13856        ///Sets `status` with the provided value.
13857        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
13858            self.status = Some(field.into().into());
13859        }
13860        ///Sets `status` with the provided value.
13861        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
13862            self.set_status(field.into());
13863            self
13864        }
13865        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13866        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13867            self.epoch.as_mut().map(|field| field as _)
13868        }
13869        ///Returns a mutable reference to `epoch`.
13870        ///If the field is unset, it is first initialized with the default value.
13871        pub fn epoch_mut(&mut self) -> &mut u64 {
13872            self.epoch.get_or_insert_default()
13873        }
13874        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13875        pub fn epoch_opt(&self) -> Option<u64> {
13876            self.epoch.as_ref().map(|field| *field)
13877        }
13878        ///Sets `epoch` with the provided value.
13879        pub fn set_epoch(&mut self, field: u64) {
13880            self.epoch = Some(field);
13881        }
13882        ///Sets `epoch` with the provided value.
13883        pub fn with_epoch(mut self, field: u64) -> Self {
13884            self.set_epoch(field);
13885            self
13886        }
13887        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
13888        pub fn gas_used(&self) -> &super::GasCostSummary {
13889            self.gas_used
13890                .as_ref()
13891                .map(|field| field as _)
13892                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
13893        }
13894        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13895        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
13896            self.gas_used.as_mut().map(|field| field as _)
13897        }
13898        ///Returns a mutable reference to `gas_used`.
13899        ///If the field is unset, it is first initialized with the default value.
13900        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
13901            self.gas_used.get_or_insert_default()
13902        }
13903        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
13904        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
13905            self.gas_used.as_ref().map(|field| field as _)
13906        }
13907        ///Sets `gas_used` with the provided value.
13908        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
13909            self.gas_used = Some(field.into().into());
13910        }
13911        ///Sets `gas_used` with the provided value.
13912        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
13913            mut self,
13914            field: T,
13915        ) -> Self {
13916            self.set_gas_used(field.into());
13917            self
13918        }
13919        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13920        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
13921            self.transaction_digest.as_mut().map(|field| field as _)
13922        }
13923        ///Returns a mutable reference to `transaction_digest`.
13924        ///If the field is unset, it is first initialized with the default value.
13925        pub fn transaction_digest_mut(&mut self) -> &mut String {
13926            self.transaction_digest.get_or_insert_default()
13927        }
13928        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13929        pub fn transaction_digest_opt(&self) -> Option<&str> {
13930            self.transaction_digest.as_ref().map(|field| field as _)
13931        }
13932        ///Sets `transaction_digest` with the provided value.
13933        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
13934            self.transaction_digest = Some(field.into().into());
13935        }
13936        ///Sets `transaction_digest` with the provided value.
13937        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
13938            self.set_transaction_digest(field.into());
13939            self
13940        }
13941        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
13942        pub fn gas_object(&self) -> &super::ChangedObject {
13943            self.gas_object
13944                .as_ref()
13945                .map(|field| field as _)
13946                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
13947        }
13948        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13949        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
13950            self.gas_object.as_mut().map(|field| field as _)
13951        }
13952        ///Returns a mutable reference to `gas_object`.
13953        ///If the field is unset, it is first initialized with the default value.
13954        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
13955            self.gas_object.get_or_insert_default()
13956        }
13957        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13958        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
13959            self.gas_object.as_ref().map(|field| field as _)
13960        }
13961        ///Sets `gas_object` with the provided value.
13962        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
13963            self.gas_object = Some(field.into().into());
13964        }
13965        ///Sets `gas_object` with the provided value.
13966        pub fn with_gas_object<T: Into<super::ChangedObject>>(
13967            mut self,
13968            field: T,
13969        ) -> Self {
13970            self.set_gas_object(field.into());
13971            self
13972        }
13973        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13974        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
13975            self.events_digest.as_mut().map(|field| field as _)
13976        }
13977        ///Returns a mutable reference to `events_digest`.
13978        ///If the field is unset, it is first initialized with the default value.
13979        pub fn events_digest_mut(&mut self) -> &mut String {
13980            self.events_digest.get_or_insert_default()
13981        }
13982        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13983        pub fn events_digest_opt(&self) -> Option<&str> {
13984            self.events_digest.as_ref().map(|field| field as _)
13985        }
13986        ///Sets `events_digest` with the provided value.
13987        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
13988            self.events_digest = Some(field.into().into());
13989        }
13990        ///Sets `events_digest` with the provided value.
13991        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
13992            self.set_events_digest(field.into());
13993            self
13994        }
13995        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13996        pub fn dependencies(&self) -> &[String] {
13997            &self.dependencies
13998        }
13999        ///Returns a mutable reference to `dependencies`.
14000        ///If the field is unset, it is first initialized with the default value.
14001        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14002            &mut self.dependencies
14003        }
14004        ///Sets `dependencies` with the provided value.
14005        pub fn set_dependencies(&mut self, field: Vec<String>) {
14006            self.dependencies = field;
14007        }
14008        ///Sets `dependencies` with the provided value.
14009        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14010            self.set_dependencies(field);
14011            self
14012        }
14013        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14014        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14015            self.lamport_version.as_mut().map(|field| field as _)
14016        }
14017        ///Returns a mutable reference to `lamport_version`.
14018        ///If the field is unset, it is first initialized with the default value.
14019        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14020            self.lamport_version.get_or_insert_default()
14021        }
14022        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14023        pub fn lamport_version_opt(&self) -> Option<u64> {
14024            self.lamport_version.as_ref().map(|field| *field)
14025        }
14026        ///Sets `lamport_version` with the provided value.
14027        pub fn set_lamport_version(&mut self, field: u64) {
14028            self.lamport_version = Some(field);
14029        }
14030        ///Sets `lamport_version` with the provided value.
14031        pub fn with_lamport_version(mut self, field: u64) -> Self {
14032            self.set_lamport_version(field);
14033            self
14034        }
14035        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14036        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14037            &self.changed_objects
14038        }
14039        ///Returns a mutable reference to `changed_objects`.
14040        ///If the field is unset, it is first initialized with the default value.
14041        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14042            &mut self.changed_objects
14043        }
14044        ///Sets `changed_objects` with the provided value.
14045        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14046            self.changed_objects = field;
14047        }
14048        ///Sets `changed_objects` with the provided value.
14049        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14050            self.set_changed_objects(field);
14051            self
14052        }
14053        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14054        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14055            &self.unchanged_consensus_objects
14056        }
14057        ///Returns a mutable reference to `unchanged_consensus_objects`.
14058        ///If the field is unset, it is first initialized with the default value.
14059        pub fn unchanged_consensus_objects_mut(
14060            &mut self,
14061        ) -> &mut Vec<super::UnchangedConsensusObject> {
14062            &mut self.unchanged_consensus_objects
14063        }
14064        ///Sets `unchanged_consensus_objects` with the provided value.
14065        pub fn set_unchanged_consensus_objects(
14066            &mut self,
14067            field: Vec<super::UnchangedConsensusObject>,
14068        ) {
14069            self.unchanged_consensus_objects = field;
14070        }
14071        ///Sets `unchanged_consensus_objects` with the provided value.
14072        pub fn with_unchanged_consensus_objects(
14073            mut self,
14074            field: Vec<super::UnchangedConsensusObject>,
14075        ) -> Self {
14076            self.set_unchanged_consensus_objects(field);
14077            self
14078        }
14079        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14080        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14081            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14082        }
14083        ///Returns a mutable reference to `auxiliary_data_digest`.
14084        ///If the field is unset, it is first initialized with the default value.
14085        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14086            self.auxiliary_data_digest.get_or_insert_default()
14087        }
14088        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14089        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14090            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14091        }
14092        ///Sets `auxiliary_data_digest` with the provided value.
14093        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14094            self.auxiliary_data_digest = Some(field.into().into());
14095        }
14096        ///Sets `auxiliary_data_digest` with the provided value.
14097        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14098            self.set_auxiliary_data_digest(field.into());
14099            self
14100        }
14101        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14102        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14103            &self.unchanged_loaded_runtime_objects
14104        }
14105        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14106        ///If the field is unset, it is first initialized with the default value.
14107        pub fn unchanged_loaded_runtime_objects_mut(
14108            &mut self,
14109        ) -> &mut Vec<super::ObjectReference> {
14110            &mut self.unchanged_loaded_runtime_objects
14111        }
14112        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14113        pub fn set_unchanged_loaded_runtime_objects(
14114            &mut self,
14115            field: Vec<super::ObjectReference>,
14116        ) {
14117            self.unchanged_loaded_runtime_objects = field;
14118        }
14119        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14120        pub fn with_unchanged_loaded_runtime_objects(
14121            mut self,
14122            field: Vec<super::ObjectReference>,
14123        ) -> Self {
14124            self.set_unchanged_loaded_runtime_objects(field);
14125            self
14126        }
14127    }
14128    impl super::TransactionEvents {
14129        pub const fn const_default() -> Self {
14130            Self {
14131                bcs: None,
14132                digest: None,
14133                events: Vec::new(),
14134            }
14135        }
14136        #[doc(hidden)]
14137        pub fn default_instance() -> &'static Self {
14138            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14139            &DEFAULT
14140        }
14141        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14142        pub fn bcs(&self) -> &super::Bcs {
14143            self.bcs
14144                .as_ref()
14145                .map(|field| field as _)
14146                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14147        }
14148        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14149        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14150            self.bcs.as_mut().map(|field| field as _)
14151        }
14152        ///Returns a mutable reference to `bcs`.
14153        ///If the field is unset, it is first initialized with the default value.
14154        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14155            self.bcs.get_or_insert_default()
14156        }
14157        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14158        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14159            self.bcs.as_ref().map(|field| field as _)
14160        }
14161        ///Sets `bcs` with the provided value.
14162        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14163            self.bcs = Some(field.into().into());
14164        }
14165        ///Sets `bcs` with the provided value.
14166        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14167            self.set_bcs(field.into());
14168            self
14169        }
14170        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14171        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14172            self.digest.as_mut().map(|field| field as _)
14173        }
14174        ///Returns a mutable reference to `digest`.
14175        ///If the field is unset, it is first initialized with the default value.
14176        pub fn digest_mut(&mut self) -> &mut String {
14177            self.digest.get_or_insert_default()
14178        }
14179        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14180        pub fn digest_opt(&self) -> Option<&str> {
14181            self.digest.as_ref().map(|field| field as _)
14182        }
14183        ///Sets `digest` with the provided value.
14184        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14185            self.digest = Some(field.into().into());
14186        }
14187        ///Sets `digest` with the provided value.
14188        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14189            self.set_digest(field.into());
14190            self
14191        }
14192        ///Returns the value of `events`, or the default value if `events` is unset.
14193        pub fn events(&self) -> &[super::Event] {
14194            &self.events
14195        }
14196        ///Returns a mutable reference to `events`.
14197        ///If the field is unset, it is first initialized with the default value.
14198        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14199            &mut self.events
14200        }
14201        ///Sets `events` with the provided value.
14202        pub fn set_events(&mut self, field: Vec<super::Event>) {
14203            self.events = field;
14204        }
14205        ///Sets `events` with the provided value.
14206        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14207            self.set_events(field);
14208            self
14209        }
14210    }
14211    impl super::TransactionExpiration {
14212        pub const fn const_default() -> Self {
14213            Self { kind: None, epoch: None }
14214        }
14215        #[doc(hidden)]
14216        pub fn default_instance() -> &'static Self {
14217            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14218            &DEFAULT
14219        }
14220        ///Sets `kind` with the provided value.
14221        pub fn with_kind<
14222            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14223        >(mut self, field: T) -> Self {
14224            self.set_kind(field.into());
14225            self
14226        }
14227        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14228        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14229            self.epoch.as_mut().map(|field| field as _)
14230        }
14231        ///Returns a mutable reference to `epoch`.
14232        ///If the field is unset, it is first initialized with the default value.
14233        pub fn epoch_mut(&mut self) -> &mut u64 {
14234            self.epoch.get_or_insert_default()
14235        }
14236        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14237        pub fn epoch_opt(&self) -> Option<u64> {
14238            self.epoch.as_ref().map(|field| *field)
14239        }
14240        ///Sets `epoch` with the provided value.
14241        pub fn set_epoch(&mut self, field: u64) {
14242            self.epoch = Some(field);
14243        }
14244        ///Sets `epoch` with the provided value.
14245        pub fn with_epoch(mut self, field: u64) -> Self {
14246            self.set_epoch(field);
14247            self
14248        }
14249    }
14250    impl super::TransactionKind {
14251        pub const fn const_default() -> Self {
14252            Self { kind: None, data: None }
14253        }
14254        #[doc(hidden)]
14255        pub fn default_instance() -> &'static Self {
14256            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14257            &DEFAULT
14258        }
14259        ///Sets `kind` with the provided value.
14260        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14261            mut self,
14262            field: T,
14263        ) -> Self {
14264            self.set_kind(field.into());
14265            self
14266        }
14267        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14268        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14269            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14270                .data
14271            {
14272                field as _
14273            } else {
14274                super::ProgrammableTransaction::default_instance() as _
14275            }
14276        }
14277        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14278        pub fn programmable_transaction_opt(
14279            &self,
14280        ) -> Option<&super::ProgrammableTransaction> {
14281            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14282                .data
14283            {
14284                Some(field as _)
14285            } else {
14286                None
14287            }
14288        }
14289        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14290        pub fn programmable_transaction_opt_mut(
14291            &mut self,
14292        ) -> Option<&mut super::ProgrammableTransaction> {
14293            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14294                .data
14295            {
14296                Some(field as _)
14297            } else {
14298                None
14299            }
14300        }
14301        ///Returns a mutable reference to `programmable_transaction`.
14302        ///If the field is unset, it is first initialized with the default value.
14303        ///If any other oneof field in the same oneof is set, it will be cleared.
14304        pub fn programmable_transaction_mut(
14305            &mut self,
14306        ) -> &mut super::ProgrammableTransaction {
14307            if self.programmable_transaction_opt_mut().is_none() {
14308                self.data = Some(
14309                    super::transaction_kind::Data::ProgrammableTransaction(
14310                        super::ProgrammableTransaction::default(),
14311                    ),
14312                );
14313            }
14314            self.programmable_transaction_opt_mut().unwrap()
14315        }
14316        ///Sets `programmable_transaction` with the provided value.
14317        ///If any other oneof field in the same oneof is set, it will be cleared.
14318        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14319            &mut self,
14320            field: T,
14321        ) {
14322            self.data = Some(
14323                super::transaction_kind::Data::ProgrammableTransaction(
14324                    field.into().into(),
14325                ),
14326            );
14327        }
14328        ///Sets `programmable_transaction` with the provided value.
14329        ///If any other oneof field in the same oneof is set, it will be cleared.
14330        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14331            mut self,
14332            field: T,
14333        ) -> Self {
14334            self.set_programmable_transaction(field.into());
14335            self
14336        }
14337        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14338        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14339            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14340                field as _
14341            } else {
14342                super::ChangeEpoch::default_instance() as _
14343            }
14344        }
14345        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14346        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14347            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14348                Some(field as _)
14349            } else {
14350                None
14351            }
14352        }
14353        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14354        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14355            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14356                .data
14357            {
14358                Some(field as _)
14359            } else {
14360                None
14361            }
14362        }
14363        ///Returns a mutable reference to `change_epoch`.
14364        ///If the field is unset, it is first initialized with the default value.
14365        ///If any other oneof field in the same oneof is set, it will be cleared.
14366        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14367            if self.change_epoch_opt_mut().is_none() {
14368                self.data = Some(
14369                    super::transaction_kind::Data::ChangeEpoch(
14370                        super::ChangeEpoch::default(),
14371                    ),
14372                );
14373            }
14374            self.change_epoch_opt_mut().unwrap()
14375        }
14376        ///Sets `change_epoch` with the provided value.
14377        ///If any other oneof field in the same oneof is set, it will be cleared.
14378        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14379            self.data = Some(
14380                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14381            );
14382        }
14383        ///Sets `change_epoch` with the provided value.
14384        ///If any other oneof field in the same oneof is set, it will be cleared.
14385        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14386            mut self,
14387            field: T,
14388        ) -> Self {
14389            self.set_change_epoch(field.into());
14390            self
14391        }
14392        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
14393        pub fn genesis(&self) -> &super::GenesisTransaction {
14394            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14395                field as _
14396            } else {
14397                super::GenesisTransaction::default_instance() as _
14398            }
14399        }
14400        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
14401        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14402            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14403                Some(field as _)
14404            } else {
14405                None
14406            }
14407        }
14408        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14409        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14410            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14411                Some(field as _)
14412            } else {
14413                None
14414            }
14415        }
14416        ///Returns a mutable reference to `genesis`.
14417        ///If the field is unset, it is first initialized with the default value.
14418        ///If any other oneof field in the same oneof is set, it will be cleared.
14419        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14420            if self.genesis_opt_mut().is_none() {
14421                self.data = Some(
14422                    super::transaction_kind::Data::Genesis(
14423                        super::GenesisTransaction::default(),
14424                    ),
14425                );
14426            }
14427            self.genesis_opt_mut().unwrap()
14428        }
14429        ///Sets `genesis` with the provided value.
14430        ///If any other oneof field in the same oneof is set, it will be cleared.
14431        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14432            self.data = Some(
14433                super::transaction_kind::Data::Genesis(field.into().into()),
14434            );
14435        }
14436        ///Sets `genesis` with the provided value.
14437        ///If any other oneof field in the same oneof is set, it will be cleared.
14438        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14439            mut self,
14440            field: T,
14441        ) -> Self {
14442            self.set_genesis(field.into());
14443            self
14444        }
14445        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
14446        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14447            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14448                .data
14449            {
14450                field as _
14451            } else {
14452                super::ConsensusCommitPrologue::default_instance() as _
14453            }
14454        }
14455        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
14456        pub fn consensus_commit_prologue_opt(
14457            &self,
14458        ) -> Option<&super::ConsensusCommitPrologue> {
14459            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14460                .data
14461            {
14462                Some(field as _)
14463            } else {
14464                None
14465            }
14466        }
14467        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14468        pub fn consensus_commit_prologue_opt_mut(
14469            &mut self,
14470        ) -> Option<&mut super::ConsensusCommitPrologue> {
14471            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14472                .data
14473            {
14474                Some(field as _)
14475            } else {
14476                None
14477            }
14478        }
14479        ///Returns a mutable reference to `consensus_commit_prologue`.
14480        ///If the field is unset, it is first initialized with the default value.
14481        ///If any other oneof field in the same oneof is set, it will be cleared.
14482        pub fn consensus_commit_prologue_mut(
14483            &mut self,
14484        ) -> &mut super::ConsensusCommitPrologue {
14485            if self.consensus_commit_prologue_opt_mut().is_none() {
14486                self.data = Some(
14487                    super::transaction_kind::Data::ConsensusCommitPrologue(
14488                        super::ConsensusCommitPrologue::default(),
14489                    ),
14490                );
14491            }
14492            self.consensus_commit_prologue_opt_mut().unwrap()
14493        }
14494        ///Sets `consensus_commit_prologue` with the provided value.
14495        ///If any other oneof field in the same oneof is set, it will be cleared.
14496        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14497            &mut self,
14498            field: T,
14499        ) {
14500            self.data = Some(
14501                super::transaction_kind::Data::ConsensusCommitPrologue(
14502                    field.into().into(),
14503                ),
14504            );
14505        }
14506        ///Sets `consensus_commit_prologue` with the provided value.
14507        ///If any other oneof field in the same oneof is set, it will be cleared.
14508        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14509            mut self,
14510            field: T,
14511        ) -> Self {
14512            self.set_consensus_commit_prologue(field.into());
14513            self
14514        }
14515        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
14516        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14517            if let Some(
14518                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14519            ) = &self.data
14520            {
14521                field as _
14522            } else {
14523                super::AuthenticatorStateUpdate::default_instance() as _
14524            }
14525        }
14526        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14527        pub fn authenticator_state_update_opt(
14528            &self,
14529        ) -> Option<&super::AuthenticatorStateUpdate> {
14530            if let Some(
14531                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14532            ) = &self.data
14533            {
14534                Some(field as _)
14535            } else {
14536                None
14537            }
14538        }
14539        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14540        pub fn authenticator_state_update_opt_mut(
14541            &mut self,
14542        ) -> Option<&mut super::AuthenticatorStateUpdate> {
14543            if let Some(
14544                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14545            ) = &mut self.data
14546            {
14547                Some(field as _)
14548            } else {
14549                None
14550            }
14551        }
14552        ///Returns a mutable reference to `authenticator_state_update`.
14553        ///If the field is unset, it is first initialized with the default value.
14554        ///If any other oneof field in the same oneof is set, it will be cleared.
14555        pub fn authenticator_state_update_mut(
14556            &mut self,
14557        ) -> &mut super::AuthenticatorStateUpdate {
14558            if self.authenticator_state_update_opt_mut().is_none() {
14559                self.data = Some(
14560                    super::transaction_kind::Data::AuthenticatorStateUpdate(
14561                        super::AuthenticatorStateUpdate::default(),
14562                    ),
14563                );
14564            }
14565            self.authenticator_state_update_opt_mut().unwrap()
14566        }
14567        ///Sets `authenticator_state_update` with the provided value.
14568        ///If any other oneof field in the same oneof is set, it will be cleared.
14569        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14570            &mut self,
14571            field: T,
14572        ) {
14573            self.data = Some(
14574                super::transaction_kind::Data::AuthenticatorStateUpdate(
14575                    field.into().into(),
14576                ),
14577            );
14578        }
14579        ///Sets `authenticator_state_update` with the provided value.
14580        ///If any other oneof field in the same oneof is set, it will be cleared.
14581        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14582            mut self,
14583            field: T,
14584        ) -> Self {
14585            self.set_authenticator_state_update(field.into());
14586            self
14587        }
14588        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
14589        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
14590            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14591                field as _
14592            } else {
14593                super::EndOfEpochTransaction::default_instance() as _
14594            }
14595        }
14596        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14597        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
14598            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14599                Some(field as _)
14600            } else {
14601                None
14602            }
14603        }
14604        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14605        pub fn end_of_epoch_opt_mut(
14606            &mut self,
14607        ) -> Option<&mut super::EndOfEpochTransaction> {
14608            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
14609                .data
14610            {
14611                Some(field as _)
14612            } else {
14613                None
14614            }
14615        }
14616        ///Returns a mutable reference to `end_of_epoch`.
14617        ///If the field is unset, it is first initialized with the default value.
14618        ///If any other oneof field in the same oneof is set, it will be cleared.
14619        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
14620            if self.end_of_epoch_opt_mut().is_none() {
14621                self.data = Some(
14622                    super::transaction_kind::Data::EndOfEpoch(
14623                        super::EndOfEpochTransaction::default(),
14624                    ),
14625                );
14626            }
14627            self.end_of_epoch_opt_mut().unwrap()
14628        }
14629        ///Sets `end_of_epoch` with the provided value.
14630        ///If any other oneof field in the same oneof is set, it will be cleared.
14631        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14632            &mut self,
14633            field: T,
14634        ) {
14635            self.data = Some(
14636                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
14637            );
14638        }
14639        ///Sets `end_of_epoch` with the provided value.
14640        ///If any other oneof field in the same oneof is set, it will be cleared.
14641        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14642            mut self,
14643            field: T,
14644        ) -> Self {
14645            self.set_end_of_epoch(field.into());
14646            self
14647        }
14648        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
14649        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
14650            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14651                .data
14652            {
14653                field as _
14654            } else {
14655                super::RandomnessStateUpdate::default_instance() as _
14656            }
14657        }
14658        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14659        pub fn randomness_state_update_opt(
14660            &self,
14661        ) -> Option<&super::RandomnessStateUpdate> {
14662            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14663                .data
14664            {
14665                Some(field as _)
14666            } else {
14667                None
14668            }
14669        }
14670        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14671        pub fn randomness_state_update_opt_mut(
14672            &mut self,
14673        ) -> Option<&mut super::RandomnessStateUpdate> {
14674            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
14675                .data
14676            {
14677                Some(field as _)
14678            } else {
14679                None
14680            }
14681        }
14682        ///Returns a mutable reference to `randomness_state_update`.
14683        ///If the field is unset, it is first initialized with the default value.
14684        ///If any other oneof field in the same oneof is set, it will be cleared.
14685        pub fn randomness_state_update_mut(
14686            &mut self,
14687        ) -> &mut super::RandomnessStateUpdate {
14688            if self.randomness_state_update_opt_mut().is_none() {
14689                self.data = Some(
14690                    super::transaction_kind::Data::RandomnessStateUpdate(
14691                        super::RandomnessStateUpdate::default(),
14692                    ),
14693                );
14694            }
14695            self.randomness_state_update_opt_mut().unwrap()
14696        }
14697        ///Sets `randomness_state_update` with the provided value.
14698        ///If any other oneof field in the same oneof is set, it will be cleared.
14699        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14700            &mut self,
14701            field: T,
14702        ) {
14703            self.data = Some(
14704                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
14705            );
14706        }
14707        ///Sets `randomness_state_update` with the provided value.
14708        ///If any other oneof field in the same oneof is set, it will be cleared.
14709        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14710            mut self,
14711            field: T,
14712        ) -> Self {
14713            self.set_randomness_state_update(field.into());
14714            self
14715        }
14716    }
14717    impl super::TransferObjects {
14718        pub const fn const_default() -> Self {
14719            Self {
14720                objects: Vec::new(),
14721                address: None,
14722            }
14723        }
14724        #[doc(hidden)]
14725        pub fn default_instance() -> &'static Self {
14726            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
14727            &DEFAULT
14728        }
14729        ///Returns the value of `objects`, or the default value if `objects` is unset.
14730        pub fn objects(&self) -> &[super::Argument] {
14731            &self.objects
14732        }
14733        ///Returns a mutable reference to `objects`.
14734        ///If the field is unset, it is first initialized with the default value.
14735        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
14736            &mut self.objects
14737        }
14738        ///Sets `objects` with the provided value.
14739        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
14740            self.objects = field;
14741        }
14742        ///Sets `objects` with the provided value.
14743        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
14744            self.set_objects(field);
14745            self
14746        }
14747        ///Returns the value of `address`, or the default value if `address` is unset.
14748        pub fn address(&self) -> &super::Argument {
14749            self.address
14750                .as_ref()
14751                .map(|field| field as _)
14752                .unwrap_or_else(|| super::Argument::default_instance() as _)
14753        }
14754        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14755        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
14756            self.address.as_mut().map(|field| field as _)
14757        }
14758        ///Returns a mutable reference to `address`.
14759        ///If the field is unset, it is first initialized with the default value.
14760        pub fn address_mut(&mut self) -> &mut super::Argument {
14761            self.address.get_or_insert_default()
14762        }
14763        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14764        pub fn address_opt(&self) -> Option<&super::Argument> {
14765            self.address.as_ref().map(|field| field as _)
14766        }
14767        ///Sets `address` with the provided value.
14768        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
14769            self.address = Some(field.into().into());
14770        }
14771        ///Sets `address` with the provided value.
14772        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
14773            self.set_address(field.into());
14774            self
14775        }
14776    }
14777    impl super::TypeArgumentError {
14778        pub const fn const_default() -> Self {
14779            Self {
14780                type_argument: None,
14781                kind: None,
14782            }
14783        }
14784        #[doc(hidden)]
14785        pub fn default_instance() -> &'static Self {
14786            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
14787            &DEFAULT
14788        }
14789        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14790        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
14791            self.type_argument.as_mut().map(|field| field as _)
14792        }
14793        ///Returns a mutable reference to `type_argument`.
14794        ///If the field is unset, it is first initialized with the default value.
14795        pub fn type_argument_mut(&mut self) -> &mut u32 {
14796            self.type_argument.get_or_insert_default()
14797        }
14798        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
14799        pub fn type_argument_opt(&self) -> Option<u32> {
14800            self.type_argument.as_ref().map(|field| *field)
14801        }
14802        ///Sets `type_argument` with the provided value.
14803        pub fn set_type_argument(&mut self, field: u32) {
14804            self.type_argument = Some(field);
14805        }
14806        ///Sets `type_argument` with the provided value.
14807        pub fn with_type_argument(mut self, field: u32) -> Self {
14808            self.set_type_argument(field);
14809            self
14810        }
14811        ///Sets `kind` with the provided value.
14812        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
14813            mut self,
14814            field: T,
14815        ) -> Self {
14816            self.set_kind(field.into());
14817            self
14818        }
14819    }
14820    impl super::TypeOrigin {
14821        pub const fn const_default() -> Self {
14822            Self {
14823                module_name: None,
14824                datatype_name: None,
14825                package_id: None,
14826            }
14827        }
14828        #[doc(hidden)]
14829        pub fn default_instance() -> &'static Self {
14830            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
14831            &DEFAULT
14832        }
14833        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14834        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
14835            self.module_name.as_mut().map(|field| field as _)
14836        }
14837        ///Returns a mutable reference to `module_name`.
14838        ///If the field is unset, it is first initialized with the default value.
14839        pub fn module_name_mut(&mut self) -> &mut String {
14840            self.module_name.get_or_insert_default()
14841        }
14842        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
14843        pub fn module_name_opt(&self) -> Option<&str> {
14844            self.module_name.as_ref().map(|field| field as _)
14845        }
14846        ///Sets `module_name` with the provided value.
14847        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
14848            self.module_name = Some(field.into().into());
14849        }
14850        ///Sets `module_name` with the provided value.
14851        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
14852            self.set_module_name(field.into());
14853            self
14854        }
14855        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14856        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
14857            self.datatype_name.as_mut().map(|field| field as _)
14858        }
14859        ///Returns a mutable reference to `datatype_name`.
14860        ///If the field is unset, it is first initialized with the default value.
14861        pub fn datatype_name_mut(&mut self) -> &mut String {
14862            self.datatype_name.get_or_insert_default()
14863        }
14864        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
14865        pub fn datatype_name_opt(&self) -> Option<&str> {
14866            self.datatype_name.as_ref().map(|field| field as _)
14867        }
14868        ///Sets `datatype_name` with the provided value.
14869        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
14870            self.datatype_name = Some(field.into().into());
14871        }
14872        ///Sets `datatype_name` with the provided value.
14873        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
14874            self.set_datatype_name(field.into());
14875            self
14876        }
14877        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14878        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14879            self.package_id.as_mut().map(|field| field as _)
14880        }
14881        ///Returns a mutable reference to `package_id`.
14882        ///If the field is unset, it is first initialized with the default value.
14883        pub fn package_id_mut(&mut self) -> &mut String {
14884            self.package_id.get_or_insert_default()
14885        }
14886        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14887        pub fn package_id_opt(&self) -> Option<&str> {
14888            self.package_id.as_ref().map(|field| field as _)
14889        }
14890        ///Sets `package_id` with the provided value.
14891        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14892            self.package_id = Some(field.into().into());
14893        }
14894        ///Sets `package_id` with the provided value.
14895        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14896            self.set_package_id(field.into());
14897            self
14898        }
14899    }
14900    impl super::TypeParameter {
14901        pub const fn const_default() -> Self {
14902            Self {
14903                constraints: Vec::new(),
14904                is_phantom: None,
14905            }
14906        }
14907        #[doc(hidden)]
14908        pub fn default_instance() -> &'static Self {
14909            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
14910            &DEFAULT
14911        }
14912        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14913        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
14914            self.is_phantom.as_mut().map(|field| field as _)
14915        }
14916        ///Returns a mutable reference to `is_phantom`.
14917        ///If the field is unset, it is first initialized with the default value.
14918        pub fn is_phantom_mut(&mut self) -> &mut bool {
14919            self.is_phantom.get_or_insert_default()
14920        }
14921        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
14922        pub fn is_phantom_opt(&self) -> Option<bool> {
14923            self.is_phantom.as_ref().map(|field| *field)
14924        }
14925        ///Sets `is_phantom` with the provided value.
14926        pub fn set_is_phantom(&mut self, field: bool) {
14927            self.is_phantom = Some(field);
14928        }
14929        ///Sets `is_phantom` with the provided value.
14930        pub fn with_is_phantom(mut self, field: bool) -> Self {
14931            self.set_is_phantom(field);
14932            self
14933        }
14934    }
14935    impl super::UnchangedConsensusObject {
14936        pub const fn const_default() -> Self {
14937            Self {
14938                kind: None,
14939                object_id: None,
14940                version: None,
14941                digest: None,
14942                object_type: None,
14943            }
14944        }
14945        #[doc(hidden)]
14946        pub fn default_instance() -> &'static Self {
14947            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
14948            &DEFAULT
14949        }
14950        ///Sets `kind` with the provided value.
14951        pub fn with_kind<
14952            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
14953        >(mut self, field: T) -> Self {
14954            self.set_kind(field.into());
14955            self
14956        }
14957        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14958        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
14959            self.object_id.as_mut().map(|field| field as _)
14960        }
14961        ///Returns a mutable reference to `object_id`.
14962        ///If the field is unset, it is first initialized with the default value.
14963        pub fn object_id_mut(&mut self) -> &mut String {
14964            self.object_id.get_or_insert_default()
14965        }
14966        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14967        pub fn object_id_opt(&self) -> Option<&str> {
14968            self.object_id.as_ref().map(|field| field as _)
14969        }
14970        ///Sets `object_id` with the provided value.
14971        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
14972            self.object_id = Some(field.into().into());
14973        }
14974        ///Sets `object_id` with the provided value.
14975        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
14976            self.set_object_id(field.into());
14977            self
14978        }
14979        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14980        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14981            self.version.as_mut().map(|field| field as _)
14982        }
14983        ///Returns a mutable reference to `version`.
14984        ///If the field is unset, it is first initialized with the default value.
14985        pub fn version_mut(&mut self) -> &mut u64 {
14986            self.version.get_or_insert_default()
14987        }
14988        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14989        pub fn version_opt(&self) -> Option<u64> {
14990            self.version.as_ref().map(|field| *field)
14991        }
14992        ///Sets `version` with the provided value.
14993        pub fn set_version(&mut self, field: u64) {
14994            self.version = Some(field);
14995        }
14996        ///Sets `version` with the provided value.
14997        pub fn with_version(mut self, field: u64) -> Self {
14998            self.set_version(field);
14999            self
15000        }
15001        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15002        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15003            self.digest.as_mut().map(|field| field as _)
15004        }
15005        ///Returns a mutable reference to `digest`.
15006        ///If the field is unset, it is first initialized with the default value.
15007        pub fn digest_mut(&mut self) -> &mut String {
15008            self.digest.get_or_insert_default()
15009        }
15010        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15011        pub fn digest_opt(&self) -> Option<&str> {
15012            self.digest.as_ref().map(|field| field as _)
15013        }
15014        ///Sets `digest` with the provided value.
15015        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15016            self.digest = Some(field.into().into());
15017        }
15018        ///Sets `digest` with the provided value.
15019        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15020            self.set_digest(field.into());
15021            self
15022        }
15023        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15024        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15025            self.object_type.as_mut().map(|field| field as _)
15026        }
15027        ///Returns a mutable reference to `object_type`.
15028        ///If the field is unset, it is first initialized with the default value.
15029        pub fn object_type_mut(&mut self) -> &mut String {
15030            self.object_type.get_or_insert_default()
15031        }
15032        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15033        pub fn object_type_opt(&self) -> Option<&str> {
15034            self.object_type.as_ref().map(|field| field as _)
15035        }
15036        ///Sets `object_type` with the provided value.
15037        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15038            self.object_type = Some(field.into().into());
15039        }
15040        ///Sets `object_type` with the provided value.
15041        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15042            self.set_object_type(field.into());
15043            self
15044        }
15045    }
15046    impl super::Upgrade {
15047        pub const fn const_default() -> Self {
15048            Self {
15049                modules: Vec::new(),
15050                dependencies: Vec::new(),
15051                package: None,
15052                ticket: None,
15053            }
15054        }
15055        #[doc(hidden)]
15056        pub fn default_instance() -> &'static Self {
15057            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15058            &DEFAULT
15059        }
15060        ///Returns the value of `modules`, or the default value if `modules` is unset.
15061        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15062            &self.modules
15063        }
15064        ///Returns a mutable reference to `modules`.
15065        ///If the field is unset, it is first initialized with the default value.
15066        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15067            &mut self.modules
15068        }
15069        ///Sets `modules` with the provided value.
15070        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15071            self.modules = field;
15072        }
15073        ///Sets `modules` with the provided value.
15074        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15075            self.set_modules(field);
15076            self
15077        }
15078        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15079        pub fn dependencies(&self) -> &[String] {
15080            &self.dependencies
15081        }
15082        ///Returns a mutable reference to `dependencies`.
15083        ///If the field is unset, it is first initialized with the default value.
15084        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15085            &mut self.dependencies
15086        }
15087        ///Sets `dependencies` with the provided value.
15088        pub fn set_dependencies(&mut self, field: Vec<String>) {
15089            self.dependencies = field;
15090        }
15091        ///Sets `dependencies` with the provided value.
15092        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15093            self.set_dependencies(field);
15094            self
15095        }
15096        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15097        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15098            self.package.as_mut().map(|field| field as _)
15099        }
15100        ///Returns a mutable reference to `package`.
15101        ///If the field is unset, it is first initialized with the default value.
15102        pub fn package_mut(&mut self) -> &mut String {
15103            self.package.get_or_insert_default()
15104        }
15105        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15106        pub fn package_opt(&self) -> Option<&str> {
15107            self.package.as_ref().map(|field| field as _)
15108        }
15109        ///Sets `package` with the provided value.
15110        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15111            self.package = Some(field.into().into());
15112        }
15113        ///Sets `package` with the provided value.
15114        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15115            self.set_package(field.into());
15116            self
15117        }
15118        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15119        pub fn ticket(&self) -> &super::Argument {
15120            self.ticket
15121                .as_ref()
15122                .map(|field| field as _)
15123                .unwrap_or_else(|| super::Argument::default_instance() as _)
15124        }
15125        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15126        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15127            self.ticket.as_mut().map(|field| field as _)
15128        }
15129        ///Returns a mutable reference to `ticket`.
15130        ///If the field is unset, it is first initialized with the default value.
15131        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15132            self.ticket.get_or_insert_default()
15133        }
15134        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15135        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15136            self.ticket.as_ref().map(|field| field as _)
15137        }
15138        ///Sets `ticket` with the provided value.
15139        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15140            self.ticket = Some(field.into().into());
15141        }
15142        ///Sets `ticket` with the provided value.
15143        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15144            self.set_ticket(field.into());
15145            self
15146        }
15147    }
15148    impl super::UserSignature {
15149        pub const fn const_default() -> Self {
15150            Self {
15151                bcs: None,
15152                scheme: None,
15153                signature: None,
15154            }
15155        }
15156        #[doc(hidden)]
15157        pub fn default_instance() -> &'static Self {
15158            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15159            &DEFAULT
15160        }
15161        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15162        pub fn bcs(&self) -> &super::Bcs {
15163            self.bcs
15164                .as_ref()
15165                .map(|field| field as _)
15166                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15167        }
15168        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15169        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15170            self.bcs.as_mut().map(|field| field as _)
15171        }
15172        ///Returns a mutable reference to `bcs`.
15173        ///If the field is unset, it is first initialized with the default value.
15174        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15175            self.bcs.get_or_insert_default()
15176        }
15177        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15178        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15179            self.bcs.as_ref().map(|field| field as _)
15180        }
15181        ///Sets `bcs` with the provided value.
15182        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15183            self.bcs = Some(field.into().into());
15184        }
15185        ///Sets `bcs` with the provided value.
15186        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15187            self.set_bcs(field.into());
15188            self
15189        }
15190        ///Sets `scheme` with the provided value.
15191        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15192            self.set_scheme(field.into());
15193            self
15194        }
15195        ///Returns the value of `simple`, or the default value if `simple` is unset.
15196        pub fn simple(&self) -> &super::SimpleSignature {
15197            if let Some(super::user_signature::Signature::Simple(field)) = &self
15198                .signature
15199            {
15200                field as _
15201            } else {
15202                super::SimpleSignature::default_instance() as _
15203            }
15204        }
15205        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15206        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15207            if let Some(super::user_signature::Signature::Simple(field)) = &self
15208                .signature
15209            {
15210                Some(field as _)
15211            } else {
15212                None
15213            }
15214        }
15215        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15216        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15217            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15218                .signature
15219            {
15220                Some(field as _)
15221            } else {
15222                None
15223            }
15224        }
15225        ///Returns a mutable reference to `simple`.
15226        ///If the field is unset, it is first initialized with the default value.
15227        ///If any other oneof field in the same oneof is set, it will be cleared.
15228        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15229            if self.simple_opt_mut().is_none() {
15230                self.signature = Some(
15231                    super::user_signature::Signature::Simple(
15232                        super::SimpleSignature::default(),
15233                    ),
15234                );
15235            }
15236            self.simple_opt_mut().unwrap()
15237        }
15238        ///Sets `simple` with the provided value.
15239        ///If any other oneof field in the same oneof is set, it will be cleared.
15240        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15241            self.signature = Some(
15242                super::user_signature::Signature::Simple(field.into().into()),
15243            );
15244        }
15245        ///Sets `simple` with the provided value.
15246        ///If any other oneof field in the same oneof is set, it will be cleared.
15247        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15248            self.set_simple(field.into());
15249            self
15250        }
15251        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15252        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15253            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15254                .signature
15255            {
15256                field as _
15257            } else {
15258                super::MultisigAggregatedSignature::default_instance() as _
15259            }
15260        }
15261        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15262        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15263            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15264                .signature
15265            {
15266                Some(field as _)
15267            } else {
15268                None
15269            }
15270        }
15271        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15272        pub fn multisig_opt_mut(
15273            &mut self,
15274        ) -> Option<&mut super::MultisigAggregatedSignature> {
15275            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15276                .signature
15277            {
15278                Some(field as _)
15279            } else {
15280                None
15281            }
15282        }
15283        ///Returns a mutable reference to `multisig`.
15284        ///If the field is unset, it is first initialized with the default value.
15285        ///If any other oneof field in the same oneof is set, it will be cleared.
15286        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15287            if self.multisig_opt_mut().is_none() {
15288                self.signature = Some(
15289                    super::user_signature::Signature::Multisig(
15290                        super::MultisigAggregatedSignature::default(),
15291                    ),
15292                );
15293            }
15294            self.multisig_opt_mut().unwrap()
15295        }
15296        ///Sets `multisig` with the provided value.
15297        ///If any other oneof field in the same oneof is set, it will be cleared.
15298        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15299            &mut self,
15300            field: T,
15301        ) {
15302            self.signature = Some(
15303                super::user_signature::Signature::Multisig(field.into().into()),
15304            );
15305        }
15306        ///Sets `multisig` with the provided value.
15307        ///If any other oneof field in the same oneof is set, it will be cleared.
15308        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15309            mut self,
15310            field: T,
15311        ) -> Self {
15312            self.set_multisig(field.into());
15313            self
15314        }
15315        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15316        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15317            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15318                .signature
15319            {
15320                field as _
15321            } else {
15322                super::ZkLoginAuthenticator::default_instance() as _
15323            }
15324        }
15325        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15326        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15327            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15328                .signature
15329            {
15330                Some(field as _)
15331            } else {
15332                None
15333            }
15334        }
15335        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15336        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15337            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15338                .signature
15339            {
15340                Some(field as _)
15341            } else {
15342                None
15343            }
15344        }
15345        ///Returns a mutable reference to `zklogin`.
15346        ///If the field is unset, it is first initialized with the default value.
15347        ///If any other oneof field in the same oneof is set, it will be cleared.
15348        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15349            if self.zklogin_opt_mut().is_none() {
15350                self.signature = Some(
15351                    super::user_signature::Signature::Zklogin(
15352                        super::ZkLoginAuthenticator::default(),
15353                    ),
15354                );
15355            }
15356            self.zklogin_opt_mut().unwrap()
15357        }
15358        ///Sets `zklogin` with the provided value.
15359        ///If any other oneof field in the same oneof is set, it will be cleared.
15360        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15361            self.signature = Some(
15362                super::user_signature::Signature::Zklogin(field.into().into()),
15363            );
15364        }
15365        ///Sets `zklogin` with the provided value.
15366        ///If any other oneof field in the same oneof is set, it will be cleared.
15367        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15368            mut self,
15369            field: T,
15370        ) -> Self {
15371            self.set_zklogin(field.into());
15372            self
15373        }
15374        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
15375        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15376            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15377                .signature
15378            {
15379                field as _
15380            } else {
15381                super::PasskeyAuthenticator::default_instance() as _
15382            }
15383        }
15384        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
15385        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15386            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15387                .signature
15388            {
15389                Some(field as _)
15390            } else {
15391                None
15392            }
15393        }
15394        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15395        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15396            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15397                .signature
15398            {
15399                Some(field as _)
15400            } else {
15401                None
15402            }
15403        }
15404        ///Returns a mutable reference to `passkey`.
15405        ///If the field is unset, it is first initialized with the default value.
15406        ///If any other oneof field in the same oneof is set, it will be cleared.
15407        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15408            if self.passkey_opt_mut().is_none() {
15409                self.signature = Some(
15410                    super::user_signature::Signature::Passkey(
15411                        super::PasskeyAuthenticator::default(),
15412                    ),
15413                );
15414            }
15415            self.passkey_opt_mut().unwrap()
15416        }
15417        ///Sets `passkey` with the provided value.
15418        ///If any other oneof field in the same oneof is set, it will be cleared.
15419        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15420            self.signature = Some(
15421                super::user_signature::Signature::Passkey(field.into().into()),
15422            );
15423        }
15424        ///Sets `passkey` with the provided value.
15425        ///If any other oneof field in the same oneof is set, it will be cleared.
15426        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15427            mut self,
15428            field: T,
15429        ) -> Self {
15430            self.set_passkey(field.into());
15431            self
15432        }
15433    }
15434    impl super::Validator {
15435        pub const fn const_default() -> Self {
15436            Self {
15437                name: None,
15438                address: None,
15439                description: None,
15440                image_url: None,
15441                project_url: None,
15442                protocol_public_key: None,
15443                proof_of_possession: None,
15444                network_public_key: None,
15445                worker_public_key: None,
15446                network_address: None,
15447                p2p_address: None,
15448                primary_address: None,
15449                worker_address: None,
15450                next_epoch_protocol_public_key: None,
15451                next_epoch_proof_of_possession: None,
15452                next_epoch_network_public_key: None,
15453                next_epoch_worker_public_key: None,
15454                next_epoch_network_address: None,
15455                next_epoch_p2p_address: None,
15456                next_epoch_primary_address: None,
15457                next_epoch_worker_address: None,
15458                metadata_extra_fields: None,
15459                voting_power: None,
15460                operation_cap_id: None,
15461                gas_price: None,
15462                staking_pool: None,
15463                commission_rate: None,
15464                next_epoch_stake: None,
15465                next_epoch_gas_price: None,
15466                next_epoch_commission_rate: None,
15467                extra_fields: None,
15468            }
15469        }
15470        #[doc(hidden)]
15471        pub fn default_instance() -> &'static Self {
15472            static DEFAULT: super::Validator = super::Validator::const_default();
15473            &DEFAULT
15474        }
15475        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15476        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15477            self.name.as_mut().map(|field| field as _)
15478        }
15479        ///Returns a mutable reference to `name`.
15480        ///If the field is unset, it is first initialized with the default value.
15481        pub fn name_mut(&mut self) -> &mut String {
15482            self.name.get_or_insert_default()
15483        }
15484        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15485        pub fn name_opt(&self) -> Option<&str> {
15486            self.name.as_ref().map(|field| field as _)
15487        }
15488        ///Sets `name` with the provided value.
15489        pub fn set_name<T: Into<String>>(&mut self, field: T) {
15490            self.name = Some(field.into().into());
15491        }
15492        ///Sets `name` with the provided value.
15493        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15494            self.set_name(field.into());
15495            self
15496        }
15497        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15498        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15499            self.address.as_mut().map(|field| field as _)
15500        }
15501        ///Returns a mutable reference to `address`.
15502        ///If the field is unset, it is first initialized with the default value.
15503        pub fn address_mut(&mut self) -> &mut String {
15504            self.address.get_or_insert_default()
15505        }
15506        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15507        pub fn address_opt(&self) -> Option<&str> {
15508            self.address.as_ref().map(|field| field as _)
15509        }
15510        ///Sets `address` with the provided value.
15511        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15512            self.address = Some(field.into().into());
15513        }
15514        ///Sets `address` with the provided value.
15515        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15516            self.set_address(field.into());
15517            self
15518        }
15519        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15520        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15521            self.description.as_mut().map(|field| field as _)
15522        }
15523        ///Returns a mutable reference to `description`.
15524        ///If the field is unset, it is first initialized with the default value.
15525        pub fn description_mut(&mut self) -> &mut String {
15526            self.description.get_or_insert_default()
15527        }
15528        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
15529        pub fn description_opt(&self) -> Option<&str> {
15530            self.description.as_ref().map(|field| field as _)
15531        }
15532        ///Sets `description` with the provided value.
15533        pub fn set_description<T: Into<String>>(&mut self, field: T) {
15534            self.description = Some(field.into().into());
15535        }
15536        ///Sets `description` with the provided value.
15537        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15538            self.set_description(field.into());
15539            self
15540        }
15541        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15542        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15543            self.image_url.as_mut().map(|field| field as _)
15544        }
15545        ///Returns a mutable reference to `image_url`.
15546        ///If the field is unset, it is first initialized with the default value.
15547        pub fn image_url_mut(&mut self) -> &mut String {
15548            self.image_url.get_or_insert_default()
15549        }
15550        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15551        pub fn image_url_opt(&self) -> Option<&str> {
15552            self.image_url.as_ref().map(|field| field as _)
15553        }
15554        ///Sets `image_url` with the provided value.
15555        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15556            self.image_url = Some(field.into().into());
15557        }
15558        ///Sets `image_url` with the provided value.
15559        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15560            self.set_image_url(field.into());
15561            self
15562        }
15563        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15564        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15565            self.project_url.as_mut().map(|field| field as _)
15566        }
15567        ///Returns a mutable reference to `project_url`.
15568        ///If the field is unset, it is first initialized with the default value.
15569        pub fn project_url_mut(&mut self) -> &mut String {
15570            self.project_url.get_or_insert_default()
15571        }
15572        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15573        pub fn project_url_opt(&self) -> Option<&str> {
15574            self.project_url.as_ref().map(|field| field as _)
15575        }
15576        ///Sets `project_url` with the provided value.
15577        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
15578            self.project_url = Some(field.into().into());
15579        }
15580        ///Sets `project_url` with the provided value.
15581        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
15582            self.set_project_url(field.into());
15583            self
15584        }
15585        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15586        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
15587            self.protocol_public_key.as_ref().map(|field| field as _)
15588        }
15589        ///Sets `protocol_public_key` with the provided value.
15590        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15591            &mut self,
15592            field: T,
15593        ) {
15594            self.protocol_public_key = Some(field.into().into());
15595        }
15596        ///Sets `protocol_public_key` with the provided value.
15597        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15598            mut self,
15599            field: T,
15600        ) -> Self {
15601            self.set_protocol_public_key(field.into());
15602            self
15603        }
15604        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
15605        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
15606            self.proof_of_possession.as_ref().map(|field| field as _)
15607        }
15608        ///Sets `proof_of_possession` with the provided value.
15609        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15610            &mut self,
15611            field: T,
15612        ) {
15613            self.proof_of_possession = Some(field.into().into());
15614        }
15615        ///Sets `proof_of_possession` with the provided value.
15616        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15617            mut self,
15618            field: T,
15619        ) -> Self {
15620            self.set_proof_of_possession(field.into());
15621            self
15622        }
15623        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15624        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
15625            self.network_public_key.as_ref().map(|field| field as _)
15626        }
15627        ///Sets `network_public_key` with the provided value.
15628        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
15629            &mut self,
15630            field: T,
15631        ) {
15632            self.network_public_key = Some(field.into().into());
15633        }
15634        ///Sets `network_public_key` with the provided value.
15635        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
15636            mut self,
15637            field: T,
15638        ) -> Self {
15639            self.set_network_public_key(field.into());
15640            self
15641        }
15642        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15643        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
15644            self.worker_public_key.as_ref().map(|field| field as _)
15645        }
15646        ///Sets `worker_public_key` with the provided value.
15647        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15648            &mut self,
15649            field: T,
15650        ) {
15651            self.worker_public_key = Some(field.into().into());
15652        }
15653        ///Sets `worker_public_key` with the provided value.
15654        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15655            mut self,
15656            field: T,
15657        ) -> Self {
15658            self.set_worker_public_key(field.into());
15659            self
15660        }
15661        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15662        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
15663            self.network_address.as_mut().map(|field| field as _)
15664        }
15665        ///Returns a mutable reference to `network_address`.
15666        ///If the field is unset, it is first initialized with the default value.
15667        pub fn network_address_mut(&mut self) -> &mut String {
15668            self.network_address.get_or_insert_default()
15669        }
15670        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15671        pub fn network_address_opt(&self) -> Option<&str> {
15672            self.network_address.as_ref().map(|field| field as _)
15673        }
15674        ///Sets `network_address` with the provided value.
15675        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
15676            self.network_address = Some(field.into().into());
15677        }
15678        ///Sets `network_address` with the provided value.
15679        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
15680            self.set_network_address(field.into());
15681            self
15682        }
15683        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15684        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15685            self.p2p_address.as_mut().map(|field| field as _)
15686        }
15687        ///Returns a mutable reference to `p2p_address`.
15688        ///If the field is unset, it is first initialized with the default value.
15689        pub fn p2p_address_mut(&mut self) -> &mut String {
15690            self.p2p_address.get_or_insert_default()
15691        }
15692        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15693        pub fn p2p_address_opt(&self) -> Option<&str> {
15694            self.p2p_address.as_ref().map(|field| field as _)
15695        }
15696        ///Sets `p2p_address` with the provided value.
15697        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
15698            self.p2p_address = Some(field.into().into());
15699        }
15700        ///Sets `p2p_address` with the provided value.
15701        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15702            self.set_p2p_address(field.into());
15703            self
15704        }
15705        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15706        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
15707            self.primary_address.as_mut().map(|field| field as _)
15708        }
15709        ///Returns a mutable reference to `primary_address`.
15710        ///If the field is unset, it is first initialized with the default value.
15711        pub fn primary_address_mut(&mut self) -> &mut String {
15712            self.primary_address.get_or_insert_default()
15713        }
15714        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15715        pub fn primary_address_opt(&self) -> Option<&str> {
15716            self.primary_address.as_ref().map(|field| field as _)
15717        }
15718        ///Sets `primary_address` with the provided value.
15719        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
15720            self.primary_address = Some(field.into().into());
15721        }
15722        ///Sets `primary_address` with the provided value.
15723        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
15724            self.set_primary_address(field.into());
15725            self
15726        }
15727        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15728        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
15729            self.worker_address.as_mut().map(|field| field as _)
15730        }
15731        ///Returns a mutable reference to `worker_address`.
15732        ///If the field is unset, it is first initialized with the default value.
15733        pub fn worker_address_mut(&mut self) -> &mut String {
15734            self.worker_address.get_or_insert_default()
15735        }
15736        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15737        pub fn worker_address_opt(&self) -> Option<&str> {
15738            self.worker_address.as_ref().map(|field| field as _)
15739        }
15740        ///Sets `worker_address` with the provided value.
15741        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
15742            self.worker_address = Some(field.into().into());
15743        }
15744        ///Sets `worker_address` with the provided value.
15745        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
15746            self.set_worker_address(field.into());
15747            self
15748        }
15749        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15750        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
15751            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
15752        }
15753        ///Sets `next_epoch_protocol_public_key` with the provided value.
15754        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15755            &mut self,
15756            field: T,
15757        ) {
15758            self.next_epoch_protocol_public_key = Some(field.into().into());
15759        }
15760        ///Sets `next_epoch_protocol_public_key` with the provided value.
15761        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15762            mut self,
15763            field: T,
15764        ) -> Self {
15765            self.set_next_epoch_protocol_public_key(field.into());
15766            self
15767        }
15768        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
15769        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
15770            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
15771        }
15772        ///Sets `next_epoch_proof_of_possession` with the provided value.
15773        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15774            &mut self,
15775            field: T,
15776        ) {
15777            self.next_epoch_proof_of_possession = Some(field.into().into());
15778        }
15779        ///Sets `next_epoch_proof_of_possession` with the provided value.
15780        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15781            mut self,
15782            field: T,
15783        ) -> Self {
15784            self.set_next_epoch_proof_of_possession(field.into());
15785            self
15786        }
15787        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15788        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
15789            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
15790        }
15791        ///Sets `next_epoch_network_public_key` with the provided value.
15792        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15793            &mut self,
15794            field: T,
15795        ) {
15796            self.next_epoch_network_public_key = Some(field.into().into());
15797        }
15798        ///Sets `next_epoch_network_public_key` with the provided value.
15799        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15800            mut self,
15801            field: T,
15802        ) -> Self {
15803            self.set_next_epoch_network_public_key(field.into());
15804            self
15805        }
15806        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15807        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
15808            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
15809        }
15810        ///Sets `next_epoch_worker_public_key` with the provided value.
15811        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15812            &mut self,
15813            field: T,
15814        ) {
15815            self.next_epoch_worker_public_key = Some(field.into().into());
15816        }
15817        ///Sets `next_epoch_worker_public_key` with the provided value.
15818        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15819            mut self,
15820            field: T,
15821        ) -> Self {
15822            self.set_next_epoch_worker_public_key(field.into());
15823            self
15824        }
15825        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15826        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
15827            self.next_epoch_network_address.as_mut().map(|field| field as _)
15828        }
15829        ///Returns a mutable reference to `next_epoch_network_address`.
15830        ///If the field is unset, it is first initialized with the default value.
15831        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
15832            self.next_epoch_network_address.get_or_insert_default()
15833        }
15834        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15835        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
15836            self.next_epoch_network_address.as_ref().map(|field| field as _)
15837        }
15838        ///Sets `next_epoch_network_address` with the provided value.
15839        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
15840            self.next_epoch_network_address = Some(field.into().into());
15841        }
15842        ///Sets `next_epoch_network_address` with the provided value.
15843        pub fn with_next_epoch_network_address<T: Into<String>>(
15844            mut self,
15845            field: T,
15846        ) -> Self {
15847            self.set_next_epoch_network_address(field.into());
15848            self
15849        }
15850        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15851        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15852            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
15853        }
15854        ///Returns a mutable reference to `next_epoch_p2p_address`.
15855        ///If the field is unset, it is first initialized with the default value.
15856        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
15857            self.next_epoch_p2p_address.get_or_insert_default()
15858        }
15859        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15860        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
15861            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
15862        }
15863        ///Sets `next_epoch_p2p_address` with the provided value.
15864        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
15865            self.next_epoch_p2p_address = Some(field.into().into());
15866        }
15867        ///Sets `next_epoch_p2p_address` with the provided value.
15868        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15869            self.set_next_epoch_p2p_address(field.into());
15870            self
15871        }
15872        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15873        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
15874            self.next_epoch_primary_address.as_mut().map(|field| field as _)
15875        }
15876        ///Returns a mutable reference to `next_epoch_primary_address`.
15877        ///If the field is unset, it is first initialized with the default value.
15878        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
15879            self.next_epoch_primary_address.get_or_insert_default()
15880        }
15881        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15882        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
15883            self.next_epoch_primary_address.as_ref().map(|field| field as _)
15884        }
15885        ///Sets `next_epoch_primary_address` with the provided value.
15886        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
15887            self.next_epoch_primary_address = Some(field.into().into());
15888        }
15889        ///Sets `next_epoch_primary_address` with the provided value.
15890        pub fn with_next_epoch_primary_address<T: Into<String>>(
15891            mut self,
15892            field: T,
15893        ) -> Self {
15894            self.set_next_epoch_primary_address(field.into());
15895            self
15896        }
15897        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15898        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
15899            self.next_epoch_worker_address.as_mut().map(|field| field as _)
15900        }
15901        ///Returns a mutable reference to `next_epoch_worker_address`.
15902        ///If the field is unset, it is first initialized with the default value.
15903        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
15904            self.next_epoch_worker_address.get_or_insert_default()
15905        }
15906        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15907        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
15908            self.next_epoch_worker_address.as_ref().map(|field| field as _)
15909        }
15910        ///Sets `next_epoch_worker_address` with the provided value.
15911        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
15912            self.next_epoch_worker_address = Some(field.into().into());
15913        }
15914        ///Sets `next_epoch_worker_address` with the provided value.
15915        pub fn with_next_epoch_worker_address<T: Into<String>>(
15916            mut self,
15917            field: T,
15918        ) -> Self {
15919            self.set_next_epoch_worker_address(field.into());
15920            self
15921        }
15922        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
15923        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
15924            self.metadata_extra_fields
15925                .as_ref()
15926                .map(|field| field as _)
15927                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15928        }
15929        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15930        pub fn metadata_extra_fields_opt_mut(
15931            &mut self,
15932        ) -> Option<&mut super::MoveTable> {
15933            self.metadata_extra_fields.as_mut().map(|field| field as _)
15934        }
15935        ///Returns a mutable reference to `metadata_extra_fields`.
15936        ///If the field is unset, it is first initialized with the default value.
15937        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
15938            self.metadata_extra_fields.get_or_insert_default()
15939        }
15940        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15941        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
15942            self.metadata_extra_fields.as_ref().map(|field| field as _)
15943        }
15944        ///Sets `metadata_extra_fields` with the provided value.
15945        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
15946            &mut self,
15947            field: T,
15948        ) {
15949            self.metadata_extra_fields = Some(field.into().into());
15950        }
15951        ///Sets `metadata_extra_fields` with the provided value.
15952        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
15953            mut self,
15954            field: T,
15955        ) -> Self {
15956            self.set_metadata_extra_fields(field.into());
15957            self
15958        }
15959        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15960        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
15961            self.voting_power.as_mut().map(|field| field as _)
15962        }
15963        ///Returns a mutable reference to `voting_power`.
15964        ///If the field is unset, it is first initialized with the default value.
15965        pub fn voting_power_mut(&mut self) -> &mut u64 {
15966            self.voting_power.get_or_insert_default()
15967        }
15968        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
15969        pub fn voting_power_opt(&self) -> Option<u64> {
15970            self.voting_power.as_ref().map(|field| *field)
15971        }
15972        ///Sets `voting_power` with the provided value.
15973        pub fn set_voting_power(&mut self, field: u64) {
15974            self.voting_power = Some(field);
15975        }
15976        ///Sets `voting_power` with the provided value.
15977        pub fn with_voting_power(mut self, field: u64) -> Self {
15978            self.set_voting_power(field);
15979            self
15980        }
15981        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15982        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
15983            self.operation_cap_id.as_mut().map(|field| field as _)
15984        }
15985        ///Returns a mutable reference to `operation_cap_id`.
15986        ///If the field is unset, it is first initialized with the default value.
15987        pub fn operation_cap_id_mut(&mut self) -> &mut String {
15988            self.operation_cap_id.get_or_insert_default()
15989        }
15990        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15991        pub fn operation_cap_id_opt(&self) -> Option<&str> {
15992            self.operation_cap_id.as_ref().map(|field| field as _)
15993        }
15994        ///Sets `operation_cap_id` with the provided value.
15995        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
15996            self.operation_cap_id = Some(field.into().into());
15997        }
15998        ///Sets `operation_cap_id` with the provided value.
15999        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16000            self.set_operation_cap_id(field.into());
16001            self
16002        }
16003        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16004        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16005            self.gas_price.as_mut().map(|field| field as _)
16006        }
16007        ///Returns a mutable reference to `gas_price`.
16008        ///If the field is unset, it is first initialized with the default value.
16009        pub fn gas_price_mut(&mut self) -> &mut u64 {
16010            self.gas_price.get_or_insert_default()
16011        }
16012        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16013        pub fn gas_price_opt(&self) -> Option<u64> {
16014            self.gas_price.as_ref().map(|field| *field)
16015        }
16016        ///Sets `gas_price` with the provided value.
16017        pub fn set_gas_price(&mut self, field: u64) {
16018            self.gas_price = Some(field);
16019        }
16020        ///Sets `gas_price` with the provided value.
16021        pub fn with_gas_price(mut self, field: u64) -> Self {
16022            self.set_gas_price(field);
16023            self
16024        }
16025        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16026        pub fn staking_pool(&self) -> &super::StakingPool {
16027            self.staking_pool
16028                .as_ref()
16029                .map(|field| field as _)
16030                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16031        }
16032        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16033        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16034            self.staking_pool.as_mut().map(|field| field as _)
16035        }
16036        ///Returns a mutable reference to `staking_pool`.
16037        ///If the field is unset, it is first initialized with the default value.
16038        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16039            self.staking_pool.get_or_insert_default()
16040        }
16041        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16042        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16043            self.staking_pool.as_ref().map(|field| field as _)
16044        }
16045        ///Sets `staking_pool` with the provided value.
16046        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16047            self.staking_pool = Some(field.into().into());
16048        }
16049        ///Sets `staking_pool` with the provided value.
16050        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16051            mut self,
16052            field: T,
16053        ) -> Self {
16054            self.set_staking_pool(field.into());
16055            self
16056        }
16057        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16058        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16059            self.commission_rate.as_mut().map(|field| field as _)
16060        }
16061        ///Returns a mutable reference to `commission_rate`.
16062        ///If the field is unset, it is first initialized with the default value.
16063        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16064            self.commission_rate.get_or_insert_default()
16065        }
16066        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16067        pub fn commission_rate_opt(&self) -> Option<u64> {
16068            self.commission_rate.as_ref().map(|field| *field)
16069        }
16070        ///Sets `commission_rate` with the provided value.
16071        pub fn set_commission_rate(&mut self, field: u64) {
16072            self.commission_rate = Some(field);
16073        }
16074        ///Sets `commission_rate` with the provided value.
16075        pub fn with_commission_rate(mut self, field: u64) -> Self {
16076            self.set_commission_rate(field);
16077            self
16078        }
16079        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16080        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16081            self.next_epoch_stake.as_mut().map(|field| field as _)
16082        }
16083        ///Returns a mutable reference to `next_epoch_stake`.
16084        ///If the field is unset, it is first initialized with the default value.
16085        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16086            self.next_epoch_stake.get_or_insert_default()
16087        }
16088        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16089        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16090            self.next_epoch_stake.as_ref().map(|field| *field)
16091        }
16092        ///Sets `next_epoch_stake` with the provided value.
16093        pub fn set_next_epoch_stake(&mut self, field: u64) {
16094            self.next_epoch_stake = Some(field);
16095        }
16096        ///Sets `next_epoch_stake` with the provided value.
16097        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16098            self.set_next_epoch_stake(field);
16099            self
16100        }
16101        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16102        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16103            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16104        }
16105        ///Returns a mutable reference to `next_epoch_gas_price`.
16106        ///If the field is unset, it is first initialized with the default value.
16107        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16108            self.next_epoch_gas_price.get_or_insert_default()
16109        }
16110        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16111        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16112            self.next_epoch_gas_price.as_ref().map(|field| *field)
16113        }
16114        ///Sets `next_epoch_gas_price` with the provided value.
16115        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16116            self.next_epoch_gas_price = Some(field);
16117        }
16118        ///Sets `next_epoch_gas_price` with the provided value.
16119        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16120            self.set_next_epoch_gas_price(field);
16121            self
16122        }
16123        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16124        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16125            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16126        }
16127        ///Returns a mutable reference to `next_epoch_commission_rate`.
16128        ///If the field is unset, it is first initialized with the default value.
16129        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16130            self.next_epoch_commission_rate.get_or_insert_default()
16131        }
16132        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16133        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16134            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16135        }
16136        ///Sets `next_epoch_commission_rate` with the provided value.
16137        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16138            self.next_epoch_commission_rate = Some(field);
16139        }
16140        ///Sets `next_epoch_commission_rate` with the provided value.
16141        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16142            self.set_next_epoch_commission_rate(field);
16143            self
16144        }
16145        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16146        pub fn extra_fields(&self) -> &super::MoveTable {
16147            self.extra_fields
16148                .as_ref()
16149                .map(|field| field as _)
16150                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16151        }
16152        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16153        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16154            self.extra_fields.as_mut().map(|field| field as _)
16155        }
16156        ///Returns a mutable reference to `extra_fields`.
16157        ///If the field is unset, it is first initialized with the default value.
16158        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16159            self.extra_fields.get_or_insert_default()
16160        }
16161        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16162        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16163            self.extra_fields.as_ref().map(|field| field as _)
16164        }
16165        ///Sets `extra_fields` with the provided value.
16166        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16167            self.extra_fields = Some(field.into().into());
16168        }
16169        ///Sets `extra_fields` with the provided value.
16170        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16171            self.set_extra_fields(field.into());
16172            self
16173        }
16174    }
16175    impl super::ValidatorAggregatedSignature {
16176        pub const fn const_default() -> Self {
16177            Self {
16178                epoch: None,
16179                signature: None,
16180                bitmap: None,
16181            }
16182        }
16183        #[doc(hidden)]
16184        pub fn default_instance() -> &'static Self {
16185            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16186            &DEFAULT
16187        }
16188        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16189        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16190            self.epoch.as_mut().map(|field| field as _)
16191        }
16192        ///Returns a mutable reference to `epoch`.
16193        ///If the field is unset, it is first initialized with the default value.
16194        pub fn epoch_mut(&mut self) -> &mut u64 {
16195            self.epoch.get_or_insert_default()
16196        }
16197        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16198        pub fn epoch_opt(&self) -> Option<u64> {
16199            self.epoch.as_ref().map(|field| *field)
16200        }
16201        ///Sets `epoch` with the provided value.
16202        pub fn set_epoch(&mut self, field: u64) {
16203            self.epoch = Some(field);
16204        }
16205        ///Sets `epoch` with the provided value.
16206        pub fn with_epoch(mut self, field: u64) -> Self {
16207            self.set_epoch(field);
16208            self
16209        }
16210        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16211        pub fn signature_opt(&self) -> Option<&[u8]> {
16212            self.signature.as_ref().map(|field| field as _)
16213        }
16214        ///Sets `signature` with the provided value.
16215        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16216            self.signature = Some(field.into().into());
16217        }
16218        ///Sets `signature` with the provided value.
16219        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16220            mut self,
16221            field: T,
16222        ) -> Self {
16223            self.set_signature(field.into());
16224            self
16225        }
16226        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16227        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16228            self.bitmap.as_ref().map(|field| field as _)
16229        }
16230        ///Sets `bitmap` with the provided value.
16231        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16232            self.bitmap = Some(field.into().into());
16233        }
16234        ///Sets `bitmap` with the provided value.
16235        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16236            self.set_bitmap(field.into());
16237            self
16238        }
16239    }
16240    impl super::ValidatorCommittee {
16241        pub const fn const_default() -> Self {
16242            Self {
16243                epoch: None,
16244                members: Vec::new(),
16245            }
16246        }
16247        #[doc(hidden)]
16248        pub fn default_instance() -> &'static Self {
16249            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16250            &DEFAULT
16251        }
16252        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16253        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16254            self.epoch.as_mut().map(|field| field as _)
16255        }
16256        ///Returns a mutable reference to `epoch`.
16257        ///If the field is unset, it is first initialized with the default value.
16258        pub fn epoch_mut(&mut self) -> &mut u64 {
16259            self.epoch.get_or_insert_default()
16260        }
16261        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16262        pub fn epoch_opt(&self) -> Option<u64> {
16263            self.epoch.as_ref().map(|field| *field)
16264        }
16265        ///Sets `epoch` with the provided value.
16266        pub fn set_epoch(&mut self, field: u64) {
16267            self.epoch = Some(field);
16268        }
16269        ///Sets `epoch` with the provided value.
16270        pub fn with_epoch(mut self, field: u64) -> Self {
16271            self.set_epoch(field);
16272            self
16273        }
16274        ///Returns the value of `members`, or the default value if `members` is unset.
16275        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16276            &self.members
16277        }
16278        ///Returns a mutable reference to `members`.
16279        ///If the field is unset, it is first initialized with the default value.
16280        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16281            &mut self.members
16282        }
16283        ///Sets `members` with the provided value.
16284        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16285            self.members = field;
16286        }
16287        ///Sets `members` with the provided value.
16288        pub fn with_members(
16289            mut self,
16290            field: Vec<super::ValidatorCommitteeMember>,
16291        ) -> Self {
16292            self.set_members(field);
16293            self
16294        }
16295    }
16296    impl super::ValidatorCommitteeMember {
16297        pub const fn const_default() -> Self {
16298            Self {
16299                public_key: None,
16300                weight: None,
16301            }
16302        }
16303        #[doc(hidden)]
16304        pub fn default_instance() -> &'static Self {
16305            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16306            &DEFAULT
16307        }
16308        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16309        pub fn public_key_opt(&self) -> Option<&[u8]> {
16310            self.public_key.as_ref().map(|field| field as _)
16311        }
16312        ///Sets `public_key` with the provided value.
16313        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16314            self.public_key = Some(field.into().into());
16315        }
16316        ///Sets `public_key` with the provided value.
16317        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16318            mut self,
16319            field: T,
16320        ) -> Self {
16321            self.set_public_key(field.into());
16322            self
16323        }
16324        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16325        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16326            self.weight.as_mut().map(|field| field as _)
16327        }
16328        ///Returns a mutable reference to `weight`.
16329        ///If the field is unset, it is first initialized with the default value.
16330        pub fn weight_mut(&mut self) -> &mut u64 {
16331            self.weight.get_or_insert_default()
16332        }
16333        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16334        pub fn weight_opt(&self) -> Option<u64> {
16335            self.weight.as_ref().map(|field| *field)
16336        }
16337        ///Sets `weight` with the provided value.
16338        pub fn set_weight(&mut self, field: u64) {
16339            self.weight = Some(field);
16340        }
16341        ///Sets `weight` with the provided value.
16342        pub fn with_weight(mut self, field: u64) -> Self {
16343            self.set_weight(field);
16344            self
16345        }
16346    }
16347    impl super::ValidatorExecutionTimeObservation {
16348        pub const fn const_default() -> Self {
16349            Self {
16350                validator: None,
16351                duration: None,
16352            }
16353        }
16354        #[doc(hidden)]
16355        pub fn default_instance() -> &'static Self {
16356            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16357            &DEFAULT
16358        }
16359        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
16360        pub fn validator_opt(&self) -> Option<&[u8]> {
16361            self.validator.as_ref().map(|field| field as _)
16362        }
16363        ///Sets `validator` with the provided value.
16364        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16365            self.validator = Some(field.into().into());
16366        }
16367        ///Sets `validator` with the provided value.
16368        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16369            mut self,
16370            field: T,
16371        ) -> Self {
16372            self.set_validator(field.into());
16373            self
16374        }
16375        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16376        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16377            self.duration.as_mut().map(|field| field as _)
16378        }
16379        ///Returns a mutable reference to `duration`.
16380        ///If the field is unset, it is first initialized with the default value.
16381        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16382            self.duration.get_or_insert_default()
16383        }
16384        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16385        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16386            self.duration.as_ref().map(|field| field as _)
16387        }
16388        ///Sets `duration` with the provided value.
16389        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16390            self.duration = Some(field.into().into());
16391        }
16392        ///Sets `duration` with the provided value.
16393        pub fn with_duration<T: Into<::prost_types::Duration>>(
16394            mut self,
16395            field: T,
16396        ) -> Self {
16397            self.set_duration(field.into());
16398            self
16399        }
16400    }
16401    impl super::ValidatorReportRecord {
16402        pub const fn const_default() -> Self {
16403            Self {
16404                reported: None,
16405                reporters: Vec::new(),
16406            }
16407        }
16408        #[doc(hidden)]
16409        pub fn default_instance() -> &'static Self {
16410            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16411            &DEFAULT
16412        }
16413        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16414        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16415            self.reported.as_mut().map(|field| field as _)
16416        }
16417        ///Returns a mutable reference to `reported`.
16418        ///If the field is unset, it is first initialized with the default value.
16419        pub fn reported_mut(&mut self) -> &mut String {
16420            self.reported.get_or_insert_default()
16421        }
16422        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
16423        pub fn reported_opt(&self) -> Option<&str> {
16424            self.reported.as_ref().map(|field| field as _)
16425        }
16426        ///Sets `reported` with the provided value.
16427        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16428            self.reported = Some(field.into().into());
16429        }
16430        ///Sets `reported` with the provided value.
16431        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16432            self.set_reported(field.into());
16433            self
16434        }
16435        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
16436        pub fn reporters(&self) -> &[String] {
16437            &self.reporters
16438        }
16439        ///Returns a mutable reference to `reporters`.
16440        ///If the field is unset, it is first initialized with the default value.
16441        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16442            &mut self.reporters
16443        }
16444        ///Sets `reporters` with the provided value.
16445        pub fn set_reporters(&mut self, field: Vec<String>) {
16446            self.reporters = field;
16447        }
16448        ///Sets `reporters` with the provided value.
16449        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16450            self.set_reporters(field);
16451            self
16452        }
16453    }
16454    impl super::ValidatorSet {
16455        pub const fn const_default() -> Self {
16456            Self {
16457                total_stake: None,
16458                active_validators: Vec::new(),
16459                pending_active_validators: None,
16460                pending_removals: Vec::new(),
16461                staking_pool_mappings: None,
16462                inactive_validators: None,
16463                validator_candidates: None,
16464                at_risk_validators: std::collections::BTreeMap::new(),
16465                extra_fields: None,
16466            }
16467        }
16468        #[doc(hidden)]
16469        pub fn default_instance() -> &'static Self {
16470            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16471            &DEFAULT
16472        }
16473        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16474        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16475            self.total_stake.as_mut().map(|field| field as _)
16476        }
16477        ///Returns a mutable reference to `total_stake`.
16478        ///If the field is unset, it is first initialized with the default value.
16479        pub fn total_stake_mut(&mut self) -> &mut u64 {
16480            self.total_stake.get_or_insert_default()
16481        }
16482        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16483        pub fn total_stake_opt(&self) -> Option<u64> {
16484            self.total_stake.as_ref().map(|field| *field)
16485        }
16486        ///Sets `total_stake` with the provided value.
16487        pub fn set_total_stake(&mut self, field: u64) {
16488            self.total_stake = Some(field);
16489        }
16490        ///Sets `total_stake` with the provided value.
16491        pub fn with_total_stake(mut self, field: u64) -> Self {
16492            self.set_total_stake(field);
16493            self
16494        }
16495        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
16496        pub fn active_validators(&self) -> &[super::Validator] {
16497            &self.active_validators
16498        }
16499        ///Returns a mutable reference to `active_validators`.
16500        ///If the field is unset, it is first initialized with the default value.
16501        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16502            &mut self.active_validators
16503        }
16504        ///Sets `active_validators` with the provided value.
16505        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16506            self.active_validators = field;
16507        }
16508        ///Sets `active_validators` with the provided value.
16509        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16510            self.set_active_validators(field);
16511            self
16512        }
16513        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
16514        pub fn pending_active_validators(&self) -> &super::MoveTable {
16515            self.pending_active_validators
16516                .as_ref()
16517                .map(|field| field as _)
16518                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16519        }
16520        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16521        pub fn pending_active_validators_opt_mut(
16522            &mut self,
16523        ) -> Option<&mut super::MoveTable> {
16524            self.pending_active_validators.as_mut().map(|field| field as _)
16525        }
16526        ///Returns a mutable reference to `pending_active_validators`.
16527        ///If the field is unset, it is first initialized with the default value.
16528        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16529            self.pending_active_validators.get_or_insert_default()
16530        }
16531        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
16532        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16533            self.pending_active_validators.as_ref().map(|field| field as _)
16534        }
16535        ///Sets `pending_active_validators` with the provided value.
16536        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16537            &mut self,
16538            field: T,
16539        ) {
16540            self.pending_active_validators = Some(field.into().into());
16541        }
16542        ///Sets `pending_active_validators` with the provided value.
16543        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16544            mut self,
16545            field: T,
16546        ) -> Self {
16547            self.set_pending_active_validators(field.into());
16548            self
16549        }
16550        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
16551        pub fn pending_removals(&self) -> &[u64] {
16552            &self.pending_removals
16553        }
16554        ///Returns a mutable reference to `pending_removals`.
16555        ///If the field is unset, it is first initialized with the default value.
16556        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16557            &mut self.pending_removals
16558        }
16559        ///Sets `pending_removals` with the provided value.
16560        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16561            self.pending_removals = field;
16562        }
16563        ///Sets `pending_removals` with the provided value.
16564        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16565            self.set_pending_removals(field);
16566            self
16567        }
16568        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
16569        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
16570            self.staking_pool_mappings
16571                .as_ref()
16572                .map(|field| field as _)
16573                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16574        }
16575        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16576        pub fn staking_pool_mappings_opt_mut(
16577            &mut self,
16578        ) -> Option<&mut super::MoveTable> {
16579            self.staking_pool_mappings.as_mut().map(|field| field as _)
16580        }
16581        ///Returns a mutable reference to `staking_pool_mappings`.
16582        ///If the field is unset, it is first initialized with the default value.
16583        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
16584            self.staking_pool_mappings.get_or_insert_default()
16585        }
16586        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
16587        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
16588            self.staking_pool_mappings.as_ref().map(|field| field as _)
16589        }
16590        ///Sets `staking_pool_mappings` with the provided value.
16591        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
16592            &mut self,
16593            field: T,
16594        ) {
16595            self.staking_pool_mappings = Some(field.into().into());
16596        }
16597        ///Sets `staking_pool_mappings` with the provided value.
16598        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
16599            mut self,
16600            field: T,
16601        ) -> Self {
16602            self.set_staking_pool_mappings(field.into());
16603            self
16604        }
16605        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
16606        pub fn inactive_validators(&self) -> &super::MoveTable {
16607            self.inactive_validators
16608                .as_ref()
16609                .map(|field| field as _)
16610                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16611        }
16612        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16613        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16614            self.inactive_validators.as_mut().map(|field| field as _)
16615        }
16616        ///Returns a mutable reference to `inactive_validators`.
16617        ///If the field is unset, it is first initialized with the default value.
16618        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
16619            self.inactive_validators.get_or_insert_default()
16620        }
16621        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
16622        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
16623            self.inactive_validators.as_ref().map(|field| field as _)
16624        }
16625        ///Sets `inactive_validators` with the provided value.
16626        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
16627            self.inactive_validators = Some(field.into().into());
16628        }
16629        ///Sets `inactive_validators` with the provided value.
16630        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
16631            mut self,
16632            field: T,
16633        ) -> Self {
16634            self.set_inactive_validators(field.into());
16635            self
16636        }
16637        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
16638        pub fn validator_candidates(&self) -> &super::MoveTable {
16639            self.validator_candidates
16640                .as_ref()
16641                .map(|field| field as _)
16642                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16643        }
16644        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16645        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16646            self.validator_candidates.as_mut().map(|field| field as _)
16647        }
16648        ///Returns a mutable reference to `validator_candidates`.
16649        ///If the field is unset, it is first initialized with the default value.
16650        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
16651            self.validator_candidates.get_or_insert_default()
16652        }
16653        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
16654        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
16655            self.validator_candidates.as_ref().map(|field| field as _)
16656        }
16657        ///Sets `validator_candidates` with the provided value.
16658        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
16659            self.validator_candidates = Some(field.into().into());
16660        }
16661        ///Sets `validator_candidates` with the provided value.
16662        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
16663            mut self,
16664            field: T,
16665        ) -> Self {
16666            self.set_validator_candidates(field.into());
16667            self
16668        }
16669        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
16670        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
16671            &self.at_risk_validators
16672        }
16673        ///Returns a mutable reference to `at_risk_validators`.
16674        ///If the field is unset, it is first initialized with the default value.
16675        pub fn at_risk_validators_mut(
16676            &mut self,
16677        ) -> &mut ::std::collections::BTreeMap<String, u64> {
16678            &mut self.at_risk_validators
16679        }
16680        ///Sets `at_risk_validators` with the provided value.
16681        pub fn set_at_risk_validators(
16682            &mut self,
16683            field: ::std::collections::BTreeMap<String, u64>,
16684        ) {
16685            self.at_risk_validators = field;
16686        }
16687        ///Sets `at_risk_validators` with the provided value.
16688        pub fn with_at_risk_validators(
16689            mut self,
16690            field: ::std::collections::BTreeMap<String, u64>,
16691        ) -> Self {
16692            self.set_at_risk_validators(field);
16693            self
16694        }
16695        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16696        pub fn extra_fields(&self) -> &super::MoveTable {
16697            self.extra_fields
16698                .as_ref()
16699                .map(|field| field as _)
16700                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16701        }
16702        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16703        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16704            self.extra_fields.as_mut().map(|field| field as _)
16705        }
16706        ///Returns a mutable reference to `extra_fields`.
16707        ///If the field is unset, it is first initialized with the default value.
16708        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16709            self.extra_fields.get_or_insert_default()
16710        }
16711        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16712        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16713            self.extra_fields.as_ref().map(|field| field as _)
16714        }
16715        ///Sets `extra_fields` with the provided value.
16716        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16717            self.extra_fields = Some(field.into().into());
16718        }
16719        ///Sets `extra_fields` with the provided value.
16720        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16721            self.set_extra_fields(field.into());
16722            self
16723        }
16724    }
16725    impl super::VariantDescriptor {
16726        pub const fn const_default() -> Self {
16727            Self {
16728                name: None,
16729                position: None,
16730                fields: Vec::new(),
16731            }
16732        }
16733        #[doc(hidden)]
16734        pub fn default_instance() -> &'static Self {
16735            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
16736            &DEFAULT
16737        }
16738        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16739        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16740            self.name.as_mut().map(|field| field as _)
16741        }
16742        ///Returns a mutable reference to `name`.
16743        ///If the field is unset, it is first initialized with the default value.
16744        pub fn name_mut(&mut self) -> &mut String {
16745            self.name.get_or_insert_default()
16746        }
16747        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
16748        pub fn name_opt(&self) -> Option<&str> {
16749            self.name.as_ref().map(|field| field as _)
16750        }
16751        ///Sets `name` with the provided value.
16752        pub fn set_name<T: Into<String>>(&mut self, field: T) {
16753            self.name = Some(field.into().into());
16754        }
16755        ///Sets `name` with the provided value.
16756        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16757            self.set_name(field.into());
16758            self
16759        }
16760        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16761        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
16762            self.position.as_mut().map(|field| field as _)
16763        }
16764        ///Returns a mutable reference to `position`.
16765        ///If the field is unset, it is first initialized with the default value.
16766        pub fn position_mut(&mut self) -> &mut u32 {
16767            self.position.get_or_insert_default()
16768        }
16769        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
16770        pub fn position_opt(&self) -> Option<u32> {
16771            self.position.as_ref().map(|field| *field)
16772        }
16773        ///Sets `position` with the provided value.
16774        pub fn set_position(&mut self, field: u32) {
16775            self.position = Some(field);
16776        }
16777        ///Sets `position` with the provided value.
16778        pub fn with_position(mut self, field: u32) -> Self {
16779            self.set_position(field);
16780            self
16781        }
16782        ///Returns the value of `fields`, or the default value if `fields` is unset.
16783        pub fn fields(&self) -> &[super::FieldDescriptor] {
16784            &self.fields
16785        }
16786        ///Returns a mutable reference to `fields`.
16787        ///If the field is unset, it is first initialized with the default value.
16788        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
16789            &mut self.fields
16790        }
16791        ///Sets `fields` with the provided value.
16792        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
16793            self.fields = field;
16794        }
16795        ///Sets `fields` with the provided value.
16796        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
16797            self.set_fields(field);
16798            self
16799        }
16800    }
16801    impl super::VerifySignatureRequest {
16802        pub const fn const_default() -> Self {
16803            Self {
16804                message: None,
16805                signature: None,
16806                address: None,
16807                jwks: Vec::new(),
16808            }
16809        }
16810        #[doc(hidden)]
16811        pub fn default_instance() -> &'static Self {
16812            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
16813            &DEFAULT
16814        }
16815        ///Returns the value of `message`, or the default value if `message` is unset.
16816        pub fn message(&self) -> &super::Bcs {
16817            self.message
16818                .as_ref()
16819                .map(|field| field as _)
16820                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16821        }
16822        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16823        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16824            self.message.as_mut().map(|field| field as _)
16825        }
16826        ///Returns a mutable reference to `message`.
16827        ///If the field is unset, it is first initialized with the default value.
16828        pub fn message_mut(&mut self) -> &mut super::Bcs {
16829            self.message.get_or_insert_default()
16830        }
16831        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
16832        pub fn message_opt(&self) -> Option<&super::Bcs> {
16833            self.message.as_ref().map(|field| field as _)
16834        }
16835        ///Sets `message` with the provided value.
16836        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
16837            self.message = Some(field.into().into());
16838        }
16839        ///Sets `message` with the provided value.
16840        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16841            self.set_message(field.into());
16842            self
16843        }
16844        ///Returns the value of `signature`, or the default value if `signature` is unset.
16845        pub fn signature(&self) -> &super::UserSignature {
16846            self.signature
16847                .as_ref()
16848                .map(|field| field as _)
16849                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
16850        }
16851        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16852        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
16853            self.signature.as_mut().map(|field| field as _)
16854        }
16855        ///Returns a mutable reference to `signature`.
16856        ///If the field is unset, it is first initialized with the default value.
16857        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
16858            self.signature.get_or_insert_default()
16859        }
16860        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16861        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
16862            self.signature.as_ref().map(|field| field as _)
16863        }
16864        ///Sets `signature` with the provided value.
16865        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
16866            self.signature = Some(field.into().into());
16867        }
16868        ///Sets `signature` with the provided value.
16869        pub fn with_signature<T: Into<super::UserSignature>>(
16870            mut self,
16871            field: T,
16872        ) -> Self {
16873            self.set_signature(field.into());
16874            self
16875        }
16876        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16877        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16878            self.address.as_mut().map(|field| field as _)
16879        }
16880        ///Returns a mutable reference to `address`.
16881        ///If the field is unset, it is first initialized with the default value.
16882        pub fn address_mut(&mut self) -> &mut String {
16883            self.address.get_or_insert_default()
16884        }
16885        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16886        pub fn address_opt(&self) -> Option<&str> {
16887            self.address.as_ref().map(|field| field as _)
16888        }
16889        ///Sets `address` with the provided value.
16890        pub fn set_address<T: Into<String>>(&mut self, field: T) {
16891            self.address = Some(field.into().into());
16892        }
16893        ///Sets `address` with the provided value.
16894        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16895            self.set_address(field.into());
16896            self
16897        }
16898        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
16899        pub fn jwks(&self) -> &[super::ActiveJwk] {
16900            &self.jwks
16901        }
16902        ///Returns a mutable reference to `jwks`.
16903        ///If the field is unset, it is first initialized with the default value.
16904        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
16905            &mut self.jwks
16906        }
16907        ///Sets `jwks` with the provided value.
16908        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
16909            self.jwks = field;
16910        }
16911        ///Sets `jwks` with the provided value.
16912        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
16913            self.set_jwks(field);
16914            self
16915        }
16916    }
16917    impl super::VerifySignatureResponse {
16918        pub const fn const_default() -> Self {
16919            Self {
16920                is_valid: None,
16921                reason: None,
16922            }
16923        }
16924        #[doc(hidden)]
16925        pub fn default_instance() -> &'static Self {
16926            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
16927            &DEFAULT
16928        }
16929        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16930        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
16931            self.is_valid.as_mut().map(|field| field as _)
16932        }
16933        ///Returns a mutable reference to `is_valid`.
16934        ///If the field is unset, it is first initialized with the default value.
16935        pub fn is_valid_mut(&mut self) -> &mut bool {
16936            self.is_valid.get_or_insert_default()
16937        }
16938        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
16939        pub fn is_valid_opt(&self) -> Option<bool> {
16940            self.is_valid.as_ref().map(|field| *field)
16941        }
16942        ///Sets `is_valid` with the provided value.
16943        pub fn set_is_valid(&mut self, field: bool) {
16944            self.is_valid = Some(field);
16945        }
16946        ///Sets `is_valid` with the provided value.
16947        pub fn with_is_valid(mut self, field: bool) -> Self {
16948            self.set_is_valid(field);
16949            self
16950        }
16951        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16952        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
16953            self.reason.as_mut().map(|field| field as _)
16954        }
16955        ///Returns a mutable reference to `reason`.
16956        ///If the field is unset, it is first initialized with the default value.
16957        pub fn reason_mut(&mut self) -> &mut String {
16958            self.reason.get_or_insert_default()
16959        }
16960        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
16961        pub fn reason_opt(&self) -> Option<&str> {
16962            self.reason.as_ref().map(|field| field as _)
16963        }
16964        ///Sets `reason` with the provided value.
16965        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
16966            self.reason = Some(field.into().into());
16967        }
16968        ///Sets `reason` with the provided value.
16969        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
16970            self.set_reason(field.into());
16971            self
16972        }
16973    }
16974    impl super::VersionAssignment {
16975        pub const fn const_default() -> Self {
16976            Self {
16977                object_id: None,
16978                start_version: None,
16979                version: None,
16980            }
16981        }
16982        #[doc(hidden)]
16983        pub fn default_instance() -> &'static Self {
16984            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
16985            &DEFAULT
16986        }
16987        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16988        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
16989            self.object_id.as_mut().map(|field| field as _)
16990        }
16991        ///Returns a mutable reference to `object_id`.
16992        ///If the field is unset, it is first initialized with the default value.
16993        pub fn object_id_mut(&mut self) -> &mut String {
16994            self.object_id.get_or_insert_default()
16995        }
16996        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16997        pub fn object_id_opt(&self) -> Option<&str> {
16998            self.object_id.as_ref().map(|field| field as _)
16999        }
17000        ///Sets `object_id` with the provided value.
17001        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17002            self.object_id = Some(field.into().into());
17003        }
17004        ///Sets `object_id` with the provided value.
17005        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17006            self.set_object_id(field.into());
17007            self
17008        }
17009        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17010        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17011            self.start_version.as_mut().map(|field| field as _)
17012        }
17013        ///Returns a mutable reference to `start_version`.
17014        ///If the field is unset, it is first initialized with the default value.
17015        pub fn start_version_mut(&mut self) -> &mut u64 {
17016            self.start_version.get_or_insert_default()
17017        }
17018        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17019        pub fn start_version_opt(&self) -> Option<u64> {
17020            self.start_version.as_ref().map(|field| *field)
17021        }
17022        ///Sets `start_version` with the provided value.
17023        pub fn set_start_version(&mut self, field: u64) {
17024            self.start_version = Some(field);
17025        }
17026        ///Sets `start_version` with the provided value.
17027        pub fn with_start_version(mut self, field: u64) -> Self {
17028            self.set_start_version(field);
17029            self
17030        }
17031        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17032        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17033            self.version.as_mut().map(|field| field as _)
17034        }
17035        ///Returns a mutable reference to `version`.
17036        ///If the field is unset, it is first initialized with the default value.
17037        pub fn version_mut(&mut self) -> &mut u64 {
17038            self.version.get_or_insert_default()
17039        }
17040        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17041        pub fn version_opt(&self) -> Option<u64> {
17042            self.version.as_ref().map(|field| *field)
17043        }
17044        ///Sets `version` with the provided value.
17045        pub fn set_version(&mut self, field: u64) {
17046            self.version = Some(field);
17047        }
17048        ///Sets `version` with the provided value.
17049        pub fn with_version(mut self, field: u64) -> Self {
17050            self.set_version(field);
17051            self
17052        }
17053    }
17054    impl super::ZkLoginAuthenticator {
17055        pub const fn const_default() -> Self {
17056            Self {
17057                inputs: None,
17058                max_epoch: None,
17059                signature: None,
17060                public_identifier: None,
17061                jwk_id: None,
17062            }
17063        }
17064        #[doc(hidden)]
17065        pub fn default_instance() -> &'static Self {
17066            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17067            &DEFAULT
17068        }
17069        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17070        pub fn inputs(&self) -> &super::ZkLoginInputs {
17071            self.inputs
17072                .as_ref()
17073                .map(|field| field as _)
17074                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17075        }
17076        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17077        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17078            self.inputs.as_mut().map(|field| field as _)
17079        }
17080        ///Returns a mutable reference to `inputs`.
17081        ///If the field is unset, it is first initialized with the default value.
17082        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17083            self.inputs.get_or_insert_default()
17084        }
17085        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17086        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17087            self.inputs.as_ref().map(|field| field as _)
17088        }
17089        ///Sets `inputs` with the provided value.
17090        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17091            self.inputs = Some(field.into().into());
17092        }
17093        ///Sets `inputs` with the provided value.
17094        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17095            self.set_inputs(field.into());
17096            self
17097        }
17098        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17099        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17100            self.max_epoch.as_mut().map(|field| field as _)
17101        }
17102        ///Returns a mutable reference to `max_epoch`.
17103        ///If the field is unset, it is first initialized with the default value.
17104        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17105            self.max_epoch.get_or_insert_default()
17106        }
17107        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17108        pub fn max_epoch_opt(&self) -> Option<u64> {
17109            self.max_epoch.as_ref().map(|field| *field)
17110        }
17111        ///Sets `max_epoch` with the provided value.
17112        pub fn set_max_epoch(&mut self, field: u64) {
17113            self.max_epoch = Some(field);
17114        }
17115        ///Sets `max_epoch` with the provided value.
17116        pub fn with_max_epoch(mut self, field: u64) -> Self {
17117            self.set_max_epoch(field);
17118            self
17119        }
17120        ///Returns the value of `signature`, or the default value if `signature` is unset.
17121        pub fn signature(&self) -> &super::SimpleSignature {
17122            self.signature
17123                .as_ref()
17124                .map(|field| field as _)
17125                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17126        }
17127        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17128        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17129            self.signature.as_mut().map(|field| field as _)
17130        }
17131        ///Returns a mutable reference to `signature`.
17132        ///If the field is unset, it is first initialized with the default value.
17133        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17134            self.signature.get_or_insert_default()
17135        }
17136        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17137        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17138            self.signature.as_ref().map(|field| field as _)
17139        }
17140        ///Sets `signature` with the provided value.
17141        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17142            self.signature = Some(field.into().into());
17143        }
17144        ///Sets `signature` with the provided value.
17145        pub fn with_signature<T: Into<super::SimpleSignature>>(
17146            mut self,
17147            field: T,
17148        ) -> Self {
17149            self.set_signature(field.into());
17150            self
17151        }
17152        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17153        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17154            self.public_identifier
17155                .as_ref()
17156                .map(|field| field as _)
17157                .unwrap_or_else(|| {
17158                    super::ZkLoginPublicIdentifier::default_instance() as _
17159                })
17160        }
17161        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17162        pub fn public_identifier_opt_mut(
17163            &mut self,
17164        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17165            self.public_identifier.as_mut().map(|field| field as _)
17166        }
17167        ///Returns a mutable reference to `public_identifier`.
17168        ///If the field is unset, it is first initialized with the default value.
17169        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17170            self.public_identifier.get_or_insert_default()
17171        }
17172        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17173        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17174            self.public_identifier.as_ref().map(|field| field as _)
17175        }
17176        ///Sets `public_identifier` with the provided value.
17177        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17178            &mut self,
17179            field: T,
17180        ) {
17181            self.public_identifier = Some(field.into().into());
17182        }
17183        ///Sets `public_identifier` with the provided value.
17184        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17185            mut self,
17186            field: T,
17187        ) -> Self {
17188            self.set_public_identifier(field.into());
17189            self
17190        }
17191        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17192        pub fn jwk_id(&self) -> &super::JwkId {
17193            self.jwk_id
17194                .as_ref()
17195                .map(|field| field as _)
17196                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17197        }
17198        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17199        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17200            self.jwk_id.as_mut().map(|field| field as _)
17201        }
17202        ///Returns a mutable reference to `jwk_id`.
17203        ///If the field is unset, it is first initialized with the default value.
17204        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17205            self.jwk_id.get_or_insert_default()
17206        }
17207        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17208        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17209            self.jwk_id.as_ref().map(|field| field as _)
17210        }
17211        ///Sets `jwk_id` with the provided value.
17212        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17213            self.jwk_id = Some(field.into().into());
17214        }
17215        ///Sets `jwk_id` with the provided value.
17216        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17217            self.set_jwk_id(field.into());
17218            self
17219        }
17220    }
17221    impl super::ZkLoginClaim {
17222        pub const fn const_default() -> Self {
17223            Self {
17224                value: None,
17225                index_mod_4: None,
17226            }
17227        }
17228        #[doc(hidden)]
17229        pub fn default_instance() -> &'static Self {
17230            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17231            &DEFAULT
17232        }
17233        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17234        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17235            self.value.as_mut().map(|field| field as _)
17236        }
17237        ///Returns a mutable reference to `value`.
17238        ///If the field is unset, it is first initialized with the default value.
17239        pub fn value_mut(&mut self) -> &mut String {
17240            self.value.get_or_insert_default()
17241        }
17242        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17243        pub fn value_opt(&self) -> Option<&str> {
17244            self.value.as_ref().map(|field| field as _)
17245        }
17246        ///Sets `value` with the provided value.
17247        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17248            self.value = Some(field.into().into());
17249        }
17250        ///Sets `value` with the provided value.
17251        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17252            self.set_value(field.into());
17253            self
17254        }
17255        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17256        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17257            self.index_mod_4.as_mut().map(|field| field as _)
17258        }
17259        ///Returns a mutable reference to `index_mod_4`.
17260        ///If the field is unset, it is first initialized with the default value.
17261        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17262            self.index_mod_4.get_or_insert_default()
17263        }
17264        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17265        pub fn index_mod_4_opt(&self) -> Option<u32> {
17266            self.index_mod_4.as_ref().map(|field| *field)
17267        }
17268        ///Sets `index_mod_4` with the provided value.
17269        pub fn set_index_mod_4(&mut self, field: u32) {
17270            self.index_mod_4 = Some(field);
17271        }
17272        ///Sets `index_mod_4` with the provided value.
17273        pub fn with_index_mod_4(mut self, field: u32) -> Self {
17274            self.set_index_mod_4(field);
17275            self
17276        }
17277    }
17278    impl super::ZkLoginInputs {
17279        pub const fn const_default() -> Self {
17280            Self {
17281                proof_points: None,
17282                iss_base64_details: None,
17283                header_base64: None,
17284                address_seed: None,
17285            }
17286        }
17287        #[doc(hidden)]
17288        pub fn default_instance() -> &'static Self {
17289            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17290            &DEFAULT
17291        }
17292        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17293        pub fn proof_points(&self) -> &super::ZkLoginProof {
17294            self.proof_points
17295                .as_ref()
17296                .map(|field| field as _)
17297                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17298        }
17299        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17300        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17301            self.proof_points.as_mut().map(|field| field as _)
17302        }
17303        ///Returns a mutable reference to `proof_points`.
17304        ///If the field is unset, it is first initialized with the default value.
17305        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17306            self.proof_points.get_or_insert_default()
17307        }
17308        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17309        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17310            self.proof_points.as_ref().map(|field| field as _)
17311        }
17312        ///Sets `proof_points` with the provided value.
17313        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17314            self.proof_points = Some(field.into().into());
17315        }
17316        ///Sets `proof_points` with the provided value.
17317        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17318            mut self,
17319            field: T,
17320        ) -> Self {
17321            self.set_proof_points(field.into());
17322            self
17323        }
17324        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17325        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17326            self.iss_base64_details
17327                .as_ref()
17328                .map(|field| field as _)
17329                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17330        }
17331        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17332        pub fn iss_base64_details_opt_mut(
17333            &mut self,
17334        ) -> Option<&mut super::ZkLoginClaim> {
17335            self.iss_base64_details.as_mut().map(|field| field as _)
17336        }
17337        ///Returns a mutable reference to `iss_base64_details`.
17338        ///If the field is unset, it is first initialized with the default value.
17339        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17340            self.iss_base64_details.get_or_insert_default()
17341        }
17342        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17343        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17344            self.iss_base64_details.as_ref().map(|field| field as _)
17345        }
17346        ///Sets `iss_base64_details` with the provided value.
17347        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17348            &mut self,
17349            field: T,
17350        ) {
17351            self.iss_base64_details = Some(field.into().into());
17352        }
17353        ///Sets `iss_base64_details` with the provided value.
17354        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17355            mut self,
17356            field: T,
17357        ) -> Self {
17358            self.set_iss_base64_details(field.into());
17359            self
17360        }
17361        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17362        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17363            self.header_base64.as_mut().map(|field| field as _)
17364        }
17365        ///Returns a mutable reference to `header_base64`.
17366        ///If the field is unset, it is first initialized with the default value.
17367        pub fn header_base64_mut(&mut self) -> &mut String {
17368            self.header_base64.get_or_insert_default()
17369        }
17370        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
17371        pub fn header_base64_opt(&self) -> Option<&str> {
17372            self.header_base64.as_ref().map(|field| field as _)
17373        }
17374        ///Sets `header_base64` with the provided value.
17375        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17376            self.header_base64 = Some(field.into().into());
17377        }
17378        ///Sets `header_base64` with the provided value.
17379        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17380            self.set_header_base64(field.into());
17381            self
17382        }
17383        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17384        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17385            self.address_seed.as_mut().map(|field| field as _)
17386        }
17387        ///Returns a mutable reference to `address_seed`.
17388        ///If the field is unset, it is first initialized with the default value.
17389        pub fn address_seed_mut(&mut self) -> &mut String {
17390            self.address_seed.get_or_insert_default()
17391        }
17392        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17393        pub fn address_seed_opt(&self) -> Option<&str> {
17394            self.address_seed.as_ref().map(|field| field as _)
17395        }
17396        ///Sets `address_seed` with the provided value.
17397        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17398            self.address_seed = Some(field.into().into());
17399        }
17400        ///Sets `address_seed` with the provided value.
17401        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17402            self.set_address_seed(field.into());
17403            self
17404        }
17405    }
17406    impl super::ZkLoginProof {
17407        pub const fn const_default() -> Self {
17408            Self { a: None, b: None, c: None }
17409        }
17410        #[doc(hidden)]
17411        pub fn default_instance() -> &'static Self {
17412            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17413            &DEFAULT
17414        }
17415        ///Returns the value of `a`, or the default value if `a` is unset.
17416        pub fn a(&self) -> &super::CircomG1 {
17417            self.a
17418                .as_ref()
17419                .map(|field| field as _)
17420                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17421        }
17422        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17423        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17424            self.a.as_mut().map(|field| field as _)
17425        }
17426        ///Returns a mutable reference to `a`.
17427        ///If the field is unset, it is first initialized with the default value.
17428        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17429            self.a.get_or_insert_default()
17430        }
17431        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
17432        pub fn a_opt(&self) -> Option<&super::CircomG1> {
17433            self.a.as_ref().map(|field| field as _)
17434        }
17435        ///Sets `a` with the provided value.
17436        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17437            self.a = Some(field.into().into());
17438        }
17439        ///Sets `a` with the provided value.
17440        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17441            self.set_a(field.into());
17442            self
17443        }
17444        ///Returns the value of `b`, or the default value if `b` is unset.
17445        pub fn b(&self) -> &super::CircomG2 {
17446            self.b
17447                .as_ref()
17448                .map(|field| field as _)
17449                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17450        }
17451        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17452        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17453            self.b.as_mut().map(|field| field as _)
17454        }
17455        ///Returns a mutable reference to `b`.
17456        ///If the field is unset, it is first initialized with the default value.
17457        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17458            self.b.get_or_insert_default()
17459        }
17460        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
17461        pub fn b_opt(&self) -> Option<&super::CircomG2> {
17462            self.b.as_ref().map(|field| field as _)
17463        }
17464        ///Sets `b` with the provided value.
17465        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17466            self.b = Some(field.into().into());
17467        }
17468        ///Sets `b` with the provided value.
17469        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17470            self.set_b(field.into());
17471            self
17472        }
17473        ///Returns the value of `c`, or the default value if `c` is unset.
17474        pub fn c(&self) -> &super::CircomG1 {
17475            self.c
17476                .as_ref()
17477                .map(|field| field as _)
17478                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17479        }
17480        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17481        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17482            self.c.as_mut().map(|field| field as _)
17483        }
17484        ///Returns a mutable reference to `c`.
17485        ///If the field is unset, it is first initialized with the default value.
17486        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17487            self.c.get_or_insert_default()
17488        }
17489        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
17490        pub fn c_opt(&self) -> Option<&super::CircomG1> {
17491            self.c.as_ref().map(|field| field as _)
17492        }
17493        ///Sets `c` with the provided value.
17494        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17495            self.c = Some(field.into().into());
17496        }
17497        ///Sets `c` with the provided value.
17498        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17499            self.set_c(field.into());
17500            self
17501        }
17502    }
17503    impl super::ZkLoginPublicIdentifier {
17504        pub const fn const_default() -> Self {
17505            Self {
17506                iss: None,
17507                address_seed: None,
17508            }
17509        }
17510        #[doc(hidden)]
17511        pub fn default_instance() -> &'static Self {
17512            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17513            &DEFAULT
17514        }
17515        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17516        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17517            self.iss.as_mut().map(|field| field as _)
17518        }
17519        ///Returns a mutable reference to `iss`.
17520        ///If the field is unset, it is first initialized with the default value.
17521        pub fn iss_mut(&mut self) -> &mut String {
17522            self.iss.get_or_insert_default()
17523        }
17524        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
17525        pub fn iss_opt(&self) -> Option<&str> {
17526            self.iss.as_ref().map(|field| field as _)
17527        }
17528        ///Sets `iss` with the provided value.
17529        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17530            self.iss = Some(field.into().into());
17531        }
17532        ///Sets `iss` with the provided value.
17533        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17534            self.set_iss(field.into());
17535            self
17536        }
17537        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17538        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17539            self.address_seed.as_mut().map(|field| field as _)
17540        }
17541        ///Returns a mutable reference to `address_seed`.
17542        ///If the field is unset, it is first initialized with the default value.
17543        pub fn address_seed_mut(&mut self) -> &mut String {
17544            self.address_seed.get_or_insert_default()
17545        }
17546        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17547        pub fn address_seed_opt(&self) -> Option<&str> {
17548            self.address_seed.as_ref().map(|field| field as _)
17549        }
17550        ///Sets `address_seed` with the provided value.
17551        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17552            self.address_seed = Some(field.into().into());
17553        }
17554        ///Sets `address_seed` with the provided value.
17555        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17556            self.set_address_seed(field.into());
17557            self
17558        }
17559    }
17560}