ic_query/sns/report/model/requests/lookup.rs
1//! Module: sns::report::model::requests::lookup
2//!
3//! Responsibility: shared request DTO for direct SNS lookup reports.
4//! Does not own: command option parsing, source resolution, or rendering.
5//! Boundary: carries validated lookup inputs into one SNS report builder.
6
7///
8/// SnsLookupRequest
9///
10/// Shared request accepted by direct SNS info, token, and params builders.
11///
12
13#[derive(Clone, Debug, Eq, PartialEq)]
14pub struct SnsLookupRequest {
15 pub network: String,
16 pub source_endpoint: String,
17 pub now_unix_secs: u64,
18 pub input: String,
19}
20
21impl SnsLookupRequest {
22 #[must_use]
23 pub fn new(
24 network: impl Into<String>,
25 source_endpoint: impl Into<String>,
26 now_unix_secs: u64,
27 input: impl Into<String>,
28 ) -> Self {
29 Self {
30 network: network.into(),
31 source_endpoint: source_endpoint.into(),
32 now_unix_secs,
33 input: input.into(),
34 }
35 }
36}
37
38/// Request accepted by the SNS info report builder.
39pub type SnsInfoRequest = SnsLookupRequest;
40
41/// Request accepted by the SNS governance-parameters report builder.
42pub type SnsParamsRequest = SnsLookupRequest;
43
44/// Request accepted by the SNS token report builder.
45pub type SnsTokenRequest = SnsLookupRequest;