Skip to main content

ic_query/sns/report/model/requests/
list.rs

1//! Module: sns::report::model::requests::list
2//!
3//! Responsibility: request DTO for deployed SNS list reports.
4//! Does not own: command option parsing, source lookup, or text rendering.
5//! Boundary: carries validated command inputs into the list report builder.
6
7use crate::sns::report::SnsListSort;
8
9///
10/// SnsListRequest
11///
12/// Request accepted by the deployed SNS list report builder.
13///
14
15#[derive(Clone, Debug, Eq, PartialEq)]
16pub struct SnsListRequest {
17    pub network: String,
18    pub source_endpoint: String,
19    pub now_unix_secs: u64,
20    /// Whether to include SNS instances outside the normal visible lifecycle set.
21    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}