mistral-openapi-client 0.1.0

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.
Documentation
/*
 * Mistral AI API
 *
 * 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.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// SseTypes : Server side events sent when streaming a conversation response.
/// Server side events sent when streaming a conversation response.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SseTypes {
    #[serde(rename = "conversation.response.started")]
    ConversationResponseStarted,
    #[serde(rename = "conversation.response.done")]
    ConversationResponseDone,
    #[serde(rename = "conversation.response.error")]
    ConversationResponseError,
    #[serde(rename = "message.output.delta")]
    MessageOutputDelta,
    #[serde(rename = "tool.execution.started")]
    ToolExecutionStarted,
    #[serde(rename = "tool.execution.delta")]
    ToolExecutionDelta,
    #[serde(rename = "tool.execution.done")]
    ToolExecutionDone,
    #[serde(rename = "agent.handoff.started")]
    AgentHandoffStarted,
    #[serde(rename = "agent.handoff.done")]
    AgentHandoffDone,
    #[serde(rename = "function.call.delta")]
    FunctionCallDelta,

}

impl std::fmt::Display for SseTypes {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::ConversationResponseStarted => write!(f, "conversation.response.started"),
            Self::ConversationResponseDone => write!(f, "conversation.response.done"),
            Self::ConversationResponseError => write!(f, "conversation.response.error"),
            Self::MessageOutputDelta => write!(f, "message.output.delta"),
            Self::ToolExecutionStarted => write!(f, "tool.execution.started"),
            Self::ToolExecutionDelta => write!(f, "tool.execution.delta"),
            Self::ToolExecutionDone => write!(f, "tool.execution.done"),
            Self::AgentHandoffStarted => write!(f, "agent.handoff.started"),
            Self::AgentHandoffDone => write!(f, "agent.handoff.done"),
            Self::FunctionCallDelta => write!(f, "function.call.delta"),
        }
    }
}

impl Default for SseTypes {
    fn default() -> SseTypes {
        Self::ConversationResponseStarted
    }
}