/*
 * 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.AccountingCode;
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.CategoryInvoiceAgregate;
import org.openapitools.client.model.DiscountPlanItem;
import org.openapitools.client.model.Invoice;
import org.openapitools.client.model.InvoiceSubCategory;
import org.openapitools.client.model.RatedTransaction;
import org.openapitools.client.model.Tax;
import org.openapitools.client.model.TradingCountry;
import org.openapitools.client.model.TradingCurrency;
import org.openapitools.client.model.TradingLanguage;
import org.openapitools.client.model.UserAccount;
import org.openapitools.client.model.WalletInstance;

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

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

  public static final String SERIALIZED_NAME_ITEM_NUMBER = "itemNumber";
  @SerializedName(SERIALIZED_NAME_ITEM_NUMBER)
  private Integer itemNumber;

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

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

  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_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_PR_DESCRIPTION = "prDescription";
  @SerializedName(SERIALIZED_NAME_PR_DESCRIPTION)
  private String prDescription;

  public static final String SERIALIZED_NAME_INVOICE_SUB_CATEGORY = "invoiceSubCategory";
  @SerializedName(SERIALIZED_NAME_INVOICE_SUB_CATEGORY)
  private InvoiceSubCategory invoiceSubCategory;

  public static final String SERIALIZED_NAME_CATEGORY_INVOICE_AGREGATE = "categoryInvoiceAgregate";
  @SerializedName(SERIALIZED_NAME_CATEGORY_INVOICE_AGREGATE)
  private CategoryInvoiceAgregate categoryInvoiceAgregate;

  public static final String SERIALIZED_NAME_USER_ACCOUNT = "userAccount";
  @SerializedName(SERIALIZED_NAME_USER_ACCOUNT)
  private UserAccount userAccount;

  public static final String SERIALIZED_NAME_WALLET = "wallet";
  @SerializedName(SERIALIZED_NAME_WALLET)
  private WalletInstance wallet;

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

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

  public static final String SERIALIZED_NAME_DISCOUNT_PLAN_CODE = "discountPlanCode";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_PLAN_CODE)
  private String discountPlanCode;

  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_PLAN_ITEM = "discountPlanItem";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_PLAN_ITEM)
  private DiscountPlanItem discountPlanItem;

  public static final String SERIALIZED_NAME_SUB_CATEGORY_TAXES_TRANSIENT = "subCategoryTaxesTransient";
  @SerializedName(SERIALIZED_NAME_SUB_CATEGORY_TAXES_TRANSIENT)
  private List<Tax> subCategoryTaxesTransient = null;

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

  public static final String SERIALIZED_NAME_TAX = "tax";
  @SerializedName(SERIALIZED_NAME_TAX)
  private Tax tax;

  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_DISCOUNT = "discount";
  @SerializedName(SERIALIZED_NAME_DISCOUNT)
  private BigDecimal discount;

  public static final String SERIALIZED_NAME_DISCOUNT_AGGREGATE = "discountAggregate";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_AGGREGATE)
  private Boolean discountAggregate;

  public static final String SERIALIZED_NAME_OLD_AMOUNT_WITHOUT_TAX = "oldAmountWithoutTax";
  @SerializedName(SERIALIZED_NAME_OLD_AMOUNT_WITHOUT_TAX)
  private BigDecimal oldAmountWithoutTax;

  public static final String SERIALIZED_NAME_OLD_AMOUNT_WITH_TAX = "oldAmountWithTax";
  @SerializedName(SERIALIZED_NAME_OLD_AMOUNT_WITH_TAX)
  private BigDecimal oldAmountWithTax;

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

  public static final String SERIALIZED_NAME_TRANSIENT = "transient";
  @SerializedName(SERIALIZED_NAME_TRANSIENT)
  private Boolean _transient;


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

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

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

  public Invoice getInvoice() {
    return invoice;
  }



  public void setInvoice(Invoice invoice) {
    this.invoice = invoice;
  }


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

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

  public String getPrDescription() {
    return prDescription;
  }



  public void setPrDescription(String prDescription) {
    this.prDescription = prDescription;
  }


  public SubCategoryInvoiceAgregate invoiceSubCategory(InvoiceSubCategory invoiceSubCategory) {
    
    this.invoiceSubCategory = invoiceSubCategory;
    return this;
  }

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

  public InvoiceSubCategory getInvoiceSubCategory() {
    return invoiceSubCategory;
  }



  public void setInvoiceSubCategory(InvoiceSubCategory invoiceSubCategory) {
    this.invoiceSubCategory = invoiceSubCategory;
  }


  public SubCategoryInvoiceAgregate categoryInvoiceAgregate(CategoryInvoiceAgregate categoryInvoiceAgregate) {
    
    this.categoryInvoiceAgregate = categoryInvoiceAgregate;
    return this;
  }

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

  public CategoryInvoiceAgregate getCategoryInvoiceAgregate() {
    return categoryInvoiceAgregate;
  }



  public void setCategoryInvoiceAgregate(CategoryInvoiceAgregate categoryInvoiceAgregate) {
    this.categoryInvoiceAgregate = categoryInvoiceAgregate;
  }


  public SubCategoryInvoiceAgregate userAccount(UserAccount userAccount) {
    
    this.userAccount = userAccount;
    return this;
  }

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

  public UserAccount getUserAccount() {
    return userAccount;
  }



  public void setUserAccount(UserAccount userAccount) {
    this.userAccount = userAccount;
  }


  public SubCategoryInvoiceAgregate wallet(WalletInstance wallet) {
    
    this.wallet = wallet;
    return this;
  }

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

  public WalletInstance getWallet() {
    return wallet;
  }



  public void setWallet(WalletInstance wallet) {
    this.wallet = wallet;
  }


  public SubCategoryInvoiceAgregate accountingCode(AccountingCode accountingCode) {
    
    this.accountingCode = accountingCode;
    return this;
  }

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

  public AccountingCode getAccountingCode() {
    return accountingCode;
  }



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


  public SubCategoryInvoiceAgregate ratedtransactions(List<RatedTransaction> ratedtransactions) {
    
    this.ratedtransactions = ratedtransactions;
    return this;
  }

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

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

  public String getDiscountPlanCode() {
    return discountPlanCode;
  }



  public void setDiscountPlanCode(String discountPlanCode) {
    this.discountPlanCode = discountPlanCode;
  }


  public SubCategoryInvoiceAgregate 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 SubCategoryInvoiceAgregate discountPlanItem(DiscountPlanItem discountPlanItem) {
    
    this.discountPlanItem = discountPlanItem;
    return this;
  }

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

  public DiscountPlanItem getDiscountPlanItem() {
    return discountPlanItem;
  }



  public void setDiscountPlanItem(DiscountPlanItem discountPlanItem) {
    this.discountPlanItem = discountPlanItem;
  }


  public SubCategoryInvoiceAgregate subCategoryTaxesTransient(List<Tax> subCategoryTaxesTransient) {
    
    this.subCategoryTaxesTransient = subCategoryTaxesTransient;
    return this;
  }

  public SubCategoryInvoiceAgregate addSubCategoryTaxesTransientItem(Tax subCategoryTaxesTransientItem) {
    if (this.subCategoryTaxesTransient == null) {
      this.subCategoryTaxesTransient = new ArrayList<Tax>();
    }
    this.subCategoryTaxesTransient.add(subCategoryTaxesTransientItem);
    return this;
  }

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

  public List<Tax> getSubCategoryTaxesTransient() {
    return subCategoryTaxesTransient;
  }



  public void setSubCategoryTaxesTransient(List<Tax> subCategoryTaxesTransient) {
    this.subCategoryTaxesTransient = subCategoryTaxesTransient;
  }


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


  public SubCategoryInvoiceAgregate tax(Tax tax) {
    
    this.tax = tax;
    return this;
  }

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

  public Tax getTax() {
    return tax;
  }



  public void setTax(Tax tax) {
    this.tax = tax;
  }


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

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

  public Boolean getDiscountAggregate() {
    return discountAggregate;
  }



  public void setDiscountAggregate(Boolean discountAggregate) {
    this.discountAggregate = discountAggregate;
  }


  public SubCategoryInvoiceAgregate oldAmountWithoutTax(BigDecimal oldAmountWithoutTax) {
    
    this.oldAmountWithoutTax = oldAmountWithoutTax;
    return this;
  }

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

  public BigDecimal getOldAmountWithoutTax() {
    return oldAmountWithoutTax;
  }



  public void setOldAmountWithoutTax(BigDecimal oldAmountWithoutTax) {
    this.oldAmountWithoutTax = oldAmountWithoutTax;
  }


  public SubCategoryInvoiceAgregate oldAmountWithTax(BigDecimal oldAmountWithTax) {
    
    this.oldAmountWithTax = oldAmountWithTax;
    return this;
  }

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

  public BigDecimal getOldAmountWithTax() {
    return oldAmountWithTax;
  }



  public void setOldAmountWithTax(BigDecimal oldAmountWithTax) {
    this.oldAmountWithTax = oldAmountWithTax;
  }


  public SubCategoryInvoiceAgregate ratedtransactionsToAssociate(List<RatedTransaction> ratedtransactionsToAssociate) {
    
    this.ratedtransactionsToAssociate = ratedtransactionsToAssociate;
    return this;
  }

  public SubCategoryInvoiceAgregate addRatedtransactionsToAssociateItem(RatedTransaction ratedtransactionsToAssociateItem) {
    if (this.ratedtransactionsToAssociate == null) {
      this.ratedtransactionsToAssociate = new ArrayList<RatedTransaction>();
    }
    this.ratedtransactionsToAssociate.add(ratedtransactionsToAssociateItem);
    return this;
  }

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

  public List<RatedTransaction> getRatedtransactionsToAssociate() {
    return ratedtransactionsToAssociate;
  }



  public void setRatedtransactionsToAssociate(List<RatedTransaction> ratedtransactionsToAssociate) {
    this.ratedtransactionsToAssociate = ratedtransactionsToAssociate;
  }


  public SubCategoryInvoiceAgregate _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;
    }
    SubCategoryInvoiceAgregate subCategoryInvoiceAgregate = (SubCategoryInvoiceAgregate) o;
    return Objects.equals(this.id, subCategoryInvoiceAgregate.id) &&
        Objects.equals(this.version, subCategoryInvoiceAgregate.version) &&
        Objects.equals(this.auditable, subCategoryInvoiceAgregate.auditable) &&
        Objects.equals(this.historized, subCategoryInvoiceAgregate.historized) &&
        Objects.equals(this.notified, subCategoryInvoiceAgregate.notified) &&
        Objects.equals(this.auditableFields, subCategoryInvoiceAgregate.auditableFields) &&
        Objects.equals(this.billingAccount, subCategoryInvoiceAgregate.billingAccount) &&
        Objects.equals(this.invoice, subCategoryInvoiceAgregate.invoice) &&
        Objects.equals(this.billingRun, subCategoryInvoiceAgregate.billingRun) &&
        Objects.equals(this.itemNumber, subCategoryInvoiceAgregate.itemNumber) &&
        Objects.equals(this.description, subCategoryInvoiceAgregate.description) &&
        Objects.equals(this.amount, subCategoryInvoiceAgregate.amount) &&
        Objects.equals(this.amountWithoutTax, subCategoryInvoiceAgregate.amountWithoutTax) &&
        Objects.equals(this.amountTax, subCategoryInvoiceAgregate.amountTax) &&
        Objects.equals(this.amountWithTax, subCategoryInvoiceAgregate.amountWithTax) &&
        Objects.equals(this.tradingCurrency, subCategoryInvoiceAgregate.tradingCurrency) &&
        Objects.equals(this.tradingCountry, subCategoryInvoiceAgregate.tradingCountry) &&
        Objects.equals(this.tradingLanguage, subCategoryInvoiceAgregate.tradingLanguage) &&
        Objects.equals(this.prDescription, subCategoryInvoiceAgregate.prDescription) &&
        Objects.equals(this.invoiceSubCategory, subCategoryInvoiceAgregate.invoiceSubCategory) &&
        Objects.equals(this.categoryInvoiceAgregate, subCategoryInvoiceAgregate.categoryInvoiceAgregate) &&
        Objects.equals(this.userAccount, subCategoryInvoiceAgregate.userAccount) &&
        Objects.equals(this.wallet, subCategoryInvoiceAgregate.wallet) &&
        Objects.equals(this.accountingCode, subCategoryInvoiceAgregate.accountingCode) &&
        Objects.equals(this.ratedtransactions, subCategoryInvoiceAgregate.ratedtransactions) &&
        Objects.equals(this.discountPlanCode, subCategoryInvoiceAgregate.discountPlanCode) &&
        Objects.equals(this.discountPlanItemCode, subCategoryInvoiceAgregate.discountPlanItemCode) &&
        Objects.equals(this.discountPlanItem, subCategoryInvoiceAgregate.discountPlanItem) &&
        Objects.equals(this.subCategoryTaxesTransient, subCategoryInvoiceAgregate.subCategoryTaxesTransient) &&
        Objects.equals(this.discountPercent, subCategoryInvoiceAgregate.discountPercent) &&
        Objects.equals(this.tax, subCategoryInvoiceAgregate.tax) &&
        Objects.equals(this.taxPercent, subCategoryInvoiceAgregate.taxPercent) &&
        Objects.equals(this.quantity, subCategoryInvoiceAgregate.quantity) &&
        Objects.equals(this.discount, subCategoryInvoiceAgregate.discount) &&
        Objects.equals(this.discountAggregate, subCategoryInvoiceAgregate.discountAggregate) &&
        Objects.equals(this.oldAmountWithoutTax, subCategoryInvoiceAgregate.oldAmountWithoutTax) &&
        Objects.equals(this.oldAmountWithTax, subCategoryInvoiceAgregate.oldAmountWithTax) &&
        Objects.equals(this.ratedtransactionsToAssociate, subCategoryInvoiceAgregate.ratedtransactionsToAssociate) &&
        Objects.equals(this._transient, subCategoryInvoiceAgregate._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, billingAccount, invoice, billingRun, itemNumber, description, amount, amountWithoutTax, amountTax, amountWithTax, tradingCurrency, tradingCountry, tradingLanguage, prDescription, invoiceSubCategory, categoryInvoiceAgregate, userAccount, wallet, accountingCode, ratedtransactions, discountPlanCode, discountPlanItemCode, discountPlanItem, subCategoryTaxesTransient, discountPercent, tax, taxPercent, quantity, discount, discountAggregate, oldAmountWithoutTax, oldAmountWithTax, ratedtransactionsToAssociate, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubCategoryInvoiceAgregate {\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("    invoice: ").append(toIndentedString(invoice)).append("\n");
    sb.append("    billingRun: ").append(toIndentedString(billingRun)).append("\n");
    sb.append("    itemNumber: ").append(toIndentedString(itemNumber)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).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("    tradingCurrency: ").append(toIndentedString(tradingCurrency)).append("\n");
    sb.append("    tradingCountry: ").append(toIndentedString(tradingCountry)).append("\n");
    sb.append("    tradingLanguage: ").append(toIndentedString(tradingLanguage)).append("\n");
    sb.append("    prDescription: ").append(toIndentedString(prDescription)).append("\n");
    sb.append("    invoiceSubCategory: ").append(toIndentedString(invoiceSubCategory)).append("\n");
    sb.append("    categoryInvoiceAgregate: ").append(toIndentedString(categoryInvoiceAgregate)).append("\n");
    sb.append("    userAccount: ").append(toIndentedString(userAccount)).append("\n");
    sb.append("    wallet: ").append(toIndentedString(wallet)).append("\n");
    sb.append("    accountingCode: ").append(toIndentedString(accountingCode)).append("\n");
    sb.append("    ratedtransactions: ").append(toIndentedString(ratedtransactions)).append("\n");
    sb.append("    discountPlanCode: ").append(toIndentedString(discountPlanCode)).append("\n");
    sb.append("    discountPlanItemCode: ").append(toIndentedString(discountPlanItemCode)).append("\n");
    sb.append("    discountPlanItem: ").append(toIndentedString(discountPlanItem)).append("\n");
    sb.append("    subCategoryTaxesTransient: ").append(toIndentedString(subCategoryTaxesTransient)).append("\n");
    sb.append("    discountPercent: ").append(toIndentedString(discountPercent)).append("\n");
    sb.append("    tax: ").append(toIndentedString(tax)).append("\n");
    sb.append("    taxPercent: ").append(toIndentedString(taxPercent)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
    sb.append("    discount: ").append(toIndentedString(discount)).append("\n");
    sb.append("    discountAggregate: ").append(toIndentedString(discountAggregate)).append("\n");
    sb.append("    oldAmountWithoutTax: ").append(toIndentedString(oldAmountWithoutTax)).append("\n");
    sb.append("    oldAmountWithTax: ").append(toIndentedString(oldAmountWithTax)).append("\n");
    sb.append("    ratedtransactionsToAssociate: ").append(toIndentedString(ratedtransactionsToAssociate)).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    ");
  }

}

