1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* The Selling Partner API for Amazon Warehousing and Distribution
*
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
*
* The version of the OpenAPI document: 2024-05-09
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Address : Shipping address that represents the origin or destination location.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Address {
/// First line of the address text.
#[serde(rename = "addressLine1")]
pub address_line1: String,
/// Optional second line of the address text.
#[serde(rename = "addressLine2", skip_serializing_if = "Option::is_none")]
pub address_line2: Option<String>,
/// Optional third line of the address text.
#[serde(rename = "addressLine3", skip_serializing_if = "Option::is_none")]
pub address_line3: Option<String>,
/// Optional city where this address is located.
#[serde(rename = "city", skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
/// Two-digit, ISO 3166-1 alpha-2 formatted country code where this address is located.
#[serde(rename = "countryCode")]
pub country_code: String,
/// Optional county where this address is located.
#[serde(rename = "county", skip_serializing_if = "Option::is_none")]
pub county: Option<String>,
/// Optional district where this address is located.
#[serde(rename = "district", skip_serializing_if = "Option::is_none")]
pub district: Option<String>,
/// Name of the person, business, or institution at this address.
#[serde(rename = "name")]
pub name: String,
/// Optional E.164-formatted phone number for an available contact at this address.
#[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
/// Optional postal code where this address is located.
#[serde(rename = "postalCode", skip_serializing_if = "Option::is_none")]
pub postal_code: Option<String>,
/// State or region where this address is located. Note that this is contextual to the specified country code.
#[serde(rename = "stateOrRegion")]
pub state_or_region: String,
}
impl Address {
/// Shipping address that represents the origin or destination location.
pub fn new(address_line1: String, country_code: String, name: String, state_or_region: String) -> Address {
Address {
address_line1,
address_line2: None,
address_line3: None,
city: None,
country_code,
county: None,
district: None,
name,
phone_number: None,
postal_code: None,
state_or_region,
}
}
}