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};

/// Query
/// The query.

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Query {
    /// The match all query.
    #[serde(rename = "match_all", default, skip_serializing_if = "Option::is_none")]
    pub match_all: Option<ml::MatchAllQuery>,
    /// The Boolean query.
    #[serde(rename = "bool", default, skip_serializing_if = "Option::is_none")]
    pub bool: Option<ml::BoolQuery>,
    /// Term to match the query.
    #[serde(rename = "term", default, skip_serializing_if = "Option::is_none")]
    pub term: Option<ml::Term>,
    /// Match query.
    #[serde(rename = "match", default, skip_serializing_if = "Option::is_none")]
    pub r#match: Option<ml::Match>,
}

impl Query {
    /// The query.
    pub fn new() -> Query {
        Query {
            match_all: None,
            bool: None,
            term: None,
            r#match: None,
        }
    }
}