// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Request body to create a split.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SplitRequest {
    /// The document to split
    pub document: ClassificationRequestDocumentOneOf,
    /// The subdocuments to split the document into
    pub subdocuments: Vec<Subdocument>,
    /// The model to use to split the document
    ///
    /// Defaults to `retab-small`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub model: Option<String>,
    /// Free-form instructions appended to the system prompt to steer the split.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub instructions: Option<String>,
    /// Number of consensus split runs to perform. Uses deterministic single-pass when set to 1.
    ///
    /// Defaults to `1`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub n_consensus: Option<i64>,
    /// If true, skip the LLM cache and force a fresh completion
    ///
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub bust_cache: Option<bool>,
    /// If true, run asynchronously: returns immediately with status 'queued' and an empty output. Poll GET /v1/<primitive>/{id} until status is terminal. Mutually exclusive with stream.
    ///
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub background: Option<bool>,
}
impl SplitRequest {
    /// Construct a new `SplitRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        document: ClassificationRequestDocumentOneOf,
        subdocuments: Vec<Subdocument>,
    ) -> Self {
        Self {
            document,
            subdocuments,
            model: Default::default(),
            instructions: Default::default(),
            n_consensus: Default::default(),
            bust_cache: Default::default(),
            background: Default::default(),
        }
    }
}
