Skip to main content

naurt_api/models/
final_destination_match_level.rs

1/*
2 * Naurt API
3 *
4 * OpenAPI specification for Naurt's APIs. 
5 *
6 * The version of the OpenAPI document: 0.1.4
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FinalDestinationMatchLevel : Match level describing the geographical level to which an address has been matched.  It can be one of the following:    - Unit   - StreetNumber   - Street   - Postalcode  See: http://localhost:4321/reference/search-confidence/ 
15/// Match level describing the geographical level to which an address has been matched.  It can be one of the following:    - Unit   - StreetNumber   - Street   - Postalcode  See: http://localhost:4321/reference/search-confidence/ 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum FinalDestinationMatchLevel {
18    #[serde(rename = "Unit")]
19    Unit,
20    #[serde(rename = "StreetNumber")]
21    StreetNumber,
22    #[serde(rename = "Street")]
23    Street,
24    #[serde(rename = "Postalcode")]
25    Postalcode,
26
27}
28
29impl std::fmt::Display for FinalDestinationMatchLevel {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::Unit => write!(f, "Unit"),
33            Self::StreetNumber => write!(f, "StreetNumber"),
34            Self::Street => write!(f, "Street"),
35            Self::Postalcode => write!(f, "Postalcode"),
36        }
37    }
38}
39
40impl Default for FinalDestinationMatchLevel {
41    fn default() -> FinalDestinationMatchLevel {
42        Self::Unit
43    }
44}
45