Skip to main content

naurt_api/models/
structured_address.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/// StructuredAddress : Naurt's own format for structured address data. Please see:  https://docs.naurt.com/reference/address-structure/ for significant more  details on this data format.  When searching, do not use `country_code` - as it is not used. `country_code` is for responses only. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct StructuredAddress {
17    #[serde(rename = "unit", skip_serializing_if = "Option::is_none")]
18    pub unit: Option<String>,
19    #[serde(rename = "house_name", skip_serializing_if = "Option::is_none")]
20    pub house_name: Option<String>,
21    #[serde(rename = "street_number", skip_serializing_if = "Option::is_none")]
22    pub street_number: Option<String>,
23    #[serde(rename = "street_name", skip_serializing_if = "Option::is_none")]
24    pub street_name: Option<String>,
25    #[serde(rename = "locality", skip_serializing_if = "Option::is_none")]
26    pub locality: Option<String>,
27    #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
28    pub city: Option<String>,
29    #[serde(rename = "county", skip_serializing_if = "Option::is_none")]
30    pub county: Option<String>,
31    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
32    pub state: Option<String>,
33    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
34    pub country: Option<String>,
35    #[serde(rename = "postalcode", skip_serializing_if = "Option::is_none")]
36    pub postalcode: Option<String>,
37    #[serde(rename = "country_code", skip_serializing_if = "Option::is_none")]
38    pub country_code: Option<models::Country>,
39}
40
41impl StructuredAddress {
42    /// Naurt's own format for structured address data. Please see:  https://docs.naurt.com/reference/address-structure/ for significant more  details on this data format.  When searching, do not use `country_code` - as it is not used. `country_code` is for responses only. 
43    pub fn new() -> StructuredAddress {
44        StructuredAddress {
45            unit: None,
46            house_name: None,
47            street_number: None,
48            street_name: None,
49            locality: None,
50            city: None,
51            county: None,
52            state: None,
53            country: None,
54            postalcode: None,
55            country_code: None,
56        }
57    }
58}
59