use std::path::{Path, PathBuf};
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SnsCacheListRequest {
pub network: String,
pub cache_root: PathBuf,
}
impl SnsCacheListRequest {
#[must_use]
pub fn new(cache_root: impl Into<PathBuf>, network: impl Into<String>) -> Self {
Self {
network: network.into(),
cache_root: cache_root.into(),
}
}
#[must_use]
pub fn cache_root(&self) -> &Path {
&self.cache_root
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SnsCacheStatusRequest {
pub network: String,
pub cache_root: PathBuf,
pub input: String,
}
impl SnsCacheStatusRequest {
#[must_use]
pub fn new(
cache_root: impl Into<PathBuf>,
network: impl Into<String>,
input: impl Into<String>,
) -> Self {
Self {
network: network.into(),
cache_root: cache_root.into(),
input: input.into(),
}
}
#[must_use]
pub fn cache_root(&self) -> &Path {
&self.cache_root
}
}