/*
 * OMF Embeddings
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateEmbeddingResponse {
    /// The list of embeddings generated by the model.
    #[serde(rename = "data")]
    pub data: Vec<embeddings::Embedding>,
    /// The name of the model used to generate the embedding.
    #[serde(rename = "model")]
    pub model: String,
    /// The object type, which is always \"list\".
    #[serde(rename = "object")]
    pub object: Object,
    #[serde(rename = "usage")]
    pub usage: Box<embeddings::CreateEmbeddingResponseUsage>,
}

impl CreateEmbeddingResponse {
    pub fn new(
        data: Vec<embeddings::Embedding>,
        model: String,
        object: Object,
        usage: embeddings::CreateEmbeddingResponseUsage,
    ) -> CreateEmbeddingResponse {
        CreateEmbeddingResponse {
            data,
            model,
            object,
            usage: Box::new(usage),
        }
    }
}
/// The object type, which is always \"list\".
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Object {
    #[serde(rename = "list")]
    List,
}

impl Default for Object {
    fn default() -> Object {
        Self::List
    }
}
