Skip to main content

opensearch_client/common/aggregations/
matrix_stats_fields.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 MatrixStatsFields {
16    #[serde(rename = "skewness")]
17    pub skewness: f64,
18    /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
19    #[serde(rename = "name")]
20    pub name: String,
21    #[serde(rename = "correlation")]
22    pub correlation: serde_json::Value,
23    #[serde(rename = "count")]
24    pub count: f64,
25    #[serde(rename = "variance")]
26    pub variance: f64,
27    #[serde(rename = "kurtosis")]
28    pub kurtosis: f64,
29    #[serde(rename = "mean")]
30    pub mean: f64,
31    #[serde(rename = "covariance")]
32    pub covariance: serde_json::Value,
33}
34
35impl MatrixStatsFields {
36    pub fn new(
37        skewness: f64,
38        name: String,
39        correlation: serde_json::Value,
40        count: f64,
41        variance: f64,
42        kurtosis: f64,
43        mean: f64,
44        covariance: serde_json::Value,
45    ) -> MatrixStatsFields {
46        MatrixStatsFields {
47            skewness,
48            name,
49            correlation,
50            count,
51            variance,
52            kurtosis,
53            mean,
54            covariance,
55        }
56    }
57}