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 /// Name of the (numeric) vector attribute or raster band to compute the histogram on.
18 #[serde(rename = "attributeName")]
19 pub attribute_name: String,
20 /// If `data`, it computes the bounds of the underlying data. If `values`, one can specify custom bounds.
21 #[serde(rename = "bounds")]
22 pub bounds: Box<models::HistogramBounds>,
23 /// The number of buckets. The value can be specified or calculated.
24 #[serde(rename = "buckets")]
25 pub buckets: Box<models::HistogramBuckets>,
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(attribute_name: String, bounds: models::HistogramBounds, buckets: models::HistogramBuckets) -> HistogramParameters {
34 HistogramParameters {
35 attribute_name,
36 bounds: Box::new(bounds),
37 buckets: Box::new(buckets),
38 interactive: None,
39 }
40 }
41}
42