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

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

  public static final String SERIALIZED_NAME_ACCOUNTING_CODE = "accountingCode";
  @SerializedName(SERIALIZED_NAME_ACCOUNTING_CODE)
  private String accountingCode;

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

  public static final String SERIALIZED_NAME_TAX_CODE = "taxCode";
  @SerializedName(SERIALIZED_NAME_TAX_CODE)
  private String taxCode;

  public static final String SERIALIZED_NAME_TAX_PERCENT = "taxPercent";
  @SerializedName(SERIALIZED_NAME_TAX_PERCENT)
  private BigDecimal taxPercent;

  public static final String SERIALIZED_NAME_QUANTITY = "quantity";
  @SerializedName(SERIALIZED_NAME_QUANTITY)
  private BigDecimal quantity;

  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_INVOICE_SUB_CATEGORY_CODE = "invoiceSubCategoryCode";
  @SerializedName(SERIALIZED_NAME_INVOICE_SUB_CATEGORY_CODE)
  private String invoiceSubCategoryCode;

  public static final String SERIALIZED_NAME_USER_ACCOUNT_CODE = "userAccountCode";
  @SerializedName(SERIALIZED_NAME_USER_ACCOUNT_CODE)
  private String userAccountCode;

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

  public static final String SERIALIZED_NAME_DISCOUNT_PLAN_ITEM_CODE = "discountPlanItemCode";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_PLAN_ITEM_CODE)
  private String discountPlanItemCode;

  public static final String SERIALIZED_NAME_DISCOUNT_PERCENT = "discountPercent";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_PERCENT)
  private BigDecimal discountPercent;


  public DiscountInvoiceAggregateDto itemNumber(Integer itemNumber) {
    
    this.itemNumber = itemNumber;
    return this;
  }

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

  public Integer getItemNumber() {
    return itemNumber;
  }



  public void setItemNumber(Integer itemNumber) {
    this.itemNumber = itemNumber;
  }


  public DiscountInvoiceAggregateDto accountingCode(String accountingCode) {
    
    this.accountingCode = accountingCode;
    return this;
  }

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

  public String getAccountingCode() {
    return accountingCode;
  }



  public void setAccountingCode(String accountingCode) {
    this.accountingCode = accountingCode;
  }


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

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

  public String getTaxCode() {
    return taxCode;
  }



  public void setTaxCode(String taxCode) {
    this.taxCode = taxCode;
  }


  public DiscountInvoiceAggregateDto taxPercent(BigDecimal taxPercent) {
    
    this.taxPercent = taxPercent;
    return this;
  }

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

  public BigDecimal getTaxPercent() {
    return taxPercent;
  }



  public void setTaxPercent(BigDecimal taxPercent) {
    this.taxPercent = taxPercent;
  }


  public DiscountInvoiceAggregateDto quantity(BigDecimal quantity) {
    
    this.quantity = quantity;
    return this;
  }

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

  public BigDecimal getQuantity() {
    return quantity;
  }



  public void setQuantity(BigDecimal quantity) {
    this.quantity = quantity;
  }


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

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

  public String getInvoiceSubCategoryCode() {
    return invoiceSubCategoryCode;
  }



  public void setInvoiceSubCategoryCode(String invoiceSubCategoryCode) {
    this.invoiceSubCategoryCode = invoiceSubCategoryCode;
  }


  public DiscountInvoiceAggregateDto userAccountCode(String userAccountCode) {
    
    this.userAccountCode = userAccountCode;
    return this;
  }

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

  public String getUserAccountCode() {
    return userAccountCode;
  }



  public void setUserAccountCode(String userAccountCode) {
    this.userAccountCode = userAccountCode;
  }


  public DiscountInvoiceAggregateDto ratedTransactions(List<RatedTransactionDto> ratedTransactions) {
    
    this.ratedTransactions = ratedTransactions;
    return this;
  }

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

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

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



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


  public DiscountInvoiceAggregateDto discountPlanItemCode(String discountPlanItemCode) {
    
    this.discountPlanItemCode = discountPlanItemCode;
    return this;
  }

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

  public String getDiscountPlanItemCode() {
    return discountPlanItemCode;
  }



  public void setDiscountPlanItemCode(String discountPlanItemCode) {
    this.discountPlanItemCode = discountPlanItemCode;
  }


  public DiscountInvoiceAggregateDto discountPercent(BigDecimal discountPercent) {
    
    this.discountPercent = discountPercent;
    return this;
  }

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

  public BigDecimal getDiscountPercent() {
    return discountPercent;
  }



  public void setDiscountPercent(BigDecimal discountPercent) {
    this.discountPercent = discountPercent;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DiscountInvoiceAggregateDto discountInvoiceAggregateDto = (DiscountInvoiceAggregateDto) o;
    return Objects.equals(this.itemNumber, discountInvoiceAggregateDto.itemNumber) &&
        Objects.equals(this.accountingCode, discountInvoiceAggregateDto.accountingCode) &&
        Objects.equals(this.description, discountInvoiceAggregateDto.description) &&
        Objects.equals(this.taxCode, discountInvoiceAggregateDto.taxCode) &&
        Objects.equals(this.taxPercent, discountInvoiceAggregateDto.taxPercent) &&
        Objects.equals(this.quantity, discountInvoiceAggregateDto.quantity) &&
        Objects.equals(this.amountWithoutTax, discountInvoiceAggregateDto.amountWithoutTax) &&
        Objects.equals(this.amountTax, discountInvoiceAggregateDto.amountTax) &&
        Objects.equals(this.amountWithTax, discountInvoiceAggregateDto.amountWithTax) &&
        Objects.equals(this.invoiceSubCategoryCode, discountInvoiceAggregateDto.invoiceSubCategoryCode) &&
        Objects.equals(this.userAccountCode, discountInvoiceAggregateDto.userAccountCode) &&
        Objects.equals(this.ratedTransactions, discountInvoiceAggregateDto.ratedTransactions) &&
        Objects.equals(this.discountPlanItemCode, discountInvoiceAggregateDto.discountPlanItemCode) &&
        Objects.equals(this.discountPercent, discountInvoiceAggregateDto.discountPercent);
  }

  @Override
  public int hashCode() {
    return Objects.hash(itemNumber, accountingCode, description, taxCode, taxPercent, quantity, amountWithoutTax, amountTax, amountWithTax, invoiceSubCategoryCode, userAccountCode, ratedTransactions, discountPlanItemCode, discountPercent);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DiscountInvoiceAggregateDto {\n");
    sb.append("    itemNumber: ").append(toIndentedString(itemNumber)).append("\n");
    sb.append("    accountingCode: ").append(toIndentedString(accountingCode)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    taxCode: ").append(toIndentedString(taxCode)).append("\n");
    sb.append("    taxPercent: ").append(toIndentedString(taxPercent)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).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("    invoiceSubCategoryCode: ").append(toIndentedString(invoiceSubCategoryCode)).append("\n");
    sb.append("    userAccountCode: ").append(toIndentedString(userAccountCode)).append("\n");
    sb.append("    ratedTransactions: ").append(toIndentedString(ratedTransactions)).append("\n");
    sb.append("    discountPlanItemCode: ").append(toIndentedString(discountPlanItemCode)).append("\n");
    sb.append("    discountPercent: ").append(toIndentedString(discountPercent)).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    ");
  }

}

