Skip to main content

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