---
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 ToolsRequest {
pub tools: Vec<ToolsRequestToolsItemUnion>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(tag = "type")]
pub enum ToolsRequestToolsItemUnion {
#[serde(rename = "text")]
TextTool(TextTool),
#[serde(rename = "code")]
CodeTool(CodeTool),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TextTool {
pub name: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TextToolType {
#[default]
#[serde(rename = "text")]
Text,
}
impl TextToolType {
pub fn as_str(&self) -> &'static str {
match self {
Self::Text => "text",
}
}
}
impl ::std::fmt::Display for TextToolType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
f.write_str(self.as_str())
}
}
impl AsRef<str> for TextToolType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct CodeTool {
pub language: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum CodeToolType {
#[default]
#[serde(rename = "code")]
Code,
}
impl CodeToolType {
pub fn as_str(&self) -> &'static str {
match self {
Self::Code => "code",
}
}
}
impl ::std::fmt::Display for CodeToolType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
f.write_str(self.as_str())
}
}
impl AsRef<str> for CodeToolType {
fn as_ref(&self) -> &str {
self.as_str()
}
}