openai-client-base 0.16.0

Auto-generated Rust client for the OpenAI API
/*
 * OpenAI API
 *
 * The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
 *
 * The version of the OpenAPI document: 2.3.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// ItemResource : Content item used to generate a response.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ItemResource {
    InputMessageResource(Box<models::InputMessageResource>),
    OutputMessage(Box<models::OutputMessage>),
    FileSearchToolCall(Box<models::FileSearchToolCall>),
    ComputerToolCall(Box<models::ComputerToolCall>),
    ComputerToolCallOutputResource(Box<models::ComputerToolCallOutputResource>),
    WebSearchToolCall(Box<models::WebSearchToolCall>),
    FunctionToolCallResource(Box<models::FunctionToolCallResource>),
    FunctionToolCallOutputResource(Box<models::FunctionToolCallOutputResource>),
    ToolSearchCall(Box<models::ToolSearchCall>),
    ToolSearchOutput(Box<models::ToolSearchOutput>),
    AdditionalTools(Box<models::AdditionalTools>),
    ResponseConfigurationUpdate(Box<models::ResponseConfigurationUpdate>),
    ReasoningItem(Box<models::ReasoningItem>),
    Program(Box<models::Program>),
    ProgramOutput(Box<models::ProgramOutput>),
    CompactionBody(Box<models::CompactionBody>),
    ImageGenToolCall(Box<models::ImageGenToolCall>),
    CodeInterpreterToolCall(Box<models::CodeInterpreterToolCall>),
    LocalShellToolCall(Box<models::LocalShellToolCall>),
    LocalShellToolCallOutput(Box<models::LocalShellToolCallOutput>),
    FunctionShellCall(Box<models::FunctionShellCall>),
    FunctionShellCallOutput(Box<models::FunctionShellCallOutput>),
    ApplyPatchToolCall(Box<models::ApplyPatchToolCall>),
    ApplyPatchToolCallOutput(Box<models::ApplyPatchToolCallOutput>),
    McpListTools(Box<models::McpListTools>),
    McpApprovalRequest(Box<models::McpApprovalRequest>),
    McpApprovalResponseResource(Box<models::McpApprovalResponseResource>),
    McpToolCall(Box<models::McpToolCall>),
    CustomToolCallResource(Box<models::CustomToolCallResource>),
    CustomToolCallOutputResource(Box<models::CustomToolCallOutputResource>),
}

/// The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Quality {
    Low,
    Medium,
    High,
    Xhigh,
    Max,
    Auto,
}

impl Default for Quality {
    fn default() -> Quality {
        Self::Low
    }
}