opensearch-client 0.3.1

Strongly typed OpenSearch Client
Documentation
/*
 * opensearch-client
 *
 * Rust Client for OpenSearch
 *
 * The version of the OpenAPI document: 3.1.0
 * Contact: alberto.paro@gmail.com
 * Generated by Paro OpenAPI Generator
 */

use serde::{Deserialize, Serialize};




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClassificationInferenceOptions {  /// Specifies the number of top class predictions to return. Defaults to 0.
    #[serde(rename = "num_top_classes", default, skip_serializing_if = "Option::is_none")]
    pub num_top_classes: Option<u32>,  /// Specifies the maximum number of feature importance values per document.
    #[serde(rename = "num_top_feature_importance_values", default, skip_serializing_if = "Option::is_none")]
    pub num_top_feature_importance_values: Option<u32>,  /// The field that is added to incoming documents to contain the inference prediction. Defaults to `predicted_value`.
    #[serde(rename = "results_field", default, skip_serializing_if = "Option::is_none")]
    pub results_field: Option<String>,  /// Specifies the field to which the top classes are written. Defaults to `top_classes`.
    #[serde(rename = "top_classes_results_field", default, skip_serializing_if = "Option::is_none")]
    pub top_classes_results_field: Option<String>,  /// Specifies the type of the predicted field to write. Acceptable values are: string, number, Boolean. When Boolean is provided 1.0 is transformed to true and 0.0 to false.
    #[serde(rename = "prediction_field_type", default, skip_serializing_if = "Option::is_none")]
    pub prediction_field_type: Option<String>,
}

impl ClassificationInferenceOptions {
    
    pub fn new() -> ClassificationInferenceOptions {
        ClassificationInferenceOptions {
            num_top_classes: None,
            num_top_feature_importance_values: None,
            results_field: None,
            top_classes_results_field: None,
            prediction_field_type: None,
        }
    }
}