openapi-to-rust 0.4.0

Generate strongly-typed Rust structs, HTTP clients, and SSE streaming clients from OpenAPI 3.1 specifications
Documentation
---
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 Message {
    ///The content of the message.
    pub content: MessageContent,
    ///Unique object identifier.
    pub id: String,
    ///The model that was used to generate the message.
    pub model: String,
    /**Conversational role of the generated message.

This will always be `"assistant"`.*/
    #[serde(default)]
    pub role: MessageRole,
}
/**Conversational role of the generated message.

This will always be `"assistant"`.*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum MessageRole {
    #[default]
    #[serde(rename = "assistant")]
    Assistant,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct MessageContentInlineVariant2Item {}
///The content of the message.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum MessageContent {
    String(String),
    MessageContentInlineVariant2Array(Vec<MessageContentInlineVariant2Item>),
}