// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ParseWorkflowArtifact {
    /// Unique identifier of the parse
    pub id: String,
    /// Information about the parsed file
    pub file: FileRef,
    /// Model used for parsing
    pub model: String,
    /// Format used to render tables extracted from the document
    pub table_parsing_format: ParseWorkflowArtifactTableParsingFormat,
    /// DPI used when rasterizing pages for the parser
    pub image_resolution_dpi: i64,
    /// Free-form instructions supplied with the parse request.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub instructions: Option<String>,
    /// The parsed document content
    pub output: ParseOutput,
    /// Usage information for the parse operation
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub usage: Option<RetabUsage>,
    /// When this artifact was written by the orchestrator.
    pub created_at: String,
    /// Artifact operation that determines the backing record type
    ///
    /// Defaults to `parse`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub operation: Option<String>,
}
impl ParseWorkflowArtifact {
    /// Construct a new `ParseWorkflowArtifact` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        file: FileRef,
        model: impl Into<String>,
        table_parsing_format: ParseWorkflowArtifactTableParsingFormat,
        image_resolution_dpi: i64,
        output: ParseOutput,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            file,
            model: model.into(),
            table_parsing_format,
            image_resolution_dpi,
            instructions: Default::default(),
            output,
            usage: Default::default(),
            created_at: created_at.into(),
            operation: Default::default(),
        }
    }
}
