Skip to main content

opensearch_client/common/mapping/
dynamic_template.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::common;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DynamicTemplate {
16    #[serde(
17        rename = "path_match",
18        default,
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub path_match: Option<String>,
22    #[serde(
23        rename = "path_unmatch",
24        default,
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub path_unmatch: Option<String>,
28    #[serde(rename = "unmatch", default, skip_serializing_if = "Option::is_none")]
29    pub unmatch: Option<String>,
30    #[serde(rename = "match", default, skip_serializing_if = "Option::is_none")]
31    pub r#match: Option<String>,
32    #[serde(
33        rename = "match_mapping_type",
34        default,
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub match_mapping_type: Option<String>,
38    #[serde(rename = "mapping", default, skip_serializing_if = "Option::is_none")]
39    pub mapping: Option<common::mapping::Property>,
40    #[serde(
41        rename = "match_pattern",
42        default,
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub match_pattern: Option<String>,
46}
47
48impl DynamicTemplate {
49    pub fn new() -> DynamicTemplate {
50        DynamicTemplate {
51            path_match: None,
52            path_unmatch: None,
53            unmatch: None,
54            r#match: None,
55            match_mapping_type: None,
56            mapping: None,
57            match_pattern: None,
58        }
59    }
60}