use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MapBoxOptimizationResponse {
#[serde(default, rename = "code")]
pub code: Option<String>,
#[serde(default)]
pub trips: Vec<MapBoxTrip>,
#[serde(default)]
pub waypoints: Vec<MapBoxOptWaypoint>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MapBoxTrip {
#[serde(default, rename = "distance")]
pub distance: f64,
#[serde(default, rename = "duration")]
pub duration: f64,
#[serde(default, rename = "geometry")]
pub geometry: Option<String>,
#[serde(default)]
pub legs: Vec<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MapBoxOptWaypoint {
#[serde(default, rename = "waypoint_index")]
pub waypoint_index: Option<u64>,
#[serde(default, rename = "trips_index")]
pub trips_index: Option<u64>,
#[serde(default)]
pub location: Option<Vec<f64>>,
#[serde(default, rename = "name")]
pub name: Option<String>,
}