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 LibraryOut {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "owner_id", deserialize_with = "Option::deserialize")]
    pub owner_id: Option<uuid::Uuid>,
    #[serde(rename = "owner_type")]
    pub owner_type: String,
    #[serde(rename = "total_size")]
    pub total_size: i32,
    #[serde(rename = "nb_documents")]
    pub nb_documents: i32,
    #[serde(rename = "chunk_size", deserialize_with = "Option::deserialize")]
    pub chunk_size: Option<i32>,
    #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub emoji: Option<Option<String>>,
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "generated_description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub generated_description: Option<Option<String>>,
    #[serde(rename = "explicit_user_members_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub explicit_user_members_count: Option<Option<i32>>,
    #[serde(rename = "explicit_workspace_members_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub explicit_workspace_members_count: Option<Option<i32>>,
    #[serde(rename = "org_sharing_role", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub org_sharing_role: Option<Option<String>>,
    #[serde(rename = "generated_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub generated_name: Option<Option<String>>,
}

impl LibraryOut {
    pub fn new(id: uuid::Uuid, name: String, created_at: String, updated_at: String, owner_id: Option<uuid::Uuid>, owner_type: String, total_size: i32, nb_documents: i32, chunk_size: Option<i32>) -> LibraryOut {
        LibraryOut {
            id,
            name,
            created_at,
            updated_at,
            owner_id,
            owner_type,
            total_size,
            nb_documents,
            chunk_size,
            emoji: None,
            description: None,
            generated_description: None,
            explicit_user_members_count: None,
            explicit_workspace_members_count: None,
            org_sharing_role: None,
            generated_name: None,
        }
    }
}