mistral-openapi-client 0.1.0

Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
Documentation
/*
 * Mistral AI API
 *
 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OcrRequest {
    #[serde(rename = "model", deserialize_with = "Option::deserialize")]
    pub model: Option<String>,
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "document")]
    pub document: Box<models::Document>,
    #[serde(rename = "pages", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub pages: Option<Option<Vec<i32>>>,
    #[serde(rename = "include_image_base64", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub include_image_base64: Option<Option<bool>>,
    #[serde(rename = "image_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub image_limit: Option<Option<i32>>,
    #[serde(rename = "image_min_size", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub image_min_size: Option<Option<i32>>,
    #[serde(rename = "bbox_annotation_format", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bbox_annotation_format: Option<Option<Box<models::ResponseFormat>>>,
    #[serde(rename = "document_annotation_format", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub document_annotation_format: Option<Option<Box<models::ResponseFormat>>>,
    #[serde(rename = "document_annotation_prompt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub document_annotation_prompt: Option<Option<String>>,
    #[serde(rename = "table_format", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub table_format: Option<Option<TableFormat>>,
    #[serde(rename = "extract_header", skip_serializing_if = "Option::is_none")]
    pub extract_header: Option<bool>,
    #[serde(rename = "extract_footer", skip_serializing_if = "Option::is_none")]
    pub extract_footer: Option<bool>,
}

impl OcrRequest {
    pub fn new(model: Option<String>, document: models::Document) -> OcrRequest {
        OcrRequest {
            model,
            id: None,
            document: Box::new(document),
            pages: None,
            include_image_base64: None,
            image_limit: None,
            image_min_size: None,
            bbox_annotation_format: None,
            document_annotation_format: None,
            document_annotation_prompt: None,
            table_format: None,
            extract_header: None,
            extract_footer: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TableFormat {
    #[serde(rename = "markdown")]
    Markdown,
    #[serde(rename = "html")]
    Html,
}

impl Default for TableFormat {
    fn default() -> TableFormat {
        Self::Markdown
    }
}