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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IndexSettingsMapping {
    #[serde(
        rename = "dimension_fields",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub dimension_fields: Option<indices::IndexSettingsMappingLimitDimensionFields>,
    /// 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 = "ignore_malformed",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub ignore_malformed: Option<common::StringifiedBoolean>,
    #[serde(
        rename = "nested_objects",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub nested_objects: Option<indices::IndexSettingsMappingLimitNestedObjects>,
    #[serde(
        rename = "nested_fields",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub nested_fields: Option<indices::IndexSettingsMappingLimitNestedFields>,
    #[serde(
        rename = "total_fields",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub total_fields: Option<indices::IndexSettingsMappingLimitTotalFields>,
    #[serde(rename = "depth", default, skip_serializing_if = "Option::is_none")]
    pub depth: Option<indices::IndexSettingsMappingLimitDepth>,
    /// 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 = "coerce", default, skip_serializing_if = "Option::is_none")]
    pub coerce: Option<common::StringifiedBoolean>,
    #[serde(
        rename = "field_name_length",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub field_name_length: Option<indices::IndexSettingsMappingLimitFieldNameLength>,
}

impl IndexSettingsMapping {
    pub fn new() -> IndexSettingsMapping {
        IndexSettingsMapping {
            dimension_fields: None,
            ignore_malformed: None,
            nested_objects: None,
            nested_fields: None,
            total_fields: None,
            depth: None,
            coerce: None,
            field_name_length: None,
        }
    }
}