Skip to main content

opensearch_client/ml/
predict.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 crate::ml;
12use serde::{Deserialize, Serialize};
13
14
15
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct Predict {  /// The target response.
19    #[serde(rename = "target_response", default, skip_serializing_if = "Option::is_none")]
20    pub target_response: Option<Vec<String>>,  /// The input index.
21    #[serde(rename = "input_index", default, skip_serializing_if = "Option::is_none")]
22    pub input_index: Option<Vec<String>>,  /// Whether to return bytes in model output.
23    #[serde(rename = "return_number", default, skip_serializing_if = "Option::is_none")]
24    pub return_number: Option<bool>,  /// The text documents.
25    #[serde(rename = "text_docs", default, skip_serializing_if = "Option::is_none")]
26    pub text_docs: Option<Vec<String>>,
27    #[serde(rename = "input_query", default, skip_serializing_if = "Option::is_none")]
28    pub input_query: Option<ml::InputQuery>,
29}
30
31impl Predict {
32    
33    pub fn new() -> Predict {
34        Predict {
35            target_response: None,
36            input_index: None,
37            return_number: None,
38            text_docs: None,
39            input_query: None,
40        }
41    }
42}