Skip to main content

opensearch_client/ml/
model_config.rs

1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct ModelConfig {
15    /// The embedding dimension.
16    #[serde(
17        rename = "embedding_dimension",
18        default,
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub embedding_dimension: Option<u32>,
22    /// The all config.
23    #[serde(
24        rename = "all_config",
25        default,
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub all_config: Option<String>,
29    /// The model type.
30    #[serde(
31        rename = "model_type",
32        default,
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub model_type: Option<String>,
36    /// The framework type.
37    #[serde(
38        rename = "framework_type",
39        default,
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub framework_type: Option<String>,
43}
44
45impl ModelConfig {
46    pub fn new() -> ModelConfig {
47        ModelConfig {
48            embedding_dimension: None,
49            all_config: None,
50            model_type: None,
51            framework_type: None,
52        }
53    }
54}