/*
 * 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.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BillingAccount;
import org.openapitools.client.model.BillingRun;
import org.openapitools.client.model.Invoice;
import org.openapitools.client.model.InvoiceCategory;
import org.openapitools.client.model.SubCategoryInvoiceAgregate;
import org.openapitools.client.model.TradingCountry;
import org.openapitools.client.model.TradingCurrency;
import org.openapitools.client.model.TradingLanguage;
import org.openapitools.client.model.UserAccount;

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

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

  public static final String SERIALIZED_NAME_SUB_CATEGORY_INVOICE_AGREGATES = "subCategoryInvoiceAgregates";
  @SerializedName(SERIALIZED_NAME_SUB_CATEGORY_INVOICE_AGREGATES)
  private List<SubCategoryInvoiceAgregate> subCategoryInvoiceAgregates = null;

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


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

  public CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate 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 CategoryInvoiceAgregate invoiceCategory(InvoiceCategory invoiceCategory) {
    
    this.invoiceCategory = invoiceCategory;
    return this;
  }

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

  public InvoiceCategory getInvoiceCategory() {
    return invoiceCategory;
  }



  public void setInvoiceCategory(InvoiceCategory invoiceCategory) {
    this.invoiceCategory = invoiceCategory;
  }


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

  public CategoryInvoiceAgregate addSubCategoryInvoiceAgregatesItem(SubCategoryInvoiceAgregate subCategoryInvoiceAgregatesItem) {
    if (this.subCategoryInvoiceAgregates == null) {
      this.subCategoryInvoiceAgregates = new ArrayList<SubCategoryInvoiceAgregate>();
    }
    this.subCategoryInvoiceAgregates.add(subCategoryInvoiceAgregatesItem);
    return this;
  }

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

  public List<SubCategoryInvoiceAgregate> getSubCategoryInvoiceAgregates() {
    return subCategoryInvoiceAgregates;
  }



  public void setSubCategoryInvoiceAgregates(List<SubCategoryInvoiceAgregate> subCategoryInvoiceAgregates) {
    this.subCategoryInvoiceAgregates = subCategoryInvoiceAgregates;
  }


  public CategoryInvoiceAgregate _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;
    }
    CategoryInvoiceAgregate categoryInvoiceAgregate = (CategoryInvoiceAgregate) o;
    return Objects.equals(this.id, categoryInvoiceAgregate.id) &&
        Objects.equals(this.version, categoryInvoiceAgregate.version) &&
        Objects.equals(this.auditable, categoryInvoiceAgregate.auditable) &&
        Objects.equals(this.historized, categoryInvoiceAgregate.historized) &&
        Objects.equals(this.notified, categoryInvoiceAgregate.notified) &&
        Objects.equals(this.auditableFields, categoryInvoiceAgregate.auditableFields) &&
        Objects.equals(this.billingAccount, categoryInvoiceAgregate.billingAccount) &&
        Objects.equals(this.invoice, categoryInvoiceAgregate.invoice) &&
        Objects.equals(this.billingRun, categoryInvoiceAgregate.billingRun) &&
        Objects.equals(this.itemNumber, categoryInvoiceAgregate.itemNumber) &&
        Objects.equals(this.description, categoryInvoiceAgregate.description) &&
        Objects.equals(this.amount, categoryInvoiceAgregate.amount) &&
        Objects.equals(this.amountWithoutTax, categoryInvoiceAgregate.amountWithoutTax) &&
        Objects.equals(this.amountTax, categoryInvoiceAgregate.amountTax) &&
        Objects.equals(this.amountWithTax, categoryInvoiceAgregate.amountWithTax) &&
        Objects.equals(this.tradingCurrency, categoryInvoiceAgregate.tradingCurrency) &&
        Objects.equals(this.tradingCountry, categoryInvoiceAgregate.tradingCountry) &&
        Objects.equals(this.tradingLanguage, categoryInvoiceAgregate.tradingLanguage) &&
        Objects.equals(this.prDescription, categoryInvoiceAgregate.prDescription) &&
        Objects.equals(this.invoiceCategory, categoryInvoiceAgregate.invoiceCategory) &&
        Objects.equals(this.userAccount, categoryInvoiceAgregate.userAccount) &&
        Objects.equals(this.subCategoryInvoiceAgregates, categoryInvoiceAgregate.subCategoryInvoiceAgregates) &&
        Objects.equals(this._transient, categoryInvoiceAgregate._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, invoiceCategory, userAccount, subCategoryInvoiceAgregates, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CategoryInvoiceAgregate {\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("    invoiceCategory: ").append(toIndentedString(invoiceCategory)).append("\n");
    sb.append("    userAccount: ").append(toIndentedString(userAccount)).append("\n");
    sb.append("    subCategoryInvoiceAgregates: ").append(toIndentedString(subCategoryInvoiceAgregates)).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    ");
  }

}

