use crate::cli::{
clap::{required_string, required_typed},
common::{OutputFormat, output_format},
};
use clap::ArgMatches;
use ic_query::sns::SnsListSort;
pub(in crate::sns::commands) fn list_request(
matches: &ArgMatches,
network: &str,
now_unix_secs: u64,
) -> (OutputFormat, ic_query::sns::SnsListRequest) {
(
output_format(matches),
ic_query::sns::SnsListRequest {
network: network.to_string(),
source_endpoint: required_string(matches, "source-endpoint"),
now_unix_secs,
all_lifecycles: matches.get_flag("all"),
sort: required_typed::<SnsListSort>(matches, "sort"),
},
)
}