sui_rpc_store/proto/generated/
sui.rpc_store.v1alpha.accessors.rs

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::BalanceDelta {
4        pub const fn const_default() -> Self {
5            Self {
6                coin: ::prost::bytes::Bytes::new(),
7                address: ::prost::bytes::Bytes::new(),
8            }
9        }
10        #[doc(hidden)]
11        pub fn default_instance() -> &'static Self {
12            static DEFAULT: super::BalanceDelta = super::BalanceDelta::const_default();
13            &DEFAULT
14        }
15        ///Sets `coin` with the provided value.
16        pub fn set_coin<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17            self.coin = field.into().into();
18        }
19        ///Sets `coin` with the provided value.
20        pub fn with_coin<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
21            self.set_coin(field.into());
22            self
23        }
24        ///Sets `address` with the provided value.
25        pub fn set_address<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
26            self.address = field.into().into();
27        }
28        ///Sets `address` with the provided value.
29        pub fn with_address<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
30            self.set_address(field.into());
31            self
32        }
33    }
34    impl super::BitmapBlob {
35        pub const fn const_default() -> Self {
36            Self {
37                data: ::prost::bytes::Bytes::new(),
38            }
39        }
40        #[doc(hidden)]
41        pub fn default_instance() -> &'static Self {
42            static DEFAULT: super::BitmapBlob = super::BitmapBlob::const_default();
43            &DEFAULT
44        }
45        ///Sets `data` with the provided value.
46        pub fn set_data<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
47            self.data = field.into().into();
48        }
49        ///Sets `data` with the provided value.
50        pub fn with_data<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
51            self.set_data(field.into());
52            self
53        }
54    }
55    impl super::ObjectVersionInfo {
56        pub const fn const_default() -> Self {
57            Self {
58                version: 0,
59                from_restore: None,
60            }
61        }
62        #[doc(hidden)]
63        pub fn default_instance() -> &'static Self {
64            static DEFAULT: super::ObjectVersionInfo = super::ObjectVersionInfo::const_default();
65            &DEFAULT
66        }
67        ///Returns a mutable reference to `version`.
68        ///If the field is unset, it is first initialized with the default value.
69        pub fn version_mut(&mut self) -> &mut u64 {
70            &mut self.version
71        }
72        ///Sets `version` with the provided value.
73        pub fn set_version(&mut self, field: u64) {
74            self.version = field;
75        }
76        ///Sets `version` with the provided value.
77        pub fn with_version(mut self, field: u64) -> Self {
78            self.set_version(field);
79            self
80        }
81        ///If `from_restore` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
82        pub fn from_restore_opt_mut(&mut self) -> Option<&mut bool> {
83            self.from_restore.as_mut().map(|field| field as _)
84        }
85        ///Returns a mutable reference to `from_restore`.
86        ///If the field is unset, it is first initialized with the default value.
87        pub fn from_restore_mut(&mut self) -> &mut bool {
88            self.from_restore.get_or_insert_default()
89        }
90        ///If `from_restore` is set, returns [`Some`] with the value; otherwise returns [`None`].
91        pub fn from_restore_opt(&self) -> Option<bool> {
92            self.from_restore.as_ref().map(|field| *field)
93        }
94        ///Sets `from_restore` with the provided value.
95        pub fn set_from_restore(&mut self, field: bool) {
96            self.from_restore = Some(field);
97        }
98        ///Sets `from_restore` with the provided value.
99        pub fn with_from_restore(mut self, field: bool) -> Self {
100            self.set_from_restore(field);
101            self
102        }
103    }
104    impl super::PackageVersionInfo {
105        pub const fn const_default() -> Self {
106            Self {
107                storage_id: ::prost::bytes::Bytes::new(),
108                checkpoint: None,
109            }
110        }
111        #[doc(hidden)]
112        pub fn default_instance() -> &'static Self {
113            static DEFAULT: super::PackageVersionInfo = super::PackageVersionInfo::const_default();
114            &DEFAULT
115        }
116        ///Sets `storage_id` with the provided value.
117        pub fn set_storage_id<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
118            self.storage_id = field.into().into();
119        }
120        ///Sets `storage_id` with the provided value.
121        pub fn with_storage_id<T: Into<::prost::bytes::Bytes>>(
122            mut self,
123            field: T,
124        ) -> Self {
125            self.set_storage_id(field.into());
126            self
127        }
128        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
129        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
130            self.checkpoint.as_mut().map(|field| field as _)
131        }
132        ///Returns a mutable reference to `checkpoint`.
133        ///If the field is unset, it is first initialized with the default value.
134        pub fn checkpoint_mut(&mut self) -> &mut u64 {
135            self.checkpoint.get_or_insert_default()
136        }
137        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
138        pub fn checkpoint_opt(&self) -> Option<u64> {
139            self.checkpoint.as_ref().map(|field| *field)
140        }
141        ///Sets `checkpoint` with the provided value.
142        pub fn set_checkpoint(&mut self, field: u64) {
143            self.checkpoint = Some(field);
144        }
145        ///Sets `checkpoint` with the provided value.
146        pub fn with_checkpoint(mut self, field: u64) -> Self {
147            self.set_checkpoint(field);
148            self
149        }
150    }
151    impl super::PruningWatermarks {
152        pub const fn const_default() -> Self {
153            Self {
154                tx_seq_lo: 0,
155                checkpoint_lo: 0,
156            }
157        }
158        #[doc(hidden)]
159        pub fn default_instance() -> &'static Self {
160            static DEFAULT: super::PruningWatermarks = super::PruningWatermarks::const_default();
161            &DEFAULT
162        }
163        ///Returns a mutable reference to `tx_seq_lo`.
164        ///If the field is unset, it is first initialized with the default value.
165        pub fn tx_seq_lo_mut(&mut self) -> &mut u64 {
166            &mut self.tx_seq_lo
167        }
168        ///Sets `tx_seq_lo` with the provided value.
169        pub fn set_tx_seq_lo(&mut self, field: u64) {
170            self.tx_seq_lo = field;
171        }
172        ///Sets `tx_seq_lo` with the provided value.
173        pub fn with_tx_seq_lo(mut self, field: u64) -> Self {
174            self.set_tx_seq_lo(field);
175            self
176        }
177        ///Returns a mutable reference to `checkpoint_lo`.
178        ///If the field is unset, it is first initialized with the default value.
179        pub fn checkpoint_lo_mut(&mut self) -> &mut u64 {
180            &mut self.checkpoint_lo
181        }
182        ///Sets `checkpoint_lo` with the provided value.
183        pub fn set_checkpoint_lo(&mut self, field: u64) {
184            self.checkpoint_lo = field;
185        }
186        ///Sets `checkpoint_lo` with the provided value.
187        pub fn with_checkpoint_lo(mut self, field: u64) -> Self {
188            self.set_checkpoint_lo(field);
189            self
190        }
191    }
192    impl super::StoredCheckpointContents {
193        pub const fn const_default() -> Self {
194            Self {
195                bcs: ::prost::bytes::Bytes::new(),
196            }
197        }
198        #[doc(hidden)]
199        pub fn default_instance() -> &'static Self {
200            static DEFAULT: super::StoredCheckpointContents = super::StoredCheckpointContents::const_default();
201            &DEFAULT
202        }
203        ///Sets `bcs` with the provided value.
204        pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
205            self.bcs = field.into().into();
206        }
207        ///Sets `bcs` with the provided value.
208        pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
209            self.set_bcs(field.into());
210            self
211        }
212    }
213    impl super::StoredCheckpointSummary {
214        pub const fn const_default() -> Self {
215            Self {
216                summary_bcs: ::prost::bytes::Bytes::new(),
217                signature_bcs: ::prost::bytes::Bytes::new(),
218            }
219        }
220        #[doc(hidden)]
221        pub fn default_instance() -> &'static Self {
222            static DEFAULT: super::StoredCheckpointSummary = super::StoredCheckpointSummary::const_default();
223            &DEFAULT
224        }
225        ///Sets `summary_bcs` with the provided value.
226        pub fn set_summary_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
227            self.summary_bcs = field.into().into();
228        }
229        ///Sets `summary_bcs` with the provided value.
230        pub fn with_summary_bcs<T: Into<::prost::bytes::Bytes>>(
231            mut self,
232            field: T,
233        ) -> Self {
234            self.set_summary_bcs(field.into());
235            self
236        }
237        ///Sets `signature_bcs` with the provided value.
238        pub fn set_signature_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
239            self.signature_bcs = field.into().into();
240        }
241        ///Sets `signature_bcs` with the provided value.
242        pub fn with_signature_bcs<T: Into<::prost::bytes::Bytes>>(
243            mut self,
244            field: T,
245        ) -> Self {
246            self.set_signature_bcs(field.into());
247            self
248        }
249    }
250    impl super::StoredEffects {
251        pub const fn const_default() -> Self {
252            Self {
253                bcs: ::prost::bytes::Bytes::new(),
254                unchanged_loaded_bcs: ::prost::bytes::Bytes::new(),
255            }
256        }
257        #[doc(hidden)]
258        pub fn default_instance() -> &'static Self {
259            static DEFAULT: super::StoredEffects = super::StoredEffects::const_default();
260            &DEFAULT
261        }
262        ///Sets `bcs` with the provided value.
263        pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
264            self.bcs = field.into().into();
265        }
266        ///Sets `bcs` with the provided value.
267        pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
268            self.set_bcs(field.into());
269            self
270        }
271        ///Sets `unchanged_loaded_bcs` with the provided value.
272        pub fn set_unchanged_loaded_bcs<T: Into<::prost::bytes::Bytes>>(
273            &mut self,
274            field: T,
275        ) {
276            self.unchanged_loaded_bcs = field.into().into();
277        }
278        ///Sets `unchanged_loaded_bcs` with the provided value.
279        pub fn with_unchanged_loaded_bcs<T: Into<::prost::bytes::Bytes>>(
280            mut self,
281            field: T,
282        ) -> Self {
283            self.set_unchanged_loaded_bcs(field.into());
284            self
285        }
286    }
287    impl super::StoredEpoch {
288        pub const fn const_default() -> Self {
289            Self {
290                protocol_version: None,
291                reference_gas_price: None,
292                start_timestamp_ms: None,
293                end_timestamp_ms: None,
294                start_checkpoint: None,
295                end_checkpoint: None,
296                system_state_bcs: None,
297                tx_hi: None,
298                safe_mode: None,
299                total_stake: None,
300                storage_fund_balance: None,
301                storage_fund_reinvestment: None,
302                storage_charge: None,
303                storage_rebate: None,
304                stake_subsidy_amount: None,
305                total_gas_fees: None,
306                total_stake_rewards_distributed: None,
307                leftover_storage_fund_inflow: None,
308                epoch_commitments: None,
309            }
310        }
311        #[doc(hidden)]
312        pub fn default_instance() -> &'static Self {
313            static DEFAULT: super::StoredEpoch = super::StoredEpoch::const_default();
314            &DEFAULT
315        }
316        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
317        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
318            self.protocol_version.as_mut().map(|field| field as _)
319        }
320        ///Returns a mutable reference to `protocol_version`.
321        ///If the field is unset, it is first initialized with the default value.
322        pub fn protocol_version_mut(&mut self) -> &mut u64 {
323            self.protocol_version.get_or_insert_default()
324        }
325        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
326        pub fn protocol_version_opt(&self) -> Option<u64> {
327            self.protocol_version.as_ref().map(|field| *field)
328        }
329        ///Sets `protocol_version` with the provided value.
330        pub fn set_protocol_version(&mut self, field: u64) {
331            self.protocol_version = Some(field);
332        }
333        ///Sets `protocol_version` with the provided value.
334        pub fn with_protocol_version(mut self, field: u64) -> Self {
335            self.set_protocol_version(field);
336            self
337        }
338        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
339        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
340            self.reference_gas_price.as_mut().map(|field| field as _)
341        }
342        ///Returns a mutable reference to `reference_gas_price`.
343        ///If the field is unset, it is first initialized with the default value.
344        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
345            self.reference_gas_price.get_or_insert_default()
346        }
347        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
348        pub fn reference_gas_price_opt(&self) -> Option<u64> {
349            self.reference_gas_price.as_ref().map(|field| *field)
350        }
351        ///Sets `reference_gas_price` with the provided value.
352        pub fn set_reference_gas_price(&mut self, field: u64) {
353            self.reference_gas_price = Some(field);
354        }
355        ///Sets `reference_gas_price` with the provided value.
356        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
357            self.set_reference_gas_price(field);
358            self
359        }
360        ///If `start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
361        pub fn start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
362            self.start_timestamp_ms.as_mut().map(|field| field as _)
363        }
364        ///Returns a mutable reference to `start_timestamp_ms`.
365        ///If the field is unset, it is first initialized with the default value.
366        pub fn start_timestamp_ms_mut(&mut self) -> &mut u64 {
367            self.start_timestamp_ms.get_or_insert_default()
368        }
369        ///If `start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
370        pub fn start_timestamp_ms_opt(&self) -> Option<u64> {
371            self.start_timestamp_ms.as_ref().map(|field| *field)
372        }
373        ///Sets `start_timestamp_ms` with the provided value.
374        pub fn set_start_timestamp_ms(&mut self, field: u64) {
375            self.start_timestamp_ms = Some(field);
376        }
377        ///Sets `start_timestamp_ms` with the provided value.
378        pub fn with_start_timestamp_ms(mut self, field: u64) -> Self {
379            self.set_start_timestamp_ms(field);
380            self
381        }
382        ///If `end_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
383        pub fn end_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
384            self.end_timestamp_ms.as_mut().map(|field| field as _)
385        }
386        ///Returns a mutable reference to `end_timestamp_ms`.
387        ///If the field is unset, it is first initialized with the default value.
388        pub fn end_timestamp_ms_mut(&mut self) -> &mut u64 {
389            self.end_timestamp_ms.get_or_insert_default()
390        }
391        ///If `end_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
392        pub fn end_timestamp_ms_opt(&self) -> Option<u64> {
393            self.end_timestamp_ms.as_ref().map(|field| *field)
394        }
395        ///Sets `end_timestamp_ms` with the provided value.
396        pub fn set_end_timestamp_ms(&mut self, field: u64) {
397            self.end_timestamp_ms = Some(field);
398        }
399        ///Sets `end_timestamp_ms` with the provided value.
400        pub fn with_end_timestamp_ms(mut self, field: u64) -> Self {
401            self.set_end_timestamp_ms(field);
402            self
403        }
404        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
405        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
406            self.start_checkpoint.as_mut().map(|field| field as _)
407        }
408        ///Returns a mutable reference to `start_checkpoint`.
409        ///If the field is unset, it is first initialized with the default value.
410        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
411            self.start_checkpoint.get_or_insert_default()
412        }
413        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
414        pub fn start_checkpoint_opt(&self) -> Option<u64> {
415            self.start_checkpoint.as_ref().map(|field| *field)
416        }
417        ///Sets `start_checkpoint` with the provided value.
418        pub fn set_start_checkpoint(&mut self, field: u64) {
419            self.start_checkpoint = Some(field);
420        }
421        ///Sets `start_checkpoint` with the provided value.
422        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
423            self.set_start_checkpoint(field);
424            self
425        }
426        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
427        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
428            self.end_checkpoint.as_mut().map(|field| field as _)
429        }
430        ///Returns a mutable reference to `end_checkpoint`.
431        ///If the field is unset, it is first initialized with the default value.
432        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
433            self.end_checkpoint.get_or_insert_default()
434        }
435        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
436        pub fn end_checkpoint_opt(&self) -> Option<u64> {
437            self.end_checkpoint.as_ref().map(|field| *field)
438        }
439        ///Sets `end_checkpoint` with the provided value.
440        pub fn set_end_checkpoint(&mut self, field: u64) {
441            self.end_checkpoint = Some(field);
442        }
443        ///Sets `end_checkpoint` with the provided value.
444        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
445            self.set_end_checkpoint(field);
446            self
447        }
448        ///If `system_state_bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
449        pub fn system_state_bcs_opt(&self) -> Option<&[u8]> {
450            self.system_state_bcs.as_ref().map(|field| field as _)
451        }
452        ///Sets `system_state_bcs` with the provided value.
453        pub fn set_system_state_bcs<T: Into<::prost::bytes::Bytes>>(
454            &mut self,
455            field: T,
456        ) {
457            self.system_state_bcs = Some(field.into().into());
458        }
459        ///Sets `system_state_bcs` with the provided value.
460        pub fn with_system_state_bcs<T: Into<::prost::bytes::Bytes>>(
461            mut self,
462            field: T,
463        ) -> Self {
464            self.set_system_state_bcs(field.into());
465            self
466        }
467        ///If `tx_hi` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
468        pub fn tx_hi_opt_mut(&mut self) -> Option<&mut u64> {
469            self.tx_hi.as_mut().map(|field| field as _)
470        }
471        ///Returns a mutable reference to `tx_hi`.
472        ///If the field is unset, it is first initialized with the default value.
473        pub fn tx_hi_mut(&mut self) -> &mut u64 {
474            self.tx_hi.get_or_insert_default()
475        }
476        ///If `tx_hi` is set, returns [`Some`] with the value; otherwise returns [`None`].
477        pub fn tx_hi_opt(&self) -> Option<u64> {
478            self.tx_hi.as_ref().map(|field| *field)
479        }
480        ///Sets `tx_hi` with the provided value.
481        pub fn set_tx_hi(&mut self, field: u64) {
482            self.tx_hi = Some(field);
483        }
484        ///Sets `tx_hi` with the provided value.
485        pub fn with_tx_hi(mut self, field: u64) -> Self {
486            self.set_tx_hi(field);
487            self
488        }
489        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
490        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
491            self.safe_mode.as_mut().map(|field| field as _)
492        }
493        ///Returns a mutable reference to `safe_mode`.
494        ///If the field is unset, it is first initialized with the default value.
495        pub fn safe_mode_mut(&mut self) -> &mut bool {
496            self.safe_mode.get_or_insert_default()
497        }
498        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
499        pub fn safe_mode_opt(&self) -> Option<bool> {
500            self.safe_mode.as_ref().map(|field| *field)
501        }
502        ///Sets `safe_mode` with the provided value.
503        pub fn set_safe_mode(&mut self, field: bool) {
504            self.safe_mode = Some(field);
505        }
506        ///Sets `safe_mode` with the provided value.
507        pub fn with_safe_mode(mut self, field: bool) -> Self {
508            self.set_safe_mode(field);
509            self
510        }
511        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
512        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
513            self.total_stake.as_mut().map(|field| field as _)
514        }
515        ///Returns a mutable reference to `total_stake`.
516        ///If the field is unset, it is first initialized with the default value.
517        pub fn total_stake_mut(&mut self) -> &mut u64 {
518            self.total_stake.get_or_insert_default()
519        }
520        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
521        pub fn total_stake_opt(&self) -> Option<u64> {
522            self.total_stake.as_ref().map(|field| *field)
523        }
524        ///Sets `total_stake` with the provided value.
525        pub fn set_total_stake(&mut self, field: u64) {
526            self.total_stake = Some(field);
527        }
528        ///Sets `total_stake` with the provided value.
529        pub fn with_total_stake(mut self, field: u64) -> Self {
530            self.set_total_stake(field);
531            self
532        }
533        ///If `storage_fund_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
534        pub fn storage_fund_balance_opt_mut(&mut self) -> Option<&mut u64> {
535            self.storage_fund_balance.as_mut().map(|field| field as _)
536        }
537        ///Returns a mutable reference to `storage_fund_balance`.
538        ///If the field is unset, it is first initialized with the default value.
539        pub fn storage_fund_balance_mut(&mut self) -> &mut u64 {
540            self.storage_fund_balance.get_or_insert_default()
541        }
542        ///If `storage_fund_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
543        pub fn storage_fund_balance_opt(&self) -> Option<u64> {
544            self.storage_fund_balance.as_ref().map(|field| *field)
545        }
546        ///Sets `storage_fund_balance` with the provided value.
547        pub fn set_storage_fund_balance(&mut self, field: u64) {
548            self.storage_fund_balance = Some(field);
549        }
550        ///Sets `storage_fund_balance` with the provided value.
551        pub fn with_storage_fund_balance(mut self, field: u64) -> Self {
552            self.set_storage_fund_balance(field);
553            self
554        }
555        ///If `storage_fund_reinvestment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
556        pub fn storage_fund_reinvestment_opt_mut(&mut self) -> Option<&mut u64> {
557            self.storage_fund_reinvestment.as_mut().map(|field| field as _)
558        }
559        ///Returns a mutable reference to `storage_fund_reinvestment`.
560        ///If the field is unset, it is first initialized with the default value.
561        pub fn storage_fund_reinvestment_mut(&mut self) -> &mut u64 {
562            self.storage_fund_reinvestment.get_or_insert_default()
563        }
564        ///If `storage_fund_reinvestment` is set, returns [`Some`] with the value; otherwise returns [`None`].
565        pub fn storage_fund_reinvestment_opt(&self) -> Option<u64> {
566            self.storage_fund_reinvestment.as_ref().map(|field| *field)
567        }
568        ///Sets `storage_fund_reinvestment` with the provided value.
569        pub fn set_storage_fund_reinvestment(&mut self, field: u64) {
570            self.storage_fund_reinvestment = Some(field);
571        }
572        ///Sets `storage_fund_reinvestment` with the provided value.
573        pub fn with_storage_fund_reinvestment(mut self, field: u64) -> Self {
574            self.set_storage_fund_reinvestment(field);
575            self
576        }
577        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
578        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
579            self.storage_charge.as_mut().map(|field| field as _)
580        }
581        ///Returns a mutable reference to `storage_charge`.
582        ///If the field is unset, it is first initialized with the default value.
583        pub fn storage_charge_mut(&mut self) -> &mut u64 {
584            self.storage_charge.get_or_insert_default()
585        }
586        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
587        pub fn storage_charge_opt(&self) -> Option<u64> {
588            self.storage_charge.as_ref().map(|field| *field)
589        }
590        ///Sets `storage_charge` with the provided value.
591        pub fn set_storage_charge(&mut self, field: u64) {
592            self.storage_charge = Some(field);
593        }
594        ///Sets `storage_charge` with the provided value.
595        pub fn with_storage_charge(mut self, field: u64) -> Self {
596            self.set_storage_charge(field);
597            self
598        }
599        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
600        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
601            self.storage_rebate.as_mut().map(|field| field as _)
602        }
603        ///Returns a mutable reference to `storage_rebate`.
604        ///If the field is unset, it is first initialized with the default value.
605        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
606            self.storage_rebate.get_or_insert_default()
607        }
608        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
609        pub fn storage_rebate_opt(&self) -> Option<u64> {
610            self.storage_rebate.as_ref().map(|field| *field)
611        }
612        ///Sets `storage_rebate` with the provided value.
613        pub fn set_storage_rebate(&mut self, field: u64) {
614            self.storage_rebate = Some(field);
615        }
616        ///Sets `storage_rebate` with the provided value.
617        pub fn with_storage_rebate(mut self, field: u64) -> Self {
618            self.set_storage_rebate(field);
619            self
620        }
621        ///If `stake_subsidy_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
622        pub fn stake_subsidy_amount_opt_mut(&mut self) -> Option<&mut u64> {
623            self.stake_subsidy_amount.as_mut().map(|field| field as _)
624        }
625        ///Returns a mutable reference to `stake_subsidy_amount`.
626        ///If the field is unset, it is first initialized with the default value.
627        pub fn stake_subsidy_amount_mut(&mut self) -> &mut u64 {
628            self.stake_subsidy_amount.get_or_insert_default()
629        }
630        ///If `stake_subsidy_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
631        pub fn stake_subsidy_amount_opt(&self) -> Option<u64> {
632            self.stake_subsidy_amount.as_ref().map(|field| *field)
633        }
634        ///Sets `stake_subsidy_amount` with the provided value.
635        pub fn set_stake_subsidy_amount(&mut self, field: u64) {
636            self.stake_subsidy_amount = Some(field);
637        }
638        ///Sets `stake_subsidy_amount` with the provided value.
639        pub fn with_stake_subsidy_amount(mut self, field: u64) -> Self {
640            self.set_stake_subsidy_amount(field);
641            self
642        }
643        ///If `total_gas_fees` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
644        pub fn total_gas_fees_opt_mut(&mut self) -> Option<&mut u64> {
645            self.total_gas_fees.as_mut().map(|field| field as _)
646        }
647        ///Returns a mutable reference to `total_gas_fees`.
648        ///If the field is unset, it is first initialized with the default value.
649        pub fn total_gas_fees_mut(&mut self) -> &mut u64 {
650            self.total_gas_fees.get_or_insert_default()
651        }
652        ///If `total_gas_fees` is set, returns [`Some`] with the value; otherwise returns [`None`].
653        pub fn total_gas_fees_opt(&self) -> Option<u64> {
654            self.total_gas_fees.as_ref().map(|field| *field)
655        }
656        ///Sets `total_gas_fees` with the provided value.
657        pub fn set_total_gas_fees(&mut self, field: u64) {
658            self.total_gas_fees = Some(field);
659        }
660        ///Sets `total_gas_fees` with the provided value.
661        pub fn with_total_gas_fees(mut self, field: u64) -> Self {
662            self.set_total_gas_fees(field);
663            self
664        }
665        ///If `total_stake_rewards_distributed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
666        pub fn total_stake_rewards_distributed_opt_mut(&mut self) -> Option<&mut u64> {
667            self.total_stake_rewards_distributed.as_mut().map(|field| field as _)
668        }
669        ///Returns a mutable reference to `total_stake_rewards_distributed`.
670        ///If the field is unset, it is first initialized with the default value.
671        pub fn total_stake_rewards_distributed_mut(&mut self) -> &mut u64 {
672            self.total_stake_rewards_distributed.get_or_insert_default()
673        }
674        ///If `total_stake_rewards_distributed` is set, returns [`Some`] with the value; otherwise returns [`None`].
675        pub fn total_stake_rewards_distributed_opt(&self) -> Option<u64> {
676            self.total_stake_rewards_distributed.as_ref().map(|field| *field)
677        }
678        ///Sets `total_stake_rewards_distributed` with the provided value.
679        pub fn set_total_stake_rewards_distributed(&mut self, field: u64) {
680            self.total_stake_rewards_distributed = Some(field);
681        }
682        ///Sets `total_stake_rewards_distributed` with the provided value.
683        pub fn with_total_stake_rewards_distributed(mut self, field: u64) -> Self {
684            self.set_total_stake_rewards_distributed(field);
685            self
686        }
687        ///If `leftover_storage_fund_inflow` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
688        pub fn leftover_storage_fund_inflow_opt_mut(&mut self) -> Option<&mut u64> {
689            self.leftover_storage_fund_inflow.as_mut().map(|field| field as _)
690        }
691        ///Returns a mutable reference to `leftover_storage_fund_inflow`.
692        ///If the field is unset, it is first initialized with the default value.
693        pub fn leftover_storage_fund_inflow_mut(&mut self) -> &mut u64 {
694            self.leftover_storage_fund_inflow.get_or_insert_default()
695        }
696        ///If `leftover_storage_fund_inflow` is set, returns [`Some`] with the value; otherwise returns [`None`].
697        pub fn leftover_storage_fund_inflow_opt(&self) -> Option<u64> {
698            self.leftover_storage_fund_inflow.as_ref().map(|field| *field)
699        }
700        ///Sets `leftover_storage_fund_inflow` with the provided value.
701        pub fn set_leftover_storage_fund_inflow(&mut self, field: u64) {
702            self.leftover_storage_fund_inflow = Some(field);
703        }
704        ///Sets `leftover_storage_fund_inflow` with the provided value.
705        pub fn with_leftover_storage_fund_inflow(mut self, field: u64) -> Self {
706            self.set_leftover_storage_fund_inflow(field);
707            self
708        }
709        ///If `epoch_commitments` is set, returns [`Some`] with the value; otherwise returns [`None`].
710        pub fn epoch_commitments_opt(&self) -> Option<&[u8]> {
711            self.epoch_commitments.as_ref().map(|field| field as _)
712        }
713        ///Sets `epoch_commitments` with the provided value.
714        pub fn set_epoch_commitments<T: Into<::prost::bytes::Bytes>>(
715            &mut self,
716            field: T,
717        ) {
718            self.epoch_commitments = Some(field.into().into());
719        }
720        ///Sets `epoch_commitments` with the provided value.
721        pub fn with_epoch_commitments<T: Into<::prost::bytes::Bytes>>(
722            mut self,
723            field: T,
724        ) -> Self {
725            self.set_epoch_commitments(field.into());
726            self
727        }
728    }
729    impl super::StoredEvents {
730        pub const fn const_default() -> Self {
731            Self {
732                bcs: ::prost::bytes::Bytes::new(),
733            }
734        }
735        #[doc(hidden)]
736        pub fn default_instance() -> &'static Self {
737            static DEFAULT: super::StoredEvents = super::StoredEvents::const_default();
738            &DEFAULT
739        }
740        ///Sets `bcs` with the provided value.
741        pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
742            self.bcs = field.into().into();
743        }
744        ///Sets `bcs` with the provided value.
745        pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
746            self.set_bcs(field.into());
747            self
748        }
749    }
750    impl super::StoredObject {
751        pub const fn const_default() -> Self {
752            Self { kind: None }
753        }
754        #[doc(hidden)]
755        pub fn default_instance() -> &'static Self {
756            static DEFAULT: super::StoredObject = super::StoredObject::const_default();
757            &DEFAULT
758        }
759        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
760        pub fn bcs(&self) -> &[u8] {
761            if let Some(super::stored_object::Kind::Bcs(field)) = &self.kind {
762                field as _
763            } else {
764                &[]
765            }
766        }
767        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
768        pub fn bcs_opt(&self) -> Option<&[u8]> {
769            if let Some(super::stored_object::Kind::Bcs(field)) = &self.kind {
770                Some(field as _)
771            } else {
772                None
773            }
774        }
775        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
776        pub fn bcs_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
777            if let Some(super::stored_object::Kind::Bcs(field)) = &mut self.kind {
778                Some(field as _)
779            } else {
780                None
781            }
782        }
783        ///Returns a mutable reference to `bcs`.
784        ///If the field is unset, it is first initialized with the default value.
785        ///If any other oneof field in the same oneof is set, it will be cleared.
786        pub fn bcs_mut(&mut self) -> &mut ::prost::bytes::Bytes {
787            if self.bcs_opt_mut().is_none() {
788                self.kind = Some(
789                    super::stored_object::Kind::Bcs(::prost::bytes::Bytes::default()),
790                );
791            }
792            self.bcs_opt_mut().unwrap()
793        }
794        ///Sets `bcs` with the provided value.
795        ///If any other oneof field in the same oneof is set, it will be cleared.
796        pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
797            self.kind = Some(super::stored_object::Kind::Bcs(field.into().into()));
798        }
799        ///Sets `bcs` with the provided value.
800        ///If any other oneof field in the same oneof is set, it will be cleared.
801        pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
802            self.set_bcs(field.into());
803            self
804        }
805        ///Returns the value of `tombstone`, or the default value if `tombstone` is unset.
806        pub fn tombstone(&self) -> &super::StoredObjectTombstone {
807            if let Some(super::stored_object::Kind::Tombstone(field)) = &self.kind {
808                field as _
809            } else {
810                super::StoredObjectTombstone::default_instance() as _
811            }
812        }
813        ///If `tombstone` is set, returns [`Some`] with the value; otherwise returns [`None`].
814        pub fn tombstone_opt(&self) -> Option<&super::StoredObjectTombstone> {
815            if let Some(super::stored_object::Kind::Tombstone(field)) = &self.kind {
816                Some(field as _)
817            } else {
818                None
819            }
820        }
821        ///If `tombstone` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
822        pub fn tombstone_opt_mut(
823            &mut self,
824        ) -> Option<&mut super::StoredObjectTombstone> {
825            if let Some(super::stored_object::Kind::Tombstone(field)) = &mut self.kind {
826                Some(field as _)
827            } else {
828                None
829            }
830        }
831        ///Returns a mutable reference to `tombstone`.
832        ///If the field is unset, it is first initialized with the default value.
833        ///If any other oneof field in the same oneof is set, it will be cleared.
834        pub fn tombstone_mut(&mut self) -> &mut super::StoredObjectTombstone {
835            if self.tombstone_opt_mut().is_none() {
836                self.kind = Some(
837                    super::stored_object::Kind::Tombstone(
838                        super::StoredObjectTombstone::default(),
839                    ),
840                );
841            }
842            self.tombstone_opt_mut().unwrap()
843        }
844        ///Sets `tombstone` with the provided value.
845        ///If any other oneof field in the same oneof is set, it will be cleared.
846        pub fn set_tombstone<T: Into<super::StoredObjectTombstone>>(
847            &mut self,
848            field: T,
849        ) {
850            self.kind = Some(super::stored_object::Kind::Tombstone(field.into().into()));
851        }
852        ///Sets `tombstone` with the provided value.
853        ///If any other oneof field in the same oneof is set, it will be cleared.
854        pub fn with_tombstone<T: Into<super::StoredObjectTombstone>>(
855            mut self,
856            field: T,
857        ) -> Self {
858            self.set_tombstone(field.into());
859            self
860        }
861    }
862    impl super::StoredObjectTombstone {
863        pub const fn const_default() -> Self {
864            Self { kind: 0 }
865        }
866        #[doc(hidden)]
867        pub fn default_instance() -> &'static Self {
868            static DEFAULT: super::StoredObjectTombstone = super::StoredObjectTombstone::const_default();
869            &DEFAULT
870        }
871    }
872    impl super::StoredTransaction {
873        pub const fn const_default() -> Self {
874            Self {
875                transaction_bcs: ::prost::bytes::Bytes::new(),
876                signatures_bcs: ::prost::bytes::Bytes::new(),
877            }
878        }
879        #[doc(hidden)]
880        pub fn default_instance() -> &'static Self {
881            static DEFAULT: super::StoredTransaction = super::StoredTransaction::const_default();
882            &DEFAULT
883        }
884        ///Sets `transaction_bcs` with the provided value.
885        pub fn set_transaction_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
886            self.transaction_bcs = field.into().into();
887        }
888        ///Sets `transaction_bcs` with the provided value.
889        pub fn with_transaction_bcs<T: Into<::prost::bytes::Bytes>>(
890            mut self,
891            field: T,
892        ) -> Self {
893            self.set_transaction_bcs(field.into());
894            self
895        }
896        ///Sets `signatures_bcs` with the provided value.
897        pub fn set_signatures_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
898            self.signatures_bcs = field.into().into();
899        }
900        ///Sets `signatures_bcs` with the provided value.
901        pub fn with_signatures_bcs<T: Into<::prost::bytes::Bytes>>(
902            mut self,
903            field: T,
904        ) -> Self {
905            self.set_signatures_bcs(field.into());
906            self
907        }
908    }
909    impl super::TxMetadata {
910        pub const fn const_default() -> Self {
911            Self {
912                digest: ::prost::bytes::Bytes::new(),
913                checkpoint_seq: 0,
914                ckpt_position: 0,
915                event_count: 0,
916                timestamp_ms: 0,
917            }
918        }
919        #[doc(hidden)]
920        pub fn default_instance() -> &'static Self {
921            static DEFAULT: super::TxMetadata = super::TxMetadata::const_default();
922            &DEFAULT
923        }
924        ///Sets `digest` with the provided value.
925        pub fn set_digest<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
926            self.digest = field.into().into();
927        }
928        ///Sets `digest` with the provided value.
929        pub fn with_digest<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
930            self.set_digest(field.into());
931            self
932        }
933        ///Returns a mutable reference to `checkpoint_seq`.
934        ///If the field is unset, it is first initialized with the default value.
935        pub fn checkpoint_seq_mut(&mut self) -> &mut u64 {
936            &mut self.checkpoint_seq
937        }
938        ///Sets `checkpoint_seq` with the provided value.
939        pub fn set_checkpoint_seq(&mut self, field: u64) {
940            self.checkpoint_seq = field;
941        }
942        ///Sets `checkpoint_seq` with the provided value.
943        pub fn with_checkpoint_seq(mut self, field: u64) -> Self {
944            self.set_checkpoint_seq(field);
945            self
946        }
947        ///Returns a mutable reference to `ckpt_position`.
948        ///If the field is unset, it is first initialized with the default value.
949        pub fn ckpt_position_mut(&mut self) -> &mut u32 {
950            &mut self.ckpt_position
951        }
952        ///Sets `ckpt_position` with the provided value.
953        pub fn set_ckpt_position(&mut self, field: u32) {
954            self.ckpt_position = field;
955        }
956        ///Sets `ckpt_position` with the provided value.
957        pub fn with_ckpt_position(mut self, field: u32) -> Self {
958            self.set_ckpt_position(field);
959            self
960        }
961        ///Returns a mutable reference to `event_count`.
962        ///If the field is unset, it is first initialized with the default value.
963        pub fn event_count_mut(&mut self) -> &mut u32 {
964            &mut self.event_count
965        }
966        ///Sets `event_count` with the provided value.
967        pub fn set_event_count(&mut self, field: u32) {
968            self.event_count = field;
969        }
970        ///Sets `event_count` with the provided value.
971        pub fn with_event_count(mut self, field: u32) -> Self {
972            self.set_event_count(field);
973            self
974        }
975        ///Returns a mutable reference to `timestamp_ms`.
976        ///If the field is unset, it is first initialized with the default value.
977        pub fn timestamp_ms_mut(&mut self) -> &mut u64 {
978            &mut self.timestamp_ms
979        }
980        ///Sets `timestamp_ms` with the provided value.
981        pub fn set_timestamp_ms(&mut self, field: u64) {
982            self.timestamp_ms = field;
983        }
984        ///Sets `timestamp_ms` with the provided value.
985        pub fn with_timestamp_ms(mut self, field: u64) -> Self {
986            self.set_timestamp_ms(field);
987            self
988        }
989    }
990}