/*
 * 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.BusinessEntity;
import org.openapitools.client.model.Calendar;
import org.openapitools.client.model.ChargeTemplate;
import org.openapitools.client.model.ProductChargeTemplate;
import org.openapitools.client.model.ProductInstance;
import org.openapitools.client.model.Seller;
import org.openapitools.client.model.Subscription;
import org.openapitools.client.model.TradingCountry;
import org.openapitools.client.model.TradingCurrency;
import org.openapitools.client.model.UserAccount;
import org.openapitools.client.model.WalletInstance;
import org.openapitools.client.model.WalletOperation;
import org.threeten.bp.OffsetDateTime;

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

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

  public static final String SERIALIZED_NAME_APPEND_GENERATED_CODE = "appendGeneratedCode";
  @SerializedName(SERIALIZED_NAME_APPEND_GENERATED_CODE)
  private Boolean appendGeneratedCode;

  /**
   * Gets or Sets status
   */
  @JsonAdapter(StatusEnum.Adapter.class)
  public enum StatusEnum {
    ACTIVE("ACTIVE"),
    
    INACTIVE("INACTIVE"),
    
    CANCELED("CANCELED"),
    
    TERMINATED("TERMINATED"),
    
    SUSPENDED("SUSPENDED"),
    
    CLOSED("CLOSED");

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static StatusEnum fromValue(String value) {
      for (StatusEnum b : StatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<StatusEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public StatusEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return StatusEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_STATUS = "status";
  @SerializedName(SERIALIZED_NAME_STATUS)
  private StatusEnum status;

  public static final String SERIALIZED_NAME_STATUS_DATE = "statusDate";
  @SerializedName(SERIALIZED_NAME_STATUS_DATE)
  private OffsetDateTime statusDate;

  public static final String SERIALIZED_NAME_TERMINATION_DATE = "terminationDate";
  @SerializedName(SERIALIZED_NAME_TERMINATION_DATE)
  private OffsetDateTime terminationDate;

  public static final String SERIALIZED_NAME_CHARGE_TEMPLATE = "chargeTemplate";
  @SerializedName(SERIALIZED_NAME_CHARGE_TEMPLATE)
  private ChargeTemplate chargeTemplate;

  public static final String SERIALIZED_NAME_INVOICING_CALENDAR = "invoicingCalendar";
  @SerializedName(SERIALIZED_NAME_INVOICING_CALENDAR)
  private Calendar invoicingCalendar;

  public static final String SERIALIZED_NAME_CHARGE_DATE = "chargeDate";
  @SerializedName(SERIALIZED_NAME_CHARGE_DATE)
  private OffsetDateTime chargeDate;

  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_WITH_TAX = "amountWithTax";
  @SerializedName(SERIALIZED_NAME_AMOUNT_WITH_TAX)
  private BigDecimal amountWithTax;

  public static final String SERIALIZED_NAME_CRITERIA1 = "criteria1";
  @SerializedName(SERIALIZED_NAME_CRITERIA1)
  private String criteria1;

  public static final String SERIALIZED_NAME_CRITERIA2 = "criteria2";
  @SerializedName(SERIALIZED_NAME_CRITERIA2)
  private String criteria2;

  public static final String SERIALIZED_NAME_CRITERIA3 = "criteria3";
  @SerializedName(SERIALIZED_NAME_CRITERIA3)
  private String criteria3;

  public static final String SERIALIZED_NAME_SELLER = "seller";
  @SerializedName(SERIALIZED_NAME_SELLER)
  private Seller seller;

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

  public static final String SERIALIZED_NAME_SUBSCRIPTION = "subscription";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION)
  private Subscription subscription;

  public static final String SERIALIZED_NAME_PR_DESCRIPTION = "prDescription";
  @SerializedName(SERIALIZED_NAME_PR_DESCRIPTION)
  private String prDescription;

  public static final String SERIALIZED_NAME_CURRENCY = "currency";
  @SerializedName(SERIALIZED_NAME_CURRENCY)
  private TradingCurrency currency;

  public static final String SERIALIZED_NAME_COUNTRY = "country";
  @SerializedName(SERIALIZED_NAME_COUNTRY)
  private TradingCountry country;

  public static final String SERIALIZED_NAME_WALLET_INSTANCES = "walletInstances";
  @SerializedName(SERIALIZED_NAME_WALLET_INSTANCES)
  private List<WalletInstance> walletInstances = null;

  public static final String SERIALIZED_NAME_PREPAID_WALLET_INSTANCES = "prepaidWalletInstances";
  @SerializedName(SERIALIZED_NAME_PREPAID_WALLET_INSTANCES)
  private List<WalletInstance> prepaidWalletInstances = null;

  public static final String SERIALIZED_NAME_PREPAID = "prepaid";
  @SerializedName(SERIALIZED_NAME_PREPAID)
  private Boolean prepaid;

  public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber";
  @SerializedName(SERIALIZED_NAME_ORDER_NUMBER)
  private String orderNumber;

  public static final String SERIALIZED_NAME_PRODUCT_CHARGE_TEMPLATE = "productChargeTemplate";
  @SerializedName(SERIALIZED_NAME_PRODUCT_CHARGE_TEMPLATE)
  private ProductChargeTemplate productChargeTemplate;

  public static final String SERIALIZED_NAME_PRODUCT_INSTANCE = "productInstance";
  @SerializedName(SERIALIZED_NAME_PRODUCT_INSTANCE)
  private ProductInstance productInstance;

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

  public static final String SERIALIZED_NAME_WALLET_OPERATIONS_SORTED = "walletOperationsSorted";
  @SerializedName(SERIALIZED_NAME_WALLET_OPERATIONS_SORTED)
  private List<WalletOperation> walletOperationsSorted = null;

  public static final String SERIALIZED_NAME_DESCRIPTION_OR_CODE = "descriptionOrCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_OR_CODE)
  private String descriptionOrCode;

  public static final String SERIALIZED_NAME_DESCRIPTION_AND_CODE = "descriptionAndCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_AND_CODE)
  private String descriptionAndCode;

  public static final String SERIALIZED_NAME_REFERENCE_CODE = "referenceCode";
  @SerializedName(SERIALIZED_NAME_REFERENCE_CODE)
  private String referenceCode;

  public static final String SERIALIZED_NAME_REFERENCE_DESCRIPTION = "referenceDescription";
  @SerializedName(SERIALIZED_NAME_REFERENCE_DESCRIPTION)
  private String referenceDescription;

  public static final String SERIALIZED_NAME_CODE_CHANGED = "codeChanged";
  @SerializedName(SERIALIZED_NAME_CODE_CHANGED)
  private Boolean codeChanged;

  public static final String SERIALIZED_NAME_PARENT_ENTITY = "parentEntity";
  @SerializedName(SERIALIZED_NAME_PARENT_ENTITY)
  private BusinessEntity parentEntity;

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


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

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

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

  public String getCode() {
    return code;
  }



  public void setCode(String code) {
    this.code = code;
  }


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

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

  public Boolean getAppendGeneratedCode() {
    return appendGeneratedCode;
  }



  public void setAppendGeneratedCode(Boolean appendGeneratedCode) {
    this.appendGeneratedCode = appendGeneratedCode;
  }


  public ProductChargeInstance status(StatusEnum status) {
    
    this.status = status;
    return this;
  }

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

  public StatusEnum getStatus() {
    return status;
  }



  public void setStatus(StatusEnum status) {
    this.status = status;
  }


  public ProductChargeInstance statusDate(OffsetDateTime statusDate) {
    
    this.statusDate = statusDate;
    return this;
  }

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

  public OffsetDateTime getStatusDate() {
    return statusDate;
  }



  public void setStatusDate(OffsetDateTime statusDate) {
    this.statusDate = statusDate;
  }


  public ProductChargeInstance terminationDate(OffsetDateTime terminationDate) {
    
    this.terminationDate = terminationDate;
    return this;
  }

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

  public OffsetDateTime getTerminationDate() {
    return terminationDate;
  }



  public void setTerminationDate(OffsetDateTime terminationDate) {
    this.terminationDate = terminationDate;
  }


  public ProductChargeInstance chargeTemplate(ChargeTemplate chargeTemplate) {
    
    this.chargeTemplate = chargeTemplate;
    return this;
  }

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

  public ChargeTemplate getChargeTemplate() {
    return chargeTemplate;
  }



  public void setChargeTemplate(ChargeTemplate chargeTemplate) {
    this.chargeTemplate = chargeTemplate;
  }


  public ProductChargeInstance invoicingCalendar(Calendar invoicingCalendar) {
    
    this.invoicingCalendar = invoicingCalendar;
    return this;
  }

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

  public Calendar getInvoicingCalendar() {
    return invoicingCalendar;
  }



  public void setInvoicingCalendar(Calendar invoicingCalendar) {
    this.invoicingCalendar = invoicingCalendar;
  }


  public ProductChargeInstance chargeDate(OffsetDateTime chargeDate) {
    
    this.chargeDate = chargeDate;
    return this;
  }

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

  public OffsetDateTime getChargeDate() {
    return chargeDate;
  }



  public void setChargeDate(OffsetDateTime chargeDate) {
    this.chargeDate = chargeDate;
  }


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

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

  public String getCriteria1() {
    return criteria1;
  }



  public void setCriteria1(String criteria1) {
    this.criteria1 = criteria1;
  }


  public ProductChargeInstance criteria2(String criteria2) {
    
    this.criteria2 = criteria2;
    return this;
  }

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

  public String getCriteria2() {
    return criteria2;
  }



  public void setCriteria2(String criteria2) {
    this.criteria2 = criteria2;
  }


  public ProductChargeInstance criteria3(String criteria3) {
    
    this.criteria3 = criteria3;
    return this;
  }

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

  public String getCriteria3() {
    return criteria3;
  }



  public void setCriteria3(String criteria3) {
    this.criteria3 = criteria3;
  }


  public ProductChargeInstance seller(Seller seller) {
    
    this.seller = seller;
    return this;
  }

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

  public Seller getSeller() {
    return seller;
  }



  public void setSeller(Seller seller) {
    this.seller = seller;
  }


  public ProductChargeInstance 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 ProductChargeInstance subscription(Subscription subscription) {
    
    this.subscription = subscription;
    return this;
  }

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

  public Subscription getSubscription() {
    return subscription;
  }



  public void setSubscription(Subscription subscription) {
    this.subscription = subscription;
  }


  public ProductChargeInstance 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 ProductChargeInstance currency(TradingCurrency currency) {
    
    this.currency = currency;
    return this;
  }

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

  public TradingCurrency getCurrency() {
    return currency;
  }



  public void setCurrency(TradingCurrency currency) {
    this.currency = currency;
  }


  public ProductChargeInstance country(TradingCountry country) {
    
    this.country = country;
    return this;
  }

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

  public TradingCountry getCountry() {
    return country;
  }



  public void setCountry(TradingCountry country) {
    this.country = country;
  }


  public ProductChargeInstance walletInstances(List<WalletInstance> walletInstances) {
    
    this.walletInstances = walletInstances;
    return this;
  }

  public ProductChargeInstance addWalletInstancesItem(WalletInstance walletInstancesItem) {
    if (this.walletInstances == null) {
      this.walletInstances = new ArrayList<WalletInstance>();
    }
    this.walletInstances.add(walletInstancesItem);
    return this;
  }

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

  public List<WalletInstance> getWalletInstances() {
    return walletInstances;
  }



  public void setWalletInstances(List<WalletInstance> walletInstances) {
    this.walletInstances = walletInstances;
  }


  public ProductChargeInstance prepaidWalletInstances(List<WalletInstance> prepaidWalletInstances) {
    
    this.prepaidWalletInstances = prepaidWalletInstances;
    return this;
  }

  public ProductChargeInstance addPrepaidWalletInstancesItem(WalletInstance prepaidWalletInstancesItem) {
    if (this.prepaidWalletInstances == null) {
      this.prepaidWalletInstances = new ArrayList<WalletInstance>();
    }
    this.prepaidWalletInstances.add(prepaidWalletInstancesItem);
    return this;
  }

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

  public List<WalletInstance> getPrepaidWalletInstances() {
    return prepaidWalletInstances;
  }



  public void setPrepaidWalletInstances(List<WalletInstance> prepaidWalletInstances) {
    this.prepaidWalletInstances = prepaidWalletInstances;
  }


  public ProductChargeInstance prepaid(Boolean prepaid) {
    
    this.prepaid = prepaid;
    return this;
  }

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

  public Boolean getPrepaid() {
    return prepaid;
  }



  public void setPrepaid(Boolean prepaid) {
    this.prepaid = prepaid;
  }


  public ProductChargeInstance 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 ProductChargeInstance productChargeTemplate(ProductChargeTemplate productChargeTemplate) {
    
    this.productChargeTemplate = productChargeTemplate;
    return this;
  }

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

  public ProductChargeTemplate getProductChargeTemplate() {
    return productChargeTemplate;
  }



  public void setProductChargeTemplate(ProductChargeTemplate productChargeTemplate) {
    this.productChargeTemplate = productChargeTemplate;
  }


  public ProductChargeInstance productInstance(ProductInstance productInstance) {
    
    this.productInstance = productInstance;
    return this;
  }

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

  public ProductInstance getProductInstance() {
    return productInstance;
  }



  public void setProductInstance(ProductInstance productInstance) {
    this.productInstance = productInstance;
  }


  public ProductChargeInstance 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 ProductChargeInstance walletOperationsSorted(List<WalletOperation> walletOperationsSorted) {
    
    this.walletOperationsSorted = walletOperationsSorted;
    return this;
  }

  public ProductChargeInstance addWalletOperationsSortedItem(WalletOperation walletOperationsSortedItem) {
    if (this.walletOperationsSorted == null) {
      this.walletOperationsSorted = new ArrayList<WalletOperation>();
    }
    this.walletOperationsSorted.add(walletOperationsSortedItem);
    return this;
  }

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

  public List<WalletOperation> getWalletOperationsSorted() {
    return walletOperationsSorted;
  }



  public void setWalletOperationsSorted(List<WalletOperation> walletOperationsSorted) {
    this.walletOperationsSorted = walletOperationsSorted;
  }


  public ProductChargeInstance descriptionOrCode(String descriptionOrCode) {
    
    this.descriptionOrCode = descriptionOrCode;
    return this;
  }

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

  public String getDescriptionOrCode() {
    return descriptionOrCode;
  }



  public void setDescriptionOrCode(String descriptionOrCode) {
    this.descriptionOrCode = descriptionOrCode;
  }


  public ProductChargeInstance descriptionAndCode(String descriptionAndCode) {
    
    this.descriptionAndCode = descriptionAndCode;
    return this;
  }

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

  public String getDescriptionAndCode() {
    return descriptionAndCode;
  }



  public void setDescriptionAndCode(String descriptionAndCode) {
    this.descriptionAndCode = descriptionAndCode;
  }


  public ProductChargeInstance referenceCode(String referenceCode) {
    
    this.referenceCode = referenceCode;
    return this;
  }

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

  public String getReferenceCode() {
    return referenceCode;
  }



  public void setReferenceCode(String referenceCode) {
    this.referenceCode = referenceCode;
  }


  public ProductChargeInstance referenceDescription(String referenceDescription) {
    
    this.referenceDescription = referenceDescription;
    return this;
  }

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

  public String getReferenceDescription() {
    return referenceDescription;
  }



  public void setReferenceDescription(String referenceDescription) {
    this.referenceDescription = referenceDescription;
  }


  public ProductChargeInstance codeChanged(Boolean codeChanged) {
    
    this.codeChanged = codeChanged;
    return this;
  }

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

  public Boolean getCodeChanged() {
    return codeChanged;
  }



  public void setCodeChanged(Boolean codeChanged) {
    this.codeChanged = codeChanged;
  }


  public ProductChargeInstance parentEntity(BusinessEntity parentEntity) {
    
    this.parentEntity = parentEntity;
    return this;
  }

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

  public BusinessEntity getParentEntity() {
    return parentEntity;
  }



  public void setParentEntity(BusinessEntity parentEntity) {
    this.parentEntity = parentEntity;
  }


  public ProductChargeInstance _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;
    }
    ProductChargeInstance productChargeInstance = (ProductChargeInstance) o;
    return Objects.equals(this.id, productChargeInstance.id) &&
        Objects.equals(this.version, productChargeInstance.version) &&
        Objects.equals(this.auditable, productChargeInstance.auditable) &&
        Objects.equals(this.historized, productChargeInstance.historized) &&
        Objects.equals(this.notified, productChargeInstance.notified) &&
        Objects.equals(this.auditableFields, productChargeInstance.auditableFields) &&
        Objects.equals(this.code, productChargeInstance.code) &&
        Objects.equals(this.description, productChargeInstance.description) &&
        Objects.equals(this.appendGeneratedCode, productChargeInstance.appendGeneratedCode) &&
        Objects.equals(this.status, productChargeInstance.status) &&
        Objects.equals(this.statusDate, productChargeInstance.statusDate) &&
        Objects.equals(this.terminationDate, productChargeInstance.terminationDate) &&
        Objects.equals(this.chargeTemplate, productChargeInstance.chargeTemplate) &&
        Objects.equals(this.invoicingCalendar, productChargeInstance.invoicingCalendar) &&
        Objects.equals(this.chargeDate, productChargeInstance.chargeDate) &&
        Objects.equals(this.amountWithoutTax, productChargeInstance.amountWithoutTax) &&
        Objects.equals(this.amountWithTax, productChargeInstance.amountWithTax) &&
        Objects.equals(this.criteria1, productChargeInstance.criteria1) &&
        Objects.equals(this.criteria2, productChargeInstance.criteria2) &&
        Objects.equals(this.criteria3, productChargeInstance.criteria3) &&
        Objects.equals(this.seller, productChargeInstance.seller) &&
        Objects.equals(this.userAccount, productChargeInstance.userAccount) &&
        Objects.equals(this.subscription, productChargeInstance.subscription) &&
        Objects.equals(this.prDescription, productChargeInstance.prDescription) &&
        Objects.equals(this.currency, productChargeInstance.currency) &&
        Objects.equals(this.country, productChargeInstance.country) &&
        Objects.equals(this.walletInstances, productChargeInstance.walletInstances) &&
        Objects.equals(this.prepaidWalletInstances, productChargeInstance.prepaidWalletInstances) &&
        Objects.equals(this.prepaid, productChargeInstance.prepaid) &&
        Objects.equals(this.orderNumber, productChargeInstance.orderNumber) &&
        Objects.equals(this.productChargeTemplate, productChargeInstance.productChargeTemplate) &&
        Objects.equals(this.productInstance, productChargeInstance.productInstance) &&
        Objects.equals(this.quantity, productChargeInstance.quantity) &&
        Objects.equals(this.walletOperationsSorted, productChargeInstance.walletOperationsSorted) &&
        Objects.equals(this.descriptionOrCode, productChargeInstance.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, productChargeInstance.descriptionAndCode) &&
        Objects.equals(this.referenceCode, productChargeInstance.referenceCode) &&
        Objects.equals(this.referenceDescription, productChargeInstance.referenceDescription) &&
        Objects.equals(this.codeChanged, productChargeInstance.codeChanged) &&
        Objects.equals(this.parentEntity, productChargeInstance.parentEntity) &&
        Objects.equals(this._transient, productChargeInstance._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, code, description, appendGeneratedCode, status, statusDate, terminationDate, chargeTemplate, invoicingCalendar, chargeDate, amountWithoutTax, amountWithTax, criteria1, criteria2, criteria3, seller, userAccount, subscription, prDescription, currency, country, walletInstances, prepaidWalletInstances, prepaid, orderNumber, productChargeTemplate, productInstance, quantity, walletOperationsSorted, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ProductChargeInstance {\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("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    appendGeneratedCode: ").append(toIndentedString(appendGeneratedCode)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    statusDate: ").append(toIndentedString(statusDate)).append("\n");
    sb.append("    terminationDate: ").append(toIndentedString(terminationDate)).append("\n");
    sb.append("    chargeTemplate: ").append(toIndentedString(chargeTemplate)).append("\n");
    sb.append("    invoicingCalendar: ").append(toIndentedString(invoicingCalendar)).append("\n");
    sb.append("    chargeDate: ").append(toIndentedString(chargeDate)).append("\n");
    sb.append("    amountWithoutTax: ").append(toIndentedString(amountWithoutTax)).append("\n");
    sb.append("    amountWithTax: ").append(toIndentedString(amountWithTax)).append("\n");
    sb.append("    criteria1: ").append(toIndentedString(criteria1)).append("\n");
    sb.append("    criteria2: ").append(toIndentedString(criteria2)).append("\n");
    sb.append("    criteria3: ").append(toIndentedString(criteria3)).append("\n");
    sb.append("    seller: ").append(toIndentedString(seller)).append("\n");
    sb.append("    userAccount: ").append(toIndentedString(userAccount)).append("\n");
    sb.append("    subscription: ").append(toIndentedString(subscription)).append("\n");
    sb.append("    prDescription: ").append(toIndentedString(prDescription)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
    sb.append("    walletInstances: ").append(toIndentedString(walletInstances)).append("\n");
    sb.append("    prepaidWalletInstances: ").append(toIndentedString(prepaidWalletInstances)).append("\n");
    sb.append("    prepaid: ").append(toIndentedString(prepaid)).append("\n");
    sb.append("    orderNumber: ").append(toIndentedString(orderNumber)).append("\n");
    sb.append("    productChargeTemplate: ").append(toIndentedString(productChargeTemplate)).append("\n");
    sb.append("    productInstance: ").append(toIndentedString(productInstance)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
    sb.append("    walletOperationsSorted: ").append(toIndentedString(walletOperationsSorted)).append("\n");
    sb.append("    descriptionOrCode: ").append(toIndentedString(descriptionOrCode)).append("\n");
    sb.append("    descriptionAndCode: ").append(toIndentedString(descriptionAndCode)).append("\n");
    sb.append("    referenceCode: ").append(toIndentedString(referenceCode)).append("\n");
    sb.append("    referenceDescription: ").append(toIndentedString(referenceDescription)).append("\n");
    sb.append("    codeChanged: ").append(toIndentedString(codeChanged)).append("\n");
    sb.append("    parentEntity: ").append(toIndentedString(parentEntity)).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    ");
  }

}

