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
/*
* 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::ism;
use serde::{Deserialize, Serialize};
/// States
/// A list of actions to perform, and transitions to enter a new state.
/// Once a managed index enters a state it will sequentially execute the actions
/// in the same order listed in the policy. Once all actions have been successfully completed
/// state transitions will be checked until a true condition is eventually met.
/// If you define multiple transitions in a state, the first one in the list that is true will be used.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct States {
#[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>, /// A list of actions to perform.
#[serde(rename = "actions", default, skip_serializing_if = "Option::is_none")]
pub actions: Option<Vec<ism::Action>>, /// A list of transitions to enter a new state.
#[serde(rename = "transitions", default, skip_serializing_if = "Option::is_none")]
pub transitions: Option<Vec<ism::Transition>>,
}
impl States {
/// A list of actions to perform, and transitions to enter a new state.
/// Once a managed index enters a state it will sequentially execute the actions
/// in the same order listed in the policy. Once all actions have been successfully completed
/// state transitions will be checked until a true condition is eventually met.
/// If you define multiple transitions in a state, the first one in the list that is true will be used.
pub fn new() -> States {
States {
name: None,
actions: None,
transitions: None,
}
}
}