use std::path::PathBuf;
use clap::{Args, Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(name = "teaql", version, about = "TeaQL toolchain")]
pub struct Cli {
#[arg(long, global = true, default_value = ".")]
pub cwd: PathBuf,
#[command(subcommand)]
pub command: Commands,
}
#[derive(Debug, Subcommand)]
pub enum Commands {
GenLib(GenerateArgs),
GenDoc(GenerateArgs),
GenModel(GenerateArgs),
GenWorkspace(GenerateArgs),
Ping(ServiceArgs),
Version(ServiceArgs),
ShowConfig,
Config,
InstallLinks(InstallLinksArgs),
}
#[derive(Debug, Args)]
pub struct GenerateArgs {
pub input: PathBuf,
#[arg(long)]
pub endpoint_prefix: Option<String>,
#[arg(long)]
pub service_url: Option<String>,
#[arg(long)]
pub license_file: Option<PathBuf>,
#[arg(long)]
pub output: Option<PathBuf>,
#[arg(long)]
pub timeout_seconds: Option<u64>,
}
#[derive(Debug, Args)]
pub struct ServiceArgs {
#[arg(long)]
pub endpoint_prefix: Option<String>,
#[arg(long)]
pub service_url: Option<String>,
#[arg(long)]
pub license_file: Option<PathBuf>,
#[arg(long)]
pub timeout_seconds: Option<u64>,
}
#[derive(Debug, Args)]
pub struct InstallLinksArgs {
#[arg(long)]
pub dir: Option<PathBuf>,
#[arg(long)]
pub force: bool,
}