Skip to main content

mistral_openapi_client/models/
tool_execution_started_event.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ToolExecutionStartedEvent {
16    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
17    pub r#type: Option<Type>,
18    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
19    pub created_at: Option<String>,
20    #[serde(rename = "output_index", skip_serializing_if = "Option::is_none")]
21    pub output_index: Option<i32>,
22    #[serde(rename = "id")]
23    pub id: String,
24    #[serde(rename = "model", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub model: Option<Option<String>>,
26    #[serde(rename = "agent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub agent_id: Option<Option<String>>,
28    #[serde(rename = "name")]
29    pub name: Box<models::Name>,
30    #[serde(rename = "arguments")]
31    pub arguments: String,
32}
33
34impl ToolExecutionStartedEvent {
35    pub fn new(id: String, name: models::Name, arguments: String) -> ToolExecutionStartedEvent {
36        ToolExecutionStartedEvent {
37            r#type: None,
38            created_at: None,
39            output_index: None,
40            id,
41            model: None,
42            agent_id: None,
43            name: Box::new(name),
44            arguments,
45        }
46    }
47}
48/// 
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Type {
51    #[serde(rename = "tool.execution.started")]
52    ToolExecutionStarted,
53}
54
55impl Default for Type {
56    fn default() -> Type {
57        Self::ToolExecutionStarted
58    }
59}
60