All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.customers.CustomerDraftDslBase Maven / Gradle / Ivy

The newest version!
package io.sphere.sdk.customers;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.customergroups.CustomerGroup;
import io.sphere.sdk.models.Address;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.ResourceIdentifier;
import io.sphere.sdk.stores.Store;
import io.sphere.sdk.types.CustomFieldsDraft;
import java.lang.Boolean;
import java.lang.Deprecated;
import java.lang.Integer;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.time.LocalDate;
import java.util.List;
import java.util.Locale;
import javax.annotation.Generated;
import javax.annotation.Nullable;

/**
 * Abstract base dsl class for {@link CustomerDraft} which needs to be extended to add additional methods.
 * Subclasses have to provide the same non-default constructor as this class.
 */
@Generated(
    value = "io.sphere.sdk.annotations.processors.generators.ResourceDraftValueGenerator",
    comments = "Generated from: io.sphere.sdk.customers.CustomerDraft"
)
abstract class CustomerDraftDslBase extends Base implements CustomerDraft {
  @Nullable
  private List
addresses; @Nullable private ResourceIdentifier anonymousCart; @Nullable private String anonymousCartId; @Nullable private String anonymousId; @Nullable private AuthenticationMode authenticationMode; @Nullable private List billingAddresses; @Nullable private String companyName; @Nullable private CustomFieldsDraft custom; @Nullable private ResourceIdentifier customerGroup; @Nullable private String customerNumber; @Nullable private LocalDate dateOfBirth; @Nullable private Integer defaultBillingAddress; @Nullable private Integer defaultShippingAddress; private String email; private Boolean emailVerified; @Nullable private String externalId; @Nullable private String firstName; @Nullable private String key; @Nullable private String lastName; @Nullable private Locale locale; @Nullable private String middleName; private String password; @Nullable private String salutation; @Nullable private List shippingAddresses; @Nullable private List> stores; @Nullable private String title; @Nullable private String vatId; @JsonCreator CustomerDraftDslBase(@Nullable final List
addresses, @Nullable final ResourceIdentifier anonymousCart, @Nullable final String anonymousCartId, @Nullable final String anonymousId, @Nullable final AuthenticationMode authenticationMode, @Nullable final List billingAddresses, @Nullable final String companyName, @Nullable final CustomFieldsDraft custom, @Nullable final ResourceIdentifier customerGroup, @Nullable final String customerNumber, @Nullable final LocalDate dateOfBirth, @Nullable final Integer defaultBillingAddress, @Nullable final Integer defaultShippingAddress, final String email, @JsonProperty("isEmailVerified") final Boolean emailVerified, @Nullable final String externalId, @Nullable final String firstName, @Nullable final String key, @Nullable final String lastName, @Nullable final Locale locale, @Nullable final String middleName, final String password, @Nullable final String salutation, @Nullable final List shippingAddresses, @Nullable final List> stores, @Nullable final String title, @Nullable final String vatId) { this.addresses = addresses; this.anonymousCart = anonymousCart; this.anonymousCartId = anonymousCartId; this.anonymousId = anonymousId; this.authenticationMode = authenticationMode; this.billingAddresses = billingAddresses; this.companyName = companyName; this.custom = custom; this.customerGroup = customerGroup; this.customerNumber = customerNumber; this.dateOfBirth = dateOfBirth; this.defaultBillingAddress = defaultBillingAddress; this.defaultShippingAddress = defaultShippingAddress; this.email = email; this.emailVerified = emailVerified; this.externalId = externalId; this.firstName = firstName; this.key = key; this.lastName = lastName; this.locale = locale; this.middleName = middleName; this.password = password; this.salutation = salutation; this.shippingAddresses = shippingAddresses; this.stores = stores; this.title = title; this.vatId = vatId; } @Nullable public List
getAddresses() { return addresses; } @Nullable public ResourceIdentifier getAnonymousCart() { return anonymousCart; } /** * * @deprecated This method will be removed with the next major SDK update. */ @Nullable @Deprecated public String getAnonymousCartId() { return anonymousCartId; } @Nullable public String getAnonymousId() { return anonymousId; } @Nullable public AuthenticationMode getAuthenticationMode() { return authenticationMode; } @Nullable public List getBillingAddresses() { return billingAddresses; } @Nullable public String getCompanyName() { return companyName; } @Nullable public CustomFieldsDraft getCustom() { return custom; } @Nullable public ResourceIdentifier getCustomerGroup() { return customerGroup; } @Nullable public String getCustomerNumber() { return customerNumber; } @Nullable public LocalDate getDateOfBirth() { return dateOfBirth; } @Nullable public Integer getDefaultBillingAddress() { return defaultBillingAddress; } @Nullable public Integer getDefaultShippingAddress() { return defaultShippingAddress; } public String getEmail() { return email; } @JsonProperty("isEmailVerified") public Boolean isEmailVerified() { return emailVerified; } @Nullable public String getExternalId() { return externalId; } @Nullable public String getFirstName() { return firstName; } @Nullable public String getKey() { return key; } @Nullable public String getLastName() { return lastName; } @Nullable public Locale getLocale() { return locale; } @Nullable public String getMiddleName() { return middleName; } public String getPassword() { return password; } @Nullable public String getSalutation() { return salutation; } @Nullable public List getShippingAddresses() { return shippingAddresses; } @Nullable public List> getStores() { return stores; } @Nullable public String getTitle() { return title; } @Nullable public String getVatId() { return vatId; } /** * Creates a new builder with the values of this object. * * @return new builder */ public CustomerDraftBuilder newBuilder() { return new CustomerDraftBuilder(addresses, anonymousCart, anonymousCartId, anonymousId, authenticationMode, billingAddresses, companyName, custom, customerGroup, customerNumber, dateOfBirth, defaultBillingAddress, defaultShippingAddress, email, emailVerified, externalId, firstName, key, lastName, locale, middleName, password, salutation, shippingAddresses, stores, title, vatId); } @SuppressWarnings("unchecked") public T withAddresses(@Nullable final List
addresses) { return (T) newBuilder().addresses(addresses).build(); } @SuppressWarnings("unchecked") public T withAnonymousCart(@Nullable final ResourceIdentifier anonymousCart) { return (T) newBuilder().anonymousCart(anonymousCart).build(); } /** * * @deprecated This method will be removed with the next major SDK update. */ @SuppressWarnings("unchecked") @Deprecated public T withAnonymousCartId(@Nullable final String anonymousCartId) { return (T) newBuilder().anonymousCartId(anonymousCartId).build(); } @SuppressWarnings("unchecked") public T withAnonymousId(@Nullable final String anonymousId) { return (T) newBuilder().anonymousId(anonymousId).build(); } @SuppressWarnings("unchecked") public T withAuthenticationMode(@Nullable final AuthenticationMode authenticationMode) { return (T) newBuilder().authenticationMode(authenticationMode).build(); } @SuppressWarnings("unchecked") public T withBillingAddresses(@Nullable final List billingAddresses) { return (T) newBuilder().billingAddresses(billingAddresses).build(); } @SuppressWarnings("unchecked") public T withCompanyName(@Nullable final String companyName) { return (T) newBuilder().companyName(companyName).build(); } @SuppressWarnings("unchecked") public T withCustom(@Nullable final CustomFieldsDraft custom) { return (T) newBuilder().custom(custom).build(); } @SuppressWarnings("unchecked") public T withCustomerGroup(@Nullable final ResourceIdentifier customerGroup) { return (T) newBuilder().customerGroup(customerGroup).build(); } @SuppressWarnings("unchecked") public T withCustomerNumber(@Nullable final String customerNumber) { return (T) newBuilder().customerNumber(customerNumber).build(); } @SuppressWarnings("unchecked") public T withDateOfBirth(@Nullable final LocalDate dateOfBirth) { return (T) newBuilder().dateOfBirth(dateOfBirth).build(); } @SuppressWarnings("unchecked") public T withDefaultBillingAddress(@Nullable final Integer defaultBillingAddress) { return (T) newBuilder().defaultBillingAddress(defaultBillingAddress).build(); } @SuppressWarnings("unchecked") public T withDefaultShippingAddress(@Nullable final Integer defaultShippingAddress) { return (T) newBuilder().defaultShippingAddress(defaultShippingAddress).build(); } @SuppressWarnings("unchecked") public T withEmail(final String email) { return (T) newBuilder().email(email).build(); } @SuppressWarnings("unchecked") public T withEmailVerified(final Boolean emailVerified) { return (T) newBuilder().emailVerified(emailVerified).build(); } @SuppressWarnings("unchecked") public T withExternalId(@Nullable final String externalId) { return (T) newBuilder().externalId(externalId).build(); } @SuppressWarnings("unchecked") public T withFirstName(@Nullable final String firstName) { return (T) newBuilder().firstName(firstName).build(); } @SuppressWarnings("unchecked") public T withKey(@Nullable final String key) { return (T) newBuilder().key(key).build(); } @SuppressWarnings("unchecked") public T withLastName(@Nullable final String lastName) { return (T) newBuilder().lastName(lastName).build(); } @SuppressWarnings("unchecked") public T withLocale(@Nullable final Locale locale) { return (T) newBuilder().locale(locale).build(); } @SuppressWarnings("unchecked") public T withMiddleName(@Nullable final String middleName) { return (T) newBuilder().middleName(middleName).build(); } @SuppressWarnings("unchecked") public T withPassword(final String password) { return (T) newBuilder().password(password).build(); } @SuppressWarnings("unchecked") public T withSalutation(@Nullable final String salutation) { return (T) newBuilder().salutation(salutation).build(); } @SuppressWarnings("unchecked") public T withShippingAddresses(@Nullable final List shippingAddresses) { return (T) newBuilder().shippingAddresses(shippingAddresses).build(); } @SuppressWarnings("unchecked") public T withStores(@Nullable final List> stores) { return (T) newBuilder().stores(stores).build(); } @SuppressWarnings("unchecked") public T withTitle(@Nullable final String title) { return (T) newBuilder().title(title).build(); } @SuppressWarnings("unchecked") public T withVatId(@Nullable final String vatId) { return (T) newBuilder().vatId(vatId).build(); } @SuppressWarnings("unchecked") public T withIsEmailVerified(final Boolean emailVerified) { return (T) newBuilder().emailVerified(emailVerified).build(); } /** * Creates a new object initialized with the given values. * * @param email initial value for the {@link CustomerDraft#getEmail()} property * @param password initial value for the {@link CustomerDraft#getPassword()} property * @return new object initialized with the given values */ public static CustomerDraftDsl of(final String email, final String password) { return new CustomerDraftDsl(null, null, null, null, null, null, null, null, null, null, null, null, null, email, null, null, null, null, null, null, null, password, null, null, null, null, null); } /** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static CustomerDraftDsl of(final CustomerDraft template) { return new CustomerDraftDsl(template.getAddresses(), template.getAnonymousCart(), template.getAnonymousCartId(), template.getAnonymousId(), template.getAuthenticationMode(), template.getBillingAddresses(), template.getCompanyName(), template.getCustom(), template.getCustomerGroup(), template.getCustomerNumber(), template.getDateOfBirth(), template.getDefaultBillingAddress(), template.getDefaultShippingAddress(), template.getEmail(), template.isEmailVerified(), template.getExternalId(), template.getFirstName(), template.getKey(), template.getLastName(), template.getLocale(), template.getMiddleName(), template.getPassword(), template.getSalutation(), template.getShippingAddresses(), template.getStores(), template.getTitle(), template.getVatId()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy