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

/// Nested
/// The nested filter.


#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Nested {  /// The score mode.
    #[serde(rename = "score_mode", default, skip_serializing_if = "Option::is_none")]
    pub score_mode: Option<String>,  /// Whether to ignore unmapped fields.
    #[serde(rename = "ignore_unmapped", default, skip_serializing_if = "Option::is_none")]
    pub ignore_unmapped: Option<bool>,  /// Adjust the relevance score of a match.
    #[serde(rename = "boost", default, skip_serializing_if = "Option::is_none")]
    pub boost: Option<f64>,  /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
    #[serde(rename = "path", default, skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,  /// The query.
    #[serde(rename = "query", default, skip_serializing_if = "Option::is_none")]
    pub query: Option<ml::Query>,
}

impl Nested {
      /// The nested filter.
    pub fn new() -> Nested {
        Nested {
            score_mode: None,
            ignore_unmapped: None,
            boost: None,
            path: None,
            query: None,
        }
    }
}