// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// A stored extraction record from the Retab API.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Extraction {
    /// Unique identifier of the extraction
    pub id: String,
    /// Information about the extracted file
    pub file: FileRef,
    /// Model used for the extraction
    pub model: String,
    /// JSON schema used for the extraction
    pub json_schema: std::collections::HashMap<String, serde_json::Value>,
    /// Number of consensus votes used
    ///
    /// Defaults to `1`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub n_consensus: Option<i64>,
    /// DPI used to render document images
    ///
    /// Defaults to `192`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub image_resolution_dpi: Option<i64>,
    /// Free-form instructions supplied with the extraction request.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub instructions: Option<String>,
    /// The extracted structured data
    pub output: std::collections::HashMap<String, serde_json::Value>,
    /// Consensus metadata for multi-vote extraction runs
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub consensus: Option<ExtractionConsensus>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub metadata: Option<std::collections::HashMap<String, String>>,
    /// Usage information for the extraction
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub usage: Option<RetabUsage>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub created_at: Option<String>,
}
