Skip to main content

naurt_api/models/
rendezvous_hit_data.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RendezvousHitData {
16    #[serde(rename = "id")]
17    pub id: String,
18    /// Normalised address; may differ from the searched address
19    #[serde(rename = "address")]
20    pub address: String,
21    #[serde(rename = "geojson")]
22    pub geojson: Box<models::FeatureCollection>,
23    /// Distance in metres from the searched latitude/longitude. Present only when searching with latitude and longitude. 
24    #[serde(rename = "distance", skip_serializing_if = "Option::is_none")]
25    pub distance: Option<f32>,
26}
27
28impl RendezvousHitData {
29    pub fn new(id: String, address: String, geojson: models::FeatureCollection) -> RendezvousHitData {
30        RendezvousHitData {
31            id,
32            address,
33            geojson: Box::new(geojson),
34            distance: None,
35        }
36    }
37}
38