use serde::{Deserialize, Serialize};
use schemars::JsonSchema;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema, arbitrary::Arbitrary)]
#[schemars(rename = "agent.codex_sdk.Effort")]
pub enum Effort {
#[schemars(title = "Minimal")]
#[serde(rename = "minimal")]
Minimal,
#[schemars(title = "Low")]
#[serde(rename = "low")]
Low,
#[schemars(title = "Medium")]
#[serde(rename = "medium")]
#[default]
Medium,
#[schemars(title = "High")]
#[serde(rename = "high")]
High,
}
impl Effort {
pub fn prepare(self) -> Option<Self> {
if let Effort::Medium = self {
None
} else {
Some(self)
}
}
pub fn validate(&self) -> Result<(), String> {
Ok(())
}
pub fn as_str(&self) -> &'static str {
match self {
Effort::Minimal => "minimal",
Effort::Low => "low",
Effort::Medium => "medium",
Effort::High => "high",
}
}
}