/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Address;
import org.openapitools.client.model.AddressBook;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BusinessAccountModel;
import org.openapitools.client.model.BusinessEntity;
import org.openapitools.client.model.CommunicationPolicy;
import org.openapitools.client.model.ContactInformation;
import org.openapitools.client.model.CustomFieldValues;
import org.openapitools.client.model.ICustomFieldEntity;
import org.openapitools.client.model.Message;
import org.openapitools.client.model.Name;
import org.openapitools.client.model.ProviderContact;

/**
 * Contact
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class Contact {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;

  public static final String SERIALIZED_NAME_VERSION = "version";
  @SerializedName(SERIALIZED_NAME_VERSION)
  private Integer version;

  public static final String SERIALIZED_NAME_AUDITABLE = "auditable";
  @SerializedName(SERIALIZED_NAME_AUDITABLE)
  private Auditable auditable;

  public static final String SERIALIZED_NAME_HISTORIZED = "historized";
  @SerializedName(SERIALIZED_NAME_HISTORIZED)
  private Boolean historized;

  public static final String SERIALIZED_NAME_NOTIFIED = "notified";
  @SerializedName(SERIALIZED_NAME_NOTIFIED)
  private Boolean notified;

  public static final String SERIALIZED_NAME_AUDITABLE_FIELDS = "auditableFields";
  @SerializedName(SERIALIZED_NAME_AUDITABLE_FIELDS)
  private List<AuditableFieldHistory> auditableFields = null;

  public static final String SERIALIZED_NAME_CODE = "code";
  @SerializedName(SERIALIZED_NAME_CODE)
  private String code;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_APPEND_GENERATED_CODE = "appendGeneratedCode";
  @SerializedName(SERIALIZED_NAME_APPEND_GENERATED_CODE)
  private Boolean appendGeneratedCode;

  public static final String SERIALIZED_NAME_UUID = "uuid";
  @SerializedName(SERIALIZED_NAME_UUID)
  private String uuid;

  public static final String SERIALIZED_NAME_CF_VALUES = "cfValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES)
  private CustomFieldValues cfValues;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES = "cfAccumulatedValues";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES)
  private CustomFieldValues cfAccumulatedValues;

  public static final String SERIALIZED_NAME_EXTERNAL_REF1 = "externalRef1";
  @SerializedName(SERIALIZED_NAME_EXTERNAL_REF1)
  private String externalRef1;

  public static final String SERIALIZED_NAME_EXTERNAL_REF2 = "externalRef2";
  @SerializedName(SERIALIZED_NAME_EXTERNAL_REF2)
  private String externalRef2;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private Name name;

  public static final String SERIALIZED_NAME_ADDRESS = "address";
  @SerializedName(SERIALIZED_NAME_ADDRESS)
  private Address address;

  public static final String SERIALIZED_NAME_DEFAULT_LEVEL = "defaultLevel";
  @SerializedName(SERIALIZED_NAME_DEFAULT_LEVEL)
  private Boolean defaultLevel;

  public static final String SERIALIZED_NAME_PROVIDER_CONTACT = "providerContact";
  @SerializedName(SERIALIZED_NAME_PROVIDER_CONTACT)
  private String providerContact;

  public static final String SERIALIZED_NAME_PRIMARY_CONTACT = "primaryContact";
  @SerializedName(SERIALIZED_NAME_PRIMARY_CONTACT)
  private ProviderContact primaryContact;

  public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE)
  private String accountType;

  public static final String SERIALIZED_NAME_BUSINESS_ACCOUNT_MODEL = "businessAccountModel";
  @SerializedName(SERIALIZED_NAME_BUSINESS_ACCOUNT_MODEL)
  private BusinessAccountModel businessAccountModel;

  public static final String SERIALIZED_NAME_JOB_TITLE = "jobTitle";
  @SerializedName(SERIALIZED_NAME_JOB_TITLE)
  private String jobTitle;

  public static final String SERIALIZED_NAME_CONTACT_INFORMATION = "contactInformation";
  @SerializedName(SERIALIZED_NAME_CONTACT_INFORMATION)
  private ContactInformation contactInformation;

  public static final String SERIALIZED_NAME_VAT_NO = "vatNo";
  @SerializedName(SERIALIZED_NAME_VAT_NO)
  private String vatNo;

  public static final String SERIALIZED_NAME_REGISTRATION_NO = "registrationNo";
  @SerializedName(SERIALIZED_NAME_REGISTRATION_NO)
  private String registrationNo;

  public static final String SERIALIZED_NAME_EMAIL = "email";
  @SerializedName(SERIALIZED_NAME_EMAIL)
  private String email;

  public static final String SERIALIZED_NAME_ASSISTANT_NAME = "assistantName";
  @SerializedName(SERIALIZED_NAME_ASSISTANT_NAME)
  private String assistantName;

  public static final String SERIALIZED_NAME_ASSISTANT_PHONE = "assistantPhone";
  @SerializedName(SERIALIZED_NAME_ASSISTANT_PHONE)
  private String assistantPhone;

  public static final String SERIALIZED_NAME_POSITION = "position";
  @SerializedName(SERIALIZED_NAME_POSITION)
  private String position;

  public static final String SERIALIZED_NAME_COMPANY = "company";
  @SerializedName(SERIALIZED_NAME_COMPANY)
  private String company;

  public static final String SERIALIZED_NAME_MOBILE = "mobile";
  @SerializedName(SERIALIZED_NAME_MOBILE)
  private String mobile;

  public static final String SERIALIZED_NAME_PHONE = "phone";
  @SerializedName(SERIALIZED_NAME_PHONE)
  private String phone;

  public static final String SERIALIZED_NAME_WEBSITE_URL = "websiteUrl";
  @SerializedName(SERIALIZED_NAME_WEBSITE_URL)
  private String websiteUrl;

  public static final String SERIALIZED_NAME_IMPORTED_FROM = "importedFrom";
  @SerializedName(SERIALIZED_NAME_IMPORTED_FROM)
  private String importedFrom;

  public static final String SERIALIZED_NAME_IMPORTED_BY = "importedBy";
  @SerializedName(SERIALIZED_NAME_IMPORTED_BY)
  private String importedBy;

  public static final String SERIALIZED_NAME_SOCIAL_IDENTIFIER = "socialIdentifier";
  @SerializedName(SERIALIZED_NAME_SOCIAL_IDENTIFIER)
  private String socialIdentifier;

  public static final String SERIALIZED_NAME_AGREED_TO_U_A = "agreedToUA";
  @SerializedName(SERIALIZED_NAME_AGREED_TO_U_A)
  private Boolean agreedToUA;

  public static final String SERIALIZED_NAME_CONTACT_POLICY = "contactPolicy";
  @SerializedName(SERIALIZED_NAME_CONTACT_POLICY)
  private CommunicationPolicy contactPolicy;

  public static final String SERIALIZED_NAME_MESSAGES = "messages";
  @SerializedName(SERIALIZED_NAME_MESSAGES)
  private List<Message> messages = null;

  public static final String SERIALIZED_NAME_ADDRESS_BOOK = "addressBook";
  @SerializedName(SERIALIZED_NAME_ADDRESS_BOOK)
  private AddressBook addressBook;

  public static final String SERIALIZED_NAME_TAGS = "tags";
  @SerializedName(SERIALIZED_NAME_TAGS)
  private List<String> tags = null;

  public static final String SERIALIZED_NAME_VIP = "vip";
  @SerializedName(SERIALIZED_NAME_VIP)
  private Boolean vip;

  public static final String SERIALIZED_NAME_PROSPECT = "prospect";
  @SerializedName(SERIALIZED_NAME_PROSPECT)
  private Boolean prospect;

  public static final String SERIALIZED_NAME_CONTACT_INFORMATION_NULL_SAFE = "contactInformationNullSafe";
  @SerializedName(SERIALIZED_NAME_CONTACT_INFORMATION_NULL_SAFE)
  private ContactInformation contactInformationNullSafe;

  public static final String SERIALIZED_NAME_PARENT_C_F_ENTITIES = "parentCFEntities";
  @SerializedName(SERIALIZED_NAME_PARENT_C_F_ENTITIES)
  private List<ICustomFieldEntity> parentCFEntities = null;

  public static final String SERIALIZED_NAME_CF_VALUES_NULL_SAFE = "cfValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_NULL_SAFE)
  private CustomFieldValues cfValuesNullSafe;

  public static final String SERIALIZED_NAME_CF_VALUES_AS_VALUES = "cfValuesAsValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_AS_VALUES)
  private Map<String, Object> cfValuesAsValues = null;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE = "cfAccumulatedValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE)
  private CustomFieldValues cfAccumulatedValuesNullSafe;

  public static final String SERIALIZED_NAME_DESCRIPTION_OR_CODE = "descriptionOrCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_OR_CODE)
  private String descriptionOrCode;

  public static final String SERIALIZED_NAME_DESCRIPTION_AND_CODE = "descriptionAndCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_AND_CODE)
  private String descriptionAndCode;

  public static final String SERIALIZED_NAME_REFERENCE_CODE = "referenceCode";
  @SerializedName(SERIALIZED_NAME_REFERENCE_CODE)
  private String referenceCode;

  public static final String SERIALIZED_NAME_REFERENCE_DESCRIPTION = "referenceDescription";
  @SerializedName(SERIALIZED_NAME_REFERENCE_DESCRIPTION)
  private String referenceDescription;

  public static final String SERIALIZED_NAME_CODE_CHANGED = "codeChanged";
  @SerializedName(SERIALIZED_NAME_CODE_CHANGED)
  private Boolean codeChanged;

  public static final String SERIALIZED_NAME_PARENT_ENTITY = "parentEntity";
  @SerializedName(SERIALIZED_NAME_PARENT_ENTITY)
  private BusinessEntity parentEntity;

  public static final String SERIALIZED_NAME_TRANSIENT = "transient";
  @SerializedName(SERIALIZED_NAME_TRANSIENT)
  private Boolean _transient;


  public Contact id(Long id) {
    
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Long getId() {
    return id;
  }



  public void setId(Long id) {
    this.id = id;
  }


  public Contact version(Integer version) {
    
    this.version = version;
    return this;
  }

   /**
   * Get version
   * @return version
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Integer getVersion() {
    return version;
  }



  public void setVersion(Integer version) {
    this.version = version;
  }


  public Contact auditable(Auditable auditable) {
    
    this.auditable = auditable;
    return this;
  }

   /**
   * Get auditable
   * @return auditable
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Auditable getAuditable() {
    return auditable;
  }



  public void setAuditable(Auditable auditable) {
    this.auditable = auditable;
  }


  public Contact historized(Boolean historized) {
    
    this.historized = historized;
    return this;
  }

   /**
   * Get historized
   * @return historized
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getHistorized() {
    return historized;
  }



  public void setHistorized(Boolean historized) {
    this.historized = historized;
  }


  public Contact notified(Boolean notified) {
    
    this.notified = notified;
    return this;
  }

   /**
   * Get notified
   * @return notified
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getNotified() {
    return notified;
  }



  public void setNotified(Boolean notified) {
    this.notified = notified;
  }


  public Contact auditableFields(List<AuditableFieldHistory> auditableFields) {
    
    this.auditableFields = auditableFields;
    return this;
  }

  public Contact addAuditableFieldsItem(AuditableFieldHistory auditableFieldsItem) {
    if (this.auditableFields == null) {
      this.auditableFields = new ArrayList<AuditableFieldHistory>();
    }
    this.auditableFields.add(auditableFieldsItem);
    return this;
  }

   /**
   * Get auditableFields
   * @return auditableFields
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<AuditableFieldHistory> getAuditableFields() {
    return auditableFields;
  }



  public void setAuditableFields(List<AuditableFieldHistory> auditableFields) {
    this.auditableFields = auditableFields;
  }


  public Contact code(String code) {
    
    this.code = code;
    return this;
  }

   /**
   * Get code
   * @return code
  **/
  @ApiModelProperty(required = true, value = "")

  public String getCode() {
    return code;
  }



  public void setCode(String code) {
    this.code = code;
  }


  public Contact description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * Get description
   * @return description
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getDescription() {
    return description;
  }



  public void setDescription(String description) {
    this.description = description;
  }


  public Contact appendGeneratedCode(Boolean appendGeneratedCode) {
    
    this.appendGeneratedCode = appendGeneratedCode;
    return this;
  }

   /**
   * Get appendGeneratedCode
   * @return appendGeneratedCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getAppendGeneratedCode() {
    return appendGeneratedCode;
  }



  public void setAppendGeneratedCode(Boolean appendGeneratedCode) {
    this.appendGeneratedCode = appendGeneratedCode;
  }


  public Contact uuid(String uuid) {
    
    this.uuid = uuid;
    return this;
  }

   /**
   * Get uuid
   * @return uuid
  **/
  @ApiModelProperty(required = true, value = "")

  public String getUuid() {
    return uuid;
  }



  public void setUuid(String uuid) {
    this.uuid = uuid;
  }


  public Contact cfValues(CustomFieldValues cfValues) {
    
    this.cfValues = cfValues;
    return this;
  }

   /**
   * Get cfValues
   * @return cfValues
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public CustomFieldValues getCfValues() {
    return cfValues;
  }



  public void setCfValues(CustomFieldValues cfValues) {
    this.cfValues = cfValues;
  }


  public Contact cfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    
    this.cfAccumulatedValues = cfAccumulatedValues;
    return this;
  }

   /**
   * Get cfAccumulatedValues
   * @return cfAccumulatedValues
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public CustomFieldValues getCfAccumulatedValues() {
    return cfAccumulatedValues;
  }



  public void setCfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    this.cfAccumulatedValues = cfAccumulatedValues;
  }


  public Contact externalRef1(String externalRef1) {
    
    this.externalRef1 = externalRef1;
    return this;
  }

   /**
   * Get externalRef1
   * @return externalRef1
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getExternalRef1() {
    return externalRef1;
  }



  public void setExternalRef1(String externalRef1) {
    this.externalRef1 = externalRef1;
  }


  public Contact externalRef2(String externalRef2) {
    
    this.externalRef2 = externalRef2;
    return this;
  }

   /**
   * Get externalRef2
   * @return externalRef2
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getExternalRef2() {
    return externalRef2;
  }



  public void setExternalRef2(String externalRef2) {
    this.externalRef2 = externalRef2;
  }


  public Contact name(Name name) {
    
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Name getName() {
    return name;
  }



  public void setName(Name name) {
    this.name = name;
  }


  public Contact address(Address address) {
    
    this.address = address;
    return this;
  }

   /**
   * Get address
   * @return address
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Address getAddress() {
    return address;
  }



  public void setAddress(Address address) {
    this.address = address;
  }


  public Contact defaultLevel(Boolean defaultLevel) {
    
    this.defaultLevel = defaultLevel;
    return this;
  }

   /**
   * Get defaultLevel
   * @return defaultLevel
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getDefaultLevel() {
    return defaultLevel;
  }



  public void setDefaultLevel(Boolean defaultLevel) {
    this.defaultLevel = defaultLevel;
  }


  public Contact providerContact(String providerContact) {
    
    this.providerContact = providerContact;
    return this;
  }

   /**
   * Get providerContact
   * @return providerContact
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getProviderContact() {
    return providerContact;
  }



  public void setProviderContact(String providerContact) {
    this.providerContact = providerContact;
  }


  public Contact primaryContact(ProviderContact primaryContact) {
    
    this.primaryContact = primaryContact;
    return this;
  }

   /**
   * Get primaryContact
   * @return primaryContact
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ProviderContact getPrimaryContact() {
    return primaryContact;
  }



  public void setPrimaryContact(ProviderContact primaryContact) {
    this.primaryContact = primaryContact;
  }


  public Contact accountType(String accountType) {
    
    this.accountType = accountType;
    return this;
  }

   /**
   * Get accountType
   * @return accountType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getAccountType() {
    return accountType;
  }



  public void setAccountType(String accountType) {
    this.accountType = accountType;
  }


  public Contact businessAccountModel(BusinessAccountModel businessAccountModel) {
    
    this.businessAccountModel = businessAccountModel;
    return this;
  }

   /**
   * Get businessAccountModel
   * @return businessAccountModel
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public BusinessAccountModel getBusinessAccountModel() {
    return businessAccountModel;
  }



  public void setBusinessAccountModel(BusinessAccountModel businessAccountModel) {
    this.businessAccountModel = businessAccountModel;
  }


  public Contact jobTitle(String jobTitle) {
    
    this.jobTitle = jobTitle;
    return this;
  }

   /**
   * Get jobTitle
   * @return jobTitle
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getJobTitle() {
    return jobTitle;
  }



  public void setJobTitle(String jobTitle) {
    this.jobTitle = jobTitle;
  }


  public Contact contactInformation(ContactInformation contactInformation) {
    
    this.contactInformation = contactInformation;
    return this;
  }

   /**
   * Get contactInformation
   * @return contactInformation
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ContactInformation getContactInformation() {
    return contactInformation;
  }



  public void setContactInformation(ContactInformation contactInformation) {
    this.contactInformation = contactInformation;
  }


  public Contact vatNo(String vatNo) {
    
    this.vatNo = vatNo;
    return this;
  }

   /**
   * Get vatNo
   * @return vatNo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getVatNo() {
    return vatNo;
  }



  public void setVatNo(String vatNo) {
    this.vatNo = vatNo;
  }


  public Contact registrationNo(String registrationNo) {
    
    this.registrationNo = registrationNo;
    return this;
  }

   /**
   * Get registrationNo
   * @return registrationNo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getRegistrationNo() {
    return registrationNo;
  }



  public void setRegistrationNo(String registrationNo) {
    this.registrationNo = registrationNo;
  }


  public Contact email(String email) {
    
    this.email = email;
    return this;
  }

   /**
   * Get email
   * @return email
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getEmail() {
    return email;
  }



  public void setEmail(String email) {
    this.email = email;
  }


  public Contact assistantName(String assistantName) {
    
    this.assistantName = assistantName;
    return this;
  }

   /**
   * Get assistantName
   * @return assistantName
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getAssistantName() {
    return assistantName;
  }



  public void setAssistantName(String assistantName) {
    this.assistantName = assistantName;
  }


  public Contact assistantPhone(String assistantPhone) {
    
    this.assistantPhone = assistantPhone;
    return this;
  }

   /**
   * Get assistantPhone
   * @return assistantPhone
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getAssistantPhone() {
    return assistantPhone;
  }



  public void setAssistantPhone(String assistantPhone) {
    this.assistantPhone = assistantPhone;
  }


  public Contact position(String position) {
    
    this.position = position;
    return this;
  }

   /**
   * Get position
   * @return position
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getPosition() {
    return position;
  }



  public void setPosition(String position) {
    this.position = position;
  }


  public Contact company(String company) {
    
    this.company = company;
    return this;
  }

   /**
   * Get company
   * @return company
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getCompany() {
    return company;
  }



  public void setCompany(String company) {
    this.company = company;
  }


  public Contact mobile(String mobile) {
    
    this.mobile = mobile;
    return this;
  }

   /**
   * Get mobile
   * @return mobile
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getMobile() {
    return mobile;
  }



  public void setMobile(String mobile) {
    this.mobile = mobile;
  }


  public Contact phone(String phone) {
    
    this.phone = phone;
    return this;
  }

   /**
   * Get phone
   * @return phone
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getPhone() {
    return phone;
  }



  public void setPhone(String phone) {
    this.phone = phone;
  }


  public Contact websiteUrl(String websiteUrl) {
    
    this.websiteUrl = websiteUrl;
    return this;
  }

   /**
   * Get websiteUrl
   * @return websiteUrl
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getWebsiteUrl() {
    return websiteUrl;
  }



  public void setWebsiteUrl(String websiteUrl) {
    this.websiteUrl = websiteUrl;
  }


  public Contact importedFrom(String importedFrom) {
    
    this.importedFrom = importedFrom;
    return this;
  }

   /**
   * Get importedFrom
   * @return importedFrom
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getImportedFrom() {
    return importedFrom;
  }



  public void setImportedFrom(String importedFrom) {
    this.importedFrom = importedFrom;
  }


  public Contact importedBy(String importedBy) {
    
    this.importedBy = importedBy;
    return this;
  }

   /**
   * Get importedBy
   * @return importedBy
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getImportedBy() {
    return importedBy;
  }



  public void setImportedBy(String importedBy) {
    this.importedBy = importedBy;
  }


  public Contact socialIdentifier(String socialIdentifier) {
    
    this.socialIdentifier = socialIdentifier;
    return this;
  }

   /**
   * Get socialIdentifier
   * @return socialIdentifier
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getSocialIdentifier() {
    return socialIdentifier;
  }



  public void setSocialIdentifier(String socialIdentifier) {
    this.socialIdentifier = socialIdentifier;
  }


  public Contact agreedToUA(Boolean agreedToUA) {
    
    this.agreedToUA = agreedToUA;
    return this;
  }

   /**
   * Get agreedToUA
   * @return agreedToUA
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getAgreedToUA() {
    return agreedToUA;
  }



  public void setAgreedToUA(Boolean agreedToUA) {
    this.agreedToUA = agreedToUA;
  }


  public Contact contactPolicy(CommunicationPolicy contactPolicy) {
    
    this.contactPolicy = contactPolicy;
    return this;
  }

   /**
   * Get contactPolicy
   * @return contactPolicy
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public CommunicationPolicy getContactPolicy() {
    return contactPolicy;
  }



  public void setContactPolicy(CommunicationPolicy contactPolicy) {
    this.contactPolicy = contactPolicy;
  }


  public Contact messages(List<Message> messages) {
    
    this.messages = messages;
    return this;
  }

  public Contact addMessagesItem(Message messagesItem) {
    if (this.messages == null) {
      this.messages = new ArrayList<Message>();
    }
    this.messages.add(messagesItem);
    return this;
  }

   /**
   * Get messages
   * @return messages
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<Message> getMessages() {
    return messages;
  }



  public void setMessages(List<Message> messages) {
    this.messages = messages;
  }


  public Contact addressBook(AddressBook addressBook) {
    
    this.addressBook = addressBook;
    return this;
  }

   /**
   * Get addressBook
   * @return addressBook
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public AddressBook getAddressBook() {
    return addressBook;
  }



  public void setAddressBook(AddressBook addressBook) {
    this.addressBook = addressBook;
  }


  public Contact tags(List<String> tags) {
    
    this.tags = tags;
    return this;
  }

  public Contact addTagsItem(String tagsItem) {
    if (this.tags == null) {
      this.tags = new ArrayList<String>();
    }
    this.tags.add(tagsItem);
    return this;
  }

   /**
   * Get tags
   * @return tags
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<String> getTags() {
    return tags;
  }



  public void setTags(List<String> tags) {
    this.tags = tags;
  }


  public Contact vip(Boolean vip) {
    
    this.vip = vip;
    return this;
  }

   /**
   * Get vip
   * @return vip
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getVip() {
    return vip;
  }



  public void setVip(Boolean vip) {
    this.vip = vip;
  }


  public Contact prospect(Boolean prospect) {
    
    this.prospect = prospect;
    return this;
  }

   /**
   * Get prospect
   * @return prospect
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getProspect() {
    return prospect;
  }



  public void setProspect(Boolean prospect) {
    this.prospect = prospect;
  }


  public Contact contactInformationNullSafe(ContactInformation contactInformationNullSafe) {
    
    this.contactInformationNullSafe = contactInformationNullSafe;
    return this;
  }

   /**
   * Get contactInformationNullSafe
   * @return contactInformationNullSafe
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ContactInformation getContactInformationNullSafe() {
    return contactInformationNullSafe;
  }



  public void setContactInformationNullSafe(ContactInformation contactInformationNullSafe) {
    this.contactInformationNullSafe = contactInformationNullSafe;
  }


  public Contact parentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    
    this.parentCFEntities = parentCFEntities;
    return this;
  }

  public Contact addParentCFEntitiesItem(ICustomFieldEntity parentCFEntitiesItem) {
    if (this.parentCFEntities == null) {
      this.parentCFEntities = new ArrayList<ICustomFieldEntity>();
    }
    this.parentCFEntities.add(parentCFEntitiesItem);
    return this;
  }

   /**
   * Get parentCFEntities
   * @return parentCFEntities
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<ICustomFieldEntity> getParentCFEntities() {
    return parentCFEntities;
  }



  public void setParentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    this.parentCFEntities = parentCFEntities;
  }


  public Contact cfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    
    this.cfValuesNullSafe = cfValuesNullSafe;
    return this;
  }

   /**
   * Get cfValuesNullSafe
   * @return cfValuesNullSafe
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public CustomFieldValues getCfValuesNullSafe() {
    return cfValuesNullSafe;
  }



  public void setCfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    this.cfValuesNullSafe = cfValuesNullSafe;
  }


  public Contact cfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    
    this.cfValuesAsValues = cfValuesAsValues;
    return this;
  }

  public Contact putCfValuesAsValuesItem(String key, Object cfValuesAsValuesItem) {
    if (this.cfValuesAsValues == null) {
      this.cfValuesAsValues = new HashMap<String, Object>();
    }
    this.cfValuesAsValues.put(key, cfValuesAsValuesItem);
    return this;
  }

   /**
   * Get cfValuesAsValues
   * @return cfValuesAsValues
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Map<String, Object> getCfValuesAsValues() {
    return cfValuesAsValues;
  }



  public void setCfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    this.cfValuesAsValues = cfValuesAsValues;
  }


  public Contact cfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
    return this;
  }

   /**
   * Get cfAccumulatedValuesNullSafe
   * @return cfAccumulatedValuesNullSafe
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public CustomFieldValues getCfAccumulatedValuesNullSafe() {
    return cfAccumulatedValuesNullSafe;
  }



  public void setCfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
  }


  public Contact descriptionOrCode(String descriptionOrCode) {
    
    this.descriptionOrCode = descriptionOrCode;
    return this;
  }

   /**
   * Get descriptionOrCode
   * @return descriptionOrCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getDescriptionOrCode() {
    return descriptionOrCode;
  }



  public void setDescriptionOrCode(String descriptionOrCode) {
    this.descriptionOrCode = descriptionOrCode;
  }


  public Contact descriptionAndCode(String descriptionAndCode) {
    
    this.descriptionAndCode = descriptionAndCode;
    return this;
  }

   /**
   * Get descriptionAndCode
   * @return descriptionAndCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getDescriptionAndCode() {
    return descriptionAndCode;
  }



  public void setDescriptionAndCode(String descriptionAndCode) {
    this.descriptionAndCode = descriptionAndCode;
  }


  public Contact referenceCode(String referenceCode) {
    
    this.referenceCode = referenceCode;
    return this;
  }

   /**
   * Get referenceCode
   * @return referenceCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getReferenceCode() {
    return referenceCode;
  }



  public void setReferenceCode(String referenceCode) {
    this.referenceCode = referenceCode;
  }


  public Contact referenceDescription(String referenceDescription) {
    
    this.referenceDescription = referenceDescription;
    return this;
  }

   /**
   * Get referenceDescription
   * @return referenceDescription
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getReferenceDescription() {
    return referenceDescription;
  }



  public void setReferenceDescription(String referenceDescription) {
    this.referenceDescription = referenceDescription;
  }


  public Contact codeChanged(Boolean codeChanged) {
    
    this.codeChanged = codeChanged;
    return this;
  }

   /**
   * Get codeChanged
   * @return codeChanged
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getCodeChanged() {
    return codeChanged;
  }



  public void setCodeChanged(Boolean codeChanged) {
    this.codeChanged = codeChanged;
  }


  public Contact parentEntity(BusinessEntity parentEntity) {
    
    this.parentEntity = parentEntity;
    return this;
  }

   /**
   * Get parentEntity
   * @return parentEntity
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public BusinessEntity getParentEntity() {
    return parentEntity;
  }



  public void setParentEntity(BusinessEntity parentEntity) {
    this.parentEntity = parentEntity;
  }


  public Contact _transient(Boolean _transient) {
    
    this._transient = _transient;
    return this;
  }

   /**
   * Get _transient
   * @return _transient
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getTransient() {
    return _transient;
  }



  public void setTransient(Boolean _transient) {
    this._transient = _transient;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Contact contact = (Contact) o;
    return Objects.equals(this.id, contact.id) &&
        Objects.equals(this.version, contact.version) &&
        Objects.equals(this.auditable, contact.auditable) &&
        Objects.equals(this.historized, contact.historized) &&
        Objects.equals(this.notified, contact.notified) &&
        Objects.equals(this.auditableFields, contact.auditableFields) &&
        Objects.equals(this.code, contact.code) &&
        Objects.equals(this.description, contact.description) &&
        Objects.equals(this.appendGeneratedCode, contact.appendGeneratedCode) &&
        Objects.equals(this.uuid, contact.uuid) &&
        Objects.equals(this.cfValues, contact.cfValues) &&
        Objects.equals(this.cfAccumulatedValues, contact.cfAccumulatedValues) &&
        Objects.equals(this.externalRef1, contact.externalRef1) &&
        Objects.equals(this.externalRef2, contact.externalRef2) &&
        Objects.equals(this.name, contact.name) &&
        Objects.equals(this.address, contact.address) &&
        Objects.equals(this.defaultLevel, contact.defaultLevel) &&
        Objects.equals(this.providerContact, contact.providerContact) &&
        Objects.equals(this.primaryContact, contact.primaryContact) &&
        Objects.equals(this.accountType, contact.accountType) &&
        Objects.equals(this.businessAccountModel, contact.businessAccountModel) &&
        Objects.equals(this.jobTitle, contact.jobTitle) &&
        Objects.equals(this.contactInformation, contact.contactInformation) &&
        Objects.equals(this.vatNo, contact.vatNo) &&
        Objects.equals(this.registrationNo, contact.registrationNo) &&
        Objects.equals(this.email, contact.email) &&
        Objects.equals(this.assistantName, contact.assistantName) &&
        Objects.equals(this.assistantPhone, contact.assistantPhone) &&
        Objects.equals(this.position, contact.position) &&
        Objects.equals(this.company, contact.company) &&
        Objects.equals(this.mobile, contact.mobile) &&
        Objects.equals(this.phone, contact.phone) &&
        Objects.equals(this.websiteUrl, contact.websiteUrl) &&
        Objects.equals(this.importedFrom, contact.importedFrom) &&
        Objects.equals(this.importedBy, contact.importedBy) &&
        Objects.equals(this.socialIdentifier, contact.socialIdentifier) &&
        Objects.equals(this.agreedToUA, contact.agreedToUA) &&
        Objects.equals(this.contactPolicy, contact.contactPolicy) &&
        Objects.equals(this.messages, contact.messages) &&
        Objects.equals(this.addressBook, contact.addressBook) &&
        Objects.equals(this.tags, contact.tags) &&
        Objects.equals(this.vip, contact.vip) &&
        Objects.equals(this.prospect, contact.prospect) &&
        Objects.equals(this.contactInformationNullSafe, contact.contactInformationNullSafe) &&
        Objects.equals(this.parentCFEntities, contact.parentCFEntities) &&
        Objects.equals(this.cfValuesNullSafe, contact.cfValuesNullSafe) &&
        Objects.equals(this.cfValuesAsValues, contact.cfValuesAsValues) &&
        Objects.equals(this.cfAccumulatedValuesNullSafe, contact.cfAccumulatedValuesNullSafe) &&
        Objects.equals(this.descriptionOrCode, contact.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, contact.descriptionAndCode) &&
        Objects.equals(this.referenceCode, contact.referenceCode) &&
        Objects.equals(this.referenceDescription, contact.referenceDescription) &&
        Objects.equals(this.codeChanged, contact.codeChanged) &&
        Objects.equals(this.parentEntity, contact.parentEntity) &&
        Objects.equals(this._transient, contact._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, code, description, appendGeneratedCode, uuid, cfValues, cfAccumulatedValues, externalRef1, externalRef2, name, address, defaultLevel, providerContact, primaryContact, accountType, businessAccountModel, jobTitle, contactInformation, vatNo, registrationNo, email, assistantName, assistantPhone, position, company, mobile, phone, websiteUrl, importedFrom, importedBy, socialIdentifier, agreedToUA, contactPolicy, messages, addressBook, tags, vip, prospect, contactInformationNullSafe, parentCFEntities, cfValuesNullSafe, cfValuesAsValues, cfAccumulatedValuesNullSafe, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Contact {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    auditable: ").append(toIndentedString(auditable)).append("\n");
    sb.append("    historized: ").append(toIndentedString(historized)).append("\n");
    sb.append("    notified: ").append(toIndentedString(notified)).append("\n");
    sb.append("    auditableFields: ").append(toIndentedString(auditableFields)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    appendGeneratedCode: ").append(toIndentedString(appendGeneratedCode)).append("\n");
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    cfValues: ").append(toIndentedString(cfValues)).append("\n");
    sb.append("    cfAccumulatedValues: ").append(toIndentedString(cfAccumulatedValues)).append("\n");
    sb.append("    externalRef1: ").append(toIndentedString(externalRef1)).append("\n");
    sb.append("    externalRef2: ").append(toIndentedString(externalRef2)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    address: ").append(toIndentedString(address)).append("\n");
    sb.append("    defaultLevel: ").append(toIndentedString(defaultLevel)).append("\n");
    sb.append("    providerContact: ").append(toIndentedString(providerContact)).append("\n");
    sb.append("    primaryContact: ").append(toIndentedString(primaryContact)).append("\n");
    sb.append("    accountType: ").append(toIndentedString(accountType)).append("\n");
    sb.append("    businessAccountModel: ").append(toIndentedString(businessAccountModel)).append("\n");
    sb.append("    jobTitle: ").append(toIndentedString(jobTitle)).append("\n");
    sb.append("    contactInformation: ").append(toIndentedString(contactInformation)).append("\n");
    sb.append("    vatNo: ").append(toIndentedString(vatNo)).append("\n");
    sb.append("    registrationNo: ").append(toIndentedString(registrationNo)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    assistantName: ").append(toIndentedString(assistantName)).append("\n");
    sb.append("    assistantPhone: ").append(toIndentedString(assistantPhone)).append("\n");
    sb.append("    position: ").append(toIndentedString(position)).append("\n");
    sb.append("    company: ").append(toIndentedString(company)).append("\n");
    sb.append("    mobile: ").append(toIndentedString(mobile)).append("\n");
    sb.append("    phone: ").append(toIndentedString(phone)).append("\n");
    sb.append("    websiteUrl: ").append(toIndentedString(websiteUrl)).append("\n");
    sb.append("    importedFrom: ").append(toIndentedString(importedFrom)).append("\n");
    sb.append("    importedBy: ").append(toIndentedString(importedBy)).append("\n");
    sb.append("    socialIdentifier: ").append(toIndentedString(socialIdentifier)).append("\n");
    sb.append("    agreedToUA: ").append(toIndentedString(agreedToUA)).append("\n");
    sb.append("    contactPolicy: ").append(toIndentedString(contactPolicy)).append("\n");
    sb.append("    messages: ").append(toIndentedString(messages)).append("\n");
    sb.append("    addressBook: ").append(toIndentedString(addressBook)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("    vip: ").append(toIndentedString(vip)).append("\n");
    sb.append("    prospect: ").append(toIndentedString(prospect)).append("\n");
    sb.append("    contactInformationNullSafe: ").append(toIndentedString(contactInformationNullSafe)).append("\n");
    sb.append("    parentCFEntities: ").append(toIndentedString(parentCFEntities)).append("\n");
    sb.append("    cfValuesNullSafe: ").append(toIndentedString(cfValuesNullSafe)).append("\n");
    sb.append("    cfValuesAsValues: ").append(toIndentedString(cfValuesAsValues)).append("\n");
    sb.append("    cfAccumulatedValuesNullSafe: ").append(toIndentedString(cfAccumulatedValuesNullSafe)).append("\n");
    sb.append("    descriptionOrCode: ").append(toIndentedString(descriptionOrCode)).append("\n");
    sb.append("    descriptionAndCode: ").append(toIndentedString(descriptionAndCode)).append("\n");
    sb.append("    referenceCode: ").append(toIndentedString(referenceCode)).append("\n");
    sb.append("    referenceDescription: ").append(toIndentedString(referenceDescription)).append("\n");
    sb.append("    codeChanged: ").append(toIndentedString(codeChanged)).append("\n");
    sb.append("    parentEntity: ").append(toIndentedString(parentEntity)).append("\n");
    sb.append("    _transient: ").append(toIndentedString(_transient)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

