use crate::commands::shared::SerializationFormatArg;
use crate::commands::shared::TransportArg;
use crate::commands::shared::parse_header;
use clap::Args;
use mockql_core::Header;
use reqwest::Url;
use std::path::PathBuf;
use std::time::Duration;
#[derive(Debug, Clone, Args)]
pub(crate) struct ProxyArgs {
#[arg(long)]
pub(super) port: u16,
#[arg(long, value_parser = clap::value_parser!(Url))]
pub(super) graphql_url: Url,
#[arg(long)]
pub(super) schema: Option<PathBuf>,
#[arg(long = "introspection-header", value_parser = parse_header)]
pub(super) introspection_headers: Vec<Header>,
#[arg(long, default_value = "1m", value_parser = humantime::parse_duration)]
pub(super) timeout: Duration,
#[arg(long, value_enum, default_value = "json")]
pub(super) format: SerializationFormatArg,
#[command(subcommand)]
pub(super) transport: TransportArg,
}