geoengine-api-client 0.9.2

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)
 *
 * 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 {
    /// If `data`, it computes the bounds of the underlying data. If `{ \"min\": ..., \"max\": ... }`, 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>,
    /// Name of the (numeric) vector attribute or raster band to compute the histogram on.
    #[serde(rename = "columnName")]
    pub column_name: String,
    /// 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(bounds: models::HistogramBounds, buckets: models::HistogramBuckets, column_name: String) -> HistogramParameters {
        HistogramParameters {
            bounds: Box::new(bounds),
            buckets: Box::new(buckets),
            column_name,
            interactive: None,
        }
    }
}