/*
 * 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.Calendar;
import org.openapitools.client.model.CustomFieldValues;
import org.openapitools.client.model.ICustomFieldEntity;
import org.openapitools.client.model.InvoiceSubCategory;
import org.openapitools.client.model.InvoiceType;
import org.openapitools.client.model.PaymentScheduleInstance;
import org.openapitools.client.model.ScriptInstance;
import org.openapitools.client.model.ServiceTemplate;

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

  public static final String SERIALIZED_NAME_PAYMENT_LABEL = "paymentLabel";
  @SerializedName(SERIALIZED_NAME_PAYMENT_LABEL)
  private String paymentLabel;

  public static final String SERIALIZED_NAME_PAYMENT_DAY_IN_MONTH = "paymentDayInMonth";
  @SerializedName(SERIALIZED_NAME_PAYMENT_DAY_IN_MONTH)
  private Integer paymentDayInMonth;

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

  public static final String SERIALIZED_NAME_CALENDAR = "calendar";
  @SerializedName(SERIALIZED_NAME_CALENDAR)
  private Calendar calendar;

  public static final String SERIALIZED_NAME_SERVICE_TEMPLATE = "serviceTemplate";
  @SerializedName(SERIALIZED_NAME_SERVICE_TEMPLATE)
  private ServiceTemplate serviceTemplate;

  public static final String SERIALIZED_NAME_ADVANCE_PAYMENT_INVOICE_TYPE = "advancePaymentInvoiceType";
  @SerializedName(SERIALIZED_NAME_ADVANCE_PAYMENT_INVOICE_TYPE)
  private InvoiceType advancePaymentInvoiceType;

  public static final String SERIALIZED_NAME_GENERATE_ADVANCE_PAYMENT_INVOICE = "generateAdvancePaymentInvoice";
  @SerializedName(SERIALIZED_NAME_GENERATE_ADVANCE_PAYMENT_INVOICE)
  private Boolean generateAdvancePaymentInvoice;

  public static final String SERIALIZED_NAME_ADVANCE_PAYMENT_INVOICE_SUB_CATEGORY = "advancePaymentInvoiceSubCategory";
  @SerializedName(SERIALIZED_NAME_ADVANCE_PAYMENT_INVOICE_SUB_CATEGORY)
  private InvoiceSubCategory advancePaymentInvoiceSubCategory;

  public static final String SERIALIZED_NAME_DO_PAYMENT = "doPayment";
  @SerializedName(SERIALIZED_NAME_DO_PAYMENT)
  private Boolean doPayment;

  public static final String SERIALIZED_NAME_PAYMENT_SCHEDULE_INSTANCES = "paymentScheduleInstances";
  @SerializedName(SERIALIZED_NAME_PAYMENT_SCHEDULE_INSTANCES)
  private List<PaymentScheduleInstance> paymentScheduleInstances = null;

  public static final String SERIALIZED_NAME_APPLY_AGREEMENT = "applyAgreement";
  @SerializedName(SERIALIZED_NAME_APPLY_AGREEMENT)
  private Boolean applyAgreement;

  public static final String SERIALIZED_NAME_SCRIPT_INSTANCE = "scriptInstance";
  @SerializedName(SERIALIZED_NAME_SCRIPT_INSTANCE)
  private ScriptInstance scriptInstance;

  public static final String SERIALIZED_NAME_AMOUNT_EL = "amountEl";
  @SerializedName(SERIALIZED_NAME_AMOUNT_EL)
  private String amountEl;

  public static final String SERIALIZED_NAME_FILTER_EL = "filterEl";
  @SerializedName(SERIALIZED_NAME_FILTER_EL)
  private String filterEl;

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

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

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

  public String getPaymentLabel() {
    return paymentLabel;
  }



  public void setPaymentLabel(String paymentLabel) {
    this.paymentLabel = paymentLabel;
  }


  public PaymentScheduleTemplate paymentDayInMonth(Integer paymentDayInMonth) {
    
    this.paymentDayInMonth = paymentDayInMonth;
    return this;
  }

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

  public Integer getPaymentDayInMonth() {
    return paymentDayInMonth;
  }



  public void setPaymentDayInMonth(Integer paymentDayInMonth) {
    this.paymentDayInMonth = paymentDayInMonth;
  }


  public PaymentScheduleTemplate amount(BigDecimal amount) {
    
    this.amount = amount;
    return this;
  }

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

  public BigDecimal getAmount() {
    return amount;
  }



  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }


  public PaymentScheduleTemplate calendar(Calendar calendar) {
    
    this.calendar = calendar;
    return this;
  }

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

  public Calendar getCalendar() {
    return calendar;
  }



  public void setCalendar(Calendar calendar) {
    this.calendar = calendar;
  }


  public PaymentScheduleTemplate serviceTemplate(ServiceTemplate serviceTemplate) {
    
    this.serviceTemplate = serviceTemplate;
    return this;
  }

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

  public ServiceTemplate getServiceTemplate() {
    return serviceTemplate;
  }



  public void setServiceTemplate(ServiceTemplate serviceTemplate) {
    this.serviceTemplate = serviceTemplate;
  }


  public PaymentScheduleTemplate advancePaymentInvoiceType(InvoiceType advancePaymentInvoiceType) {
    
    this.advancePaymentInvoiceType = advancePaymentInvoiceType;
    return this;
  }

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

  public InvoiceType getAdvancePaymentInvoiceType() {
    return advancePaymentInvoiceType;
  }



  public void setAdvancePaymentInvoiceType(InvoiceType advancePaymentInvoiceType) {
    this.advancePaymentInvoiceType = advancePaymentInvoiceType;
  }


  public PaymentScheduleTemplate generateAdvancePaymentInvoice(Boolean generateAdvancePaymentInvoice) {
    
    this.generateAdvancePaymentInvoice = generateAdvancePaymentInvoice;
    return this;
  }

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

  public Boolean getGenerateAdvancePaymentInvoice() {
    return generateAdvancePaymentInvoice;
  }



  public void setGenerateAdvancePaymentInvoice(Boolean generateAdvancePaymentInvoice) {
    this.generateAdvancePaymentInvoice = generateAdvancePaymentInvoice;
  }


  public PaymentScheduleTemplate advancePaymentInvoiceSubCategory(InvoiceSubCategory advancePaymentInvoiceSubCategory) {
    
    this.advancePaymentInvoiceSubCategory = advancePaymentInvoiceSubCategory;
    return this;
  }

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

  public InvoiceSubCategory getAdvancePaymentInvoiceSubCategory() {
    return advancePaymentInvoiceSubCategory;
  }



  public void setAdvancePaymentInvoiceSubCategory(InvoiceSubCategory advancePaymentInvoiceSubCategory) {
    this.advancePaymentInvoiceSubCategory = advancePaymentInvoiceSubCategory;
  }


  public PaymentScheduleTemplate doPayment(Boolean doPayment) {
    
    this.doPayment = doPayment;
    return this;
  }

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

  public Boolean getDoPayment() {
    return doPayment;
  }



  public void setDoPayment(Boolean doPayment) {
    this.doPayment = doPayment;
  }


  public PaymentScheduleTemplate paymentScheduleInstances(List<PaymentScheduleInstance> paymentScheduleInstances) {
    
    this.paymentScheduleInstances = paymentScheduleInstances;
    return this;
  }

  public PaymentScheduleTemplate addPaymentScheduleInstancesItem(PaymentScheduleInstance paymentScheduleInstancesItem) {
    if (this.paymentScheduleInstances == null) {
      this.paymentScheduleInstances = new ArrayList<PaymentScheduleInstance>();
    }
    this.paymentScheduleInstances.add(paymentScheduleInstancesItem);
    return this;
  }

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

  public List<PaymentScheduleInstance> getPaymentScheduleInstances() {
    return paymentScheduleInstances;
  }



  public void setPaymentScheduleInstances(List<PaymentScheduleInstance> paymentScheduleInstances) {
    this.paymentScheduleInstances = paymentScheduleInstances;
  }


  public PaymentScheduleTemplate applyAgreement(Boolean applyAgreement) {
    
    this.applyAgreement = applyAgreement;
    return this;
  }

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

  public Boolean getApplyAgreement() {
    return applyAgreement;
  }



  public void setApplyAgreement(Boolean applyAgreement) {
    this.applyAgreement = applyAgreement;
  }


  public PaymentScheduleTemplate scriptInstance(ScriptInstance scriptInstance) {
    
    this.scriptInstance = scriptInstance;
    return this;
  }

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

  public ScriptInstance getScriptInstance() {
    return scriptInstance;
  }



  public void setScriptInstance(ScriptInstance scriptInstance) {
    this.scriptInstance = scriptInstance;
  }


  public PaymentScheduleTemplate amountEl(String amountEl) {
    
    this.amountEl = amountEl;
    return this;
  }

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

  public String getAmountEl() {
    return amountEl;
  }



  public void setAmountEl(String amountEl) {
    this.amountEl = amountEl;
  }


  public PaymentScheduleTemplate filterEl(String filterEl) {
    
    this.filterEl = filterEl;
    return this;
  }

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

  public String getFilterEl() {
    return filterEl;
  }



  public void setFilterEl(String filterEl) {
    this.filterEl = filterEl;
  }


  public PaymentScheduleTemplate 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 PaymentScheduleTemplate parentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    
    this.parentCFEntities = parentCFEntities;
    return this;
  }

  public PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate cfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    
    this.cfValuesAsValues = cfValuesAsValues;
    return this;
  }

  public PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate 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 PaymentScheduleTemplate _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;
    }
    PaymentScheduleTemplate paymentScheduleTemplate = (PaymentScheduleTemplate) o;
    return Objects.equals(this.id, paymentScheduleTemplate.id) &&
        Objects.equals(this.version, paymentScheduleTemplate.version) &&
        Objects.equals(this.auditable, paymentScheduleTemplate.auditable) &&
        Objects.equals(this.historized, paymentScheduleTemplate.historized) &&
        Objects.equals(this.notified, paymentScheduleTemplate.notified) &&
        Objects.equals(this.auditableFields, paymentScheduleTemplate.auditableFields) &&
        Objects.equals(this.code, paymentScheduleTemplate.code) &&
        Objects.equals(this.description, paymentScheduleTemplate.description) &&
        Objects.equals(this.appendGeneratedCode, paymentScheduleTemplate.appendGeneratedCode) &&
        Objects.equals(this.uuid, paymentScheduleTemplate.uuid) &&
        Objects.equals(this.cfValues, paymentScheduleTemplate.cfValues) &&
        Objects.equals(this.cfAccumulatedValues, paymentScheduleTemplate.cfAccumulatedValues) &&
        Objects.equals(this.disabled, paymentScheduleTemplate.disabled) &&
        Objects.equals(this.paymentLabel, paymentScheduleTemplate.paymentLabel) &&
        Objects.equals(this.paymentDayInMonth, paymentScheduleTemplate.paymentDayInMonth) &&
        Objects.equals(this.amount, paymentScheduleTemplate.amount) &&
        Objects.equals(this.calendar, paymentScheduleTemplate.calendar) &&
        Objects.equals(this.serviceTemplate, paymentScheduleTemplate.serviceTemplate) &&
        Objects.equals(this.advancePaymentInvoiceType, paymentScheduleTemplate.advancePaymentInvoiceType) &&
        Objects.equals(this.generateAdvancePaymentInvoice, paymentScheduleTemplate.generateAdvancePaymentInvoice) &&
        Objects.equals(this.advancePaymentInvoiceSubCategory, paymentScheduleTemplate.advancePaymentInvoiceSubCategory) &&
        Objects.equals(this.doPayment, paymentScheduleTemplate.doPayment) &&
        Objects.equals(this.paymentScheduleInstances, paymentScheduleTemplate.paymentScheduleInstances) &&
        Objects.equals(this.applyAgreement, paymentScheduleTemplate.applyAgreement) &&
        Objects.equals(this.scriptInstance, paymentScheduleTemplate.scriptInstance) &&
        Objects.equals(this.amountEl, paymentScheduleTemplate.amountEl) &&
        Objects.equals(this.filterEl, paymentScheduleTemplate.filterEl) &&
        Objects.equals(this.active, paymentScheduleTemplate.active) &&
        Objects.equals(this.parentCFEntities, paymentScheduleTemplate.parentCFEntities) &&
        Objects.equals(this.cfValuesNullSafe, paymentScheduleTemplate.cfValuesNullSafe) &&
        Objects.equals(this.cfValuesAsValues, paymentScheduleTemplate.cfValuesAsValues) &&
        Objects.equals(this.cfAccumulatedValuesNullSafe, paymentScheduleTemplate.cfAccumulatedValuesNullSafe) &&
        Objects.equals(this.descriptionOrCode, paymentScheduleTemplate.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, paymentScheduleTemplate.descriptionAndCode) &&
        Objects.equals(this.referenceCode, paymentScheduleTemplate.referenceCode) &&
        Objects.equals(this.referenceDescription, paymentScheduleTemplate.referenceDescription) &&
        Objects.equals(this.codeChanged, paymentScheduleTemplate.codeChanged) &&
        Objects.equals(this.parentEntity, paymentScheduleTemplate.parentEntity) &&
        Objects.equals(this._transient, paymentScheduleTemplate._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, code, description, appendGeneratedCode, uuid, cfValues, cfAccumulatedValues, disabled, paymentLabel, paymentDayInMonth, amount, calendar, serviceTemplate, advancePaymentInvoiceType, generateAdvancePaymentInvoice, advancePaymentInvoiceSubCategory, doPayment, paymentScheduleInstances, applyAgreement, scriptInstance, amountEl, filterEl, active, parentCFEntities, cfValuesNullSafe, cfValuesAsValues, cfAccumulatedValuesNullSafe, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentScheduleTemplate {\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("    paymentLabel: ").append(toIndentedString(paymentLabel)).append("\n");
    sb.append("    paymentDayInMonth: ").append(toIndentedString(paymentDayInMonth)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    calendar: ").append(toIndentedString(calendar)).append("\n");
    sb.append("    serviceTemplate: ").append(toIndentedString(serviceTemplate)).append("\n");
    sb.append("    advancePaymentInvoiceType: ").append(toIndentedString(advancePaymentInvoiceType)).append("\n");
    sb.append("    generateAdvancePaymentInvoice: ").append(toIndentedString(generateAdvancePaymentInvoice)).append("\n");
    sb.append("    advancePaymentInvoiceSubCategory: ").append(toIndentedString(advancePaymentInvoiceSubCategory)).append("\n");
    sb.append("    doPayment: ").append(toIndentedString(doPayment)).append("\n");
    sb.append("    paymentScheduleInstances: ").append(toIndentedString(paymentScheduleInstances)).append("\n");
    sb.append("    applyAgreement: ").append(toIndentedString(applyAgreement)).append("\n");
    sb.append("    scriptInstance: ").append(toIndentedString(scriptInstance)).append("\n");
    sb.append("    amountEl: ").append(toIndentedString(amountEl)).append("\n");
    sb.append("    filterEl: ").append(toIndentedString(filterEl)).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    ");
  }

}

