use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct BetaFunctionShellCallOutputContentParam {
#[serde(rename = "stdout")]
pub stdout: String,
#[serde(rename = "stderr")]
pub stderr: String,
#[serde(rename = "outcome")]
pub outcome: Box<models::BetaFunctionShellCallOutputOutcomeParam>,
}
impl BetaFunctionShellCallOutputContentParam {
pub fn new(
stdout: String,
stderr: String,
outcome: models::BetaFunctionShellCallOutputOutcomeParam,
) -> BetaFunctionShellCallOutputContentParam {
BetaFunctionShellCallOutputContentParam {
stdout,
stderr,
outcome: Box::new(outcome),
}
}
}
impl std::fmt::Display for BetaFunctionShellCallOutputContentParam {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match serde_json::to_string(self) {
Ok(s) => write!(f, "{}", s),
Err(_) => Err(std::fmt::Error),
}
}
}