Skip to main content

geoengine_api_client/models/
histogram_parameters.rs

1/*
2 * Geo Engine API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * Contact: dev@geoengine.de
7 * Generated by: https://openapi-generator.tech
8 */
9
10use crate::models;
11use serde::{Deserialize, Serialize};
12
13/// HistogramParameters : The parameter spec for `Histogram`
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct HistogramParameters {
16    /// If `data`, it computes the bounds of the underlying data. If `{ \"min\": ..., \"max\": ... }`, one can specify custom bounds.
17    #[serde(rename = "bounds")]
18    pub bounds: Box<models::HistogramBounds>,
19    /// The number of buckets. The value can be specified or calculated.
20    #[serde(rename = "buckets")]
21    pub buckets: Box<models::HistogramBuckets>,
22    /// Name of the (numeric) vector attribute or raster band to compute the histogram on.
23    #[serde(rename = "columnName")]
24    pub column_name: String,
25    /// Flag, if the histogram should have user interactions for a range selection. It is `false` by default.
26    #[serde(rename = "interactive", skip_serializing_if = "Option::is_none")]
27    pub interactive: Option<bool>,
28}
29
30impl HistogramParameters {
31    /// The parameter spec for `Histogram`
32    pub fn new(bounds: models::HistogramBounds, buckets: models::HistogramBuckets, column_name: String) -> HistogramParameters {
33        HistogramParameters {
34            bounds: Box::new(bounds),
35            buckets: Box::new(buckets),
36            column_name,
37            interactive: None,
38        }
39    }
40}
41