/*
 * 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.DiscountInvoiceAggregateDto;
import org.openapitools.client.model.SubCategoryInvoiceAgregateDto;

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

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

  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_ITEM_NUMBER = "itemNumber";
  @SerializedName(SERIALIZED_NAME_ITEM_NUMBER)
  private Integer itemNumber;

  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_LIST_SUB_CATEGORY_INVOICE_AGREGATE_DTO = "listSubCategoryInvoiceAgregateDto";
  @SerializedName(SERIALIZED_NAME_LIST_SUB_CATEGORY_INVOICE_AGREGATE_DTO)
  private List<SubCategoryInvoiceAgregateDto> listSubCategoryInvoiceAgregateDto = new ArrayList<SubCategoryInvoiceAgregateDto>();

  public static final String SERIALIZED_NAME_DISCOUNT_AGGREGATES = "discountAggregates";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_AGGREGATES)
  private List<DiscountInvoiceAggregateDto> discountAggregates = null;


  public CategoryInvoiceAgregateDto categoryInvoiceCode(String categoryInvoiceCode) {
    
    this.categoryInvoiceCode = categoryInvoiceCode;
    return this;
  }

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

  public String getCategoryInvoiceCode() {
    return categoryInvoiceCode;
  }



  public void setCategoryInvoiceCode(String categoryInvoiceCode) {
    this.categoryInvoiceCode = categoryInvoiceCode;
  }


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

  public CategoryInvoiceAgregateDto addListSubCategoryInvoiceAgregateDtoItem(SubCategoryInvoiceAgregateDto listSubCategoryInvoiceAgregateDtoItem) {
    this.listSubCategoryInvoiceAgregateDto.add(listSubCategoryInvoiceAgregateDtoItem);
    return this;
  }

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

  public List<SubCategoryInvoiceAgregateDto> getListSubCategoryInvoiceAgregateDto() {
    return listSubCategoryInvoiceAgregateDto;
  }



  public void setListSubCategoryInvoiceAgregateDto(List<SubCategoryInvoiceAgregateDto> listSubCategoryInvoiceAgregateDto) {
    this.listSubCategoryInvoiceAgregateDto = listSubCategoryInvoiceAgregateDto;
  }


  public CategoryInvoiceAgregateDto discountAggregates(List<DiscountInvoiceAggregateDto> discountAggregates) {
    
    this.discountAggregates = discountAggregates;
    return this;
  }

  public CategoryInvoiceAgregateDto addDiscountAggregatesItem(DiscountInvoiceAggregateDto discountAggregatesItem) {
    if (this.discountAggregates == null) {
      this.discountAggregates = new ArrayList<DiscountInvoiceAggregateDto>();
    }
    this.discountAggregates.add(discountAggregatesItem);
    return this;
  }

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

  public List<DiscountInvoiceAggregateDto> getDiscountAggregates() {
    return discountAggregates;
  }



  public void setDiscountAggregates(List<DiscountInvoiceAggregateDto> discountAggregates) {
    this.discountAggregates = discountAggregates;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CategoryInvoiceAgregateDto categoryInvoiceAgregateDto = (CategoryInvoiceAgregateDto) o;
    return Objects.equals(this.categoryInvoiceCode, categoryInvoiceAgregateDto.categoryInvoiceCode) &&
        Objects.equals(this.description, categoryInvoiceAgregateDto.description) &&
        Objects.equals(this.userAccountCode, categoryInvoiceAgregateDto.userAccountCode) &&
        Objects.equals(this.itemNumber, categoryInvoiceAgregateDto.itemNumber) &&
        Objects.equals(this.amountWithoutTax, categoryInvoiceAgregateDto.amountWithoutTax) &&
        Objects.equals(this.amountTax, categoryInvoiceAgregateDto.amountTax) &&
        Objects.equals(this.amountWithTax, categoryInvoiceAgregateDto.amountWithTax) &&
        Objects.equals(this.listSubCategoryInvoiceAgregateDto, categoryInvoiceAgregateDto.listSubCategoryInvoiceAgregateDto) &&
        Objects.equals(this.discountAggregates, categoryInvoiceAgregateDto.discountAggregates);
  }

  @Override
  public int hashCode() {
    return Objects.hash(categoryInvoiceCode, description, userAccountCode, itemNumber, amountWithoutTax, amountTax, amountWithTax, listSubCategoryInvoiceAgregateDto, discountAggregates);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CategoryInvoiceAgregateDto {\n");
    sb.append("    categoryInvoiceCode: ").append(toIndentedString(categoryInvoiceCode)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    userAccountCode: ").append(toIndentedString(userAccountCode)).append("\n");
    sb.append("    itemNumber: ").append(toIndentedString(itemNumber)).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("    listSubCategoryInvoiceAgregateDto: ").append(toIndentedString(listSubCategoryInvoiceAgregateDto)).append("\n");
    sb.append("    discountAggregates: ").append(toIndentedString(discountAggregates)).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    ");
  }

}

