Skip to main content

naurt_api/models/
final_destination_location.rs

1/*
2 * Naurt API
3 *
4 * OpenAPI specification for Naurt's APIs. 
5 *
6 * The version of the OpenAPI document: 0.1.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FinalDestinationLocation : A location, using WGS84 latitude and longitude.  Used for a reverse geocode, or to add some location bias to a forward geocode.  Use `distance_filter` to optionally limit the distance from this point that  results can appear within 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FinalDestinationLocation {
17    #[serde(rename = "latitude")]
18    pub latitude: f64,
19    #[serde(rename = "longitude")]
20    pub longitude: f64,
21    #[serde(rename = "distance_filter", skip_serializing_if = "Option::is_none")]
22    pub distance_filter: Option<f64>,
23}
24
25impl FinalDestinationLocation {
26    /// A location, using WGS84 latitude and longitude.  Used for a reverse geocode, or to add some location bias to a forward geocode.  Use `distance_filter` to optionally limit the distance from this point that  results can appear within 
27    pub fn new(latitude: f64, longitude: f64) -> FinalDestinationLocation {
28        FinalDestinationLocation {
29            latitude,
30            longitude,
31            distance_filter: None,
32        }
33    }
34}
35