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.0.0
|
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 | * Address unique identifier.
|
32 | * @type {string}
|
33 | */
|
34 | this.id = builder.id;
|
35 |
|
36 | /**
|
37 | * Address title
|
38 | * @type {string}
|
39 | */
|
40 | this.title = undefined;
|
41 |
|
42 | /**
|
43 | * Address salutation
|
44 | * @type {string}
|
45 | */
|
46 | this.salutation = undefined;
|
47 |
|
48 | /**
|
49 | * First name.
|
50 | * @type {string}
|
51 | */
|
52 | this.firstName = builder.firstName;
|
53 |
|
54 | /**
|
55 | * Last name.
|
56 | * @type {string}
|
57 | */
|
58 | this.lastName = builder.lastName;
|
59 |
|
60 | /**
|
61 | * Email.
|
62 | * @type {string}
|
63 | */
|
64 | this.email = undefined;
|
65 |
|
66 | /**
|
67 | * Phone.
|
68 | * @type {string}
|
69 | */
|
70 | this.phone = undefined;
|
71 |
|
72 | /**
|
73 | * Mobile.
|
74 | * @type {string}
|
75 | */
|
76 | this.mobile = undefined;
|
77 |
|
78 | /**
|
79 | * Fax.
|
80 | * @type {string}
|
81 | */
|
82 | this.fax = undefined;
|
83 |
|
84 | /**
|
85 | * Country code as per ISO 3166-1.
|
86 | * @type {string}
|
87 | */
|
88 | this.country = builder.country;
|
89 |
|
90 | /**
|
91 | * Region.
|
92 | * @type {string}
|
93 | */
|
94 | this.region = undefined;
|
95 |
|
96 | /**
|
97 | * City.
|
98 | * @type {string}
|
99 | */
|
100 | this.city = builder.city;
|
101 |
|
102 | /**
|
103 | * Postal code.
|
104 | * @type {string}
|
105 | */
|
106 | this.postalCode = builder.postalCode;
|
107 |
|
108 | /**
|
109 | * Organization name. Can be company name.
|
110 | * @type {string}
|
111 | */
|
112 | this.organizationName = undefined;
|
113 |
|
114 | /**
|
115 | * Department.
|
116 | * @type {string}
|
117 | */
|
118 | this.department = undefined;
|
119 |
|
120 | /**
|
121 | * Street name.
|
122 | * @type {string}
|
123 | */
|
124 | this.streetName = builder.streetName;
|
125 |
|
126 | /**
|
127 | * Street no.
|
128 | * @type {string}
|
129 | */
|
130 | this.streetNumber = undefined;
|
131 |
|
132 | /**
|
133 | * Additional details for the street address.
|
134 | * @type {string}
|
135 | */
|
136 | this.additionalStreetInfo = undefined;
|
137 |
|
138 | /**
|
139 | * Additional details for the address.
|
140 | * @type {string}
|
141 | */
|
142 | this.additionalAddressInfo = undefined;
|
143 |
|
144 | }
|
145 |
|
146 | /**
|
147 | * Builds a Address based on API required properties.
|
148 | */
|
149 | static get Builder() {
|
150 | class Builder {
|
151 | withCity(city) {
|
152 | this.city = city;
|
153 | return this;
|
154 | }
|
155 |
|
156 | withCountry(country) {
|
157 | this.country = country;
|
158 | return this;
|
159 | }
|
160 |
|
161 | withFirstName(firstName) {
|
162 | this.firstName = firstName;
|
163 | return this;
|
164 | }
|
165 |
|
166 | withId(id) {
|
167 | this.id = id;
|
168 | return this;
|
169 | }
|
170 |
|
171 | withLastName(lastName) {
|
172 | this.lastName = lastName;
|
173 | return this;
|
174 | }
|
175 |
|
176 | withPostalCode(postalCode) {
|
177 | this.postalCode = postalCode;
|
178 | return this;
|
179 | }
|
180 |
|
181 | withStreetName(streetName) {
|
182 | this.streetName = streetName;
|
183 | return this;
|
184 | }
|
185 |
|
186 | build() {
|
187 | return new Address(this);
|
188 | }
|
189 | }
|
190 | return Builder;
|
191 | }
|
192 | }
|
193 | module.exports.Address = Address;
|