1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* 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,
}
}
}