/*
 * 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;

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

  public static final String SERIALIZED_NAME_INVOICE_TYPE_CODE = "invoiceTypeCode";
  @SerializedName(SERIALIZED_NAME_INVOICE_TYPE_CODE)
  private String invoiceTypeCode;

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

  public static final String SERIALIZED_NAME_ACCOUNT_OPERATION_ID = "accountOperationId";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_OPERATION_ID)
  private Long accountOperationId;

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


  public GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto 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 GenerateInvoiceResultDto categoryInvoiceAgregates(List<CategoryInvoiceAgregateDto> categoryInvoiceAgregates) {
    
    this.categoryInvoiceAgregates = categoryInvoiceAgregates;
    return this;
  }

  public GenerateInvoiceResultDto 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 GenerateInvoiceResultDto taxAggregates(List<TaxInvoiceAggregateDto> taxAggregates) {
    
    this.taxAggregates = taxAggregates;
    return this;
  }

  public GenerateInvoiceResultDto 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 GenerateInvoiceResultDto listInvoiceIdToLink(List<Long> listInvoiceIdToLink) {
    
    this.listInvoiceIdToLink = listInvoiceIdToLink;
    return this;
  }

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

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

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

  public String getInvoiceTypeCode() {
    return invoiceTypeCode;
  }



  public void setInvoiceTypeCode(String invoiceTypeCode) {
    this.invoiceTypeCode = invoiceTypeCode;
  }


  public GenerateInvoiceResultDto 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 GenerateInvoiceResultDto accountOperationId(Long accountOperationId) {
    
    this.accountOperationId = accountOperationId;
    return this;
  }

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

  public Long getAccountOperationId() {
    return accountOperationId;
  }



  public void setAccountOperationId(Long accountOperationId) {
    this.accountOperationId = accountOperationId;
  }


  public GenerateInvoiceResultDto 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;
    }
    GenerateInvoiceResultDto generateInvoiceResultDto = (GenerateInvoiceResultDto) o;
    return Objects.equals(this.invoiceId, generateInvoiceResultDto.invoiceId) &&
        Objects.equals(this.invoiceType, generateInvoiceResultDto.invoiceType) &&
        Objects.equals(this.billingAccountCode, generateInvoiceResultDto.billingAccountCode) &&
        Objects.equals(this.sellerCode, generateInvoiceResultDto.sellerCode) &&
        Objects.equals(this.subscriptionCode, generateInvoiceResultDto.subscriptionCode) &&
        Objects.equals(this.orderNumber, generateInvoiceResultDto.orderNumber) &&
        Objects.equals(this.dueDate, generateInvoiceResultDto.dueDate) &&
        Objects.equals(this.invoiceDate, generateInvoiceResultDto.invoiceDate) &&
        Objects.equals(this.categoryInvoiceAgregates, generateInvoiceResultDto.categoryInvoiceAgregates) &&
        Objects.equals(this.taxAggregates, generateInvoiceResultDto.taxAggregates) &&
        Objects.equals(this.listInvoiceIdToLink, generateInvoiceResultDto.listInvoiceIdToLink) &&
        Objects.equals(this.invoiceNumber, generateInvoiceResultDto.invoiceNumber) &&
        Objects.equals(this.discount, generateInvoiceResultDto.discount) &&
        Objects.equals(this.amountWithoutTax, generateInvoiceResultDto.amountWithoutTax) &&
        Objects.equals(this.amountTax, generateInvoiceResultDto.amountTax) &&
        Objects.equals(this.amountWithTax, generateInvoiceResultDto.amountWithTax) &&
        Objects.equals(this.paymentMethod, generateInvoiceResultDto.paymentMethod) &&
        Objects.equals(this.xmlFilename, generateInvoiceResultDto.xmlFilename) &&
        Objects.equals(this.xml, generateInvoiceResultDto.xml) &&
        Objects.equals(this.pdfFilename, generateInvoiceResultDto.pdfFilename) &&
        Objects.equals(this.pdf, generateInvoiceResultDto.pdf) &&
        Objects.equals(this.autoValidation, generateInvoiceResultDto.autoValidation) &&
        Objects.equals(this.returnXml, generateInvoiceResultDto.returnXml) &&
        Objects.equals(this.returnPdf, generateInvoiceResultDto.returnPdf) &&
        Objects.equals(this.includeBalance, generateInvoiceResultDto.includeBalance) &&
        Objects.equals(this.recordedInvoiceDto, generateInvoiceResultDto.recordedInvoiceDto) &&
        Objects.equals(this.netToPay, generateInvoiceResultDto.netToPay) &&
        Objects.equals(this.invoiceMode, generateInvoiceResultDto.invoiceMode) &&
        Objects.equals(this.customFields, generateInvoiceResultDto.customFields) &&
        Objects.equals(this.dueBalance, generateInvoiceResultDto.dueBalance) &&
        Objects.equals(this.checkAlreadySent, generateInvoiceResultDto.checkAlreadySent) &&
        Objects.equals(this.overrideEmail, generateInvoiceResultDto.overrideEmail) &&
        Objects.equals(this.sentByEmail, generateInvoiceResultDto.sentByEmail) &&
        Objects.equals(this.temporaryInvoiceNumber, generateInvoiceResultDto.temporaryInvoiceNumber) &&
        Objects.equals(this.invoiceTypeCode, generateInvoiceResultDto.invoiceTypeCode) &&
        Objects.equals(this.amount, generateInvoiceResultDto.amount) &&
        Objects.equals(this.accountOperationId, generateInvoiceResultDto.accountOperationId) &&
        Objects.equals(this.draft, generateInvoiceResultDto.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, temporaryInvoiceNumber, invoiceTypeCode, amount, accountOperationId, draft);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GenerateInvoiceResultDto {\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("    temporaryInvoiceNumber: ").append(toIndentedString(temporaryInvoiceNumber)).append("\n");
    sb.append("    invoiceTypeCode: ").append(toIndentedString(invoiceTypeCode)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    accountOperationId: ").append(toIndentedString(accountOperationId)).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    ");
  }

}

