opensearch-client 0.3.1

Strongly typed OpenSearch Client
Documentation
/*
 * 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,
        }
    }
}