/*
 * 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BusinessEntity;
import org.openapitools.client.model.CustomFieldValues;
import org.openapitools.client.model.ICustomFieldEntity;
import org.openapitools.client.model.InvoiceSubCategory;
import org.openapitools.client.model.RevenueRecognitionRule;
import org.openapitools.client.model.TriggeredEDRTemplate;

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

  public static final String SERIALIZED_NAME_UUID = "uuid";
  @SerializedName(SERIALIZED_NAME_UUID)
  private String uuid;

  public static final String SERIALIZED_NAME_CF_VALUES = "cfValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES)
  private CustomFieldValues cfValues;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES = "cfAccumulatedValues";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES)
  private CustomFieldValues cfAccumulatedValues;

  public static final String SERIALIZED_NAME_DISABLED = "disabled";
  @SerializedName(SERIALIZED_NAME_DISABLED)
  private Boolean disabled;

  /**
   * Gets or Sets type
   */
  @JsonAdapter(TypeEnum.Adapter.class)
  public enum TypeEnum {
    CREDIT("CREDIT"),
    
    DEBIT("DEBIT");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_TYPE = "type";
  @SerializedName(SERIALIZED_NAME_TYPE)
  private TypeEnum type;

  public static final String SERIALIZED_NAME_AMOUNT_EDITABLE = "amountEditable";
  @SerializedName(SERIALIZED_NAME_AMOUNT_EDITABLE)
  private Boolean amountEditable;

  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_EDR_TEMPLATES = "edrTemplates";
  @SerializedName(SERIALIZED_NAME_EDR_TEMPLATES)
  private List<TriggeredEDRTemplate> edrTemplates = null;

  public static final String SERIALIZED_NAME_INPUT_UNIT_DESCRIPTION = "inputUnitDescription";
  @SerializedName(SERIALIZED_NAME_INPUT_UNIT_DESCRIPTION)
  private String inputUnitDescription;

  public static final String SERIALIZED_NAME_RATING_UNIT_DESCRIPTION = "ratingUnitDescription";
  @SerializedName(SERIALIZED_NAME_RATING_UNIT_DESCRIPTION)
  private String ratingUnitDescription;

  public static final String SERIALIZED_NAME_UNIT_MULTIPLICATOR = "unitMultiplicator";
  @SerializedName(SERIALIZED_NAME_UNIT_MULTIPLICATOR)
  private BigDecimal unitMultiplicator;

  public static final String SERIALIZED_NAME_UNIT_NB_DECIMAL = "unitNbDecimal";
  @SerializedName(SERIALIZED_NAME_UNIT_NB_DECIMAL)
  private Integer unitNbDecimal;

  /**
   * Gets or Sets roundingMode
   */
  @JsonAdapter(RoundingModeEnum.Adapter.class)
  public enum RoundingModeEnum {
    NEAREST("NEAREST"),
    
    DOWN("DOWN"),
    
    UP("UP");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_ROUNDING_MODE = "roundingMode";
  @SerializedName(SERIALIZED_NAME_ROUNDING_MODE)
  private RoundingModeEnum roundingMode;

  public static final String SERIALIZED_NAME_REVENUE_RECOGNITION_RULE = "revenueRecognitionRule";
  @SerializedName(SERIALIZED_NAME_REVENUE_RECOGNITION_RULE)
  private RevenueRecognitionRule revenueRecognitionRule;

  public static final String SERIALIZED_NAME_DESCRIPTION_I18N = "descriptionI18n";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_I18N)
  private Map<String, String> descriptionI18n = null;

  /**
   * Gets or Sets oneShotChargeTemplateType
   */
  @JsonAdapter(OneShotChargeTemplateTypeEnum.Adapter.class)
  public enum OneShotChargeTemplateTypeEnum {
    SUBSCRIPTION("oneShotChargeTemplateTypeEnum.subscription"),
    
    TERMINATION("oneShotChargeTemplateTypeEnum.termination"),
    
    OTHER("oneShotChargeTemplateTypeEnum.other");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_ONE_SHOT_CHARGE_TEMPLATE_TYPE = "oneShotChargeTemplateType";
  @SerializedName(SERIALIZED_NAME_ONE_SHOT_CHARGE_TEMPLATE_TYPE)
  private OneShotChargeTemplateTypeEnum oneShotChargeTemplateType;

  public static final String SERIALIZED_NAME_IMMEDIATE_INVOICING = "immediateInvoicing";
  @SerializedName(SERIALIZED_NAME_IMMEDIATE_INVOICING)
  private Boolean immediateInvoicing;

  public static final String SERIALIZED_NAME_FILTER_EXPRESSION = "filterExpression";
  @SerializedName(SERIALIZED_NAME_FILTER_EXPRESSION)
  private String filterExpression;

  public static final String SERIALIZED_NAME_CHARGE_TYPE = "chargeType";
  @SerializedName(SERIALIZED_NAME_CHARGE_TYPE)
  private String chargeType;

  public static final String SERIALIZED_NAME_DESCRIPTION_I18N_NULL_SAFE = "descriptionI18nNullSafe";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_I18N_NULL_SAFE)
  private Map<String, String> descriptionI18nNullSafe = null;

  public static final String SERIALIZED_NAME_ACTIVE = "active";
  @SerializedName(SERIALIZED_NAME_ACTIVE)
  private Boolean active;

  public static final String SERIALIZED_NAME_PARENT_C_F_ENTITIES = "parentCFEntities";
  @SerializedName(SERIALIZED_NAME_PARENT_C_F_ENTITIES)
  private List<ICustomFieldEntity> parentCFEntities = null;

  public static final String SERIALIZED_NAME_CF_VALUES_NULL_SAFE = "cfValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_NULL_SAFE)
  private CustomFieldValues cfValuesNullSafe;

  public static final String SERIALIZED_NAME_CF_VALUES_AS_VALUES = "cfValuesAsValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_AS_VALUES)
  private Map<String, Object> cfValuesAsValues = null;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE = "cfAccumulatedValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE)
  private CustomFieldValues cfAccumulatedValuesNullSafe;

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

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

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

  public String getUuid() {
    return uuid;
  }



  public void setUuid(String uuid) {
    this.uuid = uuid;
  }


  public OneShotChargeTemplate cfValues(CustomFieldValues cfValues) {
    
    this.cfValues = cfValues;
    return this;
  }

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

  public CustomFieldValues getCfValues() {
    return cfValues;
  }



  public void setCfValues(CustomFieldValues cfValues) {
    this.cfValues = cfValues;
  }


  public OneShotChargeTemplate cfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    
    this.cfAccumulatedValues = cfAccumulatedValues;
    return this;
  }

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

  public CustomFieldValues getCfAccumulatedValues() {
    return cfAccumulatedValues;
  }



  public void setCfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    this.cfAccumulatedValues = cfAccumulatedValues;
  }


  public OneShotChargeTemplate disabled(Boolean disabled) {
    
    this.disabled = disabled;
    return this;
  }

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

  public Boolean getDisabled() {
    return disabled;
  }



  public void setDisabled(Boolean disabled) {
    this.disabled = disabled;
  }


  public OneShotChargeTemplate type(TypeEnum type) {
    
    this.type = type;
    return this;
  }

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

  public TypeEnum getType() {
    return type;
  }



  public void setType(TypeEnum type) {
    this.type = type;
  }


  public OneShotChargeTemplate amountEditable(Boolean amountEditable) {
    
    this.amountEditable = amountEditable;
    return this;
  }

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

  public Boolean getAmountEditable() {
    return amountEditable;
  }



  public void setAmountEditable(Boolean amountEditable) {
    this.amountEditable = amountEditable;
  }


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

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

  public InvoiceSubCategory getInvoiceSubCategory() {
    return invoiceSubCategory;
  }



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


  public OneShotChargeTemplate edrTemplates(List<TriggeredEDRTemplate> edrTemplates) {
    
    this.edrTemplates = edrTemplates;
    return this;
  }

  public OneShotChargeTemplate addEdrTemplatesItem(TriggeredEDRTemplate edrTemplatesItem) {
    if (this.edrTemplates == null) {
      this.edrTemplates = new ArrayList<TriggeredEDRTemplate>();
    }
    this.edrTemplates.add(edrTemplatesItem);
    return this;
  }

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

  public List<TriggeredEDRTemplate> getEdrTemplates() {
    return edrTemplates;
  }



  public void setEdrTemplates(List<TriggeredEDRTemplate> edrTemplates) {
    this.edrTemplates = edrTemplates;
  }


  public OneShotChargeTemplate inputUnitDescription(String inputUnitDescription) {
    
    this.inputUnitDescription = inputUnitDescription;
    return this;
  }

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

  public String getInputUnitDescription() {
    return inputUnitDescription;
  }



  public void setInputUnitDescription(String inputUnitDescription) {
    this.inputUnitDescription = inputUnitDescription;
  }


  public OneShotChargeTemplate ratingUnitDescription(String ratingUnitDescription) {
    
    this.ratingUnitDescription = ratingUnitDescription;
    return this;
  }

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

  public String getRatingUnitDescription() {
    return ratingUnitDescription;
  }



  public void setRatingUnitDescription(String ratingUnitDescription) {
    this.ratingUnitDescription = ratingUnitDescription;
  }


  public OneShotChargeTemplate unitMultiplicator(BigDecimal unitMultiplicator) {
    
    this.unitMultiplicator = unitMultiplicator;
    return this;
  }

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

  public BigDecimal getUnitMultiplicator() {
    return unitMultiplicator;
  }



  public void setUnitMultiplicator(BigDecimal unitMultiplicator) {
    this.unitMultiplicator = unitMultiplicator;
  }


  public OneShotChargeTemplate unitNbDecimal(Integer unitNbDecimal) {
    
    this.unitNbDecimal = unitNbDecimal;
    return this;
  }

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

  public Integer getUnitNbDecimal() {
    return unitNbDecimal;
  }



  public void setUnitNbDecimal(Integer unitNbDecimal) {
    this.unitNbDecimal = unitNbDecimal;
  }


  public OneShotChargeTemplate roundingMode(RoundingModeEnum roundingMode) {
    
    this.roundingMode = roundingMode;
    return this;
  }

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

  public RoundingModeEnum getRoundingMode() {
    return roundingMode;
  }



  public void setRoundingMode(RoundingModeEnum roundingMode) {
    this.roundingMode = roundingMode;
  }


  public OneShotChargeTemplate revenueRecognitionRule(RevenueRecognitionRule revenueRecognitionRule) {
    
    this.revenueRecognitionRule = revenueRecognitionRule;
    return this;
  }

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

  public RevenueRecognitionRule getRevenueRecognitionRule() {
    return revenueRecognitionRule;
  }



  public void setRevenueRecognitionRule(RevenueRecognitionRule revenueRecognitionRule) {
    this.revenueRecognitionRule = revenueRecognitionRule;
  }


  public OneShotChargeTemplate descriptionI18n(Map<String, String> descriptionI18n) {
    
    this.descriptionI18n = descriptionI18n;
    return this;
  }

  public OneShotChargeTemplate putDescriptionI18nItem(String key, String descriptionI18nItem) {
    if (this.descriptionI18n == null) {
      this.descriptionI18n = new HashMap<String, String>();
    }
    this.descriptionI18n.put(key, descriptionI18nItem);
    return this;
  }

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

  public Map<String, String> getDescriptionI18n() {
    return descriptionI18n;
  }



  public void setDescriptionI18n(Map<String, String> descriptionI18n) {
    this.descriptionI18n = descriptionI18n;
  }


  public OneShotChargeTemplate oneShotChargeTemplateType(OneShotChargeTemplateTypeEnum oneShotChargeTemplateType) {
    
    this.oneShotChargeTemplateType = oneShotChargeTemplateType;
    return this;
  }

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

  public OneShotChargeTemplateTypeEnum getOneShotChargeTemplateType() {
    return oneShotChargeTemplateType;
  }



  public void setOneShotChargeTemplateType(OneShotChargeTemplateTypeEnum oneShotChargeTemplateType) {
    this.oneShotChargeTemplateType = oneShotChargeTemplateType;
  }


  public OneShotChargeTemplate immediateInvoicing(Boolean immediateInvoicing) {
    
    this.immediateInvoicing = immediateInvoicing;
    return this;
  }

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

  public Boolean getImmediateInvoicing() {
    return immediateInvoicing;
  }



  public void setImmediateInvoicing(Boolean immediateInvoicing) {
    this.immediateInvoicing = immediateInvoicing;
  }


  public OneShotChargeTemplate filterExpression(String filterExpression) {
    
    this.filterExpression = filterExpression;
    return this;
  }

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

  public String getFilterExpression() {
    return filterExpression;
  }



  public void setFilterExpression(String filterExpression) {
    this.filterExpression = filterExpression;
  }


  public OneShotChargeTemplate chargeType(String chargeType) {
    
    this.chargeType = chargeType;
    return this;
  }

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

  public String getChargeType() {
    return chargeType;
  }



  public void setChargeType(String chargeType) {
    this.chargeType = chargeType;
  }


  public OneShotChargeTemplate descriptionI18nNullSafe(Map<String, String> descriptionI18nNullSafe) {
    
    this.descriptionI18nNullSafe = descriptionI18nNullSafe;
    return this;
  }

  public OneShotChargeTemplate putDescriptionI18nNullSafeItem(String key, String descriptionI18nNullSafeItem) {
    if (this.descriptionI18nNullSafe == null) {
      this.descriptionI18nNullSafe = new HashMap<String, String>();
    }
    this.descriptionI18nNullSafe.put(key, descriptionI18nNullSafeItem);
    return this;
  }

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

  public Map<String, String> getDescriptionI18nNullSafe() {
    return descriptionI18nNullSafe;
  }



  public void setDescriptionI18nNullSafe(Map<String, String> descriptionI18nNullSafe) {
    this.descriptionI18nNullSafe = descriptionI18nNullSafe;
  }


  public OneShotChargeTemplate active(Boolean active) {
    
    this.active = active;
    return this;
  }

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

  public Boolean getActive() {
    return active;
  }



  public void setActive(Boolean active) {
    this.active = active;
  }


  public OneShotChargeTemplate parentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    
    this.parentCFEntities = parentCFEntities;
    return this;
  }

  public OneShotChargeTemplate addParentCFEntitiesItem(ICustomFieldEntity parentCFEntitiesItem) {
    if (this.parentCFEntities == null) {
      this.parentCFEntities = new ArrayList<ICustomFieldEntity>();
    }
    this.parentCFEntities.add(parentCFEntitiesItem);
    return this;
  }

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

  public List<ICustomFieldEntity> getParentCFEntities() {
    return parentCFEntities;
  }



  public void setParentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    this.parentCFEntities = parentCFEntities;
  }


  public OneShotChargeTemplate cfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    
    this.cfValuesNullSafe = cfValuesNullSafe;
    return this;
  }

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

  public CustomFieldValues getCfValuesNullSafe() {
    return cfValuesNullSafe;
  }



  public void setCfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    this.cfValuesNullSafe = cfValuesNullSafe;
  }


  public OneShotChargeTemplate cfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    
    this.cfValuesAsValues = cfValuesAsValues;
    return this;
  }

  public OneShotChargeTemplate putCfValuesAsValuesItem(String key, Object cfValuesAsValuesItem) {
    if (this.cfValuesAsValues == null) {
      this.cfValuesAsValues = new HashMap<String, Object>();
    }
    this.cfValuesAsValues.put(key, cfValuesAsValuesItem);
    return this;
  }

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

  public Map<String, Object> getCfValuesAsValues() {
    return cfValuesAsValues;
  }



  public void setCfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    this.cfValuesAsValues = cfValuesAsValues;
  }


  public OneShotChargeTemplate cfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
    return this;
  }

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

  public CustomFieldValues getCfAccumulatedValuesNullSafe() {
    return cfAccumulatedValuesNullSafe;
  }



  public void setCfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
  }


  public OneShotChargeTemplate 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 OneShotChargeTemplate 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 OneShotChargeTemplate 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 OneShotChargeTemplate 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 OneShotChargeTemplate 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 OneShotChargeTemplate 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 OneShotChargeTemplate _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;
    }
    OneShotChargeTemplate oneShotChargeTemplate = (OneShotChargeTemplate) o;
    return Objects.equals(this.id, oneShotChargeTemplate.id) &&
        Objects.equals(this.version, oneShotChargeTemplate.version) &&
        Objects.equals(this.auditable, oneShotChargeTemplate.auditable) &&
        Objects.equals(this.historized, oneShotChargeTemplate.historized) &&
        Objects.equals(this.notified, oneShotChargeTemplate.notified) &&
        Objects.equals(this.auditableFields, oneShotChargeTemplate.auditableFields) &&
        Objects.equals(this.code, oneShotChargeTemplate.code) &&
        Objects.equals(this.description, oneShotChargeTemplate.description) &&
        Objects.equals(this.appendGeneratedCode, oneShotChargeTemplate.appendGeneratedCode) &&
        Objects.equals(this.uuid, oneShotChargeTemplate.uuid) &&
        Objects.equals(this.cfValues, oneShotChargeTemplate.cfValues) &&
        Objects.equals(this.cfAccumulatedValues, oneShotChargeTemplate.cfAccumulatedValues) &&
        Objects.equals(this.disabled, oneShotChargeTemplate.disabled) &&
        Objects.equals(this.type, oneShotChargeTemplate.type) &&
        Objects.equals(this.amountEditable, oneShotChargeTemplate.amountEditable) &&
        Objects.equals(this.invoiceSubCategory, oneShotChargeTemplate.invoiceSubCategory) &&
        Objects.equals(this.edrTemplates, oneShotChargeTemplate.edrTemplates) &&
        Objects.equals(this.inputUnitDescription, oneShotChargeTemplate.inputUnitDescription) &&
        Objects.equals(this.ratingUnitDescription, oneShotChargeTemplate.ratingUnitDescription) &&
        Objects.equals(this.unitMultiplicator, oneShotChargeTemplate.unitMultiplicator) &&
        Objects.equals(this.unitNbDecimal, oneShotChargeTemplate.unitNbDecimal) &&
        Objects.equals(this.roundingMode, oneShotChargeTemplate.roundingMode) &&
        Objects.equals(this.revenueRecognitionRule, oneShotChargeTemplate.revenueRecognitionRule) &&
        Objects.equals(this.descriptionI18n, oneShotChargeTemplate.descriptionI18n) &&
        Objects.equals(this.oneShotChargeTemplateType, oneShotChargeTemplate.oneShotChargeTemplateType) &&
        Objects.equals(this.immediateInvoicing, oneShotChargeTemplate.immediateInvoicing) &&
        Objects.equals(this.filterExpression, oneShotChargeTemplate.filterExpression) &&
        Objects.equals(this.chargeType, oneShotChargeTemplate.chargeType) &&
        Objects.equals(this.descriptionI18nNullSafe, oneShotChargeTemplate.descriptionI18nNullSafe) &&
        Objects.equals(this.active, oneShotChargeTemplate.active) &&
        Objects.equals(this.parentCFEntities, oneShotChargeTemplate.parentCFEntities) &&
        Objects.equals(this.cfValuesNullSafe, oneShotChargeTemplate.cfValuesNullSafe) &&
        Objects.equals(this.cfValuesAsValues, oneShotChargeTemplate.cfValuesAsValues) &&
        Objects.equals(this.cfAccumulatedValuesNullSafe, oneShotChargeTemplate.cfAccumulatedValuesNullSafe) &&
        Objects.equals(this.descriptionOrCode, oneShotChargeTemplate.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, oneShotChargeTemplate.descriptionAndCode) &&
        Objects.equals(this.referenceCode, oneShotChargeTemplate.referenceCode) &&
        Objects.equals(this.referenceDescription, oneShotChargeTemplate.referenceDescription) &&
        Objects.equals(this.codeChanged, oneShotChargeTemplate.codeChanged) &&
        Objects.equals(this.parentEntity, oneShotChargeTemplate.parentEntity) &&
        Objects.equals(this._transient, oneShotChargeTemplate._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, code, description, appendGeneratedCode, uuid, cfValues, cfAccumulatedValues, disabled, type, amountEditable, invoiceSubCategory, edrTemplates, inputUnitDescription, ratingUnitDescription, unitMultiplicator, unitNbDecimal, roundingMode, revenueRecognitionRule, descriptionI18n, oneShotChargeTemplateType, immediateInvoicing, filterExpression, chargeType, descriptionI18nNullSafe, active, parentCFEntities, cfValuesNullSafe, cfValuesAsValues, cfAccumulatedValuesNullSafe, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OneShotChargeTemplate {\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("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    cfValues: ").append(toIndentedString(cfValues)).append("\n");
    sb.append("    cfAccumulatedValues: ").append(toIndentedString(cfAccumulatedValues)).append("\n");
    sb.append("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    amountEditable: ").append(toIndentedString(amountEditable)).append("\n");
    sb.append("    invoiceSubCategory: ").append(toIndentedString(invoiceSubCategory)).append("\n");
    sb.append("    edrTemplates: ").append(toIndentedString(edrTemplates)).append("\n");
    sb.append("    inputUnitDescription: ").append(toIndentedString(inputUnitDescription)).append("\n");
    sb.append("    ratingUnitDescription: ").append(toIndentedString(ratingUnitDescription)).append("\n");
    sb.append("    unitMultiplicator: ").append(toIndentedString(unitMultiplicator)).append("\n");
    sb.append("    unitNbDecimal: ").append(toIndentedString(unitNbDecimal)).append("\n");
    sb.append("    roundingMode: ").append(toIndentedString(roundingMode)).append("\n");
    sb.append("    revenueRecognitionRule: ").append(toIndentedString(revenueRecognitionRule)).append("\n");
    sb.append("    descriptionI18n: ").append(toIndentedString(descriptionI18n)).append("\n");
    sb.append("    oneShotChargeTemplateType: ").append(toIndentedString(oneShotChargeTemplateType)).append("\n");
    sb.append("    immediateInvoicing: ").append(toIndentedString(immediateInvoicing)).append("\n");
    sb.append("    filterExpression: ").append(toIndentedString(filterExpression)).append("\n");
    sb.append("    chargeType: ").append(toIndentedString(chargeType)).append("\n");
    sb.append("    descriptionI18nNullSafe: ").append(toIndentedString(descriptionI18nNullSafe)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    parentCFEntities: ").append(toIndentedString(parentCFEntities)).append("\n");
    sb.append("    cfValuesNullSafe: ").append(toIndentedString(cfValuesNullSafe)).append("\n");
    sb.append("    cfValuesAsValues: ").append(toIndentedString(cfValuesAsValues)).append("\n");
    sb.append("    cfAccumulatedValuesNullSafe: ").append(toIndentedString(cfAccumulatedValuesNullSafe)).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    ");
  }

}

