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::PackageWriteFilter {
2536 pub const fn const_default() -> Self {
2537 Self {}
2538 }
2539 #[doc(hidden)]
2540 pub fn default_instance() -> &'static Self {
2541 static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
2542 &DEFAULT
2543 }
2544 }
2545 impl super::QueryEnd {
2546 pub const fn const_default() -> Self {
2547 Self { reason: 0 }
2548 }
2549 #[doc(hidden)]
2550 pub fn default_instance() -> &'static Self {
2551 static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
2552 &DEFAULT
2553 }
2554 }
2555 impl super::QueryOptions {
2556 pub const fn const_default() -> Self {
2557 Self {
2558 limit_items: None,
2559 after: None,
2560 before: None,
2561 ordering: 0,
2562 }
2563 }
2564 #[doc(hidden)]
2565 pub fn default_instance() -> &'static Self {
2566 static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
2567 &DEFAULT
2568 }
2569 pub fn limit_items_opt_mut(&mut self) -> Option<&mut u32> {
2571 self.limit_items.as_mut().map(|field| field as _)
2572 }
2573 pub fn limit_items_mut(&mut self) -> &mut u32 {
2576 self.limit_items.get_or_insert_default()
2577 }
2578 pub fn limit_items_opt(&self) -> Option<u32> {
2580 self.limit_items.as_ref().map(|field| *field)
2581 }
2582 pub fn set_limit_items(&mut self, field: u32) {
2584 self.limit_items = Some(field);
2585 }
2586 pub fn with_limit_items(mut self, field: u32) -> Self {
2588 self.set_limit_items(field);
2589 self
2590 }
2591 pub fn after_opt(&self) -> Option<&[u8]> {
2593 self.after.as_ref().map(|field| field as _)
2594 }
2595 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2597 self.after = Some(field.into().into());
2598 }
2599 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2601 self.set_after(field.into());
2602 self
2603 }
2604 pub fn before_opt(&self) -> Option<&[u8]> {
2606 self.before.as_ref().map(|field| field as _)
2607 }
2608 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2610 self.before = Some(field.into().into());
2611 }
2612 pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2614 self.set_before(field.into());
2615 self
2616 }
2617 }
2618 impl super::SenderFilter {
2619 pub const fn const_default() -> Self {
2620 Self { address: None }
2621 }
2622 #[doc(hidden)]
2623 pub fn default_instance() -> &'static Self {
2624 static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
2625 &DEFAULT
2626 }
2627 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2629 self.address.as_mut().map(|field| field as _)
2630 }
2631 pub fn address_mut(&mut self) -> &mut String {
2634 self.address.get_or_insert_default()
2635 }
2636 pub fn address_opt(&self) -> Option<&str> {
2638 self.address.as_ref().map(|field| field as _)
2639 }
2640 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2642 self.address = Some(field.into().into());
2643 }
2644 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2646 self.set_address(field.into());
2647 self
2648 }
2649 }
2650 impl super::TransactionFilter {
2651 pub const fn const_default() -> Self {
2652 Self { terms: Vec::new() }
2653 }
2654 #[doc(hidden)]
2655 pub fn default_instance() -> &'static Self {
2656 static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
2657 &DEFAULT
2658 }
2659 pub fn terms(&self) -> &[super::TransactionTerm] {
2661 &self.terms
2662 }
2663 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
2666 &mut self.terms
2667 }
2668 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
2670 self.terms = field;
2671 }
2672 pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
2674 self.set_terms(field);
2675 self
2676 }
2677 }
2678 impl super::TransactionItem {
2679 pub const fn const_default() -> Self {
2680 Self {
2681 transaction: None,
2682 watermark: None,
2683 transaction_offset: None,
2684 }
2685 }
2686 #[doc(hidden)]
2687 pub fn default_instance() -> &'static Self {
2688 static DEFAULT: super::TransactionItem = super::TransactionItem::const_default();
2689 &DEFAULT
2690 }
2691 pub fn transaction(&self) -> &super::super::v2::ExecutedTransaction {
2693 self.transaction
2694 .as_ref()
2695 .map(|field| field as _)
2696 .unwrap_or_else(|| {
2697 super::super::v2::ExecutedTransaction::default_instance() as _
2698 })
2699 }
2700 pub fn transaction_opt_mut(
2702 &mut self,
2703 ) -> Option<&mut super::super::v2::ExecutedTransaction> {
2704 self.transaction.as_mut().map(|field| field as _)
2705 }
2706 pub fn transaction_mut(&mut self) -> &mut super::super::v2::ExecutedTransaction {
2709 self.transaction.get_or_insert_default()
2710 }
2711 pub fn transaction_opt(&self) -> Option<&super::super::v2::ExecutedTransaction> {
2713 self.transaction.as_ref().map(|field| field as _)
2714 }
2715 pub fn set_transaction<T: Into<super::super::v2::ExecutedTransaction>>(
2717 &mut self,
2718 field: T,
2719 ) {
2720 self.transaction = Some(field.into().into());
2721 }
2722 pub fn with_transaction<T: Into<super::super::v2::ExecutedTransaction>>(
2724 mut self,
2725 field: T,
2726 ) -> Self {
2727 self.set_transaction(field.into());
2728 self
2729 }
2730 pub fn watermark(&self) -> &super::Watermark {
2732 self.watermark
2733 .as_ref()
2734 .map(|field| field as _)
2735 .unwrap_or_else(|| super::Watermark::default_instance() as _)
2736 }
2737 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
2739 self.watermark.as_mut().map(|field| field as _)
2740 }
2741 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
2744 self.watermark.get_or_insert_default()
2745 }
2746 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
2748 self.watermark.as_ref().map(|field| field as _)
2749 }
2750 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
2752 self.watermark = Some(field.into().into());
2753 }
2754 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
2756 self.set_watermark(field.into());
2757 self
2758 }
2759 pub fn transaction_offset_opt_mut(&mut self) -> Option<&mut u64> {
2761 self.transaction_offset.as_mut().map(|field| field as _)
2762 }
2763 pub fn transaction_offset_mut(&mut self) -> &mut u64 {
2766 self.transaction_offset.get_or_insert_default()
2767 }
2768 pub fn transaction_offset_opt(&self) -> Option<u64> {
2770 self.transaction_offset.as_ref().map(|field| *field)
2771 }
2772 pub fn set_transaction_offset(&mut self, field: u64) {
2774 self.transaction_offset = Some(field);
2775 }
2776 pub fn with_transaction_offset(mut self, field: u64) -> Self {
2778 self.set_transaction_offset(field);
2779 self
2780 }
2781 }
2782 impl super::TransactionLiteral {
2783 pub const fn const_default() -> Self {
2784 Self { polarity: None }
2785 }
2786 #[doc(hidden)]
2787 pub fn default_instance() -> &'static Self {
2788 static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
2789 &DEFAULT
2790 }
2791 pub fn include(&self) -> &super::TransactionPredicate {
2793 if let Some(super::transaction_literal::Polarity::Include(field)) = &self
2794 .polarity
2795 {
2796 field as _
2797 } else {
2798 super::TransactionPredicate::default_instance() as _
2799 }
2800 }
2801 pub fn include_opt(&self) -> Option<&super::TransactionPredicate> {
2803 if let Some(super::transaction_literal::Polarity::Include(field)) = &self
2804 .polarity
2805 {
2806 Some(field as _)
2807 } else {
2808 None
2809 }
2810 }
2811 pub fn include_opt_mut(&mut self) -> Option<&mut super::TransactionPredicate> {
2813 if let Some(super::transaction_literal::Polarity::Include(field)) = &mut self
2814 .polarity
2815 {
2816 Some(field as _)
2817 } else {
2818 None
2819 }
2820 }
2821 pub fn include_mut(&mut self) -> &mut super::TransactionPredicate {
2825 if self.include_opt_mut().is_none() {
2826 self.polarity = Some(
2827 super::transaction_literal::Polarity::Include(
2828 super::TransactionPredicate::default(),
2829 ),
2830 );
2831 }
2832 self.include_opt_mut().unwrap()
2833 }
2834 pub fn set_include<T: Into<super::TransactionPredicate>>(&mut self, field: T) {
2837 self.polarity = Some(
2838 super::transaction_literal::Polarity::Include(field.into().into()),
2839 );
2840 }
2841 pub fn with_include<T: Into<super::TransactionPredicate>>(
2844 mut self,
2845 field: T,
2846 ) -> Self {
2847 self.set_include(field.into());
2848 self
2849 }
2850 pub fn exclude(&self) -> &super::TransactionPredicate {
2852 if let Some(super::transaction_literal::Polarity::Exclude(field)) = &self
2853 .polarity
2854 {
2855 field as _
2856 } else {
2857 super::TransactionPredicate::default_instance() as _
2858 }
2859 }
2860 pub fn exclude_opt(&self) -> Option<&super::TransactionPredicate> {
2862 if let Some(super::transaction_literal::Polarity::Exclude(field)) = &self
2863 .polarity
2864 {
2865 Some(field as _)
2866 } else {
2867 None
2868 }
2869 }
2870 pub fn exclude_opt_mut(&mut self) -> Option<&mut super::TransactionPredicate> {
2872 if let Some(super::transaction_literal::Polarity::Exclude(field)) = &mut self
2873 .polarity
2874 {
2875 Some(field as _)
2876 } else {
2877 None
2878 }
2879 }
2880 pub fn exclude_mut(&mut self) -> &mut super::TransactionPredicate {
2884 if self.exclude_opt_mut().is_none() {
2885 self.polarity = Some(
2886 super::transaction_literal::Polarity::Exclude(
2887 super::TransactionPredicate::default(),
2888 ),
2889 );
2890 }
2891 self.exclude_opt_mut().unwrap()
2892 }
2893 pub fn set_exclude<T: Into<super::TransactionPredicate>>(&mut self, field: T) {
2896 self.polarity = Some(
2897 super::transaction_literal::Polarity::Exclude(field.into().into()),
2898 );
2899 }
2900 pub fn with_exclude<T: Into<super::TransactionPredicate>>(
2903 mut self,
2904 field: T,
2905 ) -> Self {
2906 self.set_exclude(field.into());
2907 self
2908 }
2909 }
2910 impl super::TransactionPredicate {
2911 pub const fn const_default() -> Self {
2912 Self { predicate: None }
2913 }
2914 #[doc(hidden)]
2915 pub fn default_instance() -> &'static Self {
2916 static DEFAULT: super::TransactionPredicate = super::TransactionPredicate::const_default();
2917 &DEFAULT
2918 }
2919 pub fn sender(&self) -> &super::SenderFilter {
2921 if let Some(super::transaction_predicate::Predicate::Sender(field)) = &self
2922 .predicate
2923 {
2924 field as _
2925 } else {
2926 super::SenderFilter::default_instance() as _
2927 }
2928 }
2929 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
2931 if let Some(super::transaction_predicate::Predicate::Sender(field)) = &self
2932 .predicate
2933 {
2934 Some(field as _)
2935 } else {
2936 None
2937 }
2938 }
2939 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
2941 if let Some(super::transaction_predicate::Predicate::Sender(field)) = &mut self
2942 .predicate
2943 {
2944 Some(field as _)
2945 } else {
2946 None
2947 }
2948 }
2949 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
2953 if self.sender_opt_mut().is_none() {
2954 self.predicate = Some(
2955 super::transaction_predicate::Predicate::Sender(
2956 super::SenderFilter::default(),
2957 ),
2958 );
2959 }
2960 self.sender_opt_mut().unwrap()
2961 }
2962 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
2965 self.predicate = Some(
2966 super::transaction_predicate::Predicate::Sender(field.into().into()),
2967 );
2968 }
2969 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
2972 self.set_sender(field.into());
2973 self
2974 }
2975 pub fn affected_address(&self) -> &super::AffectedAddressFilter {
2977 if let Some(
2978 super::transaction_predicate::Predicate::AffectedAddress(field),
2979 ) = &self.predicate
2980 {
2981 field as _
2982 } else {
2983 super::AffectedAddressFilter::default_instance() as _
2984 }
2985 }
2986 pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
2988 if let Some(
2989 super::transaction_predicate::Predicate::AffectedAddress(field),
2990 ) = &self.predicate
2991 {
2992 Some(field as _)
2993 } else {
2994 None
2995 }
2996 }
2997 pub fn affected_address_opt_mut(
2999 &mut self,
3000 ) -> Option<&mut super::AffectedAddressFilter> {
3001 if let Some(
3002 super::transaction_predicate::Predicate::AffectedAddress(field),
3003 ) = &mut self.predicate
3004 {
3005 Some(field as _)
3006 } else {
3007 None
3008 }
3009 }
3010 pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
3014 if self.affected_address_opt_mut().is_none() {
3015 self.predicate = Some(
3016 super::transaction_predicate::Predicate::AffectedAddress(
3017 super::AffectedAddressFilter::default(),
3018 ),
3019 );
3020 }
3021 self.affected_address_opt_mut().unwrap()
3022 }
3023 pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
3026 &mut self,
3027 field: T,
3028 ) {
3029 self.predicate = Some(
3030 super::transaction_predicate::Predicate::AffectedAddress(
3031 field.into().into(),
3032 ),
3033 );
3034 }
3035 pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
3038 mut self,
3039 field: T,
3040 ) -> Self {
3041 self.set_affected_address(field.into());
3042 self
3043 }
3044 pub fn affected_object(&self) -> &super::AffectedObjectFilter {
3046 if let Some(
3047 super::transaction_predicate::Predicate::AffectedObject(field),
3048 ) = &self.predicate
3049 {
3050 field as _
3051 } else {
3052 super::AffectedObjectFilter::default_instance() as _
3053 }
3054 }
3055 pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
3057 if let Some(
3058 super::transaction_predicate::Predicate::AffectedObject(field),
3059 ) = &self.predicate
3060 {
3061 Some(field as _)
3062 } else {
3063 None
3064 }
3065 }
3066 pub fn affected_object_opt_mut(
3068 &mut self,
3069 ) -> Option<&mut super::AffectedObjectFilter> {
3070 if let Some(
3071 super::transaction_predicate::Predicate::AffectedObject(field),
3072 ) = &mut self.predicate
3073 {
3074 Some(field as _)
3075 } else {
3076 None
3077 }
3078 }
3079 pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
3083 if self.affected_object_opt_mut().is_none() {
3084 self.predicate = Some(
3085 super::transaction_predicate::Predicate::AffectedObject(
3086 super::AffectedObjectFilter::default(),
3087 ),
3088 );
3089 }
3090 self.affected_object_opt_mut().unwrap()
3091 }
3092 pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
3095 &mut self,
3096 field: T,
3097 ) {
3098 self.predicate = Some(
3099 super::transaction_predicate::Predicate::AffectedObject(
3100 field.into().into(),
3101 ),
3102 );
3103 }
3104 pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
3107 mut self,
3108 field: T,
3109 ) -> Self {
3110 self.set_affected_object(field.into());
3111 self
3112 }
3113 pub fn move_call(&self) -> &super::MoveCallFilter {
3115 if let Some(super::transaction_predicate::Predicate::MoveCall(field)) = &self
3116 .predicate
3117 {
3118 field as _
3119 } else {
3120 super::MoveCallFilter::default_instance() as _
3121 }
3122 }
3123 pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
3125 if let Some(super::transaction_predicate::Predicate::MoveCall(field)) = &self
3126 .predicate
3127 {
3128 Some(field as _)
3129 } else {
3130 None
3131 }
3132 }
3133 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
3135 if let Some(super::transaction_predicate::Predicate::MoveCall(field)) = &mut self
3136 .predicate
3137 {
3138 Some(field as _)
3139 } else {
3140 None
3141 }
3142 }
3143 pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
3147 if self.move_call_opt_mut().is_none() {
3148 self.predicate = Some(
3149 super::transaction_predicate::Predicate::MoveCall(
3150 super::MoveCallFilter::default(),
3151 ),
3152 );
3153 }
3154 self.move_call_opt_mut().unwrap()
3155 }
3156 pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
3159 self.predicate = Some(
3160 super::transaction_predicate::Predicate::MoveCall(field.into().into()),
3161 );
3162 }
3163 pub fn with_move_call<T: Into<super::MoveCallFilter>>(
3166 mut self,
3167 field: T,
3168 ) -> Self {
3169 self.set_move_call(field.into());
3170 self
3171 }
3172 pub fn emit_module(&self) -> &super::EmitModuleFilter {
3174 if let Some(super::transaction_predicate::Predicate::EmitModule(field)) = &self
3175 .predicate
3176 {
3177 field as _
3178 } else {
3179 super::EmitModuleFilter::default_instance() as _
3180 }
3181 }
3182 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
3184 if let Some(super::transaction_predicate::Predicate::EmitModule(field)) = &self
3185 .predicate
3186 {
3187 Some(field as _)
3188 } else {
3189 None
3190 }
3191 }
3192 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
3194 if let Some(super::transaction_predicate::Predicate::EmitModule(field)) = &mut self
3195 .predicate
3196 {
3197 Some(field as _)
3198 } else {
3199 None
3200 }
3201 }
3202 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
3206 if self.emit_module_opt_mut().is_none() {
3207 self.predicate = Some(
3208 super::transaction_predicate::Predicate::EmitModule(
3209 super::EmitModuleFilter::default(),
3210 ),
3211 );
3212 }
3213 self.emit_module_opt_mut().unwrap()
3214 }
3215 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
3218 self.predicate = Some(
3219 super::transaction_predicate::Predicate::EmitModule(field.into().into()),
3220 );
3221 }
3222 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
3225 mut self,
3226 field: T,
3227 ) -> Self {
3228 self.set_emit_module(field.into());
3229 self
3230 }
3231 pub fn event_type(&self) -> &super::EventTypeFilter {
3233 if let Some(super::transaction_predicate::Predicate::EventType(field)) = &self
3234 .predicate
3235 {
3236 field as _
3237 } else {
3238 super::EventTypeFilter::default_instance() as _
3239 }
3240 }
3241 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
3243 if let Some(super::transaction_predicate::Predicate::EventType(field)) = &self
3244 .predicate
3245 {
3246 Some(field as _)
3247 } else {
3248 None
3249 }
3250 }
3251 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
3253 if let Some(super::transaction_predicate::Predicate::EventType(field)) = &mut self
3254 .predicate
3255 {
3256 Some(field as _)
3257 } else {
3258 None
3259 }
3260 }
3261 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
3265 if self.event_type_opt_mut().is_none() {
3266 self.predicate = Some(
3267 super::transaction_predicate::Predicate::EventType(
3268 super::EventTypeFilter::default(),
3269 ),
3270 );
3271 }
3272 self.event_type_opt_mut().unwrap()
3273 }
3274 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
3277 self.predicate = Some(
3278 super::transaction_predicate::Predicate::EventType(field.into().into()),
3279 );
3280 }
3281 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
3284 mut self,
3285 field: T,
3286 ) -> Self {
3287 self.set_event_type(field.into());
3288 self
3289 }
3290 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
3292 if let Some(
3293 super::transaction_predicate::Predicate::EventStreamHead(field),
3294 ) = &self.predicate
3295 {
3296 field as _
3297 } else {
3298 super::EventStreamHeadFilter::default_instance() as _
3299 }
3300 }
3301 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
3303 if let Some(
3304 super::transaction_predicate::Predicate::EventStreamHead(field),
3305 ) = &self.predicate
3306 {
3307 Some(field as _)
3308 } else {
3309 None
3310 }
3311 }
3312 pub fn event_stream_head_opt_mut(
3314 &mut self,
3315 ) -> Option<&mut super::EventStreamHeadFilter> {
3316 if let Some(
3317 super::transaction_predicate::Predicate::EventStreamHead(field),
3318 ) = &mut self.predicate
3319 {
3320 Some(field as _)
3321 } else {
3322 None
3323 }
3324 }
3325 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
3329 if self.event_stream_head_opt_mut().is_none() {
3330 self.predicate = Some(
3331 super::transaction_predicate::Predicate::EventStreamHead(
3332 super::EventStreamHeadFilter::default(),
3333 ),
3334 );
3335 }
3336 self.event_stream_head_opt_mut().unwrap()
3337 }
3338 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
3341 &mut self,
3342 field: T,
3343 ) {
3344 self.predicate = Some(
3345 super::transaction_predicate::Predicate::EventStreamHead(
3346 field.into().into(),
3347 ),
3348 );
3349 }
3350 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
3353 mut self,
3354 field: T,
3355 ) -> Self {
3356 self.set_event_stream_head(field.into());
3357 self
3358 }
3359 pub fn package_write(&self) -> &super::PackageWriteFilter {
3361 if let Some(super::transaction_predicate::Predicate::PackageWrite(field)) = &self
3362 .predicate
3363 {
3364 field as _
3365 } else {
3366 super::PackageWriteFilter::default_instance() as _
3367 }
3368 }
3369 pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
3371 if let Some(super::transaction_predicate::Predicate::PackageWrite(field)) = &self
3372 .predicate
3373 {
3374 Some(field as _)
3375 } else {
3376 None
3377 }
3378 }
3379 pub fn package_write_opt_mut(
3381 &mut self,
3382 ) -> Option<&mut super::PackageWriteFilter> {
3383 if let Some(super::transaction_predicate::Predicate::PackageWrite(field)) = &mut self
3384 .predicate
3385 {
3386 Some(field as _)
3387 } else {
3388 None
3389 }
3390 }
3391 pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
3395 if self.package_write_opt_mut().is_none() {
3396 self.predicate = Some(
3397 super::transaction_predicate::Predicate::PackageWrite(
3398 super::PackageWriteFilter::default(),
3399 ),
3400 );
3401 }
3402 self.package_write_opt_mut().unwrap()
3403 }
3404 pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
3407 &mut self,
3408 field: T,
3409 ) {
3410 self.predicate = Some(
3411 super::transaction_predicate::Predicate::PackageWrite(
3412 field.into().into(),
3413 ),
3414 );
3415 }
3416 pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
3419 mut self,
3420 field: T,
3421 ) -> Self {
3422 self.set_package_write(field.into());
3423 self
3424 }
3425 }
3426 impl super::TransactionTerm {
3427 pub const fn const_default() -> Self {
3428 Self { literals: Vec::new() }
3429 }
3430 #[doc(hidden)]
3431 pub fn default_instance() -> &'static Self {
3432 static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
3433 &DEFAULT
3434 }
3435 pub fn literals(&self) -> &[super::TransactionLiteral] {
3437 &self.literals
3438 }
3439 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
3442 &mut self.literals
3443 }
3444 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
3446 self.literals = field;
3447 }
3448 pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
3450 self.set_literals(field);
3451 self
3452 }
3453 }
3454 impl super::Watermark {
3455 pub const fn const_default() -> Self {
3456 Self {
3457 cursor: None,
3458 checkpoint_hi: None,
3459 checkpoint_lo: None,
3460 }
3461 }
3462 #[doc(hidden)]
3463 pub fn default_instance() -> &'static Self {
3464 static DEFAULT: super::Watermark = super::Watermark::const_default();
3465 &DEFAULT
3466 }
3467 pub fn cursor_opt(&self) -> Option<&[u8]> {
3469 self.cursor.as_ref().map(|field| field as _)
3470 }
3471 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
3473 self.cursor = Some(field.into().into());
3474 }
3475 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
3477 self.set_cursor(field.into());
3478 self
3479 }
3480 pub fn checkpoint_hi_opt_mut(&mut self) -> Option<&mut u64> {
3482 self.checkpoint_hi.as_mut().map(|field| field as _)
3483 }
3484 pub fn checkpoint_hi_mut(&mut self) -> &mut u64 {
3487 self.checkpoint_hi.get_or_insert_default()
3488 }
3489 pub fn checkpoint_hi_opt(&self) -> Option<u64> {
3491 self.checkpoint_hi.as_ref().map(|field| *field)
3492 }
3493 pub fn set_checkpoint_hi(&mut self, field: u64) {
3495 self.checkpoint_hi = Some(field);
3496 }
3497 pub fn with_checkpoint_hi(mut self, field: u64) -> Self {
3499 self.set_checkpoint_hi(field);
3500 self
3501 }
3502 pub fn checkpoint_lo_opt_mut(&mut self) -> Option<&mut u64> {
3504 self.checkpoint_lo.as_mut().map(|field| field as _)
3505 }
3506 pub fn checkpoint_lo_mut(&mut self) -> &mut u64 {
3509 self.checkpoint_lo.get_or_insert_default()
3510 }
3511 pub fn checkpoint_lo_opt(&self) -> Option<u64> {
3513 self.checkpoint_lo.as_ref().map(|field| *field)
3514 }
3515 pub fn set_checkpoint_lo(&mut self, field: u64) {
3517 self.checkpoint_lo = Some(field);
3518 }
3519 pub fn with_checkpoint_lo(mut self, field: u64) -> Self {
3521 self.set_checkpoint_lo(field);
3522 self
3523 }
3524 }
3525}