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::common;
use serde::{Deserialize, Serialize};




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DanglingIndex {
    #[serde(rename = "node_ids")]
    pub node_ids: common::Ids,
    #[serde(rename = "index_uuid")]
    pub index_uuid: String,
    #[serde(rename = "index_name")]
    pub index_name: String,
    #[serde(rename = "creation_date_millis")]
    pub creation_date_millis: String,  /// A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the
  /// number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string.
  /// representation.
    #[serde(rename = "creation_date", default, skip_serializing_if = "Option::is_none")]
    pub creation_date: Option<common::DateTime>,
}

impl DanglingIndex {
    
    pub fn new(node_ids: common::Ids, index_uuid: String, index_name: String, creation_date_millis: String) -> DanglingIndex {
        DanglingIndex {
            node_ids,
            index_uuid,
            index_name,
            creation_date_millis,
            creation_date: None,
        }
    }
}