// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Body to generate a JSON schema from example `documents`, optionally steered by `instructions`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GenerateSchemaRequest {
    pub documents: Vec<MimeData>,
    /// Defaults to `retab-small`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub model: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub instructions: Option<String>,
    /// If true, run asynchronously: returns immediately with status 'queued'. Poll GET /v1/schemas/generate/{schema_generation_id} until status is terminal.
    ///
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub background: Option<bool>,
}
impl GenerateSchemaRequest {
    /// Construct a new `GenerateSchemaRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(documents: Vec<MimeData>) -> Self {
        Self {
            documents,
            model: Default::default(),
            instructions: Default::default(),
            background: Default::default(),
        }
    }
}
