opensearch-client 0.3.2

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 RepositorySettings {
    /// Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
    /// this behavior while keeping the semantics of the field type.
    ///
    /// Depending on the target language, code generators can keep the union or remove it and leniently parse
    /// strings to the target type.
    #[serde(rename = "read_only", default, skip_serializing_if = "Option::is_none")]
    pub read_only: Option<common::StringifiedBoolean>,
    /// Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
    /// this behavior while keeping the semantics of the field type.
    ///
    /// Depending on the target language, code generators can keep the union or remove it and leniently parse
    /// strings to the target type.
    #[serde(rename = "compress", default, skip_serializing_if = "Option::is_none")]
    pub compress: Option<common::StringifiedBoolean>,
    #[serde(rename = "location")]
    pub location: String,
    #[serde(
        rename = "chunk_size",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub chunk_size: Option<String>,
    /// Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
    /// this behavior while keeping the semantics of the field type.
    ///
    /// Depending on the target language, code generators can keep the union or remove it and leniently parse
    /// strings to the target type.
    #[serde(
        rename = "concurrent_streams",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub concurrent_streams: Option<common::StringifiedInteger>,
}

impl RepositorySettings {
    pub fn new(location: String) -> RepositorySettings {
        RepositorySettings {
            read_only: None,
            compress: None,
            location,
            chunk_size: None,
            concurrent_streams: None,
        }
    }
}