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




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShardProfile {
    #[serde(rename = "aggregations")]
    pub aggregations: Vec<core::search::AggregationProfile>,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "fetch", default, skip_serializing_if = "Option::is_none")]
    pub fetch: Option<core::search::FetchProfile>,
    #[serde(rename = "searches")]
    pub searches: Vec<core::search::SearchProfile>,
}

impl ShardProfile {
    
    pub fn new(aggregations: Vec<core::search::AggregationProfile>, id: String, searches: Vec<core::search::SearchProfile>) -> ShardProfile {
        ShardProfile {
            aggregations,
            id,
            fetch: None,
            searches,
        }
    }
}