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




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TemplateConfig {  /// An inline search template that supports the same parameters as the Search API
  /// request body and Mustache variables. If no `id` is specified, this
  /// parameter is required.
    #[serde(rename = "source", default, skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,  /// When `true`, returns detailed information about score calculation as part of each hit.
    #[serde(rename = "explain", default, skip_serializing_if = "Option::is_none")]
    pub explain: Option<bool>,  /// The key-value pairs used to replace Mustache variables in the template.
  /// The key is the variable name.
  /// The value is the variable value.
    #[serde(rename = "params", default, skip_serializing_if = "Option::is_none")]
    pub params: Option<serde_json::Value>,  /// When `true`, provides a profile for the query execution.
    #[serde(rename = "profile", default, skip_serializing_if = "Option::is_none")]
    pub profile: Option<bool>,
}

impl TemplateConfig {
    
    pub fn new() -> TemplateConfig {
        TemplateConfig {
            source: None,
            id: None,
            explain: None,
            params: None,
            profile: None,
        }
    }
}