Skip to main content

opensearch_client/common/
nested_sort_value.rs

1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use crate::common;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NestedSortValue {
16    #[serde(
17        rename = "max_children",
18        default,
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub max_children: Option<u32>,
22    #[serde(rename = "filter", default, skip_serializing_if = "Option::is_none")]
23    pub filter: Option<crate::dsl::Query>,
24    /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
25    #[serde(rename = "path")]
26    pub path: String,
27    #[serde(rename = "nested", default, skip_serializing_if = "Option::is_none")]
28    pub nested: Option<Box<common::NestedSortValue>>,
29}
30
31impl NestedSortValue {
32    pub fn new(path: String) -> NestedSortValue {
33        NestedSortValue {
34            max_children: None,
35            filter: None,
36            path,
37            nested: None,
38        }
39    }
40}