use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct BetaMultiAgentCallItemParam {
#[serde(
rename = "agent",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub agent: Option<Option<Box<models::BetaAgentTagParam>>>,
#[serde(
rename = "id",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub id: Option<Option<String>>,
#[serde(rename = "call_id")]
pub call_id: String,
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "action")]
pub action: models::BetaMultiAgentAction1,
#[serde(rename = "arguments")]
pub arguments: String,
}
impl BetaMultiAgentCallItemParam {
pub fn new(
call_id: String,
r#type: Type,
action: models::BetaMultiAgentAction1,
arguments: String,
) -> BetaMultiAgentCallItemParam {
BetaMultiAgentCallItemParam {
agent: None,
id: None,
call_id,
r#type,
action,
arguments,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "multi_agent_call")]
MultiAgentCall,
}
impl Default for Type {
fn default() -> Type {
Self::MultiAgentCall
}
}
impl std::fmt::Display for BetaMultiAgentCallItemParam {
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),
}
}
}