use std::str;
use clap::{Args, Parser, Subcommand};
use serde::{Deserialize, Serialize};
use crate::output;
#[derive(Parser, Debug)]
#[command(author, about, version)]
#[command(propagate_version = true)]
pub struct Cli {
#[command(subcommand)]
pub(crate) commands: Commands,
}
#[derive(Clone, Debug, Subcommand)]
pub enum Commands {
#[command(arg_required_else_help = true)]
Analyze(Analysis),
#[command(arg_required_else_help = true)]
Create(Create),
}
#[derive(Args, Clone, Debug, Serialize, Deserialize)]
pub struct Analysis {
#[arg(short, long, alias = "cluster-name", value_enum)]
pub cluster: String,
#[arg(short, long)]
pub region: Option<String>,
#[arg(short, long, value_enum, default_value_t)]
pub format: output::Format,
#[arg(short, long)]
pub output: Option<String>,
#[arg(long)]
pub ignore_recommended: bool,
}
#[derive(Args, Clone, Debug, Serialize, Deserialize)]
pub struct Create {
#[command(subcommand)]
pub command: CreateCommands,
}
#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)]
pub enum CreateCommands {
#[command(arg_required_else_help = true)]
Playbook(Playbook),
}
#[derive(Args, Clone, Debug, Serialize, Deserialize)]
pub struct Playbook {
#[arg(short, long, alias = "cluster-name", value_enum)]
pub cluster: String,
#[arg(short, long)]
pub region: Option<String>,
#[arg(short, long)]
pub filename: Option<String>,
#[arg(long)]
pub ignore_recommended: bool,
}