#![forbid(unsafe_code)]
use super::SshAuthArgs;
use clap::{ArgAction, Subcommand};
#[derive(Debug, Subcommand)]
pub enum ScpAction {
Upload {
#[arg(long, action = ArgAction::SetTrue, conflicts_with = "hosts")]
all: bool,
#[arg(long, value_name = "LIST", conflicts_with = "all")]
hosts: Option<String>,
#[arg(long = "src", value_name = "PATH", action = ArgAction::Append)]
src: Vec<String>,
#[arg(long = "dest", value_name = "DIR")]
dest: Option<String>,
#[arg(num_args = 0.., value_names = ["VPS", "LOCAL", "REMOTE"])]
target: Vec<String>,
#[command(flatten)]
auth: SshAuthArgs,
#[arg(long, value_name = "MS")]
timeout: Option<u64>,
#[arg(from_global)]
json: bool,
},
Download {
#[arg(long, action = ArgAction::SetTrue, conflicts_with = "hosts")]
all: bool,
#[arg(long, value_name = "LIST", conflicts_with = "all")]
hosts: Option<String>,
#[arg(long = "src", value_name = "PATH", action = ArgAction::Append)]
src: Vec<String>,
#[arg(long = "dest", value_name = "DIR")]
dest: Option<String>,
#[arg(num_args = 0.., value_names = ["VPS", "REMOTE", "LOCAL"])]
target: Vec<String>,
#[command(flatten)]
auth: SshAuthArgs,
#[arg(long, value_name = "MS")]
timeout: Option<u64>,
#[arg(from_global)]
json: bool,
},
}