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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Predict {
16    /// The target response.
17    #[serde(
18        rename = "target_response",
19        default,
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub target_response: Option<Vec<String>>,
23    /// The input index.
24    #[serde(
25        rename = "input_index",
26        default,
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub input_index: Option<Vec<String>>,
30    /// Whether to return bytes in model output.
31    #[serde(
32        rename = "return_number",
33        default,
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub return_number: Option<bool>,
37    /// The text documents.
38    #[serde(rename = "text_docs", default, skip_serializing_if = "Option::is_none")]
39    pub text_docs: Option<Vec<String>>,
40    #[serde(
41        rename = "input_query",
42        default,
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub input_query: Option<ml::InputQuery>,
46}
47
48impl Predict {
49    pub fn new() -> Predict {
50        Predict {
51            target_response: None,
52            input_index: None,
53            return_number: None,
54            text_docs: None,
55            input_query: None,
56        }
57    }
58}