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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaletteColorizer {
    /// A map from value to color  It is assumed that is has at least one and at most 256 entries.
    #[serde(rename = "colors")]
    pub colors: std::collections::HashMap<String, Vec<i32>>,
    #[serde(rename = "defaultColor")]
    pub default_color: Vec<i32>,
    #[serde(rename = "noDataColor")]
    pub no_data_color: Vec<i32>,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl PaletteColorizer {
    pub fn new(colors: std::collections::HashMap<String, Vec<i32>>, default_color: Vec<i32>, no_data_color: Vec<i32>, r#type: Type) -> PaletteColorizer {
        PaletteColorizer {
            colors,
            default_color,
            no_data_color,
            r#type,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "palette")]
    Palette,
}

impl Default for Type {
    fn default() -> Type {
        Self::Palette
    }
}