ic_query/sns/report/model/requests/
list.rs1use crate::sns::report::SnsListSort;
8
9#[derive(Clone, Debug, Eq, PartialEq)]
16pub struct SnsListRequest {
17 pub network: String,
18 pub source_endpoint: String,
19 pub now_unix_secs: u64,
20 pub all_lifecycles: bool,
22 pub verbose: bool,
23 pub sort: SnsListSort,
24}
25
26impl SnsListRequest {
27 #[must_use]
28 pub fn new(
29 network: impl Into<String>,
30 source_endpoint: impl Into<String>,
31 now_unix_secs: u64,
32 ) -> Self {
33 Self {
34 network: network.into(),
35 source_endpoint: source_endpoint.into(),
36 now_unix_secs,
37 all_lifecycles: false,
38 verbose: false,
39 sort: SnsListSort::default(),
40 }
41 }
42
43 #[must_use]
44 pub const fn with_verbose(mut self, verbose: bool) -> Self {
45 self.verbose = verbose;
46 self
47 }
48
49 #[must_use]
51 pub const fn with_all_lifecycles(mut self, all_lifecycles: bool) -> Self {
52 self.all_lifecycles = all_lifecycles;
53 self
54 }
55
56 #[must_use]
57 pub const fn with_sort(mut self, sort: SnsListSort) -> Self {
58 self.sort = sort;
59 self
60 }
61}