001 002package com.commercetools.history.models.common; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * Address 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class AddressImpl implements Address, ModelBase { 022 023 private String id; 024 025 private String key; 026 027 private String title; 028 029 private String salutation; 030 031 private String firstName; 032 033 private String lastName; 034 035 private String streetName; 036 037 private String streetNumber; 038 039 private String additionalStreetInfo; 040 041 private String postalCode; 042 043 private String city; 044 045 private String region; 046 047 private String state; 048 049 private String country; 050 051 private String company; 052 053 private String department; 054 055 private String building; 056 057 private String apartment; 058 059 private String pOBox; 060 061 private String phone; 062 063 private String mobile; 064 065 private String email; 066 067 private String fax; 068 069 private String additionalAddressInfo; 070 071 private String externalId; 072 073 /** 074 * create instance with all properties 075 */ 076 @JsonCreator 077 AddressImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, 078 @JsonProperty("title") final String title, @JsonProperty("salutation") final String salutation, 079 @JsonProperty("firstName") final String firstName, @JsonProperty("lastName") final String lastName, 080 @JsonProperty("streetName") final String streetName, 081 @JsonProperty("streetNumber") final String streetNumber, 082 @JsonProperty("additionalStreetInfo") final String additionalStreetInfo, 083 @JsonProperty("postalCode") final String postalCode, @JsonProperty("city") final String city, 084 @JsonProperty("region") final String region, @JsonProperty("state") final String state, 085 @JsonProperty("country") final String country, @JsonProperty("company") final String company, 086 @JsonProperty("department") final String department, @JsonProperty("building") final String building, 087 @JsonProperty("apartment") final String apartment, @JsonProperty("pOBox") final String pOBox, 088 @JsonProperty("phone") final String phone, @JsonProperty("mobile") final String mobile, 089 @JsonProperty("email") final String email, @JsonProperty("fax") final String fax, 090 @JsonProperty("additionalAddressInfo") final String additionalAddressInfo, 091 @JsonProperty("externalId") final String externalId) { 092 this.id = id; 093 this.key = key; 094 this.title = title; 095 this.salutation = salutation; 096 this.firstName = firstName; 097 this.lastName = lastName; 098 this.streetName = streetName; 099 this.streetNumber = streetNumber; 100 this.additionalStreetInfo = additionalStreetInfo; 101 this.postalCode = postalCode; 102 this.city = city; 103 this.region = region; 104 this.state = state; 105 this.country = country; 106 this.company = company; 107 this.department = department; 108 this.building = building; 109 this.apartment = apartment; 110 this.pOBox = pOBox; 111 this.phone = phone; 112 this.mobile = mobile; 113 this.email = email; 114 this.fax = fax; 115 this.additionalAddressInfo = additionalAddressInfo; 116 this.externalId = externalId; 117 } 118 119 /** 120 * create empty instance 121 */ 122 public AddressImpl() { 123 } 124 125 /** 126 * <p>Unique ID of the Address.</p> 127 */ 128 129 public String getId() { 130 return this.id; 131 } 132 133 /** 134 * 135 */ 136 137 public String getKey() { 138 return this.key; 139 } 140 141 /** 142 * 143 */ 144 145 public String getTitle() { 146 return this.title; 147 } 148 149 /** 150 * 151 */ 152 153 public String getSalutation() { 154 return this.salutation; 155 } 156 157 /** 158 * 159 */ 160 161 public String getFirstName() { 162 return this.firstName; 163 } 164 165 /** 166 * 167 */ 168 169 public String getLastName() { 170 return this.lastName; 171 } 172 173 /** 174 * 175 */ 176 177 public String getStreetName() { 178 return this.streetName; 179 } 180 181 /** 182 * 183 */ 184 185 public String getStreetNumber() { 186 return this.streetNumber; 187 } 188 189 /** 190 * 191 */ 192 193 public String getAdditionalStreetInfo() { 194 return this.additionalStreetInfo; 195 } 196 197 /** 198 * 199 */ 200 201 public String getPostalCode() { 202 return this.postalCode; 203 } 204 205 /** 206 * 207 */ 208 209 public String getCity() { 210 return this.city; 211 } 212 213 /** 214 * 215 */ 216 217 public String getRegion() { 218 return this.region; 219 } 220 221 /** 222 * 223 */ 224 225 public String getState() { 226 return this.state; 227 } 228 229 /** 230 * <p>Two-digit country code as per ISO 3166-1 alpha-2.</p> 231 */ 232 233 public String getCountry() { 234 return this.country; 235 } 236 237 /** 238 * 239 */ 240 241 public String getCompany() { 242 return this.company; 243 } 244 245 /** 246 * 247 */ 248 249 public String getDepartment() { 250 return this.department; 251 } 252 253 /** 254 * 255 */ 256 257 public String getBuilding() { 258 return this.building; 259 } 260 261 /** 262 * 263 */ 264 265 public String getApartment() { 266 return this.apartment; 267 } 268 269 /** 270 * 271 */ 272 273 public String getPOBox() { 274 return this.pOBox; 275 } 276 277 /** 278 * 279 */ 280 281 public String getPhone() { 282 return this.phone; 283 } 284 285 /** 286 * 287 */ 288 289 public String getMobile() { 290 return this.mobile; 291 } 292 293 /** 294 * 295 */ 296 297 public String getEmail() { 298 return this.email; 299 } 300 301 /** 302 * 303 */ 304 305 public String getFax() { 306 return this.fax; 307 } 308 309 /** 310 * 311 */ 312 313 public String getAdditionalAddressInfo() { 314 return this.additionalAddressInfo; 315 } 316 317 /** 318 * 319 */ 320 321 public String getExternalId() { 322 return this.externalId; 323 } 324 325 public void setId(final String id) { 326 this.id = id; 327 } 328 329 public void setKey(final String key) { 330 this.key = key; 331 } 332 333 public void setTitle(final String title) { 334 this.title = title; 335 } 336 337 public void setSalutation(final String salutation) { 338 this.salutation = salutation; 339 } 340 341 public void setFirstName(final String firstName) { 342 this.firstName = firstName; 343 } 344 345 public void setLastName(final String lastName) { 346 this.lastName = lastName; 347 } 348 349 public void setStreetName(final String streetName) { 350 this.streetName = streetName; 351 } 352 353 public void setStreetNumber(final String streetNumber) { 354 this.streetNumber = streetNumber; 355 } 356 357 public void setAdditionalStreetInfo(final String additionalStreetInfo) { 358 this.additionalStreetInfo = additionalStreetInfo; 359 } 360 361 public void setPostalCode(final String postalCode) { 362 this.postalCode = postalCode; 363 } 364 365 public void setCity(final String city) { 366 this.city = city; 367 } 368 369 public void setRegion(final String region) { 370 this.region = region; 371 } 372 373 public void setState(final String state) { 374 this.state = state; 375 } 376 377 public void setCountry(final String country) { 378 this.country = country; 379 } 380 381 public void setCompany(final String company) { 382 this.company = company; 383 } 384 385 public void setDepartment(final String department) { 386 this.department = department; 387 } 388 389 public void setBuilding(final String building) { 390 this.building = building; 391 } 392 393 public void setApartment(final String apartment) { 394 this.apartment = apartment; 395 } 396 397 public void setPOBox(final String pOBox) { 398 this.pOBox = pOBox; 399 } 400 401 public void setPhone(final String phone) { 402 this.phone = phone; 403 } 404 405 public void setMobile(final String mobile) { 406 this.mobile = mobile; 407 } 408 409 public void setEmail(final String email) { 410 this.email = email; 411 } 412 413 public void setFax(final String fax) { 414 this.fax = fax; 415 } 416 417 public void setAdditionalAddressInfo(final String additionalAddressInfo) { 418 this.additionalAddressInfo = additionalAddressInfo; 419 } 420 421 public void setExternalId(final String externalId) { 422 this.externalId = externalId; 423 } 424 425 @Override 426 public boolean equals(Object o) { 427 if (this == o) 428 return true; 429 430 if (o == null || getClass() != o.getClass()) 431 return false; 432 433 AddressImpl that = (AddressImpl) o; 434 435 return new EqualsBuilder().append(id, that.id) 436 .append(key, that.key) 437 .append(title, that.title) 438 .append(salutation, that.salutation) 439 .append(firstName, that.firstName) 440 .append(lastName, that.lastName) 441 .append(streetName, that.streetName) 442 .append(streetNumber, that.streetNumber) 443 .append(additionalStreetInfo, that.additionalStreetInfo) 444 .append(postalCode, that.postalCode) 445 .append(city, that.city) 446 .append(region, that.region) 447 .append(state, that.state) 448 .append(country, that.country) 449 .append(company, that.company) 450 .append(department, that.department) 451 .append(building, that.building) 452 .append(apartment, that.apartment) 453 .append(pOBox, that.pOBox) 454 .append(phone, that.phone) 455 .append(mobile, that.mobile) 456 .append(email, that.email) 457 .append(fax, that.fax) 458 .append(additionalAddressInfo, that.additionalAddressInfo) 459 .append(externalId, that.externalId) 460 .append(id, that.id) 461 .append(key, that.key) 462 .append(title, that.title) 463 .append(salutation, that.salutation) 464 .append(firstName, that.firstName) 465 .append(lastName, that.lastName) 466 .append(streetName, that.streetName) 467 .append(streetNumber, that.streetNumber) 468 .append(additionalStreetInfo, that.additionalStreetInfo) 469 .append(postalCode, that.postalCode) 470 .append(city, that.city) 471 .append(region, that.region) 472 .append(state, that.state) 473 .append(country, that.country) 474 .append(company, that.company) 475 .append(department, that.department) 476 .append(building, that.building) 477 .append(apartment, that.apartment) 478 .append(pOBox, that.pOBox) 479 .append(phone, that.phone) 480 .append(mobile, that.mobile) 481 .append(email, that.email) 482 .append(fax, that.fax) 483 .append(additionalAddressInfo, that.additionalAddressInfo) 484 .append(externalId, that.externalId) 485 .isEquals(); 486 } 487 488 @Override 489 public int hashCode() { 490 return new HashCodeBuilder(17, 37).append(id) 491 .append(key) 492 .append(title) 493 .append(salutation) 494 .append(firstName) 495 .append(lastName) 496 .append(streetName) 497 .append(streetNumber) 498 .append(additionalStreetInfo) 499 .append(postalCode) 500 .append(city) 501 .append(region) 502 .append(state) 503 .append(country) 504 .append(company) 505 .append(department) 506 .append(building) 507 .append(apartment) 508 .append(pOBox) 509 .append(phone) 510 .append(mobile) 511 .append(email) 512 .append(fax) 513 .append(additionalAddressInfo) 514 .append(externalId) 515 .toHashCode(); 516 } 517 518}