001 002package com.commercetools.api.models.me; 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 * MyCustomerDraft 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class MyCustomerDraftImpl implements MyCustomerDraft, ModelBase { 022 023 private String email; 024 025 private String password; 026 027 private String firstName; 028 029 private String lastName; 030 031 private String middleName; 032 033 private String title; 034 035 private String salutation; 036 037 private java.time.LocalDate dateOfBirth; 038 039 private String companyName; 040 041 private String vatId; 042 043 private java.util.List<com.commercetools.api.models.common.BaseAddress> addresses; 044 045 private Long defaultShippingAddress; 046 047 private Long defaultBillingAddress; 048 049 private com.commercetools.api.models.type.CustomFieldsDraft custom; 050 051 private String locale; 052 053 private java.util.List<com.commercetools.api.models.store.StoreResourceIdentifier> stores; 054 055 /** 056 * create instance with all properties 057 */ 058 @JsonCreator 059 MyCustomerDraftImpl(@JsonProperty("email") final String email, @JsonProperty("password") final String password, 060 @JsonProperty("firstName") final String firstName, @JsonProperty("lastName") final String lastName, 061 @JsonProperty("middleName") final String middleName, @JsonProperty("title") final String title, 062 @JsonProperty("salutation") final String salutation, 063 @JsonProperty("dateOfBirth") final java.time.LocalDate dateOfBirth, 064 @JsonProperty("companyName") final String companyName, @JsonProperty("vatId") final String vatId, 065 @JsonProperty("addresses") final java.util.List<com.commercetools.api.models.common.BaseAddress> addresses, 066 @JsonProperty("defaultShippingAddress") final Long defaultShippingAddress, 067 @JsonProperty("defaultBillingAddress") final Long defaultBillingAddress, 068 @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, 069 @JsonProperty("locale") final String locale, 070 @JsonProperty("stores") final java.util.List<com.commercetools.api.models.store.StoreResourceIdentifier> stores) { 071 this.email = email; 072 this.password = password; 073 this.firstName = firstName; 074 this.lastName = lastName; 075 this.middleName = middleName; 076 this.title = title; 077 this.salutation = salutation; 078 this.dateOfBirth = dateOfBirth; 079 this.companyName = companyName; 080 this.vatId = vatId; 081 this.addresses = addresses; 082 this.defaultShippingAddress = defaultShippingAddress; 083 this.defaultBillingAddress = defaultBillingAddress; 084 this.custom = custom; 085 this.locale = locale; 086 this.stores = stores; 087 } 088 089 /** 090 * create empty instance 091 */ 092 public MyCustomerDraftImpl() { 093 } 094 095 /** 096 * <p>Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.</p> 097 */ 098 099 public String getEmail() { 100 return this.email; 101 } 102 103 /** 104 * <p>Password of the Customer.</p> 105 */ 106 107 public String getPassword() { 108 return this.password; 109 } 110 111 /** 112 * <p>Given name (first name) of the Customer.</p> 113 */ 114 115 public String getFirstName() { 116 return this.firstName; 117 } 118 119 /** 120 * <p>Family name (last name) of the Customer.</p> 121 */ 122 123 public String getLastName() { 124 return this.lastName; 125 } 126 127 /** 128 * <p>Middle name of the Customer.</p> 129 */ 130 131 public String getMiddleName() { 132 return this.middleName; 133 } 134 135 /** 136 * <p>Title of the Customer, for example, 'Dr.'.</p> 137 */ 138 139 public String getTitle() { 140 return this.title; 141 } 142 143 /** 144 * <p>Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.</p> 145 */ 146 147 public String getSalutation() { 148 return this.salutation; 149 } 150 151 /** 152 * <p>Date of birth of the Customer.</p> 153 */ 154 155 public java.time.LocalDate getDateOfBirth() { 156 return this.dateOfBirth; 157 } 158 159 /** 160 * <p>Company name of the Customer.</p> 161 */ 162 163 public String getCompanyName() { 164 return this.companyName; 165 } 166 167 /** 168 * <p>Individual VAT ID of the Customer.</p> 169 */ 170 171 public String getVatId() { 172 return this.vatId; 173 } 174 175 /** 176 * <p>Addresses of the Customer.</p> 177 */ 178 179 public java.util.List<com.commercetools.api.models.common.BaseAddress> getAddresses() { 180 return this.addresses; 181 } 182 183 /** 184 * <p>Index of the address in the <code>addresses</code> array to use as the default shipping address. The <code>defaultShippingAddressId</code> of the Customer will be set to the <code>id</code> of that address.</p> 185 */ 186 187 public Long getDefaultShippingAddress() { 188 return this.defaultShippingAddress; 189 } 190 191 /** 192 * <p>Index of the address in the <code>addresses</code> array to use as the default billing address. The <code>defaultBillingAddressId</code> of the Customer will be set to the <code>id</code> of that address.</p> 193 */ 194 195 public Long getDefaultBillingAddress() { 196 return this.defaultBillingAddress; 197 } 198 199 /** 200 * <p>Custom Fields for the Customer.</p> 201 */ 202 203 public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { 204 return this.custom; 205 } 206 207 /** 208 * <p>Preferred language of the Customer. Must be one of the languages supported by the Project.</p> 209 */ 210 211 public String getLocale() { 212 return this.locale; 213 } 214 215 /** 216 * <p>Sets the Stores for the Customer.</p> 217 */ 218 219 public java.util.List<com.commercetools.api.models.store.StoreResourceIdentifier> getStores() { 220 return this.stores; 221 } 222 223 public void setEmail(final String email) { 224 this.email = email; 225 } 226 227 public void setPassword(final String password) { 228 this.password = password; 229 } 230 231 public void setFirstName(final String firstName) { 232 this.firstName = firstName; 233 } 234 235 public void setLastName(final String lastName) { 236 this.lastName = lastName; 237 } 238 239 public void setMiddleName(final String middleName) { 240 this.middleName = middleName; 241 } 242 243 public void setTitle(final String title) { 244 this.title = title; 245 } 246 247 public void setSalutation(final String salutation) { 248 this.salutation = salutation; 249 } 250 251 public void setDateOfBirth(final java.time.LocalDate dateOfBirth) { 252 this.dateOfBirth = dateOfBirth; 253 } 254 255 public void setCompanyName(final String companyName) { 256 this.companyName = companyName; 257 } 258 259 public void setVatId(final String vatId) { 260 this.vatId = vatId; 261 } 262 263 public void setAddresses(final com.commercetools.api.models.common.BaseAddress... addresses) { 264 this.addresses = new ArrayList<>(Arrays.asList(addresses)); 265 } 266 267 public void setAddresses(final java.util.List<com.commercetools.api.models.common.BaseAddress> addresses) { 268 this.addresses = addresses; 269 } 270 271 public void setDefaultShippingAddress(final Long defaultShippingAddress) { 272 this.defaultShippingAddress = defaultShippingAddress; 273 } 274 275 public void setDefaultBillingAddress(final Long defaultBillingAddress) { 276 this.defaultBillingAddress = defaultBillingAddress; 277 } 278 279 public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) { 280 this.custom = custom; 281 } 282 283 public void setLocale(final String locale) { 284 this.locale = locale; 285 } 286 287 public void setStores(final com.commercetools.api.models.store.StoreResourceIdentifier... stores) { 288 this.stores = new ArrayList<>(Arrays.asList(stores)); 289 } 290 291 public void setStores(final java.util.List<com.commercetools.api.models.store.StoreResourceIdentifier> stores) { 292 this.stores = stores; 293 } 294 295 @Override 296 public boolean equals(Object o) { 297 if (this == o) 298 return true; 299 300 if (o == null || getClass() != o.getClass()) 301 return false; 302 303 MyCustomerDraftImpl that = (MyCustomerDraftImpl) o; 304 305 return new EqualsBuilder().append(email, that.email) 306 .append(password, that.password) 307 .append(firstName, that.firstName) 308 .append(lastName, that.lastName) 309 .append(middleName, that.middleName) 310 .append(title, that.title) 311 .append(salutation, that.salutation) 312 .append(dateOfBirth, that.dateOfBirth) 313 .append(companyName, that.companyName) 314 .append(vatId, that.vatId) 315 .append(addresses, that.addresses) 316 .append(defaultShippingAddress, that.defaultShippingAddress) 317 .append(defaultBillingAddress, that.defaultBillingAddress) 318 .append(custom, that.custom) 319 .append(locale, that.locale) 320 .append(stores, that.stores) 321 .isEquals(); 322 } 323 324 @Override 325 public int hashCode() { 326 return new HashCodeBuilder(17, 37).append(email) 327 .append(password) 328 .append(firstName) 329 .append(lastName) 330 .append(middleName) 331 .append(title) 332 .append(salutation) 333 .append(dateOfBirth) 334 .append(companyName) 335 .append(vatId) 336 .append(addresses) 337 .append(defaultShippingAddress) 338 .append(defaultBillingAddress) 339 .append(custom) 340 .append(locale) 341 .append(stores) 342 .toHashCode(); 343 } 344 345}