/*
 * 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.List;
import org.openapitools.client.model.CategoryInvoiceAgregateDto;
import org.openapitools.client.model.CustomFieldsDto;
import org.openapitools.client.model.RecordedInvoiceDto;
import org.openapitools.client.model.TaxInvoiceAggregateDto;
import org.threeten.bp.OffsetDateTime;

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

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

  public static final String SERIALIZED_NAME_BILLING_ACCOUNT_CODE = "billingAccountCode";
  @SerializedName(SERIALIZED_NAME_BILLING_ACCOUNT_CODE)
  private String billingAccountCode;

  public static final String SERIALIZED_NAME_SELLER_CODE = "sellerCode";
  @SerializedName(SERIALIZED_NAME_SELLER_CODE)
  private String sellerCode;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_CODE = "subscriptionCode";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_CODE)
  private String subscriptionCode;

  public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber";
  @SerializedName(SERIALIZED_NAME_ORDER_NUMBER)
  private String orderNumber;

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

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

  public static final String SERIALIZED_NAME_CATEGORY_INVOICE_AGREGATES = "categoryInvoiceAgregates";
  @SerializedName(SERIALIZED_NAME_CATEGORY_INVOICE_AGREGATES)
  private List<CategoryInvoiceAgregateDto> categoryInvoiceAgregates = new ArrayList<CategoryInvoiceAgregateDto>();

  public static final String SERIALIZED_NAME_TAX_AGGREGATES = "taxAggregates";
  @SerializedName(SERIALIZED_NAME_TAX_AGGREGATES)
  private List<TaxInvoiceAggregateDto> taxAggregates = new ArrayList<TaxInvoiceAggregateDto>();

  public static final String SERIALIZED_NAME_LIST_INVOICE_ID_TO_LINK = "listInvoiceIdToLink";
  @SerializedName(SERIALIZED_NAME_LIST_INVOICE_ID_TO_LINK)
  private List<Long> listInvoiceIdToLink = null;

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

  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;

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

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

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

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

  public static final String SERIALIZED_NAME_XML = "xml";
  @SerializedName(SERIALIZED_NAME_XML)
  private String xml;

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

  public static final String SERIALIZED_NAME_PDF = "pdf";
  @SerializedName(SERIALIZED_NAME_PDF)
  private List<byte[]> pdf = null;

  public static final String SERIALIZED_NAME_AUTO_VALIDATION = "autoValidation";
  @SerializedName(SERIALIZED_NAME_AUTO_VALIDATION)
  private Boolean autoValidation;

  public static final String SERIALIZED_NAME_RETURN_XML = "returnXml";
  @SerializedName(SERIALIZED_NAME_RETURN_XML)
  private Boolean returnXml;

  public static final String SERIALIZED_NAME_RETURN_PDF = "returnPdf";
  @SerializedName(SERIALIZED_NAME_RETURN_PDF)
  private Boolean returnPdf;

  public static final String SERIALIZED_NAME_INCLUDE_BALANCE = "includeBalance";
  @SerializedName(SERIALIZED_NAME_INCLUDE_BALANCE)
  private Boolean includeBalance;

  public static final String SERIALIZED_NAME_RECORDED_INVOICE_DTO = "recordedInvoiceDto";
  @SerializedName(SERIALIZED_NAME_RECORDED_INVOICE_DTO)
  private RecordedInvoiceDto recordedInvoiceDto;

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

  /**
   * Gets or Sets invoiceMode
   */
  @JsonAdapter(InvoiceModeEnum.Adapter.class)
  public enum InvoiceModeEnum {
    AGGREGATED("AGGREGATED"),
    
    DETAILLED("DETAILLED");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_INVOICE_MODE = "invoiceMode";
  @SerializedName(SERIALIZED_NAME_INVOICE_MODE)
  private InvoiceModeEnum invoiceMode;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "customFields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  private CustomFieldsDto customFields;

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

  public static final String SERIALIZED_NAME_CHECK_ALREADY_SENT = "checkAlreadySent";
  @SerializedName(SERIALIZED_NAME_CHECK_ALREADY_SENT)
  private Boolean checkAlreadySent;

  public static final String SERIALIZED_NAME_OVERRIDE_EMAIL = "overrideEmail";
  @SerializedName(SERIALIZED_NAME_OVERRIDE_EMAIL)
  private String overrideEmail;

  public static final String SERIALIZED_NAME_SENT_BY_EMAIL = "sentByEmail";
  @SerializedName(SERIALIZED_NAME_SENT_BY_EMAIL)
  private Boolean sentByEmail;

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


  public InvoiceDto invoiceId(Long invoiceId) {
    
    this.invoiceId = invoiceId;
    return this;
  }

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

  public Long getInvoiceId() {
    return invoiceId;
  }



  public void setInvoiceId(Long invoiceId) {
    this.invoiceId = invoiceId;
  }


  public InvoiceDto invoiceType(String invoiceType) {
    
    this.invoiceType = invoiceType;
    return this;
  }

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

  public String getInvoiceType() {
    return invoiceType;
  }



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


  public InvoiceDto billingAccountCode(String billingAccountCode) {
    
    this.billingAccountCode = billingAccountCode;
    return this;
  }

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

  public String getBillingAccountCode() {
    return billingAccountCode;
  }



  public void setBillingAccountCode(String billingAccountCode) {
    this.billingAccountCode = billingAccountCode;
  }


  public InvoiceDto sellerCode(String sellerCode) {
    
    this.sellerCode = sellerCode;
    return this;
  }

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

  public String getSellerCode() {
    return sellerCode;
  }



  public void setSellerCode(String sellerCode) {
    this.sellerCode = sellerCode;
  }


  public InvoiceDto subscriptionCode(String subscriptionCode) {
    
    this.subscriptionCode = subscriptionCode;
    return this;
  }

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

  public String getSubscriptionCode() {
    return subscriptionCode;
  }



  public void setSubscriptionCode(String subscriptionCode) {
    this.subscriptionCode = subscriptionCode;
  }


  public InvoiceDto orderNumber(String orderNumber) {
    
    this.orderNumber = orderNumber;
    return this;
  }

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

  public String getOrderNumber() {
    return orderNumber;
  }



  public void setOrderNumber(String orderNumber) {
    this.orderNumber = orderNumber;
  }


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

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

  public OffsetDateTime getDueDate() {
    return dueDate;
  }



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


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

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

  public OffsetDateTime getInvoiceDate() {
    return invoiceDate;
  }



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


  public InvoiceDto categoryInvoiceAgregates(List<CategoryInvoiceAgregateDto> categoryInvoiceAgregates) {
    
    this.categoryInvoiceAgregates = categoryInvoiceAgregates;
    return this;
  }

  public InvoiceDto addCategoryInvoiceAgregatesItem(CategoryInvoiceAgregateDto categoryInvoiceAgregatesItem) {
    this.categoryInvoiceAgregates.add(categoryInvoiceAgregatesItem);
    return this;
  }

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

  public List<CategoryInvoiceAgregateDto> getCategoryInvoiceAgregates() {
    return categoryInvoiceAgregates;
  }



  public void setCategoryInvoiceAgregates(List<CategoryInvoiceAgregateDto> categoryInvoiceAgregates) {
    this.categoryInvoiceAgregates = categoryInvoiceAgregates;
  }


  public InvoiceDto taxAggregates(List<TaxInvoiceAggregateDto> taxAggregates) {
    
    this.taxAggregates = taxAggregates;
    return this;
  }

  public InvoiceDto addTaxAggregatesItem(TaxInvoiceAggregateDto taxAggregatesItem) {
    this.taxAggregates.add(taxAggregatesItem);
    return this;
  }

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

  public List<TaxInvoiceAggregateDto> getTaxAggregates() {
    return taxAggregates;
  }



  public void setTaxAggregates(List<TaxInvoiceAggregateDto> taxAggregates) {
    this.taxAggregates = taxAggregates;
  }


  public InvoiceDto listInvoiceIdToLink(List<Long> listInvoiceIdToLink) {
    
    this.listInvoiceIdToLink = listInvoiceIdToLink;
    return this;
  }

  public InvoiceDto addListInvoiceIdToLinkItem(Long listInvoiceIdToLinkItem) {
    if (this.listInvoiceIdToLink == null) {
      this.listInvoiceIdToLink = new ArrayList<Long>();
    }
    this.listInvoiceIdToLink.add(listInvoiceIdToLinkItem);
    return this;
  }

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

  public List<Long> getListInvoiceIdToLink() {
    return listInvoiceIdToLink;
  }



  public void setListInvoiceIdToLink(List<Long> listInvoiceIdToLink) {
    this.listInvoiceIdToLink = listInvoiceIdToLink;
  }


  public InvoiceDto 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 InvoiceDto 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 InvoiceDto 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 InvoiceDto 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 InvoiceDto 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 InvoiceDto paymentMethod(PaymentMethodEnum paymentMethod) {
    
    this.paymentMethod = paymentMethod;
    return this;
  }

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

  public PaymentMethodEnum getPaymentMethod() {
    return paymentMethod;
  }



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


  public InvoiceDto 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 InvoiceDto xml(String xml) {
    
    this.xml = xml;
    return this;
  }

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

  public String getXml() {
    return xml;
  }



  public void setXml(String xml) {
    this.xml = xml;
  }


  public InvoiceDto 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 InvoiceDto pdf(List<byte[]> pdf) {
    
    this.pdf = pdf;
    return this;
  }

  public InvoiceDto addPdfItem(byte[] pdfItem) {
    if (this.pdf == null) {
      this.pdf = new ArrayList<byte[]>();
    }
    this.pdf.add(pdfItem);
    return this;
  }

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

  public List<byte[]> getPdf() {
    return pdf;
  }



  public void setPdf(List<byte[]> pdf) {
    this.pdf = pdf;
  }


  public InvoiceDto autoValidation(Boolean autoValidation) {
    
    this.autoValidation = autoValidation;
    return this;
  }

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

  public Boolean getAutoValidation() {
    return autoValidation;
  }



  public void setAutoValidation(Boolean autoValidation) {
    this.autoValidation = autoValidation;
  }


  public InvoiceDto returnXml(Boolean returnXml) {
    
    this.returnXml = returnXml;
    return this;
  }

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

  public Boolean getReturnXml() {
    return returnXml;
  }



  public void setReturnXml(Boolean returnXml) {
    this.returnXml = returnXml;
  }


  public InvoiceDto returnPdf(Boolean returnPdf) {
    
    this.returnPdf = returnPdf;
    return this;
  }

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

  public Boolean getReturnPdf() {
    return returnPdf;
  }



  public void setReturnPdf(Boolean returnPdf) {
    this.returnPdf = returnPdf;
  }


  public InvoiceDto includeBalance(Boolean includeBalance) {
    
    this.includeBalance = includeBalance;
    return this;
  }

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

  public Boolean getIncludeBalance() {
    return includeBalance;
  }



  public void setIncludeBalance(Boolean includeBalance) {
    this.includeBalance = includeBalance;
  }


  public InvoiceDto recordedInvoiceDto(RecordedInvoiceDto recordedInvoiceDto) {
    
    this.recordedInvoiceDto = recordedInvoiceDto;
    return this;
  }

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

  public RecordedInvoiceDto getRecordedInvoiceDto() {
    return recordedInvoiceDto;
  }



  public void setRecordedInvoiceDto(RecordedInvoiceDto recordedInvoiceDto) {
    this.recordedInvoiceDto = recordedInvoiceDto;
  }


  public InvoiceDto 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 InvoiceDto invoiceMode(InvoiceModeEnum invoiceMode) {
    
    this.invoiceMode = invoiceMode;
    return this;
  }

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

  public InvoiceModeEnum getInvoiceMode() {
    return invoiceMode;
  }



  public void setInvoiceMode(InvoiceModeEnum invoiceMode) {
    this.invoiceMode = invoiceMode;
  }


  public InvoiceDto customFields(CustomFieldsDto customFields) {
    
    this.customFields = customFields;
    return this;
  }

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

  public CustomFieldsDto getCustomFields() {
    return customFields;
  }



  public void setCustomFields(CustomFieldsDto customFields) {
    this.customFields = customFields;
  }


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

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

  public Boolean getCheckAlreadySent() {
    return checkAlreadySent;
  }



  public void setCheckAlreadySent(Boolean checkAlreadySent) {
    this.checkAlreadySent = checkAlreadySent;
  }


  public InvoiceDto overrideEmail(String overrideEmail) {
    
    this.overrideEmail = overrideEmail;
    return this;
  }

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

  public String getOverrideEmail() {
    return overrideEmail;
  }



  public void setOverrideEmail(String overrideEmail) {
    this.overrideEmail = overrideEmail;
  }


  public InvoiceDto sentByEmail(Boolean sentByEmail) {
    
    this.sentByEmail = sentByEmail;
    return this;
  }

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

  public Boolean getSentByEmail() {
    return sentByEmail;
  }



  public void setSentByEmail(Boolean sentByEmail) {
    this.sentByEmail = sentByEmail;
  }


  public InvoiceDto 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;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    InvoiceDto invoiceDto = (InvoiceDto) o;
    return Objects.equals(this.invoiceId, invoiceDto.invoiceId) &&
        Objects.equals(this.invoiceType, invoiceDto.invoiceType) &&
        Objects.equals(this.billingAccountCode, invoiceDto.billingAccountCode) &&
        Objects.equals(this.sellerCode, invoiceDto.sellerCode) &&
        Objects.equals(this.subscriptionCode, invoiceDto.subscriptionCode) &&
        Objects.equals(this.orderNumber, invoiceDto.orderNumber) &&
        Objects.equals(this.dueDate, invoiceDto.dueDate) &&
        Objects.equals(this.invoiceDate, invoiceDto.invoiceDate) &&
        Objects.equals(this.categoryInvoiceAgregates, invoiceDto.categoryInvoiceAgregates) &&
        Objects.equals(this.taxAggregates, invoiceDto.taxAggregates) &&
        Objects.equals(this.listInvoiceIdToLink, invoiceDto.listInvoiceIdToLink) &&
        Objects.equals(this.invoiceNumber, invoiceDto.invoiceNumber) &&
        Objects.equals(this.discount, invoiceDto.discount) &&
        Objects.equals(this.amountWithoutTax, invoiceDto.amountWithoutTax) &&
        Objects.equals(this.amountTax, invoiceDto.amountTax) &&
        Objects.equals(this.amountWithTax, invoiceDto.amountWithTax) &&
        Objects.equals(this.paymentMethod, invoiceDto.paymentMethod) &&
        Objects.equals(this.xmlFilename, invoiceDto.xmlFilename) &&
        Objects.equals(this.xml, invoiceDto.xml) &&
        Objects.equals(this.pdfFilename, invoiceDto.pdfFilename) &&
        Objects.equals(this.pdf, invoiceDto.pdf) &&
        Objects.equals(this.autoValidation, invoiceDto.autoValidation) &&
        Objects.equals(this.returnXml, invoiceDto.returnXml) &&
        Objects.equals(this.returnPdf, invoiceDto.returnPdf) &&
        Objects.equals(this.includeBalance, invoiceDto.includeBalance) &&
        Objects.equals(this.recordedInvoiceDto, invoiceDto.recordedInvoiceDto) &&
        Objects.equals(this.netToPay, invoiceDto.netToPay) &&
        Objects.equals(this.invoiceMode, invoiceDto.invoiceMode) &&
        Objects.equals(this.customFields, invoiceDto.customFields) &&
        Objects.equals(this.dueBalance, invoiceDto.dueBalance) &&
        Objects.equals(this.checkAlreadySent, invoiceDto.checkAlreadySent) &&
        Objects.equals(this.overrideEmail, invoiceDto.overrideEmail) &&
        Objects.equals(this.sentByEmail, invoiceDto.sentByEmail) &&
        Objects.equals(this.draft, invoiceDto.draft);
  }

  @Override
  public int hashCode() {
    return Objects.hash(invoiceId, invoiceType, billingAccountCode, sellerCode, subscriptionCode, orderNumber, dueDate, invoiceDate, categoryInvoiceAgregates, taxAggregates, listInvoiceIdToLink, invoiceNumber, discount, amountWithoutTax, amountTax, amountWithTax, paymentMethod, xmlFilename, xml, pdfFilename, pdf, autoValidation, returnXml, returnPdf, includeBalance, recordedInvoiceDto, netToPay, invoiceMode, customFields, dueBalance, checkAlreadySent, overrideEmail, sentByEmail, draft);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class InvoiceDto {\n");
    sb.append("    invoiceId: ").append(toIndentedString(invoiceId)).append("\n");
    sb.append("    invoiceType: ").append(toIndentedString(invoiceType)).append("\n");
    sb.append("    billingAccountCode: ").append(toIndentedString(billingAccountCode)).append("\n");
    sb.append("    sellerCode: ").append(toIndentedString(sellerCode)).append("\n");
    sb.append("    subscriptionCode: ").append(toIndentedString(subscriptionCode)).append("\n");
    sb.append("    orderNumber: ").append(toIndentedString(orderNumber)).append("\n");
    sb.append("    dueDate: ").append(toIndentedString(dueDate)).append("\n");
    sb.append("    invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n");
    sb.append("    categoryInvoiceAgregates: ").append(toIndentedString(categoryInvoiceAgregates)).append("\n");
    sb.append("    taxAggregates: ").append(toIndentedString(taxAggregates)).append("\n");
    sb.append("    listInvoiceIdToLink: ").append(toIndentedString(listInvoiceIdToLink)).append("\n");
    sb.append("    invoiceNumber: ").append(toIndentedString(invoiceNumber)).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("    paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n");
    sb.append("    xmlFilename: ").append(toIndentedString(xmlFilename)).append("\n");
    sb.append("    xml: ").append(toIndentedString(xml)).append("\n");
    sb.append("    pdfFilename: ").append(toIndentedString(pdfFilename)).append("\n");
    sb.append("    pdf: ").append(toIndentedString(pdf)).append("\n");
    sb.append("    autoValidation: ").append(toIndentedString(autoValidation)).append("\n");
    sb.append("    returnXml: ").append(toIndentedString(returnXml)).append("\n");
    sb.append("    returnPdf: ").append(toIndentedString(returnPdf)).append("\n");
    sb.append("    includeBalance: ").append(toIndentedString(includeBalance)).append("\n");
    sb.append("    recordedInvoiceDto: ").append(toIndentedString(recordedInvoiceDto)).append("\n");
    sb.append("    netToPay: ").append(toIndentedString(netToPay)).append("\n");
    sb.append("    invoiceMode: ").append(toIndentedString(invoiceMode)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    dueBalance: ").append(toIndentedString(dueBalance)).append("\n");
    sb.append("    checkAlreadySent: ").append(toIndentedString(checkAlreadySent)).append("\n");
    sb.append("    overrideEmail: ").append(toIndentedString(overrideEmail)).append("\n");
    sb.append("    sentByEmail: ").append(toIndentedString(sentByEmail)).append("\n");
    sb.append("    draft: ").append(toIndentedString(draft)).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    ");
  }

}

