Skip to main content

opensearch_client/ml/
action.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 Action {
16    #[serde(
17        rename = "request_body",
18        default,
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub request_body: Option<String>,
22    #[serde(rename = "url", default, skip_serializing_if = "Option::is_none")]
23    pub url: Option<String>,
24    #[serde(rename = "method", default, skip_serializing_if = "Option::is_none")]
25    pub method: Option<String>,
26    #[serde(rename = "headers", default, skip_serializing_if = "Option::is_none")]
27    pub headers: Option<ml::Headers>,
28    #[serde(
29        rename = "post_process_function",
30        default,
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub post_process_function: Option<String>,
34    #[serde(
35        rename = "pre_process_function",
36        default,
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub pre_process_function: Option<String>,
40    #[serde(
41        rename = "action_type",
42        default,
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub action_type: Option<String>,
46}
47
48impl Action {
49    pub fn new() -> Action {
50        Action {
51            request_body: None,
52            url: None,
53            method: None,
54            headers: None,
55            post_process_function: None,
56            pre_process_function: None,
57            action_type: None,
58        }
59    }
60}