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 OcrImageObject {
    /// Image ID for extracted image in a page
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "top_left_x", deserialize_with = "Option::deserialize")]
    pub top_left_x: Option<i32>,
    #[serde(rename = "top_left_y", deserialize_with = "Option::deserialize")]
    pub top_left_y: Option<i32>,
    #[serde(rename = "bottom_right_x", deserialize_with = "Option::deserialize")]
    pub bottom_right_x: Option<i32>,
    #[serde(rename = "bottom_right_y", deserialize_with = "Option::deserialize")]
    pub bottom_right_y: Option<i32>,
    #[serde(rename = "image_base64", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub image_base64: Option<Option<String>>,
    #[serde(rename = "image_annotation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub image_annotation: Option<Option<String>>,
}

impl OcrImageObject {
    pub fn new(id: String, top_left_x: Option<i32>, top_left_y: Option<i32>, bottom_right_x: Option<i32>, bottom_right_y: Option<i32>) -> OcrImageObject {
        OcrImageObject {
            id,
            top_left_x,
            top_left_y,
            bottom_right_x,
            bottom_right_y,
            image_base64: None,
            image_annotation: None,
        }
    }
}