Skip to main content

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

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::AffectedAddressFilter {
4        pub const fn const_default() -> Self {
5            Self { address: None }
6        }
7        #[doc(hidden)]
8        pub fn default_instance() -> &'static Self {
9            static DEFAULT: super::AffectedAddressFilter = super::AffectedAddressFilter::const_default();
10            &DEFAULT
11        }
12        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14            self.address.as_mut().map(|field| field as _)
15        }
16        ///Returns a mutable reference to `address`.
17        ///If the field is unset, it is first initialized with the default value.
18        pub fn address_mut(&mut self) -> &mut String {
19            self.address.get_or_insert_default()
20        }
21        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
22        pub fn address_opt(&self) -> Option<&str> {
23            self.address.as_ref().map(|field| field as _)
24        }
25        ///Sets `address` with the provided value.
26        pub fn set_address<T: Into<String>>(&mut self, field: T) {
27            self.address = Some(field.into().into());
28        }
29        ///Sets `address` with the provided value.
30        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
31            self.set_address(field.into());
32            self
33        }
34    }
35    impl super::AffectedObjectFilter {
36        pub const fn const_default() -> Self {
37            Self { object_id: None }
38        }
39        #[doc(hidden)]
40        pub fn default_instance() -> &'static Self {
41            static DEFAULT: super::AffectedObjectFilter = super::AffectedObjectFilter::const_default();
42            &DEFAULT
43        }
44        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
45        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
46            self.object_id.as_mut().map(|field| field as _)
47        }
48        ///Returns a mutable reference to `object_id`.
49        ///If the field is unset, it is first initialized with the default value.
50        pub fn object_id_mut(&mut self) -> &mut String {
51            self.object_id.get_or_insert_default()
52        }
53        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
54        pub fn object_id_opt(&self) -> Option<&str> {
55            self.object_id.as_ref().map(|field| field as _)
56        }
57        ///Sets `object_id` with the provided value.
58        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
59            self.object_id = Some(field.into().into());
60        }
61        ///Sets `object_id` with the provided value.
62        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
63            self.set_object_id(field.into());
64            self
65        }
66    }
67    impl super::CheckpointItem {
68        pub const fn const_default() -> Self {
69            Self {
70                checkpoint: None,
71                watermark: None,
72            }
73        }
74        #[doc(hidden)]
75        pub fn default_instance() -> &'static Self {
76            static DEFAULT: super::CheckpointItem = super::CheckpointItem::const_default();
77            &DEFAULT
78        }
79        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
80        pub fn checkpoint(&self) -> &super::super::v2::Checkpoint {
81            self.checkpoint
82                .as_ref()
83                .map(|field| field as _)
84                .unwrap_or_else(|| super::super::v2::Checkpoint::default_instance() as _)
85        }
86        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
87        pub fn checkpoint_opt_mut(
88            &mut self,
89        ) -> Option<&mut super::super::v2::Checkpoint> {
90            self.checkpoint.as_mut().map(|field| field as _)
91        }
92        ///Returns a mutable reference to `checkpoint`.
93        ///If the field is unset, it is first initialized with the default value.
94        pub fn checkpoint_mut(&mut self) -> &mut super::super::v2::Checkpoint {
95            self.checkpoint.get_or_insert_default()
96        }
97        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
98        pub fn checkpoint_opt(&self) -> Option<&super::super::v2::Checkpoint> {
99            self.checkpoint.as_ref().map(|field| field as _)
100        }
101        ///Sets `checkpoint` with the provided value.
102        pub fn set_checkpoint<T: Into<super::super::v2::Checkpoint>>(
103            &mut self,
104            field: T,
105        ) {
106            self.checkpoint = Some(field.into().into());
107        }
108        ///Sets `checkpoint` with the provided value.
109        pub fn with_checkpoint<T: Into<super::super::v2::Checkpoint>>(
110            mut self,
111            field: T,
112        ) -> Self {
113            self.set_checkpoint(field.into());
114            self
115        }
116        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
117        pub fn watermark(&self) -> &super::Watermark {
118            self.watermark
119                .as_ref()
120                .map(|field| field as _)
121                .unwrap_or_else(|| super::Watermark::default_instance() as _)
122        }
123        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
124        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
125            self.watermark.as_mut().map(|field| field as _)
126        }
127        ///Returns a mutable reference to `watermark`.
128        ///If the field is unset, it is first initialized with the default value.
129        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
130            self.watermark.get_or_insert_default()
131        }
132        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
133        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
134            self.watermark.as_ref().map(|field| field as _)
135        }
136        ///Sets `watermark` with the provided value.
137        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
138            self.watermark = Some(field.into().into());
139        }
140        ///Sets `watermark` with the provided value.
141        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
142            self.set_watermark(field.into());
143            self
144        }
145    }
146    impl super::EmitModuleFilter {
147        pub const fn const_default() -> Self {
148            Self { module: None }
149        }
150        #[doc(hidden)]
151        pub fn default_instance() -> &'static Self {
152            static DEFAULT: super::EmitModuleFilter = super::EmitModuleFilter::const_default();
153            &DEFAULT
154        }
155        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
156        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
157            self.module.as_mut().map(|field| field as _)
158        }
159        ///Returns a mutable reference to `module`.
160        ///If the field is unset, it is first initialized with the default value.
161        pub fn module_mut(&mut self) -> &mut String {
162            self.module.get_or_insert_default()
163        }
164        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
165        pub fn module_opt(&self) -> Option<&str> {
166            self.module.as_ref().map(|field| field as _)
167        }
168        ///Sets `module` with the provided value.
169        pub fn set_module<T: Into<String>>(&mut self, field: T) {
170            self.module = Some(field.into().into());
171        }
172        ///Sets `module` with the provided value.
173        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
174            self.set_module(field.into());
175            self
176        }
177    }
178    impl super::EventFilter {
179        pub const fn const_default() -> Self {
180            Self { terms: Vec::new() }
181        }
182        #[doc(hidden)]
183        pub fn default_instance() -> &'static Self {
184            static DEFAULT: super::EventFilter = super::EventFilter::const_default();
185            &DEFAULT
186        }
187        ///Returns the value of `terms`, or the default value if `terms` is unset.
188        pub fn terms(&self) -> &[super::EventTerm] {
189            &self.terms
190        }
191        ///Returns a mutable reference to `terms`.
192        ///If the field is unset, it is first initialized with the default value.
193        pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
194            &mut self.terms
195        }
196        ///Sets `terms` with the provided value.
197        pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
198            self.terms = field;
199        }
200        ///Sets `terms` with the provided value.
201        pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
202            self.set_terms(field);
203            self
204        }
205    }
206    impl super::EventItem {
207        pub const fn const_default() -> Self {
208            Self {
209                watermark: None,
210                checkpoint: None,
211                event_index: None,
212                transaction_digest: None,
213                event: None,
214                transaction_offset: None,
215            }
216        }
217        #[doc(hidden)]
218        pub fn default_instance() -> &'static Self {
219            static DEFAULT: super::EventItem = super::EventItem::const_default();
220            &DEFAULT
221        }
222        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
223        pub fn watermark(&self) -> &super::Watermark {
224            self.watermark
225                .as_ref()
226                .map(|field| field as _)
227                .unwrap_or_else(|| super::Watermark::default_instance() as _)
228        }
229        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
230        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
231            self.watermark.as_mut().map(|field| field as _)
232        }
233        ///Returns a mutable reference to `watermark`.
234        ///If the field is unset, it is first initialized with the default value.
235        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
236            self.watermark.get_or_insert_default()
237        }
238        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
239        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
240            self.watermark.as_ref().map(|field| field as _)
241        }
242        ///Sets `watermark` with the provided value.
243        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
244            self.watermark = Some(field.into().into());
245        }
246        ///Sets `watermark` with the provided value.
247        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
248            self.set_watermark(field.into());
249            self
250        }
251        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
252        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
253            self.checkpoint.as_mut().map(|field| field as _)
254        }
255        ///Returns a mutable reference to `checkpoint`.
256        ///If the field is unset, it is first initialized with the default value.
257        pub fn checkpoint_mut(&mut self) -> &mut u64 {
258            self.checkpoint.get_or_insert_default()
259        }
260        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
261        pub fn checkpoint_opt(&self) -> Option<u64> {
262            self.checkpoint.as_ref().map(|field| *field)
263        }
264        ///Sets `checkpoint` with the provided value.
265        pub fn set_checkpoint(&mut self, field: u64) {
266            self.checkpoint = Some(field);
267        }
268        ///Sets `checkpoint` with the provided value.
269        pub fn with_checkpoint(mut self, field: u64) -> Self {
270            self.set_checkpoint(field);
271            self
272        }
273        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
274        pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
275            self.event_index.as_mut().map(|field| field as _)
276        }
277        ///Returns a mutable reference to `event_index`.
278        ///If the field is unset, it is first initialized with the default value.
279        pub fn event_index_mut(&mut self) -> &mut u32 {
280            self.event_index.get_or_insert_default()
281        }
282        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
283        pub fn event_index_opt(&self) -> Option<u32> {
284            self.event_index.as_ref().map(|field| *field)
285        }
286        ///Sets `event_index` with the provided value.
287        pub fn set_event_index(&mut self, field: u32) {
288            self.event_index = Some(field);
289        }
290        ///Sets `event_index` with the provided value.
291        pub fn with_event_index(mut self, field: u32) -> Self {
292            self.set_event_index(field);
293            self
294        }
295        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
296        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
297            self.transaction_digest.as_mut().map(|field| field as _)
298        }
299        ///Returns a mutable reference to `transaction_digest`.
300        ///If the field is unset, it is first initialized with the default value.
301        pub fn transaction_digest_mut(&mut self) -> &mut String {
302            self.transaction_digest.get_or_insert_default()
303        }
304        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
305        pub fn transaction_digest_opt(&self) -> Option<&str> {
306            self.transaction_digest.as_ref().map(|field| field as _)
307        }
308        ///Sets `transaction_digest` with the provided value.
309        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
310            self.transaction_digest = Some(field.into().into());
311        }
312        ///Sets `transaction_digest` with the provided value.
313        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
314            self.set_transaction_digest(field.into());
315            self
316        }
317        ///Returns the value of `event`, or the default value if `event` is unset.
318        pub fn event(&self) -> &super::super::v2::Event {
319            self.event
320                .as_ref()
321                .map(|field| field as _)
322                .unwrap_or_else(|| super::super::v2::Event::default_instance() as _)
323        }
324        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
325        pub fn event_opt_mut(&mut self) -> Option<&mut super::super::v2::Event> {
326            self.event.as_mut().map(|field| field as _)
327        }
328        ///Returns a mutable reference to `event`.
329        ///If the field is unset, it is first initialized with the default value.
330        pub fn event_mut(&mut self) -> &mut super::super::v2::Event {
331            self.event.get_or_insert_default()
332        }
333        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
334        pub fn event_opt(&self) -> Option<&super::super::v2::Event> {
335            self.event.as_ref().map(|field| field as _)
336        }
337        ///Sets `event` with the provided value.
338        pub fn set_event<T: Into<super::super::v2::Event>>(&mut self, field: T) {
339            self.event = Some(field.into().into());
340        }
341        ///Sets `event` with the provided value.
342        pub fn with_event<T: Into<super::super::v2::Event>>(mut self, field: T) -> Self {
343            self.set_event(field.into());
344            self
345        }
346        ///If `transaction_offset` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
347        pub fn transaction_offset_opt_mut(&mut self) -> Option<&mut u64> {
348            self.transaction_offset.as_mut().map(|field| field as _)
349        }
350        ///Returns a mutable reference to `transaction_offset`.
351        ///If the field is unset, it is first initialized with the default value.
352        pub fn transaction_offset_mut(&mut self) -> &mut u64 {
353            self.transaction_offset.get_or_insert_default()
354        }
355        ///If `transaction_offset` is set, returns [`Some`] with the value; otherwise returns [`None`].
356        pub fn transaction_offset_opt(&self) -> Option<u64> {
357            self.transaction_offset.as_ref().map(|field| *field)
358        }
359        ///Sets `transaction_offset` with the provided value.
360        pub fn set_transaction_offset(&mut self, field: u64) {
361            self.transaction_offset = Some(field);
362        }
363        ///Sets `transaction_offset` with the provided value.
364        pub fn with_transaction_offset(mut self, field: u64) -> Self {
365            self.set_transaction_offset(field);
366            self
367        }
368    }
369    impl super::EventLiteral {
370        pub const fn const_default() -> Self {
371            Self { polarity: None }
372        }
373        #[doc(hidden)]
374        pub fn default_instance() -> &'static Self {
375            static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
376            &DEFAULT
377        }
378        ///Returns the value of `include`, or the default value if `include` is unset.
379        pub fn include(&self) -> &super::EventPredicate {
380            if let Some(super::event_literal::Polarity::Include(field)) = &self.polarity
381            {
382                field as _
383            } else {
384                super::EventPredicate::default_instance() as _
385            }
386        }
387        ///If `include` is set, returns [`Some`] with the value; otherwise returns [`None`].
388        pub fn include_opt(&self) -> Option<&super::EventPredicate> {
389            if let Some(super::event_literal::Polarity::Include(field)) = &self.polarity
390            {
391                Some(field as _)
392            } else {
393                None
394            }
395        }
396        ///If `include` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
397        pub fn include_opt_mut(&mut self) -> Option<&mut super::EventPredicate> {
398            if let Some(super::event_literal::Polarity::Include(field)) = &mut self
399                .polarity
400            {
401                Some(field as _)
402            } else {
403                None
404            }
405        }
406        ///Returns a mutable reference to `include`.
407        ///If the field is unset, it is first initialized with the default value.
408        ///If any other oneof field in the same oneof is set, it will be cleared.
409        pub fn include_mut(&mut self) -> &mut super::EventPredicate {
410            if self.include_opt_mut().is_none() {
411                self.polarity = Some(
412                    super::event_literal::Polarity::Include(
413                        super::EventPredicate::default(),
414                    ),
415                );
416            }
417            self.include_opt_mut().unwrap()
418        }
419        ///Sets `include` with the provided value.
420        ///If any other oneof field in the same oneof is set, it will be cleared.
421        pub fn set_include<T: Into<super::EventPredicate>>(&mut self, field: T) {
422            self.polarity = Some(
423                super::event_literal::Polarity::Include(field.into().into()),
424            );
425        }
426        ///Sets `include` with the provided value.
427        ///If any other oneof field in the same oneof is set, it will be cleared.
428        pub fn with_include<T: Into<super::EventPredicate>>(mut self, field: T) -> Self {
429            self.set_include(field.into());
430            self
431        }
432        ///Returns the value of `exclude`, or the default value if `exclude` is unset.
433        pub fn exclude(&self) -> &super::EventPredicate {
434            if let Some(super::event_literal::Polarity::Exclude(field)) = &self.polarity
435            {
436                field as _
437            } else {
438                super::EventPredicate::default_instance() as _
439            }
440        }
441        ///If `exclude` is set, returns [`Some`] with the value; otherwise returns [`None`].
442        pub fn exclude_opt(&self) -> Option<&super::EventPredicate> {
443            if let Some(super::event_literal::Polarity::Exclude(field)) = &self.polarity
444            {
445                Some(field as _)
446            } else {
447                None
448            }
449        }
450        ///If `exclude` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
451        pub fn exclude_opt_mut(&mut self) -> Option<&mut super::EventPredicate> {
452            if let Some(super::event_literal::Polarity::Exclude(field)) = &mut self
453                .polarity
454            {
455                Some(field as _)
456            } else {
457                None
458            }
459        }
460        ///Returns a mutable reference to `exclude`.
461        ///If the field is unset, it is first initialized with the default value.
462        ///If any other oneof field in the same oneof is set, it will be cleared.
463        pub fn exclude_mut(&mut self) -> &mut super::EventPredicate {
464            if self.exclude_opt_mut().is_none() {
465                self.polarity = Some(
466                    super::event_literal::Polarity::Exclude(
467                        super::EventPredicate::default(),
468                    ),
469                );
470            }
471            self.exclude_opt_mut().unwrap()
472        }
473        ///Sets `exclude` with the provided value.
474        ///If any other oneof field in the same oneof is set, it will be cleared.
475        pub fn set_exclude<T: Into<super::EventPredicate>>(&mut self, field: T) {
476            self.polarity = Some(
477                super::event_literal::Polarity::Exclude(field.into().into()),
478            );
479        }
480        ///Sets `exclude` with the provided value.
481        ///If any other oneof field in the same oneof is set, it will be cleared.
482        pub fn with_exclude<T: Into<super::EventPredicate>>(mut self, field: T) -> Self {
483            self.set_exclude(field.into());
484            self
485        }
486    }
487    impl super::EventPredicate {
488        pub const fn const_default() -> Self {
489            Self { predicate: None }
490        }
491        #[doc(hidden)]
492        pub fn default_instance() -> &'static Self {
493            static DEFAULT: super::EventPredicate = super::EventPredicate::const_default();
494            &DEFAULT
495        }
496        ///Returns the value of `sender`, or the default value if `sender` is unset.
497        pub fn sender(&self) -> &super::SenderFilter {
498            if let Some(super::event_predicate::Predicate::Sender(field)) = &self
499                .predicate
500            {
501                field as _
502            } else {
503                super::SenderFilter::default_instance() as _
504            }
505        }
506        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
507        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
508            if let Some(super::event_predicate::Predicate::Sender(field)) = &self
509                .predicate
510            {
511                Some(field as _)
512            } else {
513                None
514            }
515        }
516        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
517        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
518            if let Some(super::event_predicate::Predicate::Sender(field)) = &mut self
519                .predicate
520            {
521                Some(field as _)
522            } else {
523                None
524            }
525        }
526        ///Returns a mutable reference to `sender`.
527        ///If the field is unset, it is first initialized with the default value.
528        ///If any other oneof field in the same oneof is set, it will be cleared.
529        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
530            if self.sender_opt_mut().is_none() {
531                self.predicate = Some(
532                    super::event_predicate::Predicate::Sender(
533                        super::SenderFilter::default(),
534                    ),
535                );
536            }
537            self.sender_opt_mut().unwrap()
538        }
539        ///Sets `sender` with the provided value.
540        ///If any other oneof field in the same oneof is set, it will be cleared.
541        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
542            self.predicate = Some(
543                super::event_predicate::Predicate::Sender(field.into().into()),
544            );
545        }
546        ///Sets `sender` with the provided value.
547        ///If any other oneof field in the same oneof is set, it will be cleared.
548        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
549            self.set_sender(field.into());
550            self
551        }
552        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
553        pub fn emit_module(&self) -> &super::EmitModuleFilter {
554            if let Some(super::event_predicate::Predicate::EmitModule(field)) = &self
555                .predicate
556            {
557                field as _
558            } else {
559                super::EmitModuleFilter::default_instance() as _
560            }
561        }
562        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
563        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
564            if let Some(super::event_predicate::Predicate::EmitModule(field)) = &self
565                .predicate
566            {
567                Some(field as _)
568            } else {
569                None
570            }
571        }
572        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
573        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
574            if let Some(super::event_predicate::Predicate::EmitModule(field)) = &mut self
575                .predicate
576            {
577                Some(field as _)
578            } else {
579                None
580            }
581        }
582        ///Returns a mutable reference to `emit_module`.
583        ///If the field is unset, it is first initialized with the default value.
584        ///If any other oneof field in the same oneof is set, it will be cleared.
585        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
586            if self.emit_module_opt_mut().is_none() {
587                self.predicate = Some(
588                    super::event_predicate::Predicate::EmitModule(
589                        super::EmitModuleFilter::default(),
590                    ),
591                );
592            }
593            self.emit_module_opt_mut().unwrap()
594        }
595        ///Sets `emit_module` with the provided value.
596        ///If any other oneof field in the same oneof is set, it will be cleared.
597        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
598            self.predicate = Some(
599                super::event_predicate::Predicate::EmitModule(field.into().into()),
600            );
601        }
602        ///Sets `emit_module` with the provided value.
603        ///If any other oneof field in the same oneof is set, it will be cleared.
604        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
605            mut self,
606            field: T,
607        ) -> Self {
608            self.set_emit_module(field.into());
609            self
610        }
611        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
612        pub fn event_type(&self) -> &super::EventTypeFilter {
613            if let Some(super::event_predicate::Predicate::EventType(field)) = &self
614                .predicate
615            {
616                field as _
617            } else {
618                super::EventTypeFilter::default_instance() as _
619            }
620        }
621        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
622        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
623            if let Some(super::event_predicate::Predicate::EventType(field)) = &self
624                .predicate
625            {
626                Some(field as _)
627            } else {
628                None
629            }
630        }
631        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
632        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
633            if let Some(super::event_predicate::Predicate::EventType(field)) = &mut self
634                .predicate
635            {
636                Some(field as _)
637            } else {
638                None
639            }
640        }
641        ///Returns a mutable reference to `event_type`.
642        ///If the field is unset, it is first initialized with the default value.
643        ///If any other oneof field in the same oneof is set, it will be cleared.
644        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
645            if self.event_type_opt_mut().is_none() {
646                self.predicate = Some(
647                    super::event_predicate::Predicate::EventType(
648                        super::EventTypeFilter::default(),
649                    ),
650                );
651            }
652            self.event_type_opt_mut().unwrap()
653        }
654        ///Sets `event_type` with the provided value.
655        ///If any other oneof field in the same oneof is set, it will be cleared.
656        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
657            self.predicate = Some(
658                super::event_predicate::Predicate::EventType(field.into().into()),
659            );
660        }
661        ///Sets `event_type` with the provided value.
662        ///If any other oneof field in the same oneof is set, it will be cleared.
663        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
664            mut self,
665            field: T,
666        ) -> Self {
667            self.set_event_type(field.into());
668            self
669        }
670        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
671        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
672            if let Some(super::event_predicate::Predicate::EventStreamHead(field)) = &self
673                .predicate
674            {
675                field as _
676            } else {
677                super::EventStreamHeadFilter::default_instance() as _
678            }
679        }
680        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
681        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
682            if let Some(super::event_predicate::Predicate::EventStreamHead(field)) = &self
683                .predicate
684            {
685                Some(field as _)
686            } else {
687                None
688            }
689        }
690        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
691        pub fn event_stream_head_opt_mut(
692            &mut self,
693        ) -> Option<&mut super::EventStreamHeadFilter> {
694            if let Some(super::event_predicate::Predicate::EventStreamHead(field)) = &mut self
695                .predicate
696            {
697                Some(field as _)
698            } else {
699                None
700            }
701        }
702        ///Returns a mutable reference to `event_stream_head`.
703        ///If the field is unset, it is first initialized with the default value.
704        ///If any other oneof field in the same oneof is set, it will be cleared.
705        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
706            if self.event_stream_head_opt_mut().is_none() {
707                self.predicate = Some(
708                    super::event_predicate::Predicate::EventStreamHead(
709                        super::EventStreamHeadFilter::default(),
710                    ),
711                );
712            }
713            self.event_stream_head_opt_mut().unwrap()
714        }
715        ///Sets `event_stream_head` with the provided value.
716        ///If any other oneof field in the same oneof is set, it will be cleared.
717        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
718            &mut self,
719            field: T,
720        ) {
721            self.predicate = Some(
722                super::event_predicate::Predicate::EventStreamHead(field.into().into()),
723            );
724        }
725        ///Sets `event_stream_head` with the provided value.
726        ///If any other oneof field in the same oneof is set, it will be cleared.
727        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
728            mut self,
729            field: T,
730        ) -> Self {
731            self.set_event_stream_head(field.into());
732            self
733        }
734    }
735    impl super::EventStreamHeadFilter {
736        pub const fn const_default() -> Self {
737            Self { stream_id: None }
738        }
739        #[doc(hidden)]
740        pub fn default_instance() -> &'static Self {
741            static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
742            &DEFAULT
743        }
744        ///If `stream_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
745        pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
746            self.stream_id.as_mut().map(|field| field as _)
747        }
748        ///Returns a mutable reference to `stream_id`.
749        ///If the field is unset, it is first initialized with the default value.
750        pub fn stream_id_mut(&mut self) -> &mut String {
751            self.stream_id.get_or_insert_default()
752        }
753        ///If `stream_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
754        pub fn stream_id_opt(&self) -> Option<&str> {
755            self.stream_id.as_ref().map(|field| field as _)
756        }
757        ///Sets `stream_id` with the provided value.
758        pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
759            self.stream_id = Some(field.into().into());
760        }
761        ///Sets `stream_id` with the provided value.
762        pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
763            self.set_stream_id(field.into());
764            self
765        }
766    }
767    impl super::EventTerm {
768        pub const fn const_default() -> Self {
769            Self { literals: Vec::new() }
770        }
771        #[doc(hidden)]
772        pub fn default_instance() -> &'static Self {
773            static DEFAULT: super::EventTerm = super::EventTerm::const_default();
774            &DEFAULT
775        }
776        ///Returns the value of `literals`, or the default value if `literals` is unset.
777        pub fn literals(&self) -> &[super::EventLiteral] {
778            &self.literals
779        }
780        ///Returns a mutable reference to `literals`.
781        ///If the field is unset, it is first initialized with the default value.
782        pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
783            &mut self.literals
784        }
785        ///Sets `literals` with the provided value.
786        pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
787            self.literals = field;
788        }
789        ///Sets `literals` with the provided value.
790        pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
791            self.set_literals(field);
792            self
793        }
794    }
795    impl super::EventTypeFilter {
796        pub const fn const_default() -> Self {
797            Self { r#type: None }
798        }
799        #[doc(hidden)]
800        pub fn default_instance() -> &'static Self {
801            static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
802            &DEFAULT
803        }
804        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
805        pub fn type_opt_mut(&mut self) -> Option<&mut String> {
806            self.r#type.as_mut().map(|field| field as _)
807        }
808        ///Returns a mutable reference to `r#type`.
809        ///If the field is unset, it is first initialized with the default value.
810        pub fn type_mut(&mut self) -> &mut String {
811            self.r#type.get_or_insert_default()
812        }
813        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
814        pub fn type_opt(&self) -> Option<&str> {
815            self.r#type.as_ref().map(|field| field as _)
816        }
817        ///Sets `r#type` with the provided value.
818        pub fn set_type<T: Into<String>>(&mut self, field: T) {
819            self.r#type = Some(field.into().into());
820        }
821        ///Sets `r#type` with the provided value.
822        pub fn with_type<T: Into<String>>(mut self, field: T) -> Self {
823            self.set_type(field.into());
824            self
825        }
826    }
827    impl super::GetCheckpointObjectProofRequest {
828        pub const fn const_default() -> Self {
829            Self {
830                object_id: None,
831                checkpoint: None,
832            }
833        }
834        #[doc(hidden)]
835        pub fn default_instance() -> &'static Self {
836            static DEFAULT: super::GetCheckpointObjectProofRequest = super::GetCheckpointObjectProofRequest::const_default();
837            &DEFAULT
838        }
839        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
840        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
841            self.object_id.as_mut().map(|field| field as _)
842        }
843        ///Returns a mutable reference to `object_id`.
844        ///If the field is unset, it is first initialized with the default value.
845        pub fn object_id_mut(&mut self) -> &mut String {
846            self.object_id.get_or_insert_default()
847        }
848        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
849        pub fn object_id_opt(&self) -> Option<&str> {
850            self.object_id.as_ref().map(|field| field as _)
851        }
852        ///Sets `object_id` with the provided value.
853        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
854            self.object_id = Some(field.into().into());
855        }
856        ///Sets `object_id` with the provided value.
857        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
858            self.set_object_id(field.into());
859            self
860        }
861        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
862        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
863            self.checkpoint.as_mut().map(|field| field as _)
864        }
865        ///Returns a mutable reference to `checkpoint`.
866        ///If the field is unset, it is first initialized with the default value.
867        pub fn checkpoint_mut(&mut self) -> &mut u64 {
868            self.checkpoint.get_or_insert_default()
869        }
870        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
871        pub fn checkpoint_opt(&self) -> Option<u64> {
872            self.checkpoint.as_ref().map(|field| *field)
873        }
874        ///Sets `checkpoint` with the provided value.
875        pub fn set_checkpoint(&mut self, field: u64) {
876            self.checkpoint = Some(field);
877        }
878        ///Sets `checkpoint` with the provided value.
879        pub fn with_checkpoint(mut self, field: u64) -> Self {
880            self.set_checkpoint(field);
881            self
882        }
883    }
884    impl super::GetCheckpointObjectProofResponse {
885        pub const fn const_default() -> Self {
886            Self {
887                checkpoint_summary: None,
888                proof: None,
889            }
890        }
891        #[doc(hidden)]
892        pub fn default_instance() -> &'static Self {
893            static DEFAULT: super::GetCheckpointObjectProofResponse = super::GetCheckpointObjectProofResponse::const_default();
894            &DEFAULT
895        }
896        ///If `checkpoint_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
897        pub fn checkpoint_summary_opt(&self) -> Option<&[u8]> {
898            self.checkpoint_summary.as_ref().map(|field| field as _)
899        }
900        ///Sets `checkpoint_summary` with the provided value.
901        pub fn set_checkpoint_summary<T: Into<::prost::bytes::Bytes>>(
902            &mut self,
903            field: T,
904        ) {
905            self.checkpoint_summary = Some(field.into().into());
906        }
907        ///Sets `checkpoint_summary` with the provided value.
908        pub fn with_checkpoint_summary<T: Into<::prost::bytes::Bytes>>(
909            mut self,
910            field: T,
911        ) -> Self {
912            self.set_checkpoint_summary(field.into());
913            self
914        }
915        ///Returns the value of `inclusion`, or the default value if `inclusion` is unset.
916        pub fn inclusion(&self) -> &super::OcsInclusionProof {
917            if let Some(
918                super::get_checkpoint_object_proof_response::Proof::Inclusion(field),
919            ) = &self.proof
920            {
921                field as _
922            } else {
923                super::OcsInclusionProof::default_instance() as _
924            }
925        }
926        ///If `inclusion` is set, returns [`Some`] with the value; otherwise returns [`None`].
927        pub fn inclusion_opt(&self) -> Option<&super::OcsInclusionProof> {
928            if let Some(
929                super::get_checkpoint_object_proof_response::Proof::Inclusion(field),
930            ) = &self.proof
931            {
932                Some(field as _)
933            } else {
934                None
935            }
936        }
937        ///If `inclusion` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
938        pub fn inclusion_opt_mut(&mut self) -> Option<&mut super::OcsInclusionProof> {
939            if let Some(
940                super::get_checkpoint_object_proof_response::Proof::Inclusion(field),
941            ) = &mut self.proof
942            {
943                Some(field as _)
944            } else {
945                None
946            }
947        }
948        ///Returns a mutable reference to `inclusion`.
949        ///If the field is unset, it is first initialized with the default value.
950        ///If any other oneof field in the same oneof is set, it will be cleared.
951        pub fn inclusion_mut(&mut self) -> &mut super::OcsInclusionProof {
952            if self.inclusion_opt_mut().is_none() {
953                self.proof = Some(
954                    super::get_checkpoint_object_proof_response::Proof::Inclusion(
955                        super::OcsInclusionProof::default(),
956                    ),
957                );
958            }
959            self.inclusion_opt_mut().unwrap()
960        }
961        ///Sets `inclusion` with the provided value.
962        ///If any other oneof field in the same oneof is set, it will be cleared.
963        pub fn set_inclusion<T: Into<super::OcsInclusionProof>>(&mut self, field: T) {
964            self.proof = Some(
965                super::get_checkpoint_object_proof_response::Proof::Inclusion(
966                    field.into().into(),
967                ),
968            );
969        }
970        ///Sets `inclusion` with the provided value.
971        ///If any other oneof field in the same oneof is set, it will be cleared.
972        pub fn with_inclusion<T: Into<super::OcsInclusionProof>>(
973            mut self,
974            field: T,
975        ) -> Self {
976            self.set_inclusion(field.into());
977            self
978        }
979        ///Returns the value of `non_inclusion`, or the default value if `non_inclusion` is unset.
980        pub fn non_inclusion(&self) -> &super::OcsNonInclusionProof {
981            if let Some(
982                super::get_checkpoint_object_proof_response::Proof::NonInclusion(field),
983            ) = &self.proof
984            {
985                field as _
986            } else {
987                super::OcsNonInclusionProof::default_instance() as _
988            }
989        }
990        ///If `non_inclusion` is set, returns [`Some`] with the value; otherwise returns [`None`].
991        pub fn non_inclusion_opt(&self) -> Option<&super::OcsNonInclusionProof> {
992            if let Some(
993                super::get_checkpoint_object_proof_response::Proof::NonInclusion(field),
994            ) = &self.proof
995            {
996                Some(field as _)
997            } else {
998                None
999            }
1000        }
1001        ///If `non_inclusion` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1002        pub fn non_inclusion_opt_mut(
1003            &mut self,
1004        ) -> Option<&mut super::OcsNonInclusionProof> {
1005            if let Some(
1006                super::get_checkpoint_object_proof_response::Proof::NonInclusion(field),
1007            ) = &mut self.proof
1008            {
1009                Some(field as _)
1010            } else {
1011                None
1012            }
1013        }
1014        ///Returns a mutable reference to `non_inclusion`.
1015        ///If the field is unset, it is first initialized with the default value.
1016        ///If any other oneof field in the same oneof is set, it will be cleared.
1017        pub fn non_inclusion_mut(&mut self) -> &mut super::OcsNonInclusionProof {
1018            if self.non_inclusion_opt_mut().is_none() {
1019                self.proof = Some(
1020                    super::get_checkpoint_object_proof_response::Proof::NonInclusion(
1021                        super::OcsNonInclusionProof::default(),
1022                    ),
1023                );
1024            }
1025            self.non_inclusion_opt_mut().unwrap()
1026        }
1027        ///Sets `non_inclusion` with the provided value.
1028        ///If any other oneof field in the same oneof is set, it will be cleared.
1029        pub fn set_non_inclusion<T: Into<super::OcsNonInclusionProof>>(
1030            &mut self,
1031            field: T,
1032        ) {
1033            self.proof = Some(
1034                super::get_checkpoint_object_proof_response::Proof::NonInclusion(
1035                    field.into().into(),
1036                ),
1037            );
1038        }
1039        ///Sets `non_inclusion` with the provided value.
1040        ///If any other oneof field in the same oneof is set, it will be cleared.
1041        pub fn with_non_inclusion<T: Into<super::OcsNonInclusionProof>>(
1042            mut self,
1043            field: T,
1044        ) -> Self {
1045            self.set_non_inclusion(field.into());
1046            self
1047        }
1048    }
1049    impl super::ListCheckpointsRequest {
1050        pub const fn const_default() -> Self {
1051            Self {
1052                read_mask: None,
1053                start_checkpoint: None,
1054                end_checkpoint: None,
1055                filter: None,
1056                options: None,
1057            }
1058        }
1059        #[doc(hidden)]
1060        pub fn default_instance() -> &'static Self {
1061            static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
1062            &DEFAULT
1063        }
1064        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1065        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
1066            self.read_mask.as_mut().map(|field| field as _)
1067        }
1068        ///Returns a mutable reference to `read_mask`.
1069        ///If the field is unset, it is first initialized with the default value.
1070        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
1071            self.read_mask.get_or_insert_default()
1072        }
1073        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
1074        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
1075            self.read_mask.as_ref().map(|field| field as _)
1076        }
1077        ///Sets `read_mask` with the provided value.
1078        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
1079            self.read_mask = Some(field.into().into());
1080        }
1081        ///Sets `read_mask` with the provided value.
1082        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
1083            mut self,
1084            field: T,
1085        ) -> Self {
1086            self.set_read_mask(field.into());
1087            self
1088        }
1089        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1090        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1091            self.start_checkpoint.as_mut().map(|field| field as _)
1092        }
1093        ///Returns a mutable reference to `start_checkpoint`.
1094        ///If the field is unset, it is first initialized with the default value.
1095        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
1096            self.start_checkpoint.get_or_insert_default()
1097        }
1098        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
1099        pub fn start_checkpoint_opt(&self) -> Option<u64> {
1100            self.start_checkpoint.as_ref().map(|field| *field)
1101        }
1102        ///Sets `start_checkpoint` with the provided value.
1103        pub fn set_start_checkpoint(&mut self, field: u64) {
1104            self.start_checkpoint = Some(field);
1105        }
1106        ///Sets `start_checkpoint` with the provided value.
1107        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
1108            self.set_start_checkpoint(field);
1109            self
1110        }
1111        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1112        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1113            self.end_checkpoint.as_mut().map(|field| field as _)
1114        }
1115        ///Returns a mutable reference to `end_checkpoint`.
1116        ///If the field is unset, it is first initialized with the default value.
1117        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
1118            self.end_checkpoint.get_or_insert_default()
1119        }
1120        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
1121        pub fn end_checkpoint_opt(&self) -> Option<u64> {
1122            self.end_checkpoint.as_ref().map(|field| *field)
1123        }
1124        ///Sets `end_checkpoint` with the provided value.
1125        pub fn set_end_checkpoint(&mut self, field: u64) {
1126            self.end_checkpoint = Some(field);
1127        }
1128        ///Sets `end_checkpoint` with the provided value.
1129        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
1130            self.set_end_checkpoint(field);
1131            self
1132        }
1133        ///Returns the value of `filter`, or the default value if `filter` is unset.
1134        pub fn filter(&self) -> &super::TransactionFilter {
1135            self.filter
1136                .as_ref()
1137                .map(|field| field as _)
1138                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
1139        }
1140        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1141        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
1142            self.filter.as_mut().map(|field| field as _)
1143        }
1144        ///Returns a mutable reference to `filter`.
1145        ///If the field is unset, it is first initialized with the default value.
1146        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
1147            self.filter.get_or_insert_default()
1148        }
1149        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
1150        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
1151            self.filter.as_ref().map(|field| field as _)
1152        }
1153        ///Sets `filter` with the provided value.
1154        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
1155            self.filter = Some(field.into().into());
1156        }
1157        ///Sets `filter` with the provided value.
1158        pub fn with_filter<T: Into<super::TransactionFilter>>(
1159            mut self,
1160            field: T,
1161        ) -> Self {
1162            self.set_filter(field.into());
1163            self
1164        }
1165        ///Returns the value of `options`, or the default value if `options` is unset.
1166        pub fn options(&self) -> &super::QueryOptions {
1167            self.options
1168                .as_ref()
1169                .map(|field| field as _)
1170                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
1171        }
1172        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1173        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
1174            self.options.as_mut().map(|field| field as _)
1175        }
1176        ///Returns a mutable reference to `options`.
1177        ///If the field is unset, it is first initialized with the default value.
1178        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
1179            self.options.get_or_insert_default()
1180        }
1181        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
1182        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
1183            self.options.as_ref().map(|field| field as _)
1184        }
1185        ///Sets `options` with the provided value.
1186        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
1187            self.options = Some(field.into().into());
1188        }
1189        ///Sets `options` with the provided value.
1190        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
1191            self.set_options(field.into());
1192            self
1193        }
1194    }
1195    impl super::ListCheckpointsResponse {
1196        pub const fn const_default() -> Self {
1197            Self { response: None }
1198        }
1199        #[doc(hidden)]
1200        pub fn default_instance() -> &'static Self {
1201            static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
1202            &DEFAULT
1203        }
1204        ///Returns the value of `item`, or the default value if `item` is unset.
1205        pub fn item(&self) -> &super::CheckpointItem {
1206            if let Some(super::list_checkpoints_response::Response::Item(field)) = &self
1207                .response
1208            {
1209                field as _
1210            } else {
1211                super::CheckpointItem::default_instance() as _
1212            }
1213        }
1214        ///If `item` is set, returns [`Some`] with the value; otherwise returns [`None`].
1215        pub fn item_opt(&self) -> Option<&super::CheckpointItem> {
1216            if let Some(super::list_checkpoints_response::Response::Item(field)) = &self
1217                .response
1218            {
1219                Some(field as _)
1220            } else {
1221                None
1222            }
1223        }
1224        ///If `item` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1225        pub fn item_opt_mut(&mut self) -> Option<&mut super::CheckpointItem> {
1226            if let Some(super::list_checkpoints_response::Response::Item(field)) = &mut self
1227                .response
1228            {
1229                Some(field as _)
1230            } else {
1231                None
1232            }
1233        }
1234        ///Returns a mutable reference to `item`.
1235        ///If the field is unset, it is first initialized with the default value.
1236        ///If any other oneof field in the same oneof is set, it will be cleared.
1237        pub fn item_mut(&mut self) -> &mut super::CheckpointItem {
1238            if self.item_opt_mut().is_none() {
1239                self.response = Some(
1240                    super::list_checkpoints_response::Response::Item(
1241                        super::CheckpointItem::default(),
1242                    ),
1243                );
1244            }
1245            self.item_opt_mut().unwrap()
1246        }
1247        ///Sets `item` with the provided value.
1248        ///If any other oneof field in the same oneof is set, it will be cleared.
1249        pub fn set_item<T: Into<super::CheckpointItem>>(&mut self, field: T) {
1250            self.response = Some(
1251                super::list_checkpoints_response::Response::Item(field.into().into()),
1252            );
1253        }
1254        ///Sets `item` with the provided value.
1255        ///If any other oneof field in the same oneof is set, it will be cleared.
1256        pub fn with_item<T: Into<super::CheckpointItem>>(mut self, field: T) -> Self {
1257            self.set_item(field.into());
1258            self
1259        }
1260        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
1261        pub fn watermark(&self) -> &super::Watermark {
1262            if let Some(super::list_checkpoints_response::Response::Watermark(field)) = &self
1263                .response
1264            {
1265                field as _
1266            } else {
1267                super::Watermark::default_instance() as _
1268            }
1269        }
1270        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
1271        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
1272            if let Some(super::list_checkpoints_response::Response::Watermark(field)) = &self
1273                .response
1274            {
1275                Some(field as _)
1276            } else {
1277                None
1278            }
1279        }
1280        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1281        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
1282            if let Some(super::list_checkpoints_response::Response::Watermark(field)) = &mut self
1283                .response
1284            {
1285                Some(field as _)
1286            } else {
1287                None
1288            }
1289        }
1290        ///Returns a mutable reference to `watermark`.
1291        ///If the field is unset, it is first initialized with the default value.
1292        ///If any other oneof field in the same oneof is set, it will be cleared.
1293        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
1294            if self.watermark_opt_mut().is_none() {
1295                self.response = Some(
1296                    super::list_checkpoints_response::Response::Watermark(
1297                        super::Watermark::default(),
1298                    ),
1299                );
1300            }
1301            self.watermark_opt_mut().unwrap()
1302        }
1303        ///Sets `watermark` with the provided value.
1304        ///If any other oneof field in the same oneof is set, it will be cleared.
1305        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
1306            self.response = Some(
1307                super::list_checkpoints_response::Response::Watermark(
1308                    field.into().into(),
1309                ),
1310            );
1311        }
1312        ///Sets `watermark` with the provided value.
1313        ///If any other oneof field in the same oneof is set, it will be cleared.
1314        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
1315            self.set_watermark(field.into());
1316            self
1317        }
1318        ///Returns the value of `end`, or the default value if `end` is unset.
1319        pub fn end(&self) -> &super::QueryEnd {
1320            if let Some(super::list_checkpoints_response::Response::End(field)) = &self
1321                .response
1322            {
1323                field as _
1324            } else {
1325                super::QueryEnd::default_instance() as _
1326            }
1327        }
1328        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
1329        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
1330            if let Some(super::list_checkpoints_response::Response::End(field)) = &self
1331                .response
1332            {
1333                Some(field as _)
1334            } else {
1335                None
1336            }
1337        }
1338        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1339        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
1340            if let Some(super::list_checkpoints_response::Response::End(field)) = &mut self
1341                .response
1342            {
1343                Some(field as _)
1344            } else {
1345                None
1346            }
1347        }
1348        ///Returns a mutable reference to `end`.
1349        ///If the field is unset, it is first initialized with the default value.
1350        ///If any other oneof field in the same oneof is set, it will be cleared.
1351        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
1352            if self.end_opt_mut().is_none() {
1353                self.response = Some(
1354                    super::list_checkpoints_response::Response::End(
1355                        super::QueryEnd::default(),
1356                    ),
1357                );
1358            }
1359            self.end_opt_mut().unwrap()
1360        }
1361        ///Sets `end` with the provided value.
1362        ///If any other oneof field in the same oneof is set, it will be cleared.
1363        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
1364            self.response = Some(
1365                super::list_checkpoints_response::Response::End(field.into().into()),
1366            );
1367        }
1368        ///Sets `end` with the provided value.
1369        ///If any other oneof field in the same oneof is set, it will be cleared.
1370        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
1371            self.set_end(field.into());
1372            self
1373        }
1374    }
1375    impl super::ListEventsRequest {
1376        pub const fn const_default() -> Self {
1377            Self {
1378                read_mask: None,
1379                start_checkpoint: None,
1380                end_checkpoint: None,
1381                filter: None,
1382                options: None,
1383            }
1384        }
1385        #[doc(hidden)]
1386        pub fn default_instance() -> &'static Self {
1387            static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
1388            &DEFAULT
1389        }
1390        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1391        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
1392            self.read_mask.as_mut().map(|field| field as _)
1393        }
1394        ///Returns a mutable reference to `read_mask`.
1395        ///If the field is unset, it is first initialized with the default value.
1396        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
1397            self.read_mask.get_or_insert_default()
1398        }
1399        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
1400        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
1401            self.read_mask.as_ref().map(|field| field as _)
1402        }
1403        ///Sets `read_mask` with the provided value.
1404        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
1405            self.read_mask = Some(field.into().into());
1406        }
1407        ///Sets `read_mask` with the provided value.
1408        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
1409            mut self,
1410            field: T,
1411        ) -> Self {
1412            self.set_read_mask(field.into());
1413            self
1414        }
1415        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1416        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1417            self.start_checkpoint.as_mut().map(|field| field as _)
1418        }
1419        ///Returns a mutable reference to `start_checkpoint`.
1420        ///If the field is unset, it is first initialized with the default value.
1421        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
1422            self.start_checkpoint.get_or_insert_default()
1423        }
1424        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
1425        pub fn start_checkpoint_opt(&self) -> Option<u64> {
1426            self.start_checkpoint.as_ref().map(|field| *field)
1427        }
1428        ///Sets `start_checkpoint` with the provided value.
1429        pub fn set_start_checkpoint(&mut self, field: u64) {
1430            self.start_checkpoint = Some(field);
1431        }
1432        ///Sets `start_checkpoint` with the provided value.
1433        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
1434            self.set_start_checkpoint(field);
1435            self
1436        }
1437        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1438        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1439            self.end_checkpoint.as_mut().map(|field| field as _)
1440        }
1441        ///Returns a mutable reference to `end_checkpoint`.
1442        ///If the field is unset, it is first initialized with the default value.
1443        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
1444            self.end_checkpoint.get_or_insert_default()
1445        }
1446        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
1447        pub fn end_checkpoint_opt(&self) -> Option<u64> {
1448            self.end_checkpoint.as_ref().map(|field| *field)
1449        }
1450        ///Sets `end_checkpoint` with the provided value.
1451        pub fn set_end_checkpoint(&mut self, field: u64) {
1452            self.end_checkpoint = Some(field);
1453        }
1454        ///Sets `end_checkpoint` with the provided value.
1455        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
1456            self.set_end_checkpoint(field);
1457            self
1458        }
1459        ///Returns the value of `filter`, or the default value if `filter` is unset.
1460        pub fn filter(&self) -> &super::EventFilter {
1461            self.filter
1462                .as_ref()
1463                .map(|field| field as _)
1464                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
1465        }
1466        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1467        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
1468            self.filter.as_mut().map(|field| field as _)
1469        }
1470        ///Returns a mutable reference to `filter`.
1471        ///If the field is unset, it is first initialized with the default value.
1472        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
1473            self.filter.get_or_insert_default()
1474        }
1475        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
1476        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
1477            self.filter.as_ref().map(|field| field as _)
1478        }
1479        ///Sets `filter` with the provided value.
1480        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
1481            self.filter = Some(field.into().into());
1482        }
1483        ///Sets `filter` with the provided value.
1484        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
1485            self.set_filter(field.into());
1486            self
1487        }
1488        ///Returns the value of `options`, or the default value if `options` is unset.
1489        pub fn options(&self) -> &super::QueryOptions {
1490            self.options
1491                .as_ref()
1492                .map(|field| field as _)
1493                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
1494        }
1495        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1496        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
1497            self.options.as_mut().map(|field| field as _)
1498        }
1499        ///Returns a mutable reference to `options`.
1500        ///If the field is unset, it is first initialized with the default value.
1501        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
1502            self.options.get_or_insert_default()
1503        }
1504        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
1505        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
1506            self.options.as_ref().map(|field| field as _)
1507        }
1508        ///Sets `options` with the provided value.
1509        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
1510            self.options = Some(field.into().into());
1511        }
1512        ///Sets `options` with the provided value.
1513        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
1514            self.set_options(field.into());
1515            self
1516        }
1517    }
1518    impl super::ListEventsResponse {
1519        pub const fn const_default() -> Self {
1520            Self { response: None }
1521        }
1522        #[doc(hidden)]
1523        pub fn default_instance() -> &'static Self {
1524            static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
1525            &DEFAULT
1526        }
1527        ///Returns the value of `item`, or the default value if `item` is unset.
1528        pub fn item(&self) -> &super::EventItem {
1529            if let Some(super::list_events_response::Response::Item(field)) = &self
1530                .response
1531            {
1532                field as _
1533            } else {
1534                super::EventItem::default_instance() as _
1535            }
1536        }
1537        ///If `item` is set, returns [`Some`] with the value; otherwise returns [`None`].
1538        pub fn item_opt(&self) -> Option<&super::EventItem> {
1539            if let Some(super::list_events_response::Response::Item(field)) = &self
1540                .response
1541            {
1542                Some(field as _)
1543            } else {
1544                None
1545            }
1546        }
1547        ///If `item` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1548        pub fn item_opt_mut(&mut self) -> Option<&mut super::EventItem> {
1549            if let Some(super::list_events_response::Response::Item(field)) = &mut self
1550                .response
1551            {
1552                Some(field as _)
1553            } else {
1554                None
1555            }
1556        }
1557        ///Returns a mutable reference to `item`.
1558        ///If the field is unset, it is first initialized with the default value.
1559        ///If any other oneof field in the same oneof is set, it will be cleared.
1560        pub fn item_mut(&mut self) -> &mut super::EventItem {
1561            if self.item_opt_mut().is_none() {
1562                self.response = Some(
1563                    super::list_events_response::Response::Item(
1564                        super::EventItem::default(),
1565                    ),
1566                );
1567            }
1568            self.item_opt_mut().unwrap()
1569        }
1570        ///Sets `item` with the provided value.
1571        ///If any other oneof field in the same oneof is set, it will be cleared.
1572        pub fn set_item<T: Into<super::EventItem>>(&mut self, field: T) {
1573            self.response = Some(
1574                super::list_events_response::Response::Item(field.into().into()),
1575            );
1576        }
1577        ///Sets `item` with the provided value.
1578        ///If any other oneof field in the same oneof is set, it will be cleared.
1579        pub fn with_item<T: Into<super::EventItem>>(mut self, field: T) -> Self {
1580            self.set_item(field.into());
1581            self
1582        }
1583        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
1584        pub fn watermark(&self) -> &super::Watermark {
1585            if let Some(super::list_events_response::Response::Watermark(field)) = &self
1586                .response
1587            {
1588                field as _
1589            } else {
1590                super::Watermark::default_instance() as _
1591            }
1592        }
1593        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
1594        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
1595            if let Some(super::list_events_response::Response::Watermark(field)) = &self
1596                .response
1597            {
1598                Some(field as _)
1599            } else {
1600                None
1601            }
1602        }
1603        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1604        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
1605            if let Some(super::list_events_response::Response::Watermark(field)) = &mut self
1606                .response
1607            {
1608                Some(field as _)
1609            } else {
1610                None
1611            }
1612        }
1613        ///Returns a mutable reference to `watermark`.
1614        ///If the field is unset, it is first initialized with the default value.
1615        ///If any other oneof field in the same oneof is set, it will be cleared.
1616        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
1617            if self.watermark_opt_mut().is_none() {
1618                self.response = Some(
1619                    super::list_events_response::Response::Watermark(
1620                        super::Watermark::default(),
1621                    ),
1622                );
1623            }
1624            self.watermark_opt_mut().unwrap()
1625        }
1626        ///Sets `watermark` with the provided value.
1627        ///If any other oneof field in the same oneof is set, it will be cleared.
1628        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
1629            self.response = Some(
1630                super::list_events_response::Response::Watermark(field.into().into()),
1631            );
1632        }
1633        ///Sets `watermark` with the provided value.
1634        ///If any other oneof field in the same oneof is set, it will be cleared.
1635        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
1636            self.set_watermark(field.into());
1637            self
1638        }
1639        ///Returns the value of `end`, or the default value if `end` is unset.
1640        pub fn end(&self) -> &super::QueryEnd {
1641            if let Some(super::list_events_response::Response::End(field)) = &self
1642                .response
1643            {
1644                field as _
1645            } else {
1646                super::QueryEnd::default_instance() as _
1647            }
1648        }
1649        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
1650        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
1651            if let Some(super::list_events_response::Response::End(field)) = &self
1652                .response
1653            {
1654                Some(field as _)
1655            } else {
1656                None
1657            }
1658        }
1659        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1660        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
1661            if let Some(super::list_events_response::Response::End(field)) = &mut self
1662                .response
1663            {
1664                Some(field as _)
1665            } else {
1666                None
1667            }
1668        }
1669        ///Returns a mutable reference to `end`.
1670        ///If the field is unset, it is first initialized with the default value.
1671        ///If any other oneof field in the same oneof is set, it will be cleared.
1672        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
1673            if self.end_opt_mut().is_none() {
1674                self.response = Some(
1675                    super::list_events_response::Response::End(
1676                        super::QueryEnd::default(),
1677                    ),
1678                );
1679            }
1680            self.end_opt_mut().unwrap()
1681        }
1682        ///Sets `end` with the provided value.
1683        ///If any other oneof field in the same oneof is set, it will be cleared.
1684        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
1685            self.response = Some(
1686                super::list_events_response::Response::End(field.into().into()),
1687            );
1688        }
1689        ///Sets `end` with the provided value.
1690        ///If any other oneof field in the same oneof is set, it will be cleared.
1691        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
1692            self.set_end(field.into());
1693            self
1694        }
1695    }
1696    impl super::ListTransactionsRequest {
1697        pub const fn const_default() -> Self {
1698            Self {
1699                read_mask: None,
1700                start_checkpoint: None,
1701                end_checkpoint: None,
1702                filter: None,
1703                options: None,
1704            }
1705        }
1706        #[doc(hidden)]
1707        pub fn default_instance() -> &'static Self {
1708            static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
1709            &DEFAULT
1710        }
1711        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1712        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
1713            self.read_mask.as_mut().map(|field| field as _)
1714        }
1715        ///Returns a mutable reference to `read_mask`.
1716        ///If the field is unset, it is first initialized with the default value.
1717        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
1718            self.read_mask.get_or_insert_default()
1719        }
1720        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
1721        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
1722            self.read_mask.as_ref().map(|field| field as _)
1723        }
1724        ///Sets `read_mask` with the provided value.
1725        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
1726            self.read_mask = Some(field.into().into());
1727        }
1728        ///Sets `read_mask` with the provided value.
1729        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
1730            mut self,
1731            field: T,
1732        ) -> Self {
1733            self.set_read_mask(field.into());
1734            self
1735        }
1736        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1737        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1738            self.start_checkpoint.as_mut().map(|field| field as _)
1739        }
1740        ///Returns a mutable reference to `start_checkpoint`.
1741        ///If the field is unset, it is first initialized with the default value.
1742        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
1743            self.start_checkpoint.get_or_insert_default()
1744        }
1745        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
1746        pub fn start_checkpoint_opt(&self) -> Option<u64> {
1747            self.start_checkpoint.as_ref().map(|field| *field)
1748        }
1749        ///Sets `start_checkpoint` with the provided value.
1750        pub fn set_start_checkpoint(&mut self, field: u64) {
1751            self.start_checkpoint = Some(field);
1752        }
1753        ///Sets `start_checkpoint` with the provided value.
1754        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
1755            self.set_start_checkpoint(field);
1756            self
1757        }
1758        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1759        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1760            self.end_checkpoint.as_mut().map(|field| field as _)
1761        }
1762        ///Returns a mutable reference to `end_checkpoint`.
1763        ///If the field is unset, it is first initialized with the default value.
1764        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
1765            self.end_checkpoint.get_or_insert_default()
1766        }
1767        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
1768        pub fn end_checkpoint_opt(&self) -> Option<u64> {
1769            self.end_checkpoint.as_ref().map(|field| *field)
1770        }
1771        ///Sets `end_checkpoint` with the provided value.
1772        pub fn set_end_checkpoint(&mut self, field: u64) {
1773            self.end_checkpoint = Some(field);
1774        }
1775        ///Sets `end_checkpoint` with the provided value.
1776        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
1777            self.set_end_checkpoint(field);
1778            self
1779        }
1780        ///Returns the value of `filter`, or the default value if `filter` is unset.
1781        pub fn filter(&self) -> &super::TransactionFilter {
1782            self.filter
1783                .as_ref()
1784                .map(|field| field as _)
1785                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
1786        }
1787        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1788        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
1789            self.filter.as_mut().map(|field| field as _)
1790        }
1791        ///Returns a mutable reference to `filter`.
1792        ///If the field is unset, it is first initialized with the default value.
1793        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
1794            self.filter.get_or_insert_default()
1795        }
1796        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
1797        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
1798            self.filter.as_ref().map(|field| field as _)
1799        }
1800        ///Sets `filter` with the provided value.
1801        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
1802            self.filter = Some(field.into().into());
1803        }
1804        ///Sets `filter` with the provided value.
1805        pub fn with_filter<T: Into<super::TransactionFilter>>(
1806            mut self,
1807            field: T,
1808        ) -> Self {
1809            self.set_filter(field.into());
1810            self
1811        }
1812        ///Returns the value of `options`, or the default value if `options` is unset.
1813        pub fn options(&self) -> &super::QueryOptions {
1814            self.options
1815                .as_ref()
1816                .map(|field| field as _)
1817                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
1818        }
1819        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1820        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
1821            self.options.as_mut().map(|field| field as _)
1822        }
1823        ///Returns a mutable reference to `options`.
1824        ///If the field is unset, it is first initialized with the default value.
1825        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
1826            self.options.get_or_insert_default()
1827        }
1828        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
1829        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
1830            self.options.as_ref().map(|field| field as _)
1831        }
1832        ///Sets `options` with the provided value.
1833        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
1834            self.options = Some(field.into().into());
1835        }
1836        ///Sets `options` with the provided value.
1837        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
1838            self.set_options(field.into());
1839            self
1840        }
1841    }
1842    impl super::ListTransactionsResponse {
1843        pub const fn const_default() -> Self {
1844            Self { response: None }
1845        }
1846        #[doc(hidden)]
1847        pub fn default_instance() -> &'static Self {
1848            static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
1849            &DEFAULT
1850        }
1851        ///Returns the value of `item`, or the default value if `item` is unset.
1852        pub fn item(&self) -> &super::TransactionItem {
1853            if let Some(super::list_transactions_response::Response::Item(field)) = &self
1854                .response
1855            {
1856                field as _
1857            } else {
1858                super::TransactionItem::default_instance() as _
1859            }
1860        }
1861        ///If `item` is set, returns [`Some`] with the value; otherwise returns [`None`].
1862        pub fn item_opt(&self) -> Option<&super::TransactionItem> {
1863            if let Some(super::list_transactions_response::Response::Item(field)) = &self
1864                .response
1865            {
1866                Some(field as _)
1867            } else {
1868                None
1869            }
1870        }
1871        ///If `item` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1872        pub fn item_opt_mut(&mut self) -> Option<&mut super::TransactionItem> {
1873            if let Some(super::list_transactions_response::Response::Item(field)) = &mut self
1874                .response
1875            {
1876                Some(field as _)
1877            } else {
1878                None
1879            }
1880        }
1881        ///Returns a mutable reference to `item`.
1882        ///If the field is unset, it is first initialized with the default value.
1883        ///If any other oneof field in the same oneof is set, it will be cleared.
1884        pub fn item_mut(&mut self) -> &mut super::TransactionItem {
1885            if self.item_opt_mut().is_none() {
1886                self.response = Some(
1887                    super::list_transactions_response::Response::Item(
1888                        super::TransactionItem::default(),
1889                    ),
1890                );
1891            }
1892            self.item_opt_mut().unwrap()
1893        }
1894        ///Sets `item` with the provided value.
1895        ///If any other oneof field in the same oneof is set, it will be cleared.
1896        pub fn set_item<T: Into<super::TransactionItem>>(&mut self, field: T) {
1897            self.response = Some(
1898                super::list_transactions_response::Response::Item(field.into().into()),
1899            );
1900        }
1901        ///Sets `item` with the provided value.
1902        ///If any other oneof field in the same oneof is set, it will be cleared.
1903        pub fn with_item<T: Into<super::TransactionItem>>(mut self, field: T) -> Self {
1904            self.set_item(field.into());
1905            self
1906        }
1907        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
1908        pub fn watermark(&self) -> &super::Watermark {
1909            if let Some(super::list_transactions_response::Response::Watermark(field)) = &self
1910                .response
1911            {
1912                field as _
1913            } else {
1914                super::Watermark::default_instance() as _
1915            }
1916        }
1917        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
1918        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
1919            if let Some(super::list_transactions_response::Response::Watermark(field)) = &self
1920                .response
1921            {
1922                Some(field as _)
1923            } else {
1924                None
1925            }
1926        }
1927        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1928        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
1929            if let Some(super::list_transactions_response::Response::Watermark(field)) = &mut self
1930                .response
1931            {
1932                Some(field as _)
1933            } else {
1934                None
1935            }
1936        }
1937        ///Returns a mutable reference to `watermark`.
1938        ///If the field is unset, it is first initialized with the default value.
1939        ///If any other oneof field in the same oneof is set, it will be cleared.
1940        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
1941            if self.watermark_opt_mut().is_none() {
1942                self.response = Some(
1943                    super::list_transactions_response::Response::Watermark(
1944                        super::Watermark::default(),
1945                    ),
1946                );
1947            }
1948            self.watermark_opt_mut().unwrap()
1949        }
1950        ///Sets `watermark` with the provided value.
1951        ///If any other oneof field in the same oneof is set, it will be cleared.
1952        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
1953            self.response = Some(
1954                super::list_transactions_response::Response::Watermark(
1955                    field.into().into(),
1956                ),
1957            );
1958        }
1959        ///Sets `watermark` with the provided value.
1960        ///If any other oneof field in the same oneof is set, it will be cleared.
1961        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
1962            self.set_watermark(field.into());
1963            self
1964        }
1965        ///Returns the value of `end`, or the default value if `end` is unset.
1966        pub fn end(&self) -> &super::QueryEnd {
1967            if let Some(super::list_transactions_response::Response::End(field)) = &self
1968                .response
1969            {
1970                field as _
1971            } else {
1972                super::QueryEnd::default_instance() as _
1973            }
1974        }
1975        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
1976        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
1977            if let Some(super::list_transactions_response::Response::End(field)) = &self
1978                .response
1979            {
1980                Some(field as _)
1981            } else {
1982                None
1983            }
1984        }
1985        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1986        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
1987            if let Some(super::list_transactions_response::Response::End(field)) = &mut self
1988                .response
1989            {
1990                Some(field as _)
1991            } else {
1992                None
1993            }
1994        }
1995        ///Returns a mutable reference to `end`.
1996        ///If the field is unset, it is first initialized with the default value.
1997        ///If any other oneof field in the same oneof is set, it will be cleared.
1998        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
1999            if self.end_opt_mut().is_none() {
2000                self.response = Some(
2001                    super::list_transactions_response::Response::End(
2002                        super::QueryEnd::default(),
2003                    ),
2004                );
2005            }
2006            self.end_opt_mut().unwrap()
2007        }
2008        ///Sets `end` with the provided value.
2009        ///If any other oneof field in the same oneof is set, it will be cleared.
2010        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
2011            self.response = Some(
2012                super::list_transactions_response::Response::End(field.into().into()),
2013            );
2014        }
2015        ///Sets `end` with the provided value.
2016        ///If any other oneof field in the same oneof is set, it will be cleared.
2017        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
2018            self.set_end(field.into());
2019            self
2020        }
2021    }
2022    impl super::MerkleNeighbourLeaf {
2023        pub const fn const_default() -> Self {
2024            Self {
2025                leaf: None,
2026                merkle_proof: None,
2027            }
2028        }
2029        #[doc(hidden)]
2030        pub fn default_instance() -> &'static Self {
2031            static DEFAULT: super::MerkleNeighbourLeaf = super::MerkleNeighbourLeaf::const_default();
2032            &DEFAULT
2033        }
2034        ///Returns the value of `leaf`, or the default value if `leaf` is unset.
2035        pub fn leaf(&self) -> &super::super::v2::ObjectReference {
2036            self.leaf
2037                .as_ref()
2038                .map(|field| field as _)
2039                .unwrap_or_else(|| {
2040                    super::super::v2::ObjectReference::default_instance() as _
2041                })
2042        }
2043        ///If `leaf` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2044        pub fn leaf_opt_mut(
2045            &mut self,
2046        ) -> Option<&mut super::super::v2::ObjectReference> {
2047            self.leaf.as_mut().map(|field| field as _)
2048        }
2049        ///Returns a mutable reference to `leaf`.
2050        ///If the field is unset, it is first initialized with the default value.
2051        pub fn leaf_mut(&mut self) -> &mut super::super::v2::ObjectReference {
2052            self.leaf.get_or_insert_default()
2053        }
2054        ///If `leaf` is set, returns [`Some`] with the value; otherwise returns [`None`].
2055        pub fn leaf_opt(&self) -> Option<&super::super::v2::ObjectReference> {
2056            self.leaf.as_ref().map(|field| field as _)
2057        }
2058        ///Sets `leaf` with the provided value.
2059        pub fn set_leaf<T: Into<super::super::v2::ObjectReference>>(
2060            &mut self,
2061            field: T,
2062        ) {
2063            self.leaf = Some(field.into().into());
2064        }
2065        ///Sets `leaf` with the provided value.
2066        pub fn with_leaf<T: Into<super::super::v2::ObjectReference>>(
2067            mut self,
2068            field: T,
2069        ) -> Self {
2070            self.set_leaf(field.into());
2071            self
2072        }
2073        ///Returns the value of `merkle_proof`, or the default value if `merkle_proof` is unset.
2074        pub fn merkle_proof(&self) -> &super::MerkleProof {
2075            self.merkle_proof
2076                .as_ref()
2077                .map(|field| field as _)
2078                .unwrap_or_else(|| super::MerkleProof::default_instance() as _)
2079        }
2080        ///If `merkle_proof` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2081        pub fn merkle_proof_opt_mut(&mut self) -> Option<&mut super::MerkleProof> {
2082            self.merkle_proof.as_mut().map(|field| field as _)
2083        }
2084        ///Returns a mutable reference to `merkle_proof`.
2085        ///If the field is unset, it is first initialized with the default value.
2086        pub fn merkle_proof_mut(&mut self) -> &mut super::MerkleProof {
2087            self.merkle_proof.get_or_insert_default()
2088        }
2089        ///If `merkle_proof` is set, returns [`Some`] with the value; otherwise returns [`None`].
2090        pub fn merkle_proof_opt(&self) -> Option<&super::MerkleProof> {
2091            self.merkle_proof.as_ref().map(|field| field as _)
2092        }
2093        ///Sets `merkle_proof` with the provided value.
2094        pub fn set_merkle_proof<T: Into<super::MerkleProof>>(&mut self, field: T) {
2095            self.merkle_proof = Some(field.into().into());
2096        }
2097        ///Sets `merkle_proof` with the provided value.
2098        pub fn with_merkle_proof<T: Into<super::MerkleProof>>(
2099            mut self,
2100            field: T,
2101        ) -> Self {
2102            self.set_merkle_proof(field.into());
2103            self
2104        }
2105    }
2106    impl super::MerkleNode {
2107        pub const fn const_default() -> Self {
2108            Self { node: None }
2109        }
2110        #[doc(hidden)]
2111        pub fn default_instance() -> &'static Self {
2112            static DEFAULT: super::MerkleNode = super::MerkleNode::const_default();
2113            &DEFAULT
2114        }
2115        ///Returns the value of `digest`, or the default value if `digest` is unset.
2116        pub fn digest(&self) -> &[u8] {
2117            if let Some(super::merkle_node::Node::Digest(field)) = &self.node {
2118                field as _
2119            } else {
2120                &[]
2121            }
2122        }
2123        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
2124        pub fn digest_opt(&self) -> Option<&[u8]> {
2125            if let Some(super::merkle_node::Node::Digest(field)) = &self.node {
2126                Some(field as _)
2127            } else {
2128                None
2129            }
2130        }
2131        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2132        pub fn digest_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2133            if let Some(super::merkle_node::Node::Digest(field)) = &mut self.node {
2134                Some(field as _)
2135            } else {
2136                None
2137            }
2138        }
2139        ///Returns a mutable reference to `digest`.
2140        ///If the field is unset, it is first initialized with the default value.
2141        ///If any other oneof field in the same oneof is set, it will be cleared.
2142        pub fn digest_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2143            if self.digest_opt_mut().is_none() {
2144                self.node = Some(
2145                    super::merkle_node::Node::Digest(::prost::bytes::Bytes::default()),
2146                );
2147            }
2148            self.digest_opt_mut().unwrap()
2149        }
2150        ///Sets `digest` with the provided value.
2151        ///If any other oneof field in the same oneof is set, it will be cleared.
2152        pub fn set_digest<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2153            self.node = Some(super::merkle_node::Node::Digest(field.into().into()));
2154        }
2155        ///Sets `digest` with the provided value.
2156        ///If any other oneof field in the same oneof is set, it will be cleared.
2157        pub fn with_digest<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2158            self.set_digest(field.into());
2159            self
2160        }
2161    }
2162    impl super::MerkleNonInclusionProof {
2163        pub const fn const_default() -> Self {
2164            Self {
2165                index: None,
2166                left_leaf: None,
2167                right_leaf: None,
2168            }
2169        }
2170        #[doc(hidden)]
2171        pub fn default_instance() -> &'static Self {
2172            static DEFAULT: super::MerkleNonInclusionProof = super::MerkleNonInclusionProof::const_default();
2173            &DEFAULT
2174        }
2175        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2176        pub fn index_opt_mut(&mut self) -> Option<&mut u64> {
2177            self.index.as_mut().map(|field| field as _)
2178        }
2179        ///Returns a mutable reference to `index`.
2180        ///If the field is unset, it is first initialized with the default value.
2181        pub fn index_mut(&mut self) -> &mut u64 {
2182            self.index.get_or_insert_default()
2183        }
2184        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
2185        pub fn index_opt(&self) -> Option<u64> {
2186            self.index.as_ref().map(|field| *field)
2187        }
2188        ///Sets `index` with the provided value.
2189        pub fn set_index(&mut self, field: u64) {
2190            self.index = Some(field);
2191        }
2192        ///Sets `index` with the provided value.
2193        pub fn with_index(mut self, field: u64) -> Self {
2194            self.set_index(field);
2195            self
2196        }
2197        ///Returns the value of `left_leaf`, or the default value if `left_leaf` is unset.
2198        pub fn left_leaf(&self) -> &super::MerkleNeighbourLeaf {
2199            self.left_leaf
2200                .as_ref()
2201                .map(|field| field as _)
2202                .unwrap_or_else(|| super::MerkleNeighbourLeaf::default_instance() as _)
2203        }
2204        ///If `left_leaf` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2205        pub fn left_leaf_opt_mut(&mut self) -> Option<&mut super::MerkleNeighbourLeaf> {
2206            self.left_leaf.as_mut().map(|field| field as _)
2207        }
2208        ///Returns a mutable reference to `left_leaf`.
2209        ///If the field is unset, it is first initialized with the default value.
2210        pub fn left_leaf_mut(&mut self) -> &mut super::MerkleNeighbourLeaf {
2211            self.left_leaf.get_or_insert_default()
2212        }
2213        ///If `left_leaf` is set, returns [`Some`] with the value; otherwise returns [`None`].
2214        pub fn left_leaf_opt(&self) -> Option<&super::MerkleNeighbourLeaf> {
2215            self.left_leaf.as_ref().map(|field| field as _)
2216        }
2217        ///Sets `left_leaf` with the provided value.
2218        pub fn set_left_leaf<T: Into<super::MerkleNeighbourLeaf>>(&mut self, field: T) {
2219            self.left_leaf = Some(field.into().into());
2220        }
2221        ///Sets `left_leaf` with the provided value.
2222        pub fn with_left_leaf<T: Into<super::MerkleNeighbourLeaf>>(
2223            mut self,
2224            field: T,
2225        ) -> Self {
2226            self.set_left_leaf(field.into());
2227            self
2228        }
2229        ///Returns the value of `right_leaf`, or the default value if `right_leaf` is unset.
2230        pub fn right_leaf(&self) -> &super::MerkleNeighbourLeaf {
2231            self.right_leaf
2232                .as_ref()
2233                .map(|field| field as _)
2234                .unwrap_or_else(|| super::MerkleNeighbourLeaf::default_instance() as _)
2235        }
2236        ///If `right_leaf` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2237        pub fn right_leaf_opt_mut(&mut self) -> Option<&mut super::MerkleNeighbourLeaf> {
2238            self.right_leaf.as_mut().map(|field| field as _)
2239        }
2240        ///Returns a mutable reference to `right_leaf`.
2241        ///If the field is unset, it is first initialized with the default value.
2242        pub fn right_leaf_mut(&mut self) -> &mut super::MerkleNeighbourLeaf {
2243            self.right_leaf.get_or_insert_default()
2244        }
2245        ///If `right_leaf` is set, returns [`Some`] with the value; otherwise returns [`None`].
2246        pub fn right_leaf_opt(&self) -> Option<&super::MerkleNeighbourLeaf> {
2247            self.right_leaf.as_ref().map(|field| field as _)
2248        }
2249        ///Sets `right_leaf` with the provided value.
2250        pub fn set_right_leaf<T: Into<super::MerkleNeighbourLeaf>>(&mut self, field: T) {
2251            self.right_leaf = Some(field.into().into());
2252        }
2253        ///Sets `right_leaf` with the provided value.
2254        pub fn with_right_leaf<T: Into<super::MerkleNeighbourLeaf>>(
2255            mut self,
2256            field: T,
2257        ) -> Self {
2258            self.set_right_leaf(field.into());
2259            self
2260        }
2261    }
2262    impl super::MerkleProof {
2263        pub const fn const_default() -> Self {
2264            Self { path: Vec::new() }
2265        }
2266        #[doc(hidden)]
2267        pub fn default_instance() -> &'static Self {
2268            static DEFAULT: super::MerkleProof = super::MerkleProof::const_default();
2269            &DEFAULT
2270        }
2271        ///Returns the value of `path`, or the default value if `path` is unset.
2272        pub fn path(&self) -> &[super::MerkleNode] {
2273            &self.path
2274        }
2275        ///Returns a mutable reference to `path`.
2276        ///If the field is unset, it is first initialized with the default value.
2277        pub fn path_mut(&mut self) -> &mut Vec<super::MerkleNode> {
2278            &mut self.path
2279        }
2280        ///Sets `path` with the provided value.
2281        pub fn set_path(&mut self, field: Vec<super::MerkleNode>) {
2282            self.path = field;
2283        }
2284        ///Sets `path` with the provided value.
2285        pub fn with_path(mut self, field: Vec<super::MerkleNode>) -> Self {
2286            self.set_path(field);
2287            self
2288        }
2289    }
2290    impl super::MoveCallFilter {
2291        pub const fn const_default() -> Self {
2292            Self { function: None }
2293        }
2294        #[doc(hidden)]
2295        pub fn default_instance() -> &'static Self {
2296            static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
2297            &DEFAULT
2298        }
2299        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2300        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
2301            self.function.as_mut().map(|field| field as _)
2302        }
2303        ///Returns a mutable reference to `function`.
2304        ///If the field is unset, it is first initialized with the default value.
2305        pub fn function_mut(&mut self) -> &mut String {
2306            self.function.get_or_insert_default()
2307        }
2308        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
2309        pub fn function_opt(&self) -> Option<&str> {
2310            self.function.as_ref().map(|field| field as _)
2311        }
2312        ///Sets `function` with the provided value.
2313        pub fn set_function<T: Into<String>>(&mut self, field: T) {
2314            self.function = Some(field.into().into());
2315        }
2316        ///Sets `function` with the provided value.
2317        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
2318            self.set_function(field.into());
2319            self
2320        }
2321    }
2322    impl super::OcsInclusionProof {
2323        pub const fn const_default() -> Self {
2324            Self {
2325                object_ref: None,
2326                merkle_proof: None,
2327                leaf_index: None,
2328                tree_root: None,
2329                object_data: None,
2330            }
2331        }
2332        #[doc(hidden)]
2333        pub fn default_instance() -> &'static Self {
2334            static DEFAULT: super::OcsInclusionProof = super::OcsInclusionProof::const_default();
2335            &DEFAULT
2336        }
2337        ///Returns the value of `object_ref`, or the default value if `object_ref` is unset.
2338        pub fn object_ref(&self) -> &super::super::v2::ObjectReference {
2339            self.object_ref
2340                .as_ref()
2341                .map(|field| field as _)
2342                .unwrap_or_else(|| {
2343                    super::super::v2::ObjectReference::default_instance() as _
2344                })
2345        }
2346        ///If `object_ref` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2347        pub fn object_ref_opt_mut(
2348            &mut self,
2349        ) -> Option<&mut super::super::v2::ObjectReference> {
2350            self.object_ref.as_mut().map(|field| field as _)
2351        }
2352        ///Returns a mutable reference to `object_ref`.
2353        ///If the field is unset, it is first initialized with the default value.
2354        pub fn object_ref_mut(&mut self) -> &mut super::super::v2::ObjectReference {
2355            self.object_ref.get_or_insert_default()
2356        }
2357        ///If `object_ref` is set, returns [`Some`] with the value; otherwise returns [`None`].
2358        pub fn object_ref_opt(&self) -> Option<&super::super::v2::ObjectReference> {
2359            self.object_ref.as_ref().map(|field| field as _)
2360        }
2361        ///Sets `object_ref` with the provided value.
2362        pub fn set_object_ref<T: Into<super::super::v2::ObjectReference>>(
2363            &mut self,
2364            field: T,
2365        ) {
2366            self.object_ref = Some(field.into().into());
2367        }
2368        ///Sets `object_ref` with the provided value.
2369        pub fn with_object_ref<T: Into<super::super::v2::ObjectReference>>(
2370            mut self,
2371            field: T,
2372        ) -> Self {
2373            self.set_object_ref(field.into());
2374            self
2375        }
2376        ///Returns the value of `merkle_proof`, or the default value if `merkle_proof` is unset.
2377        pub fn merkle_proof(&self) -> &super::MerkleProof {
2378            self.merkle_proof
2379                .as_ref()
2380                .map(|field| field as _)
2381                .unwrap_or_else(|| super::MerkleProof::default_instance() as _)
2382        }
2383        ///If `merkle_proof` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2384        pub fn merkle_proof_opt_mut(&mut self) -> Option<&mut super::MerkleProof> {
2385            self.merkle_proof.as_mut().map(|field| field as _)
2386        }
2387        ///Returns a mutable reference to `merkle_proof`.
2388        ///If the field is unset, it is first initialized with the default value.
2389        pub fn merkle_proof_mut(&mut self) -> &mut super::MerkleProof {
2390            self.merkle_proof.get_or_insert_default()
2391        }
2392        ///If `merkle_proof` is set, returns [`Some`] with the value; otherwise returns [`None`].
2393        pub fn merkle_proof_opt(&self) -> Option<&super::MerkleProof> {
2394            self.merkle_proof.as_ref().map(|field| field as _)
2395        }
2396        ///Sets `merkle_proof` with the provided value.
2397        pub fn set_merkle_proof<T: Into<super::MerkleProof>>(&mut self, field: T) {
2398            self.merkle_proof = Some(field.into().into());
2399        }
2400        ///Sets `merkle_proof` with the provided value.
2401        pub fn with_merkle_proof<T: Into<super::MerkleProof>>(
2402            mut self,
2403            field: T,
2404        ) -> Self {
2405            self.set_merkle_proof(field.into());
2406            self
2407        }
2408        ///If `leaf_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2409        pub fn leaf_index_opt_mut(&mut self) -> Option<&mut u64> {
2410            self.leaf_index.as_mut().map(|field| field as _)
2411        }
2412        ///Returns a mutable reference to `leaf_index`.
2413        ///If the field is unset, it is first initialized with the default value.
2414        pub fn leaf_index_mut(&mut self) -> &mut u64 {
2415            self.leaf_index.get_or_insert_default()
2416        }
2417        ///If `leaf_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
2418        pub fn leaf_index_opt(&self) -> Option<u64> {
2419            self.leaf_index.as_ref().map(|field| *field)
2420        }
2421        ///Sets `leaf_index` with the provided value.
2422        pub fn set_leaf_index(&mut self, field: u64) {
2423            self.leaf_index = Some(field);
2424        }
2425        ///Sets `leaf_index` with the provided value.
2426        pub fn with_leaf_index(mut self, field: u64) -> Self {
2427            self.set_leaf_index(field);
2428            self
2429        }
2430        ///If `tree_root` is set, returns [`Some`] with the value; otherwise returns [`None`].
2431        pub fn tree_root_opt(&self) -> Option<&[u8]> {
2432            self.tree_root.as_ref().map(|field| field as _)
2433        }
2434        ///Sets `tree_root` with the provided value.
2435        pub fn set_tree_root<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2436            self.tree_root = Some(field.into().into());
2437        }
2438        ///Sets `tree_root` with the provided value.
2439        pub fn with_tree_root<T: Into<::prost::bytes::Bytes>>(
2440            mut self,
2441            field: T,
2442        ) -> Self {
2443            self.set_tree_root(field.into());
2444            self
2445        }
2446        ///If `object_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2447        pub fn object_data_opt(&self) -> Option<&[u8]> {
2448            self.object_data.as_ref().map(|field| field as _)
2449        }
2450        ///Sets `object_data` with the provided value.
2451        pub fn set_object_data<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2452            self.object_data = Some(field.into().into());
2453        }
2454        ///Sets `object_data` with the provided value.
2455        pub fn with_object_data<T: Into<::prost::bytes::Bytes>>(
2456            mut self,
2457            field: T,
2458        ) -> Self {
2459            self.set_object_data(field.into());
2460            self
2461        }
2462    }
2463    impl super::OcsNonInclusionProof {
2464        pub const fn const_default() -> Self {
2465            Self {
2466                non_inclusion_proof: None,
2467                tree_root: None,
2468            }
2469        }
2470        #[doc(hidden)]
2471        pub fn default_instance() -> &'static Self {
2472            static DEFAULT: super::OcsNonInclusionProof = super::OcsNonInclusionProof::const_default();
2473            &DEFAULT
2474        }
2475        ///Returns the value of `non_inclusion_proof`, or the default value if `non_inclusion_proof` is unset.
2476        pub fn non_inclusion_proof(&self) -> &super::MerkleNonInclusionProof {
2477            self.non_inclusion_proof
2478                .as_ref()
2479                .map(|field| field as _)
2480                .unwrap_or_else(|| {
2481                    super::MerkleNonInclusionProof::default_instance() as _
2482                })
2483        }
2484        ///If `non_inclusion_proof` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2485        pub fn non_inclusion_proof_opt_mut(
2486            &mut self,
2487        ) -> Option<&mut super::MerkleNonInclusionProof> {
2488            self.non_inclusion_proof.as_mut().map(|field| field as _)
2489        }
2490        ///Returns a mutable reference to `non_inclusion_proof`.
2491        ///If the field is unset, it is first initialized with the default value.
2492        pub fn non_inclusion_proof_mut(
2493            &mut self,
2494        ) -> &mut super::MerkleNonInclusionProof {
2495            self.non_inclusion_proof.get_or_insert_default()
2496        }
2497        ///If `non_inclusion_proof` is set, returns [`Some`] with the value; otherwise returns [`None`].
2498        pub fn non_inclusion_proof_opt(
2499            &self,
2500        ) -> Option<&super::MerkleNonInclusionProof> {
2501            self.non_inclusion_proof.as_ref().map(|field| field as _)
2502        }
2503        ///Sets `non_inclusion_proof` with the provided value.
2504        pub fn set_non_inclusion_proof<T: Into<super::MerkleNonInclusionProof>>(
2505            &mut self,
2506            field: T,
2507        ) {
2508            self.non_inclusion_proof = Some(field.into().into());
2509        }
2510        ///Sets `non_inclusion_proof` with the provided value.
2511        pub fn with_non_inclusion_proof<T: Into<super::MerkleNonInclusionProof>>(
2512            mut self,
2513            field: T,
2514        ) -> Self {
2515            self.set_non_inclusion_proof(field.into());
2516            self
2517        }
2518        ///If `tree_root` is set, returns [`Some`] with the value; otherwise returns [`None`].
2519        pub fn tree_root_opt(&self) -> Option<&[u8]> {
2520            self.tree_root.as_ref().map(|field| field as _)
2521        }
2522        ///Sets `tree_root` with the provided value.
2523        pub fn set_tree_root<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2524            self.tree_root = Some(field.into().into());
2525        }
2526        ///Sets `tree_root` with the provided value.
2527        pub fn with_tree_root<T: Into<::prost::bytes::Bytes>>(
2528            mut self,
2529            field: T,
2530        ) -> Self {
2531            self.set_tree_root(field.into());
2532            self
2533        }
2534    }
2535    impl super::QueryEnd {
2536        pub const fn const_default() -> Self {
2537            Self { reason: 0 }
2538        }
2539        #[doc(hidden)]
2540        pub fn default_instance() -> &'static Self {
2541            static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
2542            &DEFAULT
2543        }
2544    }
2545    impl super::QueryOptions {
2546        pub const fn const_default() -> Self {
2547            Self {
2548                limit_items: None,
2549                after: None,
2550                before: None,
2551                ordering: 0,
2552            }
2553        }
2554        #[doc(hidden)]
2555        pub fn default_instance() -> &'static Self {
2556            static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
2557            &DEFAULT
2558        }
2559        ///If `limit_items` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2560        pub fn limit_items_opt_mut(&mut self) -> Option<&mut u32> {
2561            self.limit_items.as_mut().map(|field| field as _)
2562        }
2563        ///Returns a mutable reference to `limit_items`.
2564        ///If the field is unset, it is first initialized with the default value.
2565        pub fn limit_items_mut(&mut self) -> &mut u32 {
2566            self.limit_items.get_or_insert_default()
2567        }
2568        ///If `limit_items` is set, returns [`Some`] with the value; otherwise returns [`None`].
2569        pub fn limit_items_opt(&self) -> Option<u32> {
2570            self.limit_items.as_ref().map(|field| *field)
2571        }
2572        ///Sets `limit_items` with the provided value.
2573        pub fn set_limit_items(&mut self, field: u32) {
2574            self.limit_items = Some(field);
2575        }
2576        ///Sets `limit_items` with the provided value.
2577        pub fn with_limit_items(mut self, field: u32) -> Self {
2578            self.set_limit_items(field);
2579            self
2580        }
2581        ///If `after` is set, returns [`Some`] with the value; otherwise returns [`None`].
2582        pub fn after_opt(&self) -> Option<&[u8]> {
2583            self.after.as_ref().map(|field| field as _)
2584        }
2585        ///Sets `after` with the provided value.
2586        pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2587            self.after = Some(field.into().into());
2588        }
2589        ///Sets `after` with the provided value.
2590        pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2591            self.set_after(field.into());
2592            self
2593        }
2594        ///If `before` is set, returns [`Some`] with the value; otherwise returns [`None`].
2595        pub fn before_opt(&self) -> Option<&[u8]> {
2596            self.before.as_ref().map(|field| field as _)
2597        }
2598        ///Sets `before` with the provided value.
2599        pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2600            self.before = Some(field.into().into());
2601        }
2602        ///Sets `before` with the provided value.
2603        pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2604            self.set_before(field.into());
2605            self
2606        }
2607    }
2608    impl super::SenderFilter {
2609        pub const fn const_default() -> Self {
2610            Self { address: None }
2611        }
2612        #[doc(hidden)]
2613        pub fn default_instance() -> &'static Self {
2614            static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
2615            &DEFAULT
2616        }
2617        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2618        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2619            self.address.as_mut().map(|field| field as _)
2620        }
2621        ///Returns a mutable reference to `address`.
2622        ///If the field is unset, it is first initialized with the default value.
2623        pub fn address_mut(&mut self) -> &mut String {
2624            self.address.get_or_insert_default()
2625        }
2626        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2627        pub fn address_opt(&self) -> Option<&str> {
2628            self.address.as_ref().map(|field| field as _)
2629        }
2630        ///Sets `address` with the provided value.
2631        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2632            self.address = Some(field.into().into());
2633        }
2634        ///Sets `address` with the provided value.
2635        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2636            self.set_address(field.into());
2637            self
2638        }
2639    }
2640    impl super::TransactionFilter {
2641        pub const fn const_default() -> Self {
2642            Self { terms: Vec::new() }
2643        }
2644        #[doc(hidden)]
2645        pub fn default_instance() -> &'static Self {
2646            static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
2647            &DEFAULT
2648        }
2649        ///Returns the value of `terms`, or the default value if `terms` is unset.
2650        pub fn terms(&self) -> &[super::TransactionTerm] {
2651            &self.terms
2652        }
2653        ///Returns a mutable reference to `terms`.
2654        ///If the field is unset, it is first initialized with the default value.
2655        pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
2656            &mut self.terms
2657        }
2658        ///Sets `terms` with the provided value.
2659        pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
2660            self.terms = field;
2661        }
2662        ///Sets `terms` with the provided value.
2663        pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
2664            self.set_terms(field);
2665            self
2666        }
2667    }
2668    impl super::TransactionItem {
2669        pub const fn const_default() -> Self {
2670            Self {
2671                transaction: None,
2672                watermark: None,
2673                transaction_offset: None,
2674            }
2675        }
2676        #[doc(hidden)]
2677        pub fn default_instance() -> &'static Self {
2678            static DEFAULT: super::TransactionItem = super::TransactionItem::const_default();
2679            &DEFAULT
2680        }
2681        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
2682        pub fn transaction(&self) -> &super::super::v2::ExecutedTransaction {
2683            self.transaction
2684                .as_ref()
2685                .map(|field| field as _)
2686                .unwrap_or_else(|| {
2687                    super::super::v2::ExecutedTransaction::default_instance() as _
2688                })
2689        }
2690        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2691        pub fn transaction_opt_mut(
2692            &mut self,
2693        ) -> Option<&mut super::super::v2::ExecutedTransaction> {
2694            self.transaction.as_mut().map(|field| field as _)
2695        }
2696        ///Returns a mutable reference to `transaction`.
2697        ///If the field is unset, it is first initialized with the default value.
2698        pub fn transaction_mut(&mut self) -> &mut super::super::v2::ExecutedTransaction {
2699            self.transaction.get_or_insert_default()
2700        }
2701        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2702        pub fn transaction_opt(&self) -> Option<&super::super::v2::ExecutedTransaction> {
2703            self.transaction.as_ref().map(|field| field as _)
2704        }
2705        ///Sets `transaction` with the provided value.
2706        pub fn set_transaction<T: Into<super::super::v2::ExecutedTransaction>>(
2707            &mut self,
2708            field: T,
2709        ) {
2710            self.transaction = Some(field.into().into());
2711        }
2712        ///Sets `transaction` with the provided value.
2713        pub fn with_transaction<T: Into<super::super::v2::ExecutedTransaction>>(
2714            mut self,
2715            field: T,
2716        ) -> Self {
2717            self.set_transaction(field.into());
2718            self
2719        }
2720        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
2721        pub fn watermark(&self) -> &super::Watermark {
2722            self.watermark
2723                .as_ref()
2724                .map(|field| field as _)
2725                .unwrap_or_else(|| super::Watermark::default_instance() as _)
2726        }
2727        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2728        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
2729            self.watermark.as_mut().map(|field| field as _)
2730        }
2731        ///Returns a mutable reference to `watermark`.
2732        ///If the field is unset, it is first initialized with the default value.
2733        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
2734            self.watermark.get_or_insert_default()
2735        }
2736        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
2737        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
2738            self.watermark.as_ref().map(|field| field as _)
2739        }
2740        ///Sets `watermark` with the provided value.
2741        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
2742            self.watermark = Some(field.into().into());
2743        }
2744        ///Sets `watermark` with the provided value.
2745        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
2746            self.set_watermark(field.into());
2747            self
2748        }
2749        ///If `transaction_offset` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2750        pub fn transaction_offset_opt_mut(&mut self) -> Option<&mut u64> {
2751            self.transaction_offset.as_mut().map(|field| field as _)
2752        }
2753        ///Returns a mutable reference to `transaction_offset`.
2754        ///If the field is unset, it is first initialized with the default value.
2755        pub fn transaction_offset_mut(&mut self) -> &mut u64 {
2756            self.transaction_offset.get_or_insert_default()
2757        }
2758        ///If `transaction_offset` is set, returns [`Some`] with the value; otherwise returns [`None`].
2759        pub fn transaction_offset_opt(&self) -> Option<u64> {
2760            self.transaction_offset.as_ref().map(|field| *field)
2761        }
2762        ///Sets `transaction_offset` with the provided value.
2763        pub fn set_transaction_offset(&mut self, field: u64) {
2764            self.transaction_offset = Some(field);
2765        }
2766        ///Sets `transaction_offset` with the provided value.
2767        pub fn with_transaction_offset(mut self, field: u64) -> Self {
2768            self.set_transaction_offset(field);
2769            self
2770        }
2771    }
2772    impl super::TransactionLiteral {
2773        pub const fn const_default() -> Self {
2774            Self { polarity: None }
2775        }
2776        #[doc(hidden)]
2777        pub fn default_instance() -> &'static Self {
2778            static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
2779            &DEFAULT
2780        }
2781        ///Returns the value of `include`, or the default value if `include` is unset.
2782        pub fn include(&self) -> &super::TransactionPredicate {
2783            if let Some(super::transaction_literal::Polarity::Include(field)) = &self
2784                .polarity
2785            {
2786                field as _
2787            } else {
2788                super::TransactionPredicate::default_instance() as _
2789            }
2790        }
2791        ///If `include` is set, returns [`Some`] with the value; otherwise returns [`None`].
2792        pub fn include_opt(&self) -> Option<&super::TransactionPredicate> {
2793            if let Some(super::transaction_literal::Polarity::Include(field)) = &self
2794                .polarity
2795            {
2796                Some(field as _)
2797            } else {
2798                None
2799            }
2800        }
2801        ///If `include` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2802        pub fn include_opt_mut(&mut self) -> Option<&mut super::TransactionPredicate> {
2803            if let Some(super::transaction_literal::Polarity::Include(field)) = &mut self
2804                .polarity
2805            {
2806                Some(field as _)
2807            } else {
2808                None
2809            }
2810        }
2811        ///Returns a mutable reference to `include`.
2812        ///If the field is unset, it is first initialized with the default value.
2813        ///If any other oneof field in the same oneof is set, it will be cleared.
2814        pub fn include_mut(&mut self) -> &mut super::TransactionPredicate {
2815            if self.include_opt_mut().is_none() {
2816                self.polarity = Some(
2817                    super::transaction_literal::Polarity::Include(
2818                        super::TransactionPredicate::default(),
2819                    ),
2820                );
2821            }
2822            self.include_opt_mut().unwrap()
2823        }
2824        ///Sets `include` with the provided value.
2825        ///If any other oneof field in the same oneof is set, it will be cleared.
2826        pub fn set_include<T: Into<super::TransactionPredicate>>(&mut self, field: T) {
2827            self.polarity = Some(
2828                super::transaction_literal::Polarity::Include(field.into().into()),
2829            );
2830        }
2831        ///Sets `include` with the provided value.
2832        ///If any other oneof field in the same oneof is set, it will be cleared.
2833        pub fn with_include<T: Into<super::TransactionPredicate>>(
2834            mut self,
2835            field: T,
2836        ) -> Self {
2837            self.set_include(field.into());
2838            self
2839        }
2840        ///Returns the value of `exclude`, or the default value if `exclude` is unset.
2841        pub fn exclude(&self) -> &super::TransactionPredicate {
2842            if let Some(super::transaction_literal::Polarity::Exclude(field)) = &self
2843                .polarity
2844            {
2845                field as _
2846            } else {
2847                super::TransactionPredicate::default_instance() as _
2848            }
2849        }
2850        ///If `exclude` is set, returns [`Some`] with the value; otherwise returns [`None`].
2851        pub fn exclude_opt(&self) -> Option<&super::TransactionPredicate> {
2852            if let Some(super::transaction_literal::Polarity::Exclude(field)) = &self
2853                .polarity
2854            {
2855                Some(field as _)
2856            } else {
2857                None
2858            }
2859        }
2860        ///If `exclude` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2861        pub fn exclude_opt_mut(&mut self) -> Option<&mut super::TransactionPredicate> {
2862            if let Some(super::transaction_literal::Polarity::Exclude(field)) = &mut self
2863                .polarity
2864            {
2865                Some(field as _)
2866            } else {
2867                None
2868            }
2869        }
2870        ///Returns a mutable reference to `exclude`.
2871        ///If the field is unset, it is first initialized with the default value.
2872        ///If any other oneof field in the same oneof is set, it will be cleared.
2873        pub fn exclude_mut(&mut self) -> &mut super::TransactionPredicate {
2874            if self.exclude_opt_mut().is_none() {
2875                self.polarity = Some(
2876                    super::transaction_literal::Polarity::Exclude(
2877                        super::TransactionPredicate::default(),
2878                    ),
2879                );
2880            }
2881            self.exclude_opt_mut().unwrap()
2882        }
2883        ///Sets `exclude` with the provided value.
2884        ///If any other oneof field in the same oneof is set, it will be cleared.
2885        pub fn set_exclude<T: Into<super::TransactionPredicate>>(&mut self, field: T) {
2886            self.polarity = Some(
2887                super::transaction_literal::Polarity::Exclude(field.into().into()),
2888            );
2889        }
2890        ///Sets `exclude` with the provided value.
2891        ///If any other oneof field in the same oneof is set, it will be cleared.
2892        pub fn with_exclude<T: Into<super::TransactionPredicate>>(
2893            mut self,
2894            field: T,
2895        ) -> Self {
2896            self.set_exclude(field.into());
2897            self
2898        }
2899    }
2900    impl super::TransactionPredicate {
2901        pub const fn const_default() -> Self {
2902            Self { predicate: None }
2903        }
2904        #[doc(hidden)]
2905        pub fn default_instance() -> &'static Self {
2906            static DEFAULT: super::TransactionPredicate = super::TransactionPredicate::const_default();
2907            &DEFAULT
2908        }
2909        ///Returns the value of `sender`, or the default value if `sender` is unset.
2910        pub fn sender(&self) -> &super::SenderFilter {
2911            if let Some(super::transaction_predicate::Predicate::Sender(field)) = &self
2912                .predicate
2913            {
2914                field as _
2915            } else {
2916                super::SenderFilter::default_instance() as _
2917            }
2918        }
2919        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
2920        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
2921            if let Some(super::transaction_predicate::Predicate::Sender(field)) = &self
2922                .predicate
2923            {
2924                Some(field as _)
2925            } else {
2926                None
2927            }
2928        }
2929        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2930        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
2931            if let Some(super::transaction_predicate::Predicate::Sender(field)) = &mut self
2932                .predicate
2933            {
2934                Some(field as _)
2935            } else {
2936                None
2937            }
2938        }
2939        ///Returns a mutable reference to `sender`.
2940        ///If the field is unset, it is first initialized with the default value.
2941        ///If any other oneof field in the same oneof is set, it will be cleared.
2942        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
2943            if self.sender_opt_mut().is_none() {
2944                self.predicate = Some(
2945                    super::transaction_predicate::Predicate::Sender(
2946                        super::SenderFilter::default(),
2947                    ),
2948                );
2949            }
2950            self.sender_opt_mut().unwrap()
2951        }
2952        ///Sets `sender` with the provided value.
2953        ///If any other oneof field in the same oneof is set, it will be cleared.
2954        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
2955            self.predicate = Some(
2956                super::transaction_predicate::Predicate::Sender(field.into().into()),
2957            );
2958        }
2959        ///Sets `sender` with the provided value.
2960        ///If any other oneof field in the same oneof is set, it will be cleared.
2961        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
2962            self.set_sender(field.into());
2963            self
2964        }
2965        ///Returns the value of `affected_address`, or the default value if `affected_address` is unset.
2966        pub fn affected_address(&self) -> &super::AffectedAddressFilter {
2967            if let Some(
2968                super::transaction_predicate::Predicate::AffectedAddress(field),
2969            ) = &self.predicate
2970            {
2971                field as _
2972            } else {
2973                super::AffectedAddressFilter::default_instance() as _
2974            }
2975        }
2976        ///If `affected_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2977        pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
2978            if let Some(
2979                super::transaction_predicate::Predicate::AffectedAddress(field),
2980            ) = &self.predicate
2981            {
2982                Some(field as _)
2983            } else {
2984                None
2985            }
2986        }
2987        ///If `affected_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2988        pub fn affected_address_opt_mut(
2989            &mut self,
2990        ) -> Option<&mut super::AffectedAddressFilter> {
2991            if let Some(
2992                super::transaction_predicate::Predicate::AffectedAddress(field),
2993            ) = &mut self.predicate
2994            {
2995                Some(field as _)
2996            } else {
2997                None
2998            }
2999        }
3000        ///Returns a mutable reference to `affected_address`.
3001        ///If the field is unset, it is first initialized with the default value.
3002        ///If any other oneof field in the same oneof is set, it will be cleared.
3003        pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
3004            if self.affected_address_opt_mut().is_none() {
3005                self.predicate = Some(
3006                    super::transaction_predicate::Predicate::AffectedAddress(
3007                        super::AffectedAddressFilter::default(),
3008                    ),
3009                );
3010            }
3011            self.affected_address_opt_mut().unwrap()
3012        }
3013        ///Sets `affected_address` with the provided value.
3014        ///If any other oneof field in the same oneof is set, it will be cleared.
3015        pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
3016            &mut self,
3017            field: T,
3018        ) {
3019            self.predicate = Some(
3020                super::transaction_predicate::Predicate::AffectedAddress(
3021                    field.into().into(),
3022                ),
3023            );
3024        }
3025        ///Sets `affected_address` with the provided value.
3026        ///If any other oneof field in the same oneof is set, it will be cleared.
3027        pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
3028            mut self,
3029            field: T,
3030        ) -> Self {
3031            self.set_affected_address(field.into());
3032            self
3033        }
3034        ///Returns the value of `affected_object`, or the default value if `affected_object` is unset.
3035        pub fn affected_object(&self) -> &super::AffectedObjectFilter {
3036            if let Some(
3037                super::transaction_predicate::Predicate::AffectedObject(field),
3038            ) = &self.predicate
3039            {
3040                field as _
3041            } else {
3042                super::AffectedObjectFilter::default_instance() as _
3043            }
3044        }
3045        ///If `affected_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
3046        pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
3047            if let Some(
3048                super::transaction_predicate::Predicate::AffectedObject(field),
3049            ) = &self.predicate
3050            {
3051                Some(field as _)
3052            } else {
3053                None
3054            }
3055        }
3056        ///If `affected_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3057        pub fn affected_object_opt_mut(
3058            &mut self,
3059        ) -> Option<&mut super::AffectedObjectFilter> {
3060            if let Some(
3061                super::transaction_predicate::Predicate::AffectedObject(field),
3062            ) = &mut self.predicate
3063            {
3064                Some(field as _)
3065            } else {
3066                None
3067            }
3068        }
3069        ///Returns a mutable reference to `affected_object`.
3070        ///If the field is unset, it is first initialized with the default value.
3071        ///If any other oneof field in the same oneof is set, it will be cleared.
3072        pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
3073            if self.affected_object_opt_mut().is_none() {
3074                self.predicate = Some(
3075                    super::transaction_predicate::Predicate::AffectedObject(
3076                        super::AffectedObjectFilter::default(),
3077                    ),
3078                );
3079            }
3080            self.affected_object_opt_mut().unwrap()
3081        }
3082        ///Sets `affected_object` with the provided value.
3083        ///If any other oneof field in the same oneof is set, it will be cleared.
3084        pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
3085            &mut self,
3086            field: T,
3087        ) {
3088            self.predicate = Some(
3089                super::transaction_predicate::Predicate::AffectedObject(
3090                    field.into().into(),
3091                ),
3092            );
3093        }
3094        ///Sets `affected_object` with the provided value.
3095        ///If any other oneof field in the same oneof is set, it will be cleared.
3096        pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
3097            mut self,
3098            field: T,
3099        ) -> Self {
3100            self.set_affected_object(field.into());
3101            self
3102        }
3103        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
3104        pub fn move_call(&self) -> &super::MoveCallFilter {
3105            if let Some(super::transaction_predicate::Predicate::MoveCall(field)) = &self
3106                .predicate
3107            {
3108                field as _
3109            } else {
3110                super::MoveCallFilter::default_instance() as _
3111            }
3112        }
3113        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
3114        pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
3115            if let Some(super::transaction_predicate::Predicate::MoveCall(field)) = &self
3116                .predicate
3117            {
3118                Some(field as _)
3119            } else {
3120                None
3121            }
3122        }
3123        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3124        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
3125            if let Some(super::transaction_predicate::Predicate::MoveCall(field)) = &mut self
3126                .predicate
3127            {
3128                Some(field as _)
3129            } else {
3130                None
3131            }
3132        }
3133        ///Returns a mutable reference to `move_call`.
3134        ///If the field is unset, it is first initialized with the default value.
3135        ///If any other oneof field in the same oneof is set, it will be cleared.
3136        pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
3137            if self.move_call_opt_mut().is_none() {
3138                self.predicate = Some(
3139                    super::transaction_predicate::Predicate::MoveCall(
3140                        super::MoveCallFilter::default(),
3141                    ),
3142                );
3143            }
3144            self.move_call_opt_mut().unwrap()
3145        }
3146        ///Sets `move_call` with the provided value.
3147        ///If any other oneof field in the same oneof is set, it will be cleared.
3148        pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
3149            self.predicate = Some(
3150                super::transaction_predicate::Predicate::MoveCall(field.into().into()),
3151            );
3152        }
3153        ///Sets `move_call` with the provided value.
3154        ///If any other oneof field in the same oneof is set, it will be cleared.
3155        pub fn with_move_call<T: Into<super::MoveCallFilter>>(
3156            mut self,
3157            field: T,
3158        ) -> Self {
3159            self.set_move_call(field.into());
3160            self
3161        }
3162        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
3163        pub fn emit_module(&self) -> &super::EmitModuleFilter {
3164            if let Some(super::transaction_predicate::Predicate::EmitModule(field)) = &self
3165                .predicate
3166            {
3167                field as _
3168            } else {
3169                super::EmitModuleFilter::default_instance() as _
3170            }
3171        }
3172        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3173        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
3174            if let Some(super::transaction_predicate::Predicate::EmitModule(field)) = &self
3175                .predicate
3176            {
3177                Some(field as _)
3178            } else {
3179                None
3180            }
3181        }
3182        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3183        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
3184            if let Some(super::transaction_predicate::Predicate::EmitModule(field)) = &mut self
3185                .predicate
3186            {
3187                Some(field as _)
3188            } else {
3189                None
3190            }
3191        }
3192        ///Returns a mutable reference to `emit_module`.
3193        ///If the field is unset, it is first initialized with the default value.
3194        ///If any other oneof field in the same oneof is set, it will be cleared.
3195        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
3196            if self.emit_module_opt_mut().is_none() {
3197                self.predicate = Some(
3198                    super::transaction_predicate::Predicate::EmitModule(
3199                        super::EmitModuleFilter::default(),
3200                    ),
3201                );
3202            }
3203            self.emit_module_opt_mut().unwrap()
3204        }
3205        ///Sets `emit_module` with the provided value.
3206        ///If any other oneof field in the same oneof is set, it will be cleared.
3207        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
3208            self.predicate = Some(
3209                super::transaction_predicate::Predicate::EmitModule(field.into().into()),
3210            );
3211        }
3212        ///Sets `emit_module` with the provided value.
3213        ///If any other oneof field in the same oneof is set, it will be cleared.
3214        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
3215            mut self,
3216            field: T,
3217        ) -> Self {
3218            self.set_emit_module(field.into());
3219            self
3220        }
3221        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
3222        pub fn event_type(&self) -> &super::EventTypeFilter {
3223            if let Some(super::transaction_predicate::Predicate::EventType(field)) = &self
3224                .predicate
3225            {
3226                field as _
3227            } else {
3228                super::EventTypeFilter::default_instance() as _
3229            }
3230        }
3231        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
3232        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
3233            if let Some(super::transaction_predicate::Predicate::EventType(field)) = &self
3234                .predicate
3235            {
3236                Some(field as _)
3237            } else {
3238                None
3239            }
3240        }
3241        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3242        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
3243            if let Some(super::transaction_predicate::Predicate::EventType(field)) = &mut self
3244                .predicate
3245            {
3246                Some(field as _)
3247            } else {
3248                None
3249            }
3250        }
3251        ///Returns a mutable reference to `event_type`.
3252        ///If the field is unset, it is first initialized with the default value.
3253        ///If any other oneof field in the same oneof is set, it will be cleared.
3254        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
3255            if self.event_type_opt_mut().is_none() {
3256                self.predicate = Some(
3257                    super::transaction_predicate::Predicate::EventType(
3258                        super::EventTypeFilter::default(),
3259                    ),
3260                );
3261            }
3262            self.event_type_opt_mut().unwrap()
3263        }
3264        ///Sets `event_type` with the provided value.
3265        ///If any other oneof field in the same oneof is set, it will be cleared.
3266        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
3267            self.predicate = Some(
3268                super::transaction_predicate::Predicate::EventType(field.into().into()),
3269            );
3270        }
3271        ///Sets `event_type` with the provided value.
3272        ///If any other oneof field in the same oneof is set, it will be cleared.
3273        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
3274            mut self,
3275            field: T,
3276        ) -> Self {
3277            self.set_event_type(field.into());
3278            self
3279        }
3280        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
3281        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
3282            if let Some(
3283                super::transaction_predicate::Predicate::EventStreamHead(field),
3284            ) = &self.predicate
3285            {
3286                field as _
3287            } else {
3288                super::EventStreamHeadFilter::default_instance() as _
3289            }
3290        }
3291        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
3292        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
3293            if let Some(
3294                super::transaction_predicate::Predicate::EventStreamHead(field),
3295            ) = &self.predicate
3296            {
3297                Some(field as _)
3298            } else {
3299                None
3300            }
3301        }
3302        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3303        pub fn event_stream_head_opt_mut(
3304            &mut self,
3305        ) -> Option<&mut super::EventStreamHeadFilter> {
3306            if let Some(
3307                super::transaction_predicate::Predicate::EventStreamHead(field),
3308            ) = &mut self.predicate
3309            {
3310                Some(field as _)
3311            } else {
3312                None
3313            }
3314        }
3315        ///Returns a mutable reference to `event_stream_head`.
3316        ///If the field is unset, it is first initialized with the default value.
3317        ///If any other oneof field in the same oneof is set, it will be cleared.
3318        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
3319            if self.event_stream_head_opt_mut().is_none() {
3320                self.predicate = Some(
3321                    super::transaction_predicate::Predicate::EventStreamHead(
3322                        super::EventStreamHeadFilter::default(),
3323                    ),
3324                );
3325            }
3326            self.event_stream_head_opt_mut().unwrap()
3327        }
3328        ///Sets `event_stream_head` with the provided value.
3329        ///If any other oneof field in the same oneof is set, it will be cleared.
3330        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
3331            &mut self,
3332            field: T,
3333        ) {
3334            self.predicate = Some(
3335                super::transaction_predicate::Predicate::EventStreamHead(
3336                    field.into().into(),
3337                ),
3338            );
3339        }
3340        ///Sets `event_stream_head` with the provided value.
3341        ///If any other oneof field in the same oneof is set, it will be cleared.
3342        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
3343            mut self,
3344            field: T,
3345        ) -> Self {
3346            self.set_event_stream_head(field.into());
3347            self
3348        }
3349    }
3350    impl super::TransactionTerm {
3351        pub const fn const_default() -> Self {
3352            Self { literals: Vec::new() }
3353        }
3354        #[doc(hidden)]
3355        pub fn default_instance() -> &'static Self {
3356            static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
3357            &DEFAULT
3358        }
3359        ///Returns the value of `literals`, or the default value if `literals` is unset.
3360        pub fn literals(&self) -> &[super::TransactionLiteral] {
3361            &self.literals
3362        }
3363        ///Returns a mutable reference to `literals`.
3364        ///If the field is unset, it is first initialized with the default value.
3365        pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
3366            &mut self.literals
3367        }
3368        ///Sets `literals` with the provided value.
3369        pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
3370            self.literals = field;
3371        }
3372        ///Sets `literals` with the provided value.
3373        pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
3374            self.set_literals(field);
3375            self
3376        }
3377    }
3378    impl super::Watermark {
3379        pub const fn const_default() -> Self {
3380            Self {
3381                cursor: None,
3382                checkpoint_hi: None,
3383                checkpoint_lo: None,
3384            }
3385        }
3386        #[doc(hidden)]
3387        pub fn default_instance() -> &'static Self {
3388            static DEFAULT: super::Watermark = super::Watermark::const_default();
3389            &DEFAULT
3390        }
3391        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
3392        pub fn cursor_opt(&self) -> Option<&[u8]> {
3393            self.cursor.as_ref().map(|field| field as _)
3394        }
3395        ///Sets `cursor` with the provided value.
3396        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
3397            self.cursor = Some(field.into().into());
3398        }
3399        ///Sets `cursor` with the provided value.
3400        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
3401            self.set_cursor(field.into());
3402            self
3403        }
3404        ///If `checkpoint_hi` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3405        pub fn checkpoint_hi_opt_mut(&mut self) -> Option<&mut u64> {
3406            self.checkpoint_hi.as_mut().map(|field| field as _)
3407        }
3408        ///Returns a mutable reference to `checkpoint_hi`.
3409        ///If the field is unset, it is first initialized with the default value.
3410        pub fn checkpoint_hi_mut(&mut self) -> &mut u64 {
3411            self.checkpoint_hi.get_or_insert_default()
3412        }
3413        ///If `checkpoint_hi` is set, returns [`Some`] with the value; otherwise returns [`None`].
3414        pub fn checkpoint_hi_opt(&self) -> Option<u64> {
3415            self.checkpoint_hi.as_ref().map(|field| *field)
3416        }
3417        ///Sets `checkpoint_hi` with the provided value.
3418        pub fn set_checkpoint_hi(&mut self, field: u64) {
3419            self.checkpoint_hi = Some(field);
3420        }
3421        ///Sets `checkpoint_hi` with the provided value.
3422        pub fn with_checkpoint_hi(mut self, field: u64) -> Self {
3423            self.set_checkpoint_hi(field);
3424            self
3425        }
3426        ///If `checkpoint_lo` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3427        pub fn checkpoint_lo_opt_mut(&mut self) -> Option<&mut u64> {
3428            self.checkpoint_lo.as_mut().map(|field| field as _)
3429        }
3430        ///Returns a mutable reference to `checkpoint_lo`.
3431        ///If the field is unset, it is first initialized with the default value.
3432        pub fn checkpoint_lo_mut(&mut self) -> &mut u64 {
3433            self.checkpoint_lo.get_or_insert_default()
3434        }
3435        ///If `checkpoint_lo` is set, returns [`Some`] with the value; otherwise returns [`None`].
3436        pub fn checkpoint_lo_opt(&self) -> Option<u64> {
3437            self.checkpoint_lo.as_ref().map(|field| *field)
3438        }
3439        ///Sets `checkpoint_lo` with the provided value.
3440        pub fn set_checkpoint_lo(&mut self, field: u64) {
3441            self.checkpoint_lo = Some(field);
3442        }
3443        ///Sets `checkpoint_lo` with the provided value.
3444        pub fn with_checkpoint_lo(mut self, field: u64) -> Self {
3445            self.set_checkpoint_lo(field);
3446            self
3447        }
3448    }
3449}