Skip to main content

opensearch_client/ml/
train_predict_response.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 TrainPredictResponse {
16    #[serde(
17        rename = "prediction_result",
18        default,
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub prediction_result: Option<ml::PredictionResult>,
22    /// The status.
23    #[serde(rename = "status")]
24    pub status: String,
25}
26
27impl TrainPredictResponse {
28    pub fn new(status: String) -> TrainPredictResponse {
29        TrainPredictResponse {
30            prediction_result: None,
31            status,
32        }
33    }
34}