naurt-api 0.1.3

OpenAPI specification for Naurt's APIs.
Documentation
/*
 * Naurt API
 *
 * OpenAPI specification for Naurt's APIs. 
 *
 * The version of the OpenAPI document: 0.1.2
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FinalDestinationHit {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "address")]
    pub address: String,
    #[serde(rename = "geojson")]
    pub geojson: Box<models::FinalDestinationHitGeojson>,
    #[serde(rename = "distance", skip_serializing_if = "Option::is_none")]
    pub distance: Option<f64>,
    /// Confidence score in the range 0.0 to 1.0 indicating how well the result  matches the query. Higher is better.  See: https://docs.naurt.com/reference/search-confidence  Not to be confused with Accuracy, which is how good the data itself is. This  is about the likelihood of a good match. 
    #[serde(rename = "search_confidence", skip_serializing_if = "Option::is_none")]
    pub search_confidence: Option<f64>,
    #[serde(rename = "structured_response", skip_serializing_if = "Option::is_none")]
    pub structured_response: Option<Box<models::StructuredAddress>>,
    #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")]
    pub source_id: Option<Box<models::FinalDestinationSourceIdResponse>>,
}

impl FinalDestinationHit {
    pub fn new(id: uuid::Uuid, address: String, geojson: models::FinalDestinationHitGeojson) -> FinalDestinationHit {
        FinalDestinationHit {
            id,
            address,
            geojson: Box::new(geojson),
            distance: None,
            search_confidence: None,
            structured_response: None,
            source_id: None,
        }
    }
}