Skip to main content

opensearch_client/core/search/
nested_identity.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::core;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NestedIdentity {
16    #[serde(rename = "offset")]
17    pub offset: u32,
18    #[serde(rename = "_nested", default, skip_serializing_if = "Option::is_none")]
19    pub nested: Option<Box<core::search::NestedIdentity>>,
20    /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
21    #[serde(rename = "field")]
22    pub field: String,
23}
24
25impl NestedIdentity {
26    pub fn new(offset: u32, field: String) -> NestedIdentity {
27        NestedIdentity {
28            offset,
29            nested: None,
30            field,
31        }
32    }
33}