---
source: src/test_helpers.rs
expression: "&generated_code"
---
//! Generated types from OpenAPI specification
//!
//! This file contains all the generated types for the API.
//! Do not edit manually - regenerate using the appropriate script.
#![allow(clippy::large_enum_variant)]
#![allow(clippy::format_in_format_args)]
#![allow(clippy::let_unit_value)]
#![allow(unreachable_patterns)]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AssistantMessage {
pub content: String,
///Always 'assistant' for this message type
pub role: AssistantMessageRole,
}
///Always 'assistant' for this message type
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum AssistantMessageRole {
#[default]
#[serde(rename = "assistant")]
Assistant,
}
impl AssistantMessageRole {
pub fn as_str(&self) -> &'static str {
match self {
Self::Assistant => "assistant",
}
}
}
impl ::std::fmt::Display for AssistantMessageRole {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
f.write_str(self.as_str())
}
}
impl AsRef<str> for AssistantMessageRole {
fn as_ref(&self) -> &str {
self.as_str()
}
}