1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* opensearch-client
*
* Rust Client for OpenSearch
*
* The version of the OpenAPI document: 3.1.0
* Contact: alberto.paro@gmail.com
* Generated by Paro OpenAPI Generator
*/
use crate::common;
use crate::indices;
use serde::{Deserialize, Serialize};
/// SimulateIndexTemplate
/// New index template definition, which will be included in the simulation, as if it already exists in the system
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
pub struct SimulateIndexTemplate {
/// A comma-separated list of data streams, indexes, and aliases used to limit the request.
/// Supports wildcards (`*`).
/// To target all data streams and indexes, omit this parameter or use `*` or `_all`.
#[serde(
rename = "index_patterns",
default,
skip_serializing_if = "Option::is_none"
)]
pub index_patterns: Option<common::Indices>,
#[serde(rename = "template", default, skip_serializing_if = "Option::is_none")]
pub template: Option<indices::put_index_template::IndexTemplateMapping>,
#[serde(
rename = "data_stream",
default,
skip_serializing_if = "Option::is_none"
)]
pub data_stream: Option<indices::IndexTemplateDataStreamConfiguration>,
/// An ordered list of component template names.
/// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
#[serde(
rename = "composed_of",
default,
skip_serializing_if = "Option::is_none"
)]
pub composed_of: Option<Vec<String>>,
#[serde(rename = "version", default, skip_serializing_if = "Option::is_none")]
pub version: Option<u32>,
/// This setting overrides the value of the `action.auto_create_index` cluster setting.
/// If set to `true` in a template, then indexes can be automatically created using that template even if auto-creation of indexes is disabled using `actions.auto_create_index`.
/// If set to `false`, then indexes or data streams matching the template must always be explicitly created, and may never be automatically created.
#[serde(
rename = "allow_auto_create",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_auto_create: Option<bool>,
#[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
pub meta: Option<common::Metadata>,
/// Priority to determine index template precedence when a new data stream or index is created.
/// The index template with the highest priority is chosen.
/// If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
/// This number is not automatically generated by OpenSearch.
#[serde(rename = "priority", default, skip_serializing_if = "Option::is_none")]
pub priority: Option<u32>,
}
impl SimulateIndexTemplate {
/// New index template definition, which will be included in the simulation, as if it already exists in the system
pub fn new() -> SimulateIndexTemplate {
SimulateIndexTemplate {
index_patterns: None,
template: None,
data_stream: None,
composed_of: None,
version: None,
allow_auto_create: None,
meta: None,
priority: None,
}
}
}