Skip to main content

opensearch_client/core/get_script_context/
context_method.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
15
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct ContextMethod {
19    #[serde(rename = "return_type")]
20    pub return_type: String,
21    #[serde(rename = "name")]
22    pub name: String,
23    #[serde(rename = "params")]
24    pub params: Vec<core::get_script_context::ContextMethodParam>,
25}
26
27impl ContextMethod {
28    
29    pub fn new(return_type: String, name: String, params: Vec<core::get_script_context::ContextMethodParam>) -> ContextMethod {
30        ContextMethod {
31            return_type,
32            name,
33            params,
34        }
35    }
36}