use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GeoJsonMultiPolygon {
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "coordinates")]
pub coordinates: Vec<Vec<Vec<Vec<f64>>>>,
#[serde(rename = "bbox", skip_serializing_if = "Option::is_none")]
pub bbox: Option<Vec<f64>>,
}
impl GeoJsonMultiPolygon {
pub fn new(r#type: Type, coordinates: Vec<Vec<Vec<Vec<f64>>>>) -> GeoJsonMultiPolygon {
GeoJsonMultiPolygon {
r#type,
coordinates,
bbox: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "MultiPolygon")]
MultiPolygon,
}
impl Default for Type {
fn default() -> Type {
Self::MultiPolygon
}
}