use schemars::JsonSchema;
use serde::Deserialize;
#[derive(Debug, Deserialize, JsonSchema)]
pub struct DirectoryInput {
pub directory: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct AutoApproveInput {
#[serde(default)]
pub auto_approve: bool,
}
#[derive(Debug, Deserialize, JsonSchema)]
#[allow(dead_code)]
pub struct AnalyzeInput {
pub path: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct SearchQueryInput {
pub query: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ProviderInput {
pub provider_name: String,
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ProviderDocsInput {
pub provider_name: String,
pub service_slug: String,
pub namespace: Option<String>,
pub data_type: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ModuleInput {
pub namespace: String,
pub name: String,
pub provider: String,
pub version: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ModuleVersionInput {
pub namespace: String,
pub name: String,
pub provider: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct AnalyzePlanInput {
#[serde(default = "default_true")]
pub include_risk: bool,
}
fn default_true() -> bool {
true
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct AnalyzeStateInput {
pub resource_type: Option<String>,
#[serde(default)]
pub detect_drift: bool,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct WorkspaceInput {
pub action: String,
pub name: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ImportInput {
pub resource_type: String,
pub resource_id: String,
pub name: String,
#[serde(default)]
pub execute: bool,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct FmtInput {
#[serde(default)]
pub check: bool,
#[serde(default)]
pub diff: bool,
pub file: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct GraphInput {
pub graph_type: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct OutputInput {
pub name: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct TaintInput {
pub action: String,
pub address: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct RefreshInput {
pub target: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ProvidersInput {
#[serde(default)]
pub include_lock: bool,
}