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 sort: SnsListSort,
23}
24
25impl SnsListRequest {
26 #[must_use]
27 pub fn new(
28 network: impl Into<String>,
29 source_endpoint: impl Into<String>,
30 now_unix_secs: u64,
31 ) -> Self {
32 Self {
33 network: network.into(),
34 source_endpoint: source_endpoint.into(),
35 now_unix_secs,
36 all_lifecycles: false,
37
38 sort: SnsListSort::default(),
39 }
40 }
41
42 #[must_use]
44 pub const fn with_all_lifecycles(mut self, all_lifecycles: bool) -> Self {
45 self.all_lifecycles = all_lifecycles;
46 self
47 }
48
49 #[must_use]
50 pub const fn with_sort(mut self, sort: SnsListSort) -> Self {
51 self.sort = sort;
52 self
53 }
54}