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 OcrResponse {
    /// List of OCR info for pages.
    #[serde(rename = "pages")]
    pub pages: Vec<models::OcrPageObject>,
    /// The model used to generate the OCR.
    #[serde(rename = "model")]
    pub model: String,
    #[serde(rename = "document_annotation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub document_annotation: Option<Option<String>>,
    /// Usage info for the OCR request.
    #[serde(rename = "usage_info")]
    pub usage_info: Box<models::OcrUsageInfo>,
}

impl OcrResponse {
    pub fn new(pages: Vec<models::OcrPageObject>, model: String, usage_info: models::OcrUsageInfo) -> OcrResponse {
        OcrResponse {
            pages,
            model,
            document_annotation: None,
            usage_info: Box::new(usage_info),
        }
    }
}