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 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14 self.address.as_mut().map(|field| field as _)
15 }
16 pub fn address_mut(&mut self) -> &mut String {
19 self.address.get_or_insert_default()
20 }
21 pub fn address_opt(&self) -> Option<&str> {
23 self.address.as_ref().map(|field| field as _)
24 }
25 pub fn set_address<T: Into<String>>(&mut self, field: T) {
27 self.address = Some(field.into().into());
28 }
29 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 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
46 self.object_id.as_mut().map(|field| field as _)
47 }
48 pub fn object_id_mut(&mut self) -> &mut String {
51 self.object_id.get_or_insert_default()
52 }
53 pub fn object_id_opt(&self) -> Option<&str> {
55 self.object_id.as_ref().map(|field| field as _)
56 }
57 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
59 self.object_id = Some(field.into().into());
60 }
61 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 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 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 pub fn checkpoint_mut(&mut self) -> &mut super::super::v2::Checkpoint {
95 self.checkpoint.get_or_insert_default()
96 }
97 pub fn checkpoint_opt(&self) -> Option<&super::super::v2::Checkpoint> {
99 self.checkpoint.as_ref().map(|field| field as _)
100 }
101 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 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 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 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
125 self.watermark.as_mut().map(|field| field as _)
126 }
127 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
130 self.watermark.get_or_insert_default()
131 }
132 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
134 self.watermark.as_ref().map(|field| field as _)
135 }
136 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
138 self.watermark = Some(field.into().into());
139 }
140 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 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
157 self.module.as_mut().map(|field| field as _)
158 }
159 pub fn module_mut(&mut self) -> &mut String {
162 self.module.get_or_insert_default()
163 }
164 pub fn module_opt(&self) -> Option<&str> {
166 self.module.as_ref().map(|field| field as _)
167 }
168 pub fn set_module<T: Into<String>>(&mut self, field: T) {
170 self.module = Some(field.into().into());
171 }
172 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 pub fn terms(&self) -> &[super::EventTerm] {
189 &self.terms
190 }
191 pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
194 &mut self.terms
195 }
196 pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
198 self.terms = field;
199 }
200 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 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 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
231 self.watermark.as_mut().map(|field| field as _)
232 }
233 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
236 self.watermark.get_or_insert_default()
237 }
238 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
240 self.watermark.as_ref().map(|field| field as _)
241 }
242 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
244 self.watermark = Some(field.into().into());
245 }
246 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
248 self.set_watermark(field.into());
249 self
250 }
251 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
253 self.checkpoint.as_mut().map(|field| field as _)
254 }
255 pub fn checkpoint_mut(&mut self) -> &mut u64 {
258 self.checkpoint.get_or_insert_default()
259 }
260 pub fn checkpoint_opt(&self) -> Option<u64> {
262 self.checkpoint.as_ref().map(|field| *field)
263 }
264 pub fn set_checkpoint(&mut self, field: u64) {
266 self.checkpoint = Some(field);
267 }
268 pub fn with_checkpoint(mut self, field: u64) -> Self {
270 self.set_checkpoint(field);
271 self
272 }
273 pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
275 self.event_index.as_mut().map(|field| field as _)
276 }
277 pub fn event_index_mut(&mut self) -> &mut u32 {
280 self.event_index.get_or_insert_default()
281 }
282 pub fn event_index_opt(&self) -> Option<u32> {
284 self.event_index.as_ref().map(|field| *field)
285 }
286 pub fn set_event_index(&mut self, field: u32) {
288 self.event_index = Some(field);
289 }
290 pub fn with_event_index(mut self, field: u32) -> Self {
292 self.set_event_index(field);
293 self
294 }
295 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
297 self.transaction_digest.as_mut().map(|field| field as _)
298 }
299 pub fn transaction_digest_mut(&mut self) -> &mut String {
302 self.transaction_digest.get_or_insert_default()
303 }
304 pub fn transaction_digest_opt(&self) -> Option<&str> {
306 self.transaction_digest.as_ref().map(|field| field as _)
307 }
308 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
310 self.transaction_digest = Some(field.into().into());
311 }
312 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
314 self.set_transaction_digest(field.into());
315 self
316 }
317 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 pub fn event_opt_mut(&mut self) -> Option<&mut super::super::v2::Event> {
326 self.event.as_mut().map(|field| field as _)
327 }
328 pub fn event_mut(&mut self) -> &mut super::super::v2::Event {
331 self.event.get_or_insert_default()
332 }
333 pub fn event_opt(&self) -> Option<&super::super::v2::Event> {
335 self.event.as_ref().map(|field| field as _)
336 }
337 pub fn set_event<T: Into<super::super::v2::Event>>(&mut self, field: T) {
339 self.event = Some(field.into().into());
340 }
341 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 pub fn transaction_offset_opt_mut(&mut self) -> Option<&mut u64> {
348 self.transaction_offset.as_mut().map(|field| field as _)
349 }
350 pub fn transaction_offset_mut(&mut self) -> &mut u64 {
353 self.transaction_offset.get_or_insert_default()
354 }
355 pub fn transaction_offset_opt(&self) -> Option<u64> {
357 self.transaction_offset.as_ref().map(|field| *field)
358 }
359 pub fn set_transaction_offset(&mut self, field: u64) {
361 self.transaction_offset = Some(field);
362 }
363 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 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 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 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 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 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 pub fn with_include<T: Into<super::EventPredicate>>(mut self, field: T) -> Self {
429 self.set_include(field.into());
430 self
431 }
432 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 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 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 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 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 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 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 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 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 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 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 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
549 self.set_sender(field.into());
550 self
551 }
552 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
746 self.stream_id.as_mut().map(|field| field as _)
747 }
748 pub fn stream_id_mut(&mut self) -> &mut String {
751 self.stream_id.get_or_insert_default()
752 }
753 pub fn stream_id_opt(&self) -> Option<&str> {
755 self.stream_id.as_ref().map(|field| field as _)
756 }
757 pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
759 self.stream_id = Some(field.into().into());
760 }
761 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 pub fn literals(&self) -> &[super::EventLiteral] {
778 &self.literals
779 }
780 pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
783 &mut self.literals
784 }
785 pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
787 self.literals = field;
788 }
789 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 pub fn type_opt_mut(&mut self) -> Option<&mut String> {
806 self.r#type.as_mut().map(|field| field as _)
807 }
808 pub fn type_mut(&mut self) -> &mut String {
811 self.r#type.get_or_insert_default()
812 }
813 pub fn type_opt(&self) -> Option<&str> {
815 self.r#type.as_ref().map(|field| field as _)
816 }
817 pub fn set_type<T: Into<String>>(&mut self, field: T) {
819 self.r#type = Some(field.into().into());
820 }
821 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 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
841 self.object_id.as_mut().map(|field| field as _)
842 }
843 pub fn object_id_mut(&mut self) -> &mut String {
846 self.object_id.get_or_insert_default()
847 }
848 pub fn object_id_opt(&self) -> Option<&str> {
850 self.object_id.as_ref().map(|field| field as _)
851 }
852 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
854 self.object_id = Some(field.into().into());
855 }
856 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
858 self.set_object_id(field.into());
859 self
860 }
861 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
863 self.checkpoint.as_mut().map(|field| field as _)
864 }
865 pub fn checkpoint_mut(&mut self) -> &mut u64 {
868 self.checkpoint.get_or_insert_default()
869 }
870 pub fn checkpoint_opt(&self) -> Option<u64> {
872 self.checkpoint.as_ref().map(|field| *field)
873 }
874 pub fn set_checkpoint(&mut self, field: u64) {
876 self.checkpoint = Some(field);
877 }
878 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 pub fn checkpoint_summary_opt(&self) -> Option<&[u8]> {
898 self.checkpoint_summary.as_ref().map(|field| field as _)
899 }
900 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
1071 self.read_mask.get_or_insert_default()
1072 }
1073 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
1075 self.read_mask.as_ref().map(|field| field as _)
1076 }
1077 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
1079 self.read_mask = Some(field.into().into());
1080 }
1081 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 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1091 self.start_checkpoint.as_mut().map(|field| field as _)
1092 }
1093 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
1096 self.start_checkpoint.get_or_insert_default()
1097 }
1098 pub fn start_checkpoint_opt(&self) -> Option<u64> {
1100 self.start_checkpoint.as_ref().map(|field| *field)
1101 }
1102 pub fn set_start_checkpoint(&mut self, field: u64) {
1104 self.start_checkpoint = Some(field);
1105 }
1106 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
1108 self.set_start_checkpoint(field);
1109 self
1110 }
1111 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1113 self.end_checkpoint.as_mut().map(|field| field as _)
1114 }
1115 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
1118 self.end_checkpoint.get_or_insert_default()
1119 }
1120 pub fn end_checkpoint_opt(&self) -> Option<u64> {
1122 self.end_checkpoint.as_ref().map(|field| *field)
1123 }
1124 pub fn set_end_checkpoint(&mut self, field: u64) {
1126 self.end_checkpoint = Some(field);
1127 }
1128 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
1130 self.set_end_checkpoint(field);
1131 self
1132 }
1133 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 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
1142 self.filter.as_mut().map(|field| field as _)
1143 }
1144 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
1147 self.filter.get_or_insert_default()
1148 }
1149 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
1151 self.filter.as_ref().map(|field| field as _)
1152 }
1153 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
1155 self.filter = Some(field.into().into());
1156 }
1157 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 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 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
1174 self.options.as_mut().map(|field| field as _)
1175 }
1176 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
1179 self.options.get_or_insert_default()
1180 }
1181 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
1183 self.options.as_ref().map(|field| field as _)
1184 }
1185 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
1187 self.options = Some(field.into().into());
1188 }
1189 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 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 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 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 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 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 pub fn with_item<T: Into<super::CheckpointItem>>(mut self, field: T) -> Self {
1257 self.set_item(field.into());
1258 self
1259 }
1260 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 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 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 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 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 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
1315 self.set_watermark(field.into());
1316 self
1317 }
1318 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 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 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 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 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 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 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 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
1397 self.read_mask.get_or_insert_default()
1398 }
1399 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
1401 self.read_mask.as_ref().map(|field| field as _)
1402 }
1403 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
1405 self.read_mask = Some(field.into().into());
1406 }
1407 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 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1417 self.start_checkpoint.as_mut().map(|field| field as _)
1418 }
1419 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
1422 self.start_checkpoint.get_or_insert_default()
1423 }
1424 pub fn start_checkpoint_opt(&self) -> Option<u64> {
1426 self.start_checkpoint.as_ref().map(|field| *field)
1427 }
1428 pub fn set_start_checkpoint(&mut self, field: u64) {
1430 self.start_checkpoint = Some(field);
1431 }
1432 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
1434 self.set_start_checkpoint(field);
1435 self
1436 }
1437 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1439 self.end_checkpoint.as_mut().map(|field| field as _)
1440 }
1441 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
1444 self.end_checkpoint.get_or_insert_default()
1445 }
1446 pub fn end_checkpoint_opt(&self) -> Option<u64> {
1448 self.end_checkpoint.as_ref().map(|field| *field)
1449 }
1450 pub fn set_end_checkpoint(&mut self, field: u64) {
1452 self.end_checkpoint = Some(field);
1453 }
1454 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
1456 self.set_end_checkpoint(field);
1457 self
1458 }
1459 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 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
1468 self.filter.as_mut().map(|field| field as _)
1469 }
1470 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
1473 self.filter.get_or_insert_default()
1474 }
1475 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
1477 self.filter.as_ref().map(|field| field as _)
1478 }
1479 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
1481 self.filter = Some(field.into().into());
1482 }
1483 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
1485 self.set_filter(field.into());
1486 self
1487 }
1488 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 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
1497 self.options.as_mut().map(|field| field as _)
1498 }
1499 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
1502 self.options.get_or_insert_default()
1503 }
1504 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
1506 self.options.as_ref().map(|field| field as _)
1507 }
1508 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
1510 self.options = Some(field.into().into());
1511 }
1512 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 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 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 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 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 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 pub fn with_item<T: Into<super::EventItem>>(mut self, field: T) -> Self {
1580 self.set_item(field.into());
1581 self
1582 }
1583 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 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 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 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 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 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
1636 self.set_watermark(field.into());
1637 self
1638 }
1639 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 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 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 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 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 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 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 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
1718 self.read_mask.get_or_insert_default()
1719 }
1720 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
1722 self.read_mask.as_ref().map(|field| field as _)
1723 }
1724 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
1726 self.read_mask = Some(field.into().into());
1727 }
1728 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 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1738 self.start_checkpoint.as_mut().map(|field| field as _)
1739 }
1740 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
1743 self.start_checkpoint.get_or_insert_default()
1744 }
1745 pub fn start_checkpoint_opt(&self) -> Option<u64> {
1747 self.start_checkpoint.as_ref().map(|field| *field)
1748 }
1749 pub fn set_start_checkpoint(&mut self, field: u64) {
1751 self.start_checkpoint = Some(field);
1752 }
1753 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
1755 self.set_start_checkpoint(field);
1756 self
1757 }
1758 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
1760 self.end_checkpoint.as_mut().map(|field| field as _)
1761 }
1762 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
1765 self.end_checkpoint.get_or_insert_default()
1766 }
1767 pub fn end_checkpoint_opt(&self) -> Option<u64> {
1769 self.end_checkpoint.as_ref().map(|field| *field)
1770 }
1771 pub fn set_end_checkpoint(&mut self, field: u64) {
1773 self.end_checkpoint = Some(field);
1774 }
1775 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
1777 self.set_end_checkpoint(field);
1778 self
1779 }
1780 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 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
1789 self.filter.as_mut().map(|field| field as _)
1790 }
1791 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
1794 self.filter.get_or_insert_default()
1795 }
1796 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
1798 self.filter.as_ref().map(|field| field as _)
1799 }
1800 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
1802 self.filter = Some(field.into().into());
1803 }
1804 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 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 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
1821 self.options.as_mut().map(|field| field as _)
1822 }
1823 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
1826 self.options.get_or_insert_default()
1827 }
1828 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
1830 self.options.as_ref().map(|field| field as _)
1831 }
1832 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
1834 self.options = Some(field.into().into());
1835 }
1836 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 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 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 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 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 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 pub fn with_item<T: Into<super::TransactionItem>>(mut self, field: T) -> Self {
1904 self.set_item(field.into());
1905 self
1906 }
1907 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 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 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 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 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 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
1962 self.set_watermark(field.into());
1963 self
1964 }
1965 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 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 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 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 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 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 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 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 pub fn leaf_mut(&mut self) -> &mut super::super::v2::ObjectReference {
2052 self.leaf.get_or_insert_default()
2053 }
2054 pub fn leaf_opt(&self) -> Option<&super::super::v2::ObjectReference> {
2056 self.leaf.as_ref().map(|field| field as _)
2057 }
2058 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 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 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 pub fn merkle_proof_opt_mut(&mut self) -> Option<&mut super::MerkleProof> {
2082 self.merkle_proof.as_mut().map(|field| field as _)
2083 }
2084 pub fn merkle_proof_mut(&mut self) -> &mut super::MerkleProof {
2087 self.merkle_proof.get_or_insert_default()
2088 }
2089 pub fn merkle_proof_opt(&self) -> Option<&super::MerkleProof> {
2091 self.merkle_proof.as_ref().map(|field| field as _)
2092 }
2093 pub fn set_merkle_proof<T: Into<super::MerkleProof>>(&mut self, field: T) {
2095 self.merkle_proof = Some(field.into().into());
2096 }
2097 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 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 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 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 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 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 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 pub fn index_opt_mut(&mut self) -> Option<&mut u64> {
2177 self.index.as_mut().map(|field| field as _)
2178 }
2179 pub fn index_mut(&mut self) -> &mut u64 {
2182 self.index.get_or_insert_default()
2183 }
2184 pub fn index_opt(&self) -> Option<u64> {
2186 self.index.as_ref().map(|field| *field)
2187 }
2188 pub fn set_index(&mut self, field: u64) {
2190 self.index = Some(field);
2191 }
2192 pub fn with_index(mut self, field: u64) -> Self {
2194 self.set_index(field);
2195 self
2196 }
2197 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 pub fn left_leaf_opt_mut(&mut self) -> Option<&mut super::MerkleNeighbourLeaf> {
2206 self.left_leaf.as_mut().map(|field| field as _)
2207 }
2208 pub fn left_leaf_mut(&mut self) -> &mut super::MerkleNeighbourLeaf {
2211 self.left_leaf.get_or_insert_default()
2212 }
2213 pub fn left_leaf_opt(&self) -> Option<&super::MerkleNeighbourLeaf> {
2215 self.left_leaf.as_ref().map(|field| field as _)
2216 }
2217 pub fn set_left_leaf<T: Into<super::MerkleNeighbourLeaf>>(&mut self, field: T) {
2219 self.left_leaf = Some(field.into().into());
2220 }
2221 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 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 pub fn right_leaf_opt_mut(&mut self) -> Option<&mut super::MerkleNeighbourLeaf> {
2238 self.right_leaf.as_mut().map(|field| field as _)
2239 }
2240 pub fn right_leaf_mut(&mut self) -> &mut super::MerkleNeighbourLeaf {
2243 self.right_leaf.get_or_insert_default()
2244 }
2245 pub fn right_leaf_opt(&self) -> Option<&super::MerkleNeighbourLeaf> {
2247 self.right_leaf.as_ref().map(|field| field as _)
2248 }
2249 pub fn set_right_leaf<T: Into<super::MerkleNeighbourLeaf>>(&mut self, field: T) {
2251 self.right_leaf = Some(field.into().into());
2252 }
2253 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 pub fn path(&self) -> &[super::MerkleNode] {
2273 &self.path
2274 }
2275 pub fn path_mut(&mut self) -> &mut Vec<super::MerkleNode> {
2278 &mut self.path
2279 }
2280 pub fn set_path(&mut self, field: Vec<super::MerkleNode>) {
2282 self.path = field;
2283 }
2284 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 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
2301 self.function.as_mut().map(|field| field as _)
2302 }
2303 pub fn function_mut(&mut self) -> &mut String {
2306 self.function.get_or_insert_default()
2307 }
2308 pub fn function_opt(&self) -> Option<&str> {
2310 self.function.as_ref().map(|field| field as _)
2311 }
2312 pub fn set_function<T: Into<String>>(&mut self, field: T) {
2314 self.function = Some(field.into().into());
2315 }
2316 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 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 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 pub fn object_ref_mut(&mut self) -> &mut super::super::v2::ObjectReference {
2355 self.object_ref.get_or_insert_default()
2356 }
2357 pub fn object_ref_opt(&self) -> Option<&super::super::v2::ObjectReference> {
2359 self.object_ref.as_ref().map(|field| field as _)
2360 }
2361 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 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 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 pub fn merkle_proof_opt_mut(&mut self) -> Option<&mut super::MerkleProof> {
2385 self.merkle_proof.as_mut().map(|field| field as _)
2386 }
2387 pub fn merkle_proof_mut(&mut self) -> &mut super::MerkleProof {
2390 self.merkle_proof.get_or_insert_default()
2391 }
2392 pub fn merkle_proof_opt(&self) -> Option<&super::MerkleProof> {
2394 self.merkle_proof.as_ref().map(|field| field as _)
2395 }
2396 pub fn set_merkle_proof<T: Into<super::MerkleProof>>(&mut self, field: T) {
2398 self.merkle_proof = Some(field.into().into());
2399 }
2400 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 pub fn leaf_index_opt_mut(&mut self) -> Option<&mut u64> {
2410 self.leaf_index.as_mut().map(|field| field as _)
2411 }
2412 pub fn leaf_index_mut(&mut self) -> &mut u64 {
2415 self.leaf_index.get_or_insert_default()
2416 }
2417 pub fn leaf_index_opt(&self) -> Option<u64> {
2419 self.leaf_index.as_ref().map(|field| *field)
2420 }
2421 pub fn set_leaf_index(&mut self, field: u64) {
2423 self.leaf_index = Some(field);
2424 }
2425 pub fn with_leaf_index(mut self, field: u64) -> Self {
2427 self.set_leaf_index(field);
2428 self
2429 }
2430 pub fn tree_root_opt(&self) -> Option<&[u8]> {
2432 self.tree_root.as_ref().map(|field| field as _)
2433 }
2434 pub fn set_tree_root<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2436 self.tree_root = Some(field.into().into());
2437 }
2438 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 pub fn object_data_opt(&self) -> Option<&[u8]> {
2448 self.object_data.as_ref().map(|field| field as _)
2449 }
2450 pub fn set_object_data<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2452 self.object_data = Some(field.into().into());
2453 }
2454 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 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 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 pub fn non_inclusion_proof_mut(
2493 &mut self,
2494 ) -> &mut super::MerkleNonInclusionProof {
2495 self.non_inclusion_proof.get_or_insert_default()
2496 }
2497 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 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 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 pub fn tree_root_opt(&self) -> Option<&[u8]> {
2520 self.tree_root.as_ref().map(|field| field as _)
2521 }
2522 pub fn set_tree_root<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2524 self.tree_root = Some(field.into().into());
2525 }
2526 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 pub fn limit_items_opt_mut(&mut self) -> Option<&mut u32> {
2561 self.limit_items.as_mut().map(|field| field as _)
2562 }
2563 pub fn limit_items_mut(&mut self) -> &mut u32 {
2566 self.limit_items.get_or_insert_default()
2567 }
2568 pub fn limit_items_opt(&self) -> Option<u32> {
2570 self.limit_items.as_ref().map(|field| *field)
2571 }
2572 pub fn set_limit_items(&mut self, field: u32) {
2574 self.limit_items = Some(field);
2575 }
2576 pub fn with_limit_items(mut self, field: u32) -> Self {
2578 self.set_limit_items(field);
2579 self
2580 }
2581 pub fn after_opt(&self) -> Option<&[u8]> {
2583 self.after.as_ref().map(|field| field as _)
2584 }
2585 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2587 self.after = Some(field.into().into());
2588 }
2589 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2591 self.set_after(field.into());
2592 self
2593 }
2594 pub fn before_opt(&self) -> Option<&[u8]> {
2596 self.before.as_ref().map(|field| field as _)
2597 }
2598 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2600 self.before = Some(field.into().into());
2601 }
2602 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 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2619 self.address.as_mut().map(|field| field as _)
2620 }
2621 pub fn address_mut(&mut self) -> &mut String {
2624 self.address.get_or_insert_default()
2625 }
2626 pub fn address_opt(&self) -> Option<&str> {
2628 self.address.as_ref().map(|field| field as _)
2629 }
2630 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2632 self.address = Some(field.into().into());
2633 }
2634 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 pub fn terms(&self) -> &[super::TransactionTerm] {
2651 &self.terms
2652 }
2653 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
2656 &mut self.terms
2657 }
2658 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
2660 self.terms = field;
2661 }
2662 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 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 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 pub fn transaction_mut(&mut self) -> &mut super::super::v2::ExecutedTransaction {
2699 self.transaction.get_or_insert_default()
2700 }
2701 pub fn transaction_opt(&self) -> Option<&super::super::v2::ExecutedTransaction> {
2703 self.transaction.as_ref().map(|field| field as _)
2704 }
2705 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 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 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 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
2729 self.watermark.as_mut().map(|field| field as _)
2730 }
2731 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
2734 self.watermark.get_or_insert_default()
2735 }
2736 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
2738 self.watermark.as_ref().map(|field| field as _)
2739 }
2740 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
2742 self.watermark = Some(field.into().into());
2743 }
2744 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
2746 self.set_watermark(field.into());
2747 self
2748 }
2749 pub fn transaction_offset_opt_mut(&mut self) -> Option<&mut u64> {
2751 self.transaction_offset.as_mut().map(|field| field as _)
2752 }
2753 pub fn transaction_offset_mut(&mut self) -> &mut u64 {
2756 self.transaction_offset.get_or_insert_default()
2757 }
2758 pub fn transaction_offset_opt(&self) -> Option<u64> {
2760 self.transaction_offset.as_ref().map(|field| *field)
2761 }
2762 pub fn set_transaction_offset(&mut self, field: u64) {
2764 self.transaction_offset = Some(field);
2765 }
2766 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
2962 self.set_sender(field.into());
2963 self
2964 }
2965 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 pub fn literals(&self) -> &[super::TransactionLiteral] {
3361 &self.literals
3362 }
3363 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
3366 &mut self.literals
3367 }
3368 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
3370 self.literals = field;
3371 }
3372 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 pub fn cursor_opt(&self) -> Option<&[u8]> {
3393 self.cursor.as_ref().map(|field| field as _)
3394 }
3395 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
3397 self.cursor = Some(field.into().into());
3398 }
3399 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
3401 self.set_cursor(field.into());
3402 self
3403 }
3404 pub fn checkpoint_hi_opt_mut(&mut self) -> Option<&mut u64> {
3406 self.checkpoint_hi.as_mut().map(|field| field as _)
3407 }
3408 pub fn checkpoint_hi_mut(&mut self) -> &mut u64 {
3411 self.checkpoint_hi.get_or_insert_default()
3412 }
3413 pub fn checkpoint_hi_opt(&self) -> Option<u64> {
3415 self.checkpoint_hi.as_ref().map(|field| *field)
3416 }
3417 pub fn set_checkpoint_hi(&mut self, field: u64) {
3419 self.checkpoint_hi = Some(field);
3420 }
3421 pub fn with_checkpoint_hi(mut self, field: u64) -> Self {
3423 self.set_checkpoint_hi(field);
3424 self
3425 }
3426 pub fn checkpoint_lo_opt_mut(&mut self) -> Option<&mut u64> {
3428 self.checkpoint_lo.as_mut().map(|field| field as _)
3429 }
3430 pub fn checkpoint_lo_mut(&mut self) -> &mut u64 {
3433 self.checkpoint_lo.get_or_insert_default()
3434 }
3435 pub fn checkpoint_lo_opt(&self) -> Option<u64> {
3437 self.checkpoint_lo.as_ref().map(|field| *field)
3438 }
3439 pub fn set_checkpoint_lo(&mut self, field: u64) {
3441 self.checkpoint_lo = Some(field);
3442 }
3443 pub fn with_checkpoint_lo(mut self, field: u64) -> Self {
3445 self.set_checkpoint_lo(field);
3446 self
3447 }
3448 }
3449}