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




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SnapshotStatus {
    #[serde(rename = "repository")]
    pub repository: String,
    #[serde(rename = "uuid")]
    pub uuid: String,
    #[serde(rename = "state")]
    pub state: String,
    #[serde(rename = "indices")]
    pub indices: serde_json::Value,
    #[serde(rename = "snapshot")]
    pub snapshot: String,
    #[serde(rename = "stats")]
    pub stats: snapshot::SnapshotStats,
    #[serde(rename = "include_global_state", default, skip_serializing_if = "Option::is_none")]
    pub include_global_state: Option<bool>,
    #[serde(rename = "shards_stats")]
    pub shards_stats: snapshot::SnapshotShardsStats,
}

impl SnapshotStatus {
    
    pub fn new(repository: String, uuid: String, state: String, indices: serde_json::Value, snapshot: String, stats: snapshot::SnapshotStats, shards_stats: snapshot::SnapshotShardsStats) -> SnapshotStatus {
        SnapshotStatus {
            repository,
            uuid,
            state,
            indices,
            snapshot,
            stats,
            include_global_state: None,
            shards_stats,
        }
    }
}