geoengine_api_client/models/
derived_color.rs1use crate::models;
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct DerivedColor {
15 #[serde(rename = "attribute")]
16 pub attribute: String,
17 #[serde(rename = "colorizer")]
18 pub colorizer: Box<models::Colorizer>,
19 #[serde(rename = "type")]
20 pub r#type: Type,
21}
22
23impl DerivedColor {
24 pub fn new(attribute: String, colorizer: models::Colorizer, r#type: Type) -> DerivedColor {
25 DerivedColor {
26 attribute,
27 colorizer: Box::new(colorizer),
28 r#type,
29 }
30 }
31}
32#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Type {
35 #[serde(rename = "derived")]
36 Derived,
37}
38
39impl Default for Type {
40 fn default() -> Type {
41 Self::Derived
42 }
43}
44