1 | /*******************************************************************************
|
2 | *
|
3 | * Copyright 2018 Adobe. All rights reserved.
|
4 | * This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
5 | * you may not use this file except in compliance with the License. You may obtain a copy
|
6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0
|
7 | *
|
8 | * Unless required by applicable law or agreed to in writing, software distributed under
|
9 | * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
10 | * OF ANY KIND, either express or implied. See the License for the specific language
|
11 | * governing permissions and limitations under the License.
|
12 | *
|
13 | ******************************************************************************/
|
14 |
|
15 | /**
|
16 | * Auto generated code based on Swagger definition.
|
17 | * Dot not edit manually. Manual changes will be overridden.
|
18 | *
|
19 | * @version 1.1.2
|
20 | */
|
21 |
|
22 | class Address {
|
23 |
|
24 | /**
|
25 | * Constructs a Address based on its enclosed builder.
|
26 | * @constructor
|
27 | * @param {Builder} builder the Address builder
|
28 | */
|
29 | constructor(builder) {
|
30 |
|
31 | /**
|
32 | * Additional details for the address.
|
33 | * @type {string}
|
34 | */
|
35 | this.additionalAddressInfo = undefined;
|
36 |
|
37 | /**
|
38 | * Additional details for the street address.
|
39 | * @type {string}
|
40 | */
|
41 | this.additionalStreetInfo = undefined;
|
42 |
|
43 | /**
|
44 | * City.
|
45 | * @type {string}
|
46 | */
|
47 | this.city = builder.city;
|
48 |
|
49 | /**
|
50 | * Country code as per ISO 3166-1.
|
51 | * @type {string}
|
52 | */
|
53 | this.country = builder.country;
|
54 |
|
55 | /**
|
56 | * Department.
|
57 | * @type {string}
|
58 | */
|
59 | this.department = undefined;
|
60 |
|
61 | /**
|
62 | * Email.
|
63 | * @type {string}
|
64 | */
|
65 | this.email = undefined;
|
66 |
|
67 | /**
|
68 | * Fax.
|
69 | * @type {string}
|
70 | */
|
71 | this.fax = undefined;
|
72 |
|
73 | /**
|
74 | * First name.
|
75 | * @type {string}
|
76 | */
|
77 | this.firstName = builder.firstName;
|
78 |
|
79 | /**
|
80 | * Address unique identifier.
|
81 | * @type {string}
|
82 | */
|
83 | this.id = builder.id;
|
84 |
|
85 | /**
|
86 | * Last name.
|
87 | * @type {string}
|
88 | */
|
89 | this.lastName = builder.lastName;
|
90 |
|
91 | /**
|
92 | * Mobile.
|
93 | * @type {string}
|
94 | */
|
95 | this.mobile = undefined;
|
96 |
|
97 | /**
|
98 | * Organization name. Can be company name.
|
99 | * @type {string}
|
100 | */
|
101 | this.organizationName = undefined;
|
102 |
|
103 | /**
|
104 | * Phone.
|
105 | * @type {string}
|
106 | */
|
107 | this.phone = undefined;
|
108 |
|
109 | /**
|
110 | * Postal code.
|
111 | * @type {string}
|
112 | */
|
113 | this.postalCode = builder.postalCode;
|
114 |
|
115 | /**
|
116 | * Region.
|
117 | * @type {string}
|
118 | */
|
119 | this.region = undefined;
|
120 |
|
121 | /**
|
122 | * Address salutation
|
123 | * @type {string}
|
124 | */
|
125 | this.salutation = undefined;
|
126 |
|
127 | /**
|
128 | * Street name.
|
129 | * @type {string}
|
130 | */
|
131 | this.streetName = builder.streetName;
|
132 |
|
133 | /**
|
134 | * Street no.
|
135 | * @type {string}
|
136 | */
|
137 | this.streetNumber = undefined;
|
138 |
|
139 | /**
|
140 | * Address title
|
141 | * @type {string}
|
142 | */
|
143 | this.title = undefined;
|
144 | }
|
145 |
|
146 | /**
|
147 | * Builds a Address based on API required properties.
|
148 | */
|
149 | static get Builder() {
|
150 | class Builder {
|
151 |
|
152 | withCity(city) {
|
153 | this.city = city;
|
154 | return this;
|
155 | }
|
156 |
|
157 | withCountry(country) {
|
158 | this.country = country;
|
159 | return this;
|
160 | }
|
161 |
|
162 | withFirstName(firstName) {
|
163 | this.firstName = firstName;
|
164 | return this;
|
165 | }
|
166 |
|
167 | withId(id) {
|
168 | this.id = id;
|
169 | return this;
|
170 | }
|
171 |
|
172 | withLastName(lastName) {
|
173 | this.lastName = lastName;
|
174 | return this;
|
175 | }
|
176 |
|
177 | withPostalCode(postalCode) {
|
178 | this.postalCode = postalCode;
|
179 | return this;
|
180 | }
|
181 |
|
182 | withStreetName(streetName) {
|
183 | this.streetName = streetName;
|
184 | return this;
|
185 | }
|
186 |
|
187 | build() {
|
188 | return new Address(this);
|
189 | }
|
190 | }
|
191 | return Builder;
|
192 | }
|
193 | }
|
194 | module.exports.Address = Address;
|