/*
 * 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.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BillingAccount;
import org.openapitools.client.model.BillingRun;
import org.openapitools.client.model.CustomFieldValues;
import org.openapitools.client.model.ICustomFieldEntity;
import org.openapitools.client.model.InvoiceAgregate;
import org.openapitools.client.model.InvoiceType;
import org.openapitools.client.model.Order;
import org.openapitools.client.model.PaymentMethod;
import org.openapitools.client.model.Quote;
import org.openapitools.client.model.RatedTransaction;
import org.openapitools.client.model.RecordedInvoice;
import org.openapitools.client.model.Seller;
import org.openapitools.client.model.SubCategoryInvoiceAgregate;
import org.openapitools.client.model.Subscription;
import org.openapitools.client.model.TradingCountry;
import org.openapitools.client.model.TradingCurrency;
import org.openapitools.client.model.TradingLanguage;
import org.threeten.bp.OffsetDateTime;

/**
 * Invoice
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class Invoice {
  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_BILLING_ACCOUNT = "billingAccount";
  @SerializedName(SERIALIZED_NAME_BILLING_ACCOUNT)
  private BillingAccount billingAccount;

  public static final String SERIALIZED_NAME_BILLING_RUN = "billingRun";
  @SerializedName(SERIALIZED_NAME_BILLING_RUN)
  private BillingRun billingRun;

  public static final String SERIALIZED_NAME_RECORDED_INVOICE = "recordedInvoice";
  @SerializedName(SERIALIZED_NAME_RECORDED_INVOICE)
  private RecordedInvoice recordedInvoice;

  public static final String SERIALIZED_NAME_INVOICE_AGREGATES = "invoiceAgregates";
  @SerializedName(SERIALIZED_NAME_INVOICE_AGREGATES)
  private List<InvoiceAgregate> invoiceAgregates = null;

  public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber";
  @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER)
  private String invoiceNumber;

  public static final String SERIALIZED_NAME_TEMPORARY_INVOICE_NUMBER = "temporaryInvoiceNumber";
  @SerializedName(SERIALIZED_NAME_TEMPORARY_INVOICE_NUMBER)
  private String temporaryInvoiceNumber;

  public static final String SERIALIZED_NAME_PRODUCT_DATE = "productDate";
  @SerializedName(SERIALIZED_NAME_PRODUCT_DATE)
  private OffsetDateTime productDate;

  public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate";
  @SerializedName(SERIALIZED_NAME_INVOICE_DATE)
  private OffsetDateTime invoiceDate;

  public static final String SERIALIZED_NAME_DUE_DATE = "dueDate";
  @SerializedName(SERIALIZED_NAME_DUE_DATE)
  private OffsetDateTime dueDate;

  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private BigDecimal amount;

  public static final String SERIALIZED_NAME_DISCOUNT = "discount";
  @SerializedName(SERIALIZED_NAME_DISCOUNT)
  private BigDecimal discount;

  public static final String SERIALIZED_NAME_AMOUNT_WITHOUT_TAX = "amountWithoutTax";
  @SerializedName(SERIALIZED_NAME_AMOUNT_WITHOUT_TAX)
  private BigDecimal amountWithoutTax;

  public static final String SERIALIZED_NAME_AMOUNT_TAX = "amountTax";
  @SerializedName(SERIALIZED_NAME_AMOUNT_TAX)
  private BigDecimal amountTax;

  public static final String SERIALIZED_NAME_AMOUNT_WITH_TAX = "amountWithTax";
  @SerializedName(SERIALIZED_NAME_AMOUNT_WITH_TAX)
  private BigDecimal amountWithTax;

  public static final String SERIALIZED_NAME_NET_TO_PAY = "netToPay";
  @SerializedName(SERIALIZED_NAME_NET_TO_PAY)
  private BigDecimal netToPay;

  /**
   * Gets or Sets paymentMethodType
   */
  @JsonAdapter(PaymentMethodTypeEnum.Adapter.class)
  public enum PaymentMethodTypeEnum {
    CHECK("CHECK"),
    
    DIRECTDEBIT("DIRECTDEBIT"),
    
    WIRETRANSFER("WIRETRANSFER"),
    
    CARD("CARD");

    private String value;

    PaymentMethodTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static PaymentMethodTypeEnum fromValue(String value) {
      for (PaymentMethodTypeEnum b : PaymentMethodTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<PaymentMethodTypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final PaymentMethodTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public PaymentMethodTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return PaymentMethodTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_PAYMENT_METHOD_TYPE = "paymentMethodType";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_TYPE)
  private PaymentMethodTypeEnum paymentMethodType;

  public static final String SERIALIZED_NAME_IBAN = "iban";
  @SerializedName(SERIALIZED_NAME_IBAN)
  private String iban;

  public static final String SERIALIZED_NAME_ALIAS = "alias";
  @SerializedName(SERIALIZED_NAME_ALIAS)
  private String alias;

  public static final String SERIALIZED_NAME_TRADING_CURRENCY = "tradingCurrency";
  @SerializedName(SERIALIZED_NAME_TRADING_CURRENCY)
  private TradingCurrency tradingCurrency;

  public static final String SERIALIZED_NAME_TRADING_COUNTRY = "tradingCountry";
  @SerializedName(SERIALIZED_NAME_TRADING_COUNTRY)
  private TradingCountry tradingCountry;

  public static final String SERIALIZED_NAME_TRADING_LANGUAGE = "tradingLanguage";
  @SerializedName(SERIALIZED_NAME_TRADING_LANGUAGE)
  private TradingLanguage tradingLanguage;

  public static final String SERIALIZED_NAME_RATED_TRANSACTIONS = "ratedTransactions";
  @SerializedName(SERIALIZED_NAME_RATED_TRANSACTIONS)
  private List<RatedTransaction> ratedTransactions = null;

  public static final String SERIALIZED_NAME_COMMENT = "comment";
  @SerializedName(SERIALIZED_NAME_COMMENT)
  private String comment;

  public static final String SERIALIZED_NAME_ADJUSTED_INVOICE = "adjustedInvoice";
  @SerializedName(SERIALIZED_NAME_ADJUSTED_INVOICE)
  private Invoice adjustedInvoice;

  public static final String SERIALIZED_NAME_INVOICE_TYPE = "invoiceType";
  @SerializedName(SERIALIZED_NAME_INVOICE_TYPE)
  private InvoiceType invoiceType;

  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_LINKED_INVOICES = "linkedInvoices";
  @SerializedName(SERIALIZED_NAME_LINKED_INVOICES)
  private List<Invoice> linkedInvoices = null;

  public static final String SERIALIZED_NAME_ORDERS = "orders";
  @SerializedName(SERIALIZED_NAME_ORDERS)
  private List<Order> orders = null;

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

  public static final String SERIALIZED_NAME_QUOTE = "quote";
  @SerializedName(SERIALIZED_NAME_QUOTE)
  private Quote quote;

  public static final String SERIALIZED_NAME_SUBSCRIPTION = "subscription";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION)
  private Subscription subscription;

  public static final String SERIALIZED_NAME_ORDER = "order";
  @SerializedName(SERIALIZED_NAME_ORDER)
  private Order order;

  public static final String SERIALIZED_NAME_XML_FILENAME = "xmlFilename";
  @SerializedName(SERIALIZED_NAME_XML_FILENAME)
  private String xmlFilename;

  public static final String SERIALIZED_NAME_PDF_FILENAME = "pdfFilename";
  @SerializedName(SERIALIZED_NAME_PDF_FILENAME)
  private String pdfFilename;

  public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD)
  private PaymentMethod paymentMethod;

  public static final String SERIALIZED_NAME_DUE_BALANCE = "dueBalance";
  @SerializedName(SERIALIZED_NAME_DUE_BALANCE)
  private BigDecimal dueBalance;

  public static final String SERIALIZED_NAME_ALREADY_SENT = "alreadySent";
  @SerializedName(SERIALIZED_NAME_ALREADY_SENT)
  private Boolean alreadySent;

  public static final String SERIALIZED_NAME_DONT_SEND = "dontSend";
  @SerializedName(SERIALIZED_NAME_DONT_SEND)
  private Boolean dontSend;

  public static final String SERIALIZED_NAME_SELLER = "seller";
  @SerializedName(SERIALIZED_NAME_SELLER)
  private Seller seller;

  public static final String SERIALIZED_NAME_PREPAID = "prepaid";
  @SerializedName(SERIALIZED_NAME_PREPAID)
  private Boolean prepaid;

  public static final String SERIALIZED_NAME_INVOICE_ADJUSTMENT_CURRENT_SELLER_NB = "invoiceAdjustmentCurrentSellerNb";
  @SerializedName(SERIALIZED_NAME_INVOICE_ADJUSTMENT_CURRENT_SELLER_NB)
  private Long invoiceAdjustmentCurrentSellerNb;

  public static final String SERIALIZED_NAME_INVOICE_ADJUSTMENT_CURRENT_PROVIDER_NB = "invoiceAdjustmentCurrentProviderNb";
  @SerializedName(SERIALIZED_NAME_INVOICE_ADJUSTMENT_CURRENT_PROVIDER_NB)
  private Long invoiceAdjustmentCurrentProviderNb;

  public static final String SERIALIZED_NAME_PREVIOUS_INVOICE_NUMBER = "previousInvoiceNumber";
  @SerializedName(SERIALIZED_NAME_PREVIOUS_INVOICE_NUMBER)
  private String previousInvoiceNumber;

  public static final String SERIALIZED_NAME_DRAFT = "draft";
  @SerializedName(SERIALIZED_NAME_DRAFT)
  private Boolean draft;

  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_PARENT_C_F_ENTITIES = "parentCFEntities";
  @SerializedName(SERIALIZED_NAME_PARENT_C_F_ENTITIES)
  private List<ICustomFieldEntity> parentCFEntities = null;

  public static final String SERIALIZED_NAME_DETAILED_INVOICE = "detailedInvoice";
  @SerializedName(SERIALIZED_NAME_DETAILED_INVOICE)
  private Boolean detailedInvoice;

  public static final String SERIALIZED_NAME_INVOICE_NUMBER_OR_TEMPORARY_NUMBER = "invoiceNumberOrTemporaryNumber";
  @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER_OR_TEMPORARY_NUMBER)
  private String invoiceNumberOrTemporaryNumber;

  public static final String SERIALIZED_NAME_DISCOUNT_AGREGATES = "discountAgregates";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_AGREGATES)
  private List<SubCategoryInvoiceAgregate> discountAgregates = null;

  public static final String SERIALIZED_NAME_PDF_FILENAME_ONLY = "pdfFilenameOnly";
  @SerializedName(SERIALIZED_NAME_PDF_FILENAME_ONLY)
  private String pdfFilenameOnly;

  public static final String SERIALIZED_NAME_XML_FILENAME_ONLY = "xmlFilenameOnly";
  @SerializedName(SERIALIZED_NAME_XML_FILENAME_ONLY)
  private String xmlFilenameOnly;

  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_TRANSIENT = "transient";
  @SerializedName(SERIALIZED_NAME_TRANSIENT)
  private Boolean _transient;


  public Invoice 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 Invoice 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 Invoice 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 Invoice 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 Invoice 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 Invoice auditableFields(List<AuditableFieldHistory> auditableFields) {
    
    this.auditableFields = auditableFields;
    return this;
  }

  public Invoice 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 Invoice billingAccount(BillingAccount billingAccount) {
    
    this.billingAccount = billingAccount;
    return this;
  }

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

  public BillingAccount getBillingAccount() {
    return billingAccount;
  }



  public void setBillingAccount(BillingAccount billingAccount) {
    this.billingAccount = billingAccount;
  }


  public Invoice billingRun(BillingRun billingRun) {
    
    this.billingRun = billingRun;
    return this;
  }

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

  public BillingRun getBillingRun() {
    return billingRun;
  }



  public void setBillingRun(BillingRun billingRun) {
    this.billingRun = billingRun;
  }


  public Invoice recordedInvoice(RecordedInvoice recordedInvoice) {
    
    this.recordedInvoice = recordedInvoice;
    return this;
  }

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

  public RecordedInvoice getRecordedInvoice() {
    return recordedInvoice;
  }



  public void setRecordedInvoice(RecordedInvoice recordedInvoice) {
    this.recordedInvoice = recordedInvoice;
  }


  public Invoice invoiceAgregates(List<InvoiceAgregate> invoiceAgregates) {
    
    this.invoiceAgregates = invoiceAgregates;
    return this;
  }

  public Invoice addInvoiceAgregatesItem(InvoiceAgregate invoiceAgregatesItem) {
    if (this.invoiceAgregates == null) {
      this.invoiceAgregates = new ArrayList<InvoiceAgregate>();
    }
    this.invoiceAgregates.add(invoiceAgregatesItem);
    return this;
  }

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

  public List<InvoiceAgregate> getInvoiceAgregates() {
    return invoiceAgregates;
  }



  public void setInvoiceAgregates(List<InvoiceAgregate> invoiceAgregates) {
    this.invoiceAgregates = invoiceAgregates;
  }


  public Invoice invoiceNumber(String invoiceNumber) {
    
    this.invoiceNumber = invoiceNumber;
    return this;
  }

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

  public String getInvoiceNumber() {
    return invoiceNumber;
  }



  public void setInvoiceNumber(String invoiceNumber) {
    this.invoiceNumber = invoiceNumber;
  }


  public Invoice temporaryInvoiceNumber(String temporaryInvoiceNumber) {
    
    this.temporaryInvoiceNumber = temporaryInvoiceNumber;
    return this;
  }

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

  public String getTemporaryInvoiceNumber() {
    return temporaryInvoiceNumber;
  }



  public void setTemporaryInvoiceNumber(String temporaryInvoiceNumber) {
    this.temporaryInvoiceNumber = temporaryInvoiceNumber;
  }


  public Invoice productDate(OffsetDateTime productDate) {
    
    this.productDate = productDate;
    return this;
  }

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

  public OffsetDateTime getProductDate() {
    return productDate;
  }



  public void setProductDate(OffsetDateTime productDate) {
    this.productDate = productDate;
  }


  public Invoice invoiceDate(OffsetDateTime invoiceDate) {
    
    this.invoiceDate = invoiceDate;
    return this;
  }

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

  public OffsetDateTime getInvoiceDate() {
    return invoiceDate;
  }



  public void setInvoiceDate(OffsetDateTime invoiceDate) {
    this.invoiceDate = invoiceDate;
  }


  public Invoice dueDate(OffsetDateTime dueDate) {
    
    this.dueDate = dueDate;
    return this;
  }

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

  public OffsetDateTime getDueDate() {
    return dueDate;
  }



  public void setDueDate(OffsetDateTime dueDate) {
    this.dueDate = dueDate;
  }


  public Invoice amount(BigDecimal amount) {
    
    this.amount = amount;
    return this;
  }

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

  public BigDecimal getAmount() {
    return amount;
  }



  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }


  public Invoice discount(BigDecimal discount) {
    
    this.discount = discount;
    return this;
  }

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

  public BigDecimal getDiscount() {
    return discount;
  }



  public void setDiscount(BigDecimal discount) {
    this.discount = discount;
  }


  public Invoice amountWithoutTax(BigDecimal amountWithoutTax) {
    
    this.amountWithoutTax = amountWithoutTax;
    return this;
  }

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

  public BigDecimal getAmountWithoutTax() {
    return amountWithoutTax;
  }



  public void setAmountWithoutTax(BigDecimal amountWithoutTax) {
    this.amountWithoutTax = amountWithoutTax;
  }


  public Invoice amountTax(BigDecimal amountTax) {
    
    this.amountTax = amountTax;
    return this;
  }

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

  public BigDecimal getAmountTax() {
    return amountTax;
  }



  public void setAmountTax(BigDecimal amountTax) {
    this.amountTax = amountTax;
  }


  public Invoice amountWithTax(BigDecimal amountWithTax) {
    
    this.amountWithTax = amountWithTax;
    return this;
  }

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

  public BigDecimal getAmountWithTax() {
    return amountWithTax;
  }



  public void setAmountWithTax(BigDecimal amountWithTax) {
    this.amountWithTax = amountWithTax;
  }


  public Invoice netToPay(BigDecimal netToPay) {
    
    this.netToPay = netToPay;
    return this;
  }

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

  public BigDecimal getNetToPay() {
    return netToPay;
  }



  public void setNetToPay(BigDecimal netToPay) {
    this.netToPay = netToPay;
  }


  public Invoice paymentMethodType(PaymentMethodTypeEnum paymentMethodType) {
    
    this.paymentMethodType = paymentMethodType;
    return this;
  }

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

  public PaymentMethodTypeEnum getPaymentMethodType() {
    return paymentMethodType;
  }



  public void setPaymentMethodType(PaymentMethodTypeEnum paymentMethodType) {
    this.paymentMethodType = paymentMethodType;
  }


  public Invoice iban(String iban) {
    
    this.iban = iban;
    return this;
  }

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

  public String getIban() {
    return iban;
  }



  public void setIban(String iban) {
    this.iban = iban;
  }


  public Invoice alias(String alias) {
    
    this.alias = alias;
    return this;
  }

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

  public String getAlias() {
    return alias;
  }



  public void setAlias(String alias) {
    this.alias = alias;
  }


  public Invoice tradingCurrency(TradingCurrency tradingCurrency) {
    
    this.tradingCurrency = tradingCurrency;
    return this;
  }

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

  public TradingCurrency getTradingCurrency() {
    return tradingCurrency;
  }



  public void setTradingCurrency(TradingCurrency tradingCurrency) {
    this.tradingCurrency = tradingCurrency;
  }


  public Invoice tradingCountry(TradingCountry tradingCountry) {
    
    this.tradingCountry = tradingCountry;
    return this;
  }

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

  public TradingCountry getTradingCountry() {
    return tradingCountry;
  }



  public void setTradingCountry(TradingCountry tradingCountry) {
    this.tradingCountry = tradingCountry;
  }


  public Invoice tradingLanguage(TradingLanguage tradingLanguage) {
    
    this.tradingLanguage = tradingLanguage;
    return this;
  }

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

  public TradingLanguage getTradingLanguage() {
    return tradingLanguage;
  }



  public void setTradingLanguage(TradingLanguage tradingLanguage) {
    this.tradingLanguage = tradingLanguage;
  }


  public Invoice ratedTransactions(List<RatedTransaction> ratedTransactions) {
    
    this.ratedTransactions = ratedTransactions;
    return this;
  }

  public Invoice addRatedTransactionsItem(RatedTransaction ratedTransactionsItem) {
    if (this.ratedTransactions == null) {
      this.ratedTransactions = new ArrayList<RatedTransaction>();
    }
    this.ratedTransactions.add(ratedTransactionsItem);
    return this;
  }

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

  public List<RatedTransaction> getRatedTransactions() {
    return ratedTransactions;
  }



  public void setRatedTransactions(List<RatedTransaction> ratedTransactions) {
    this.ratedTransactions = ratedTransactions;
  }


  public Invoice comment(String comment) {
    
    this.comment = comment;
    return this;
  }

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

  public String getComment() {
    return comment;
  }



  public void setComment(String comment) {
    this.comment = comment;
  }


  public Invoice adjustedInvoice(Invoice adjustedInvoice) {
    
    this.adjustedInvoice = adjustedInvoice;
    return this;
  }

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

  public Invoice getAdjustedInvoice() {
    return adjustedInvoice;
  }



  public void setAdjustedInvoice(Invoice adjustedInvoice) {
    this.adjustedInvoice = adjustedInvoice;
  }


  public Invoice invoiceType(InvoiceType invoiceType) {
    
    this.invoiceType = invoiceType;
    return this;
  }

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

  public InvoiceType getInvoiceType() {
    return invoiceType;
  }



  public void setInvoiceType(InvoiceType invoiceType) {
    this.invoiceType = invoiceType;
  }


  public Invoice 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 Invoice 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 Invoice 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 Invoice linkedInvoices(List<Invoice> linkedInvoices) {
    
    this.linkedInvoices = linkedInvoices;
    return this;
  }

  public Invoice addLinkedInvoicesItem(Invoice linkedInvoicesItem) {
    if (this.linkedInvoices == null) {
      this.linkedInvoices = new ArrayList<Invoice>();
    }
    this.linkedInvoices.add(linkedInvoicesItem);
    return this;
  }

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

  public List<Invoice> getLinkedInvoices() {
    return linkedInvoices;
  }



  public void setLinkedInvoices(List<Invoice> linkedInvoices) {
    this.linkedInvoices = linkedInvoices;
  }


  public Invoice orders(List<Order> orders) {
    
    this.orders = orders;
    return this;
  }

  public Invoice addOrdersItem(Order ordersItem) {
    if (this.orders == null) {
      this.orders = new ArrayList<Order>();
    }
    this.orders.add(ordersItem);
    return this;
  }

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

  public List<Order> getOrders() {
    return orders;
  }



  public void setOrders(List<Order> orders) {
    this.orders = orders;
  }


  public Invoice orderNumbers(List<String> orderNumbers) {
    
    this.orderNumbers = orderNumbers;
    return this;
  }

  public Invoice addOrderNumbersItem(String orderNumbersItem) {
    if (this.orderNumbers == null) {
      this.orderNumbers = new ArrayList<String>();
    }
    this.orderNumbers.add(orderNumbersItem);
    return this;
  }

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

  public List<String> getOrderNumbers() {
    return orderNumbers;
  }



  public void setOrderNumbers(List<String> orderNumbers) {
    this.orderNumbers = orderNumbers;
  }


  public Invoice quote(Quote quote) {
    
    this.quote = quote;
    return this;
  }

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

  public Quote getQuote() {
    return quote;
  }



  public void setQuote(Quote quote) {
    this.quote = quote;
  }


  public Invoice subscription(Subscription subscription) {
    
    this.subscription = subscription;
    return this;
  }

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

  public Subscription getSubscription() {
    return subscription;
  }



  public void setSubscription(Subscription subscription) {
    this.subscription = subscription;
  }


  public Invoice order(Order order) {
    
    this.order = order;
    return this;
  }

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

  public Order getOrder() {
    return order;
  }



  public void setOrder(Order order) {
    this.order = order;
  }


  public Invoice xmlFilename(String xmlFilename) {
    
    this.xmlFilename = xmlFilename;
    return this;
  }

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

  public String getXmlFilename() {
    return xmlFilename;
  }



  public void setXmlFilename(String xmlFilename) {
    this.xmlFilename = xmlFilename;
  }


  public Invoice pdfFilename(String pdfFilename) {
    
    this.pdfFilename = pdfFilename;
    return this;
  }

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

  public String getPdfFilename() {
    return pdfFilename;
  }



  public void setPdfFilename(String pdfFilename) {
    this.pdfFilename = pdfFilename;
  }


  public Invoice paymentMethod(PaymentMethod paymentMethod) {
    
    this.paymentMethod = paymentMethod;
    return this;
  }

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

  public PaymentMethod getPaymentMethod() {
    return paymentMethod;
  }



  public void setPaymentMethod(PaymentMethod paymentMethod) {
    this.paymentMethod = paymentMethod;
  }


  public Invoice dueBalance(BigDecimal dueBalance) {
    
    this.dueBalance = dueBalance;
    return this;
  }

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

  public BigDecimal getDueBalance() {
    return dueBalance;
  }



  public void setDueBalance(BigDecimal dueBalance) {
    this.dueBalance = dueBalance;
  }


  public Invoice alreadySent(Boolean alreadySent) {
    
    this.alreadySent = alreadySent;
    return this;
  }

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

  public Boolean getAlreadySent() {
    return alreadySent;
  }



  public void setAlreadySent(Boolean alreadySent) {
    this.alreadySent = alreadySent;
  }


  public Invoice dontSend(Boolean dontSend) {
    
    this.dontSend = dontSend;
    return this;
  }

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

  public Boolean getDontSend() {
    return dontSend;
  }



  public void setDontSend(Boolean dontSend) {
    this.dontSend = dontSend;
  }


  public Invoice seller(Seller seller) {
    
    this.seller = seller;
    return this;
  }

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

  public Seller getSeller() {
    return seller;
  }



  public void setSeller(Seller seller) {
    this.seller = seller;
  }


  public Invoice prepaid(Boolean prepaid) {
    
    this.prepaid = prepaid;
    return this;
  }

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

  public Boolean getPrepaid() {
    return prepaid;
  }



  public void setPrepaid(Boolean prepaid) {
    this.prepaid = prepaid;
  }


  public Invoice invoiceAdjustmentCurrentSellerNb(Long invoiceAdjustmentCurrentSellerNb) {
    
    this.invoiceAdjustmentCurrentSellerNb = invoiceAdjustmentCurrentSellerNb;
    return this;
  }

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

  public Long getInvoiceAdjustmentCurrentSellerNb() {
    return invoiceAdjustmentCurrentSellerNb;
  }



  public void setInvoiceAdjustmentCurrentSellerNb(Long invoiceAdjustmentCurrentSellerNb) {
    this.invoiceAdjustmentCurrentSellerNb = invoiceAdjustmentCurrentSellerNb;
  }


  public Invoice invoiceAdjustmentCurrentProviderNb(Long invoiceAdjustmentCurrentProviderNb) {
    
    this.invoiceAdjustmentCurrentProviderNb = invoiceAdjustmentCurrentProviderNb;
    return this;
  }

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

  public Long getInvoiceAdjustmentCurrentProviderNb() {
    return invoiceAdjustmentCurrentProviderNb;
  }



  public void setInvoiceAdjustmentCurrentProviderNb(Long invoiceAdjustmentCurrentProviderNb) {
    this.invoiceAdjustmentCurrentProviderNb = invoiceAdjustmentCurrentProviderNb;
  }


  public Invoice previousInvoiceNumber(String previousInvoiceNumber) {
    
    this.previousInvoiceNumber = previousInvoiceNumber;
    return this;
  }

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

  public String getPreviousInvoiceNumber() {
    return previousInvoiceNumber;
  }



  public void setPreviousInvoiceNumber(String previousInvoiceNumber) {
    this.previousInvoiceNumber = previousInvoiceNumber;
  }


  public Invoice draft(Boolean draft) {
    
    this.draft = draft;
    return this;
  }

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

  public Boolean getDraft() {
    return draft;
  }



  public void setDraft(Boolean draft) {
    this.draft = draft;
  }


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

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

  public String getCode() {
    return code;
  }



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


  public Invoice 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 Invoice parentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    
    this.parentCFEntities = parentCFEntities;
    return this;
  }

  public Invoice 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 Invoice detailedInvoice(Boolean detailedInvoice) {
    
    this.detailedInvoice = detailedInvoice;
    return this;
  }

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

  public Boolean getDetailedInvoice() {
    return detailedInvoice;
  }



  public void setDetailedInvoice(Boolean detailedInvoice) {
    this.detailedInvoice = detailedInvoice;
  }


  public Invoice invoiceNumberOrTemporaryNumber(String invoiceNumberOrTemporaryNumber) {
    
    this.invoiceNumberOrTemporaryNumber = invoiceNumberOrTemporaryNumber;
    return this;
  }

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

  public String getInvoiceNumberOrTemporaryNumber() {
    return invoiceNumberOrTemporaryNumber;
  }



  public void setInvoiceNumberOrTemporaryNumber(String invoiceNumberOrTemporaryNumber) {
    this.invoiceNumberOrTemporaryNumber = invoiceNumberOrTemporaryNumber;
  }


  public Invoice discountAgregates(List<SubCategoryInvoiceAgregate> discountAgregates) {
    
    this.discountAgregates = discountAgregates;
    return this;
  }

  public Invoice addDiscountAgregatesItem(SubCategoryInvoiceAgregate discountAgregatesItem) {
    if (this.discountAgregates == null) {
      this.discountAgregates = new ArrayList<SubCategoryInvoiceAgregate>();
    }
    this.discountAgregates.add(discountAgregatesItem);
    return this;
  }

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

  public List<SubCategoryInvoiceAgregate> getDiscountAgregates() {
    return discountAgregates;
  }



  public void setDiscountAgregates(List<SubCategoryInvoiceAgregate> discountAgregates) {
    this.discountAgregates = discountAgregates;
  }


  public Invoice pdfFilenameOnly(String pdfFilenameOnly) {
    
    this.pdfFilenameOnly = pdfFilenameOnly;
    return this;
  }

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

  public String getPdfFilenameOnly() {
    return pdfFilenameOnly;
  }



  public void setPdfFilenameOnly(String pdfFilenameOnly) {
    this.pdfFilenameOnly = pdfFilenameOnly;
  }


  public Invoice xmlFilenameOnly(String xmlFilenameOnly) {
    
    this.xmlFilenameOnly = xmlFilenameOnly;
    return this;
  }

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

  public String getXmlFilenameOnly() {
    return xmlFilenameOnly;
  }



  public void setXmlFilenameOnly(String xmlFilenameOnly) {
    this.xmlFilenameOnly = xmlFilenameOnly;
  }


  public Invoice 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 Invoice cfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    
    this.cfValuesAsValues = cfValuesAsValues;
    return this;
  }

  public Invoice 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 Invoice 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 Invoice _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;
    }
    Invoice invoice = (Invoice) o;
    return Objects.equals(this.id, invoice.id) &&
        Objects.equals(this.version, invoice.version) &&
        Objects.equals(this.auditable, invoice.auditable) &&
        Objects.equals(this.historized, invoice.historized) &&
        Objects.equals(this.notified, invoice.notified) &&
        Objects.equals(this.auditableFields, invoice.auditableFields) &&
        Objects.equals(this.billingAccount, invoice.billingAccount) &&
        Objects.equals(this.billingRun, invoice.billingRun) &&
        Objects.equals(this.recordedInvoice, invoice.recordedInvoice) &&
        Objects.equals(this.invoiceAgregates, invoice.invoiceAgregates) &&
        Objects.equals(this.invoiceNumber, invoice.invoiceNumber) &&
        Objects.equals(this.temporaryInvoiceNumber, invoice.temporaryInvoiceNumber) &&
        Objects.equals(this.productDate, invoice.productDate) &&
        Objects.equals(this.invoiceDate, invoice.invoiceDate) &&
        Objects.equals(this.dueDate, invoice.dueDate) &&
        Objects.equals(this.amount, invoice.amount) &&
        Objects.equals(this.discount, invoice.discount) &&
        Objects.equals(this.amountWithoutTax, invoice.amountWithoutTax) &&
        Objects.equals(this.amountTax, invoice.amountTax) &&
        Objects.equals(this.amountWithTax, invoice.amountWithTax) &&
        Objects.equals(this.netToPay, invoice.netToPay) &&
        Objects.equals(this.paymentMethodType, invoice.paymentMethodType) &&
        Objects.equals(this.iban, invoice.iban) &&
        Objects.equals(this.alias, invoice.alias) &&
        Objects.equals(this.tradingCurrency, invoice.tradingCurrency) &&
        Objects.equals(this.tradingCountry, invoice.tradingCountry) &&
        Objects.equals(this.tradingLanguage, invoice.tradingLanguage) &&
        Objects.equals(this.ratedTransactions, invoice.ratedTransactions) &&
        Objects.equals(this.comment, invoice.comment) &&
        Objects.equals(this.adjustedInvoice, invoice.adjustedInvoice) &&
        Objects.equals(this.invoiceType, invoice.invoiceType) &&
        Objects.equals(this.uuid, invoice.uuid) &&
        Objects.equals(this.cfValues, invoice.cfValues) &&
        Objects.equals(this.cfAccumulatedValues, invoice.cfAccumulatedValues) &&
        Objects.equals(this.linkedInvoices, invoice.linkedInvoices) &&
        Objects.equals(this.orders, invoice.orders) &&
        Objects.equals(this.orderNumbers, invoice.orderNumbers) &&
        Objects.equals(this.quote, invoice.quote) &&
        Objects.equals(this.subscription, invoice.subscription) &&
        Objects.equals(this.order, invoice.order) &&
        Objects.equals(this.xmlFilename, invoice.xmlFilename) &&
        Objects.equals(this.pdfFilename, invoice.pdfFilename) &&
        Objects.equals(this.paymentMethod, invoice.paymentMethod) &&
        Objects.equals(this.dueBalance, invoice.dueBalance) &&
        Objects.equals(this.alreadySent, invoice.alreadySent) &&
        Objects.equals(this.dontSend, invoice.dontSend) &&
        Objects.equals(this.seller, invoice.seller) &&
        Objects.equals(this.prepaid, invoice.prepaid) &&
        Objects.equals(this.invoiceAdjustmentCurrentSellerNb, invoice.invoiceAdjustmentCurrentSellerNb) &&
        Objects.equals(this.invoiceAdjustmentCurrentProviderNb, invoice.invoiceAdjustmentCurrentProviderNb) &&
        Objects.equals(this.previousInvoiceNumber, invoice.previousInvoiceNumber) &&
        Objects.equals(this.draft, invoice.draft) &&
        Objects.equals(this.code, invoice.code) &&
        Objects.equals(this.description, invoice.description) &&
        Objects.equals(this.parentCFEntities, invoice.parentCFEntities) &&
        Objects.equals(this.detailedInvoice, invoice.detailedInvoice) &&
        Objects.equals(this.invoiceNumberOrTemporaryNumber, invoice.invoiceNumberOrTemporaryNumber) &&
        Objects.equals(this.discountAgregates, invoice.discountAgregates) &&
        Objects.equals(this.pdfFilenameOnly, invoice.pdfFilenameOnly) &&
        Objects.equals(this.xmlFilenameOnly, invoice.xmlFilenameOnly) &&
        Objects.equals(this.cfValuesNullSafe, invoice.cfValuesNullSafe) &&
        Objects.equals(this.cfValuesAsValues, invoice.cfValuesAsValues) &&
        Objects.equals(this.cfAccumulatedValuesNullSafe, invoice.cfAccumulatedValuesNullSafe) &&
        Objects.equals(this._transient, invoice._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, billingAccount, billingRun, recordedInvoice, invoiceAgregates, invoiceNumber, temporaryInvoiceNumber, productDate, invoiceDate, dueDate, amount, discount, amountWithoutTax, amountTax, amountWithTax, netToPay, paymentMethodType, iban, alias, tradingCurrency, tradingCountry, tradingLanguage, ratedTransactions, comment, adjustedInvoice, invoiceType, uuid, cfValues, cfAccumulatedValues, linkedInvoices, orders, orderNumbers, quote, subscription, order, xmlFilename, pdfFilename, paymentMethod, dueBalance, alreadySent, dontSend, seller, prepaid, invoiceAdjustmentCurrentSellerNb, invoiceAdjustmentCurrentProviderNb, previousInvoiceNumber, draft, code, description, parentCFEntities, detailedInvoice, invoiceNumberOrTemporaryNumber, discountAgregates, pdfFilenameOnly, xmlFilenameOnly, cfValuesNullSafe, cfValuesAsValues, cfAccumulatedValuesNullSafe, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Invoice {\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("    billingAccount: ").append(toIndentedString(billingAccount)).append("\n");
    sb.append("    billingRun: ").append(toIndentedString(billingRun)).append("\n");
    sb.append("    recordedInvoice: ").append(toIndentedString(recordedInvoice)).append("\n");
    sb.append("    invoiceAgregates: ").append(toIndentedString(invoiceAgregates)).append("\n");
    sb.append("    invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n");
    sb.append("    temporaryInvoiceNumber: ").append(toIndentedString(temporaryInvoiceNumber)).append("\n");
    sb.append("    productDate: ").append(toIndentedString(productDate)).append("\n");
    sb.append("    invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n");
    sb.append("    dueDate: ").append(toIndentedString(dueDate)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    discount: ").append(toIndentedString(discount)).append("\n");
    sb.append("    amountWithoutTax: ").append(toIndentedString(amountWithoutTax)).append("\n");
    sb.append("    amountTax: ").append(toIndentedString(amountTax)).append("\n");
    sb.append("    amountWithTax: ").append(toIndentedString(amountWithTax)).append("\n");
    sb.append("    netToPay: ").append(toIndentedString(netToPay)).append("\n");
    sb.append("    paymentMethodType: ").append(toIndentedString(paymentMethodType)).append("\n");
    sb.append("    iban: ").append(toIndentedString(iban)).append("\n");
    sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
    sb.append("    tradingCurrency: ").append(toIndentedString(tradingCurrency)).append("\n");
    sb.append("    tradingCountry: ").append(toIndentedString(tradingCountry)).append("\n");
    sb.append("    tradingLanguage: ").append(toIndentedString(tradingLanguage)).append("\n");
    sb.append("    ratedTransactions: ").append(toIndentedString(ratedTransactions)).append("\n");
    sb.append("    comment: ").append(toIndentedString(comment)).append("\n");
    sb.append("    adjustedInvoice: ").append(toIndentedString(adjustedInvoice)).append("\n");
    sb.append("    invoiceType: ").append(toIndentedString(invoiceType)).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("    linkedInvoices: ").append(toIndentedString(linkedInvoices)).append("\n");
    sb.append("    orders: ").append(toIndentedString(orders)).append("\n");
    sb.append("    orderNumbers: ").append(toIndentedString(orderNumbers)).append("\n");
    sb.append("    quote: ").append(toIndentedString(quote)).append("\n");
    sb.append("    subscription: ").append(toIndentedString(subscription)).append("\n");
    sb.append("    order: ").append(toIndentedString(order)).append("\n");
    sb.append("    xmlFilename: ").append(toIndentedString(xmlFilename)).append("\n");
    sb.append("    pdfFilename: ").append(toIndentedString(pdfFilename)).append("\n");
    sb.append("    paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n");
    sb.append("    dueBalance: ").append(toIndentedString(dueBalance)).append("\n");
    sb.append("    alreadySent: ").append(toIndentedString(alreadySent)).append("\n");
    sb.append("    dontSend: ").append(toIndentedString(dontSend)).append("\n");
    sb.append("    seller: ").append(toIndentedString(seller)).append("\n");
    sb.append("    prepaid: ").append(toIndentedString(prepaid)).append("\n");
    sb.append("    invoiceAdjustmentCurrentSellerNb: ").append(toIndentedString(invoiceAdjustmentCurrentSellerNb)).append("\n");
    sb.append("    invoiceAdjustmentCurrentProviderNb: ").append(toIndentedString(invoiceAdjustmentCurrentProviderNb)).append("\n");
    sb.append("    previousInvoiceNumber: ").append(toIndentedString(previousInvoiceNumber)).append("\n");
    sb.append("    draft: ").append(toIndentedString(draft)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    parentCFEntities: ").append(toIndentedString(parentCFEntities)).append("\n");
    sb.append("    detailedInvoice: ").append(toIndentedString(detailedInvoice)).append("\n");
    sb.append("    invoiceNumberOrTemporaryNumber: ").append(toIndentedString(invoiceNumberOrTemporaryNumber)).append("\n");
    sb.append("    discountAgregates: ").append(toIndentedString(discountAgregates)).append("\n");
    sb.append("    pdfFilenameOnly: ").append(toIndentedString(pdfFilenameOnly)).append("\n");
    sb.append("    xmlFilenameOnly: ").append(toIndentedString(xmlFilenameOnly)).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("    _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    ");
  }

}

