geoengine-api-client 0.0.33

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Geo Engine API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.9.0
 * Contact: dev@geoengine.de
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// HistogramParameters : The parameter spec for `Histogram`
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HistogramParameters {
    /// Name of the (numeric) vector attribute or raster band to compute the histogram on.
    #[serde(rename = "attributeName")]
    pub attribute_name: String,
    /// If `data`, it computes the bounds of the underlying data. If `values`, one can specify custom bounds.
    #[serde(rename = "bounds")]
    pub bounds: Box<models::HistogramBounds>,
    /// The number of buckets. The value can be specified or calculated.
    #[serde(rename = "buckets")]
    pub buckets: Box<models::HistogramBuckets>,
    /// Flag, if the histogram should have user interactions for a range selection. It is `false` by default.
    #[serde(rename = "interactive", skip_serializing_if = "Option::is_none")]
    pub interactive: Option<bool>,
}

impl HistogramParameters {
    /// The parameter spec for `Histogram`
    pub fn new(attribute_name: String, bounds: models::HistogramBounds, buckets: models::HistogramBuckets) -> HistogramParameters {
        HistogramParameters {
            attribute_name,
            bounds: Box::new(bounds),
            buckets: Box::new(buckets),
            interactive: None,
        }
    }
}