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