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