/*
 * 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.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BusinessEntity;
import org.threeten.bp.OffsetDateTime;

/**
 * SubscriptionRenewal
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class SubscriptionRenewal {
  public static final String SERIALIZED_NAME_AUTO_RENEW = "autoRenew";
  @SerializedName(SERIALIZED_NAME_AUTO_RENEW)
  private Boolean autoRenew;

  public static final String SERIALIZED_NAME_AUTO_RENEW_DATE = "autoRenewDate";
  @SerializedName(SERIALIZED_NAME_AUTO_RENEW_DATE)
  private OffsetDateTime autoRenewDate;

  public static final String SERIALIZED_NAME_DAYS_NOTIFY_RENEWAL = "daysNotifyRenewal";
  @SerializedName(SERIALIZED_NAME_DAYS_NOTIFY_RENEWAL)
  private Integer daysNotifyRenewal;

  /**
   * Gets or Sets endOfTermAction
   */
  @JsonAdapter(EndOfTermActionEnum.Adapter.class)
  public enum EndOfTermActionEnum {
    SUSPEND("SUSPEND"),
    
    TERMINATE("TERMINATE");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_END_OF_TERM_ACTION = "endOfTermAction";
  @SerializedName(SERIALIZED_NAME_END_OF_TERM_ACTION)
  private EndOfTermActionEnum endOfTermAction;

  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_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_APPLY_AGREEMENT = "applyAgreement";
  @SerializedName(SERIALIZED_NAME_APPLY_AGREEMENT)
  private Boolean applyAgreement;

  public static final String SERIALIZED_NAME_APPLY_REIMBURSMENT = "applyReimbursment";
  @SerializedName(SERIALIZED_NAME_APPLY_REIMBURSMENT)
  private Boolean applyReimbursment;

  public static final String SERIALIZED_NAME_APPLY_TERMINATION_CHARGES = "applyTerminationCharges";
  @SerializedName(SERIALIZED_NAME_APPLY_TERMINATION_CHARGES)
  private Boolean applyTerminationCharges;

  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;

  /**
   * Gets or Sets initialyActiveForUnit
   */
  @JsonAdapter(InitialyActiveForUnitEnum.Adapter.class)
  public enum InitialyActiveForUnitEnum {
    MONTH("MONTH"),
    
    DAY("DAY");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_INITIALY_ACTIVE_FOR_UNIT = "initialyActiveForUnit";
  @SerializedName(SERIALIZED_NAME_INITIALY_ACTIVE_FOR_UNIT)
  private InitialyActiveForUnitEnum initialyActiveForUnit;

  public static final String SERIALIZED_NAME_INITIALY_ACTIVE_FOR = "initialyActiveFor";
  @SerializedName(SERIALIZED_NAME_INITIALY_ACTIVE_FOR)
  private Integer initialyActiveFor;

  public static final String SERIALIZED_NAME_EXTEND_AGREEMENT_PERIOD_TO_SUBSCRIBED_TILL_DATE = "extendAgreementPeriodToSubscribedTillDate";
  @SerializedName(SERIALIZED_NAME_EXTEND_AGREEMENT_PERIOD_TO_SUBSCRIBED_TILL_DATE)
  private Boolean extendAgreementPeriodToSubscribedTillDate;

  /**
   * Gets or Sets renewForUnit
   */
  @JsonAdapter(RenewForUnitEnum.Adapter.class)
  public enum RenewForUnitEnum {
    MONTH("MONTH"),
    
    DAY("DAY");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_RENEW_FOR_UNIT = "renewForUnit";
  @SerializedName(SERIALIZED_NAME_RENEW_FOR_UNIT)
  private RenewForUnitEnum renewForUnit;

  public static final String SERIALIZED_NAME_RENEW_FOR = "renewFor";
  @SerializedName(SERIALIZED_NAME_RENEW_FOR)
  private Integer renewFor;

  /**
   * Gets or Sets initialTermType
   */
  @JsonAdapter(InitialTermTypeEnum.Adapter.class)
  public enum InitialTermTypeEnum {
    RECURRING("RECURRING"),
    
    FIXED("FIXED");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_INITIAL_TERM_TYPE = "initialTermType";
  @SerializedName(SERIALIZED_NAME_INITIAL_TERM_TYPE)
  private InitialTermTypeEnum initialTermType;


  public SubscriptionRenewal autoRenew(Boolean autoRenew) {
    
    this.autoRenew = autoRenew;
    return this;
  }

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

  public Boolean getAutoRenew() {
    return autoRenew;
  }



  public void setAutoRenew(Boolean autoRenew) {
    this.autoRenew = autoRenew;
  }


  public SubscriptionRenewal autoRenewDate(OffsetDateTime autoRenewDate) {
    
    this.autoRenewDate = autoRenewDate;
    return this;
  }

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

  public OffsetDateTime getAutoRenewDate() {
    return autoRenewDate;
  }



  public void setAutoRenewDate(OffsetDateTime autoRenewDate) {
    this.autoRenewDate = autoRenewDate;
  }


  public SubscriptionRenewal daysNotifyRenewal(Integer daysNotifyRenewal) {
    
    this.daysNotifyRenewal = daysNotifyRenewal;
    return this;
  }

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

  public Integer getDaysNotifyRenewal() {
    return daysNotifyRenewal;
  }



  public void setDaysNotifyRenewal(Integer daysNotifyRenewal) {
    this.daysNotifyRenewal = daysNotifyRenewal;
  }


  public SubscriptionRenewal endOfTermAction(EndOfTermActionEnum endOfTermAction) {
    
    this.endOfTermAction = endOfTermAction;
    return this;
  }

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

  public EndOfTermActionEnum getEndOfTermAction() {
    return endOfTermAction;
  }



  public void setEndOfTermAction(EndOfTermActionEnum endOfTermAction) {
    this.endOfTermAction = endOfTermAction;
  }


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

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

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

  public String getCode() {
    return code;
  }



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


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

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

  public Boolean getApplyReimbursment() {
    return applyReimbursment;
  }



  public void setApplyReimbursment(Boolean applyReimbursment) {
    this.applyReimbursment = applyReimbursment;
  }


  public SubscriptionRenewal applyTerminationCharges(Boolean applyTerminationCharges) {
    
    this.applyTerminationCharges = applyTerminationCharges;
    return this;
  }

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

  public Boolean getApplyTerminationCharges() {
    return applyTerminationCharges;
  }



  public void setApplyTerminationCharges(Boolean applyTerminationCharges) {
    this.applyTerminationCharges = applyTerminationCharges;
  }


  public SubscriptionRenewal 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 SubscriptionRenewal 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 SubscriptionRenewal 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 SubscriptionRenewal 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 SubscriptionRenewal 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 SubscriptionRenewal 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 SubscriptionRenewal _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;
  }


  public SubscriptionRenewal initialyActiveForUnit(InitialyActiveForUnitEnum initialyActiveForUnit) {
    
    this.initialyActiveForUnit = initialyActiveForUnit;
    return this;
  }

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

  public InitialyActiveForUnitEnum getInitialyActiveForUnit() {
    return initialyActiveForUnit;
  }



  public void setInitialyActiveForUnit(InitialyActiveForUnitEnum initialyActiveForUnit) {
    this.initialyActiveForUnit = initialyActiveForUnit;
  }


  public SubscriptionRenewal initialyActiveFor(Integer initialyActiveFor) {
    
    this.initialyActiveFor = initialyActiveFor;
    return this;
  }

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

  public Integer getInitialyActiveFor() {
    return initialyActiveFor;
  }



  public void setInitialyActiveFor(Integer initialyActiveFor) {
    this.initialyActiveFor = initialyActiveFor;
  }


  public SubscriptionRenewal extendAgreementPeriodToSubscribedTillDate(Boolean extendAgreementPeriodToSubscribedTillDate) {
    
    this.extendAgreementPeriodToSubscribedTillDate = extendAgreementPeriodToSubscribedTillDate;
    return this;
  }

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

  public Boolean getExtendAgreementPeriodToSubscribedTillDate() {
    return extendAgreementPeriodToSubscribedTillDate;
  }



  public void setExtendAgreementPeriodToSubscribedTillDate(Boolean extendAgreementPeriodToSubscribedTillDate) {
    this.extendAgreementPeriodToSubscribedTillDate = extendAgreementPeriodToSubscribedTillDate;
  }


  public SubscriptionRenewal renewForUnit(RenewForUnitEnum renewForUnit) {
    
    this.renewForUnit = renewForUnit;
    return this;
  }

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

  public RenewForUnitEnum getRenewForUnit() {
    return renewForUnit;
  }



  public void setRenewForUnit(RenewForUnitEnum renewForUnit) {
    this.renewForUnit = renewForUnit;
  }


  public SubscriptionRenewal renewFor(Integer renewFor) {
    
    this.renewFor = renewFor;
    return this;
  }

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

  public Integer getRenewFor() {
    return renewFor;
  }



  public void setRenewFor(Integer renewFor) {
    this.renewFor = renewFor;
  }


  public SubscriptionRenewal initialTermType(InitialTermTypeEnum initialTermType) {
    
    this.initialTermType = initialTermType;
    return this;
  }

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

  public InitialTermTypeEnum getInitialTermType() {
    return initialTermType;
  }



  public void setInitialTermType(InitialTermTypeEnum initialTermType) {
    this.initialTermType = initialTermType;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubscriptionRenewal subscriptionRenewal = (SubscriptionRenewal) o;
    return Objects.equals(this.autoRenew, subscriptionRenewal.autoRenew) &&
        Objects.equals(this.autoRenewDate, subscriptionRenewal.autoRenewDate) &&
        Objects.equals(this.daysNotifyRenewal, subscriptionRenewal.daysNotifyRenewal) &&
        Objects.equals(this.endOfTermAction, subscriptionRenewal.endOfTermAction) &&
        Objects.equals(this.id, subscriptionRenewal.id) &&
        Objects.equals(this.version, subscriptionRenewal.version) &&
        Objects.equals(this.historized, subscriptionRenewal.historized) &&
        Objects.equals(this.notified, subscriptionRenewal.notified) &&
        Objects.equals(this.auditableFields, subscriptionRenewal.auditableFields) &&
        Objects.equals(this.code, subscriptionRenewal.code) &&
        Objects.equals(this.description, subscriptionRenewal.description) &&
        Objects.equals(this.applyAgreement, subscriptionRenewal.applyAgreement) &&
        Objects.equals(this.applyReimbursment, subscriptionRenewal.applyReimbursment) &&
        Objects.equals(this.applyTerminationCharges, subscriptionRenewal.applyTerminationCharges) &&
        Objects.equals(this.descriptionOrCode, subscriptionRenewal.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, subscriptionRenewal.descriptionAndCode) &&
        Objects.equals(this.referenceCode, subscriptionRenewal.referenceCode) &&
        Objects.equals(this.referenceDescription, subscriptionRenewal.referenceDescription) &&
        Objects.equals(this.codeChanged, subscriptionRenewal.codeChanged) &&
        Objects.equals(this.parentEntity, subscriptionRenewal.parentEntity) &&
        Objects.equals(this._transient, subscriptionRenewal._transient) &&
        Objects.equals(this.initialyActiveForUnit, subscriptionRenewal.initialyActiveForUnit) &&
        Objects.equals(this.initialyActiveFor, subscriptionRenewal.initialyActiveFor) &&
        Objects.equals(this.extendAgreementPeriodToSubscribedTillDate, subscriptionRenewal.extendAgreementPeriodToSubscribedTillDate) &&
        Objects.equals(this.renewForUnit, subscriptionRenewal.renewForUnit) &&
        Objects.equals(this.renewFor, subscriptionRenewal.renewFor) &&
        Objects.equals(this.initialTermType, subscriptionRenewal.initialTermType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(autoRenew, autoRenewDate, daysNotifyRenewal, endOfTermAction, id, version, historized, notified, auditableFields, code, description, applyAgreement, applyReimbursment, applyTerminationCharges, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient, initialyActiveForUnit, initialyActiveFor, extendAgreementPeriodToSubscribedTillDate, renewForUnit, renewFor, initialTermType);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubscriptionRenewal {\n");
    sb.append("    autoRenew: ").append(toIndentedString(autoRenew)).append("\n");
    sb.append("    autoRenewDate: ").append(toIndentedString(autoRenewDate)).append("\n");
    sb.append("    daysNotifyRenewal: ").append(toIndentedString(daysNotifyRenewal)).append("\n");
    sb.append("    endOfTermAction: ").append(toIndentedString(endOfTermAction)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).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("    applyAgreement: ").append(toIndentedString(applyAgreement)).append("\n");
    sb.append("    applyReimbursment: ").append(toIndentedString(applyReimbursment)).append("\n");
    sb.append("    applyTerminationCharges: ").append(toIndentedString(applyTerminationCharges)).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("    initialyActiveForUnit: ").append(toIndentedString(initialyActiveForUnit)).append("\n");
    sb.append("    initialyActiveFor: ").append(toIndentedString(initialyActiveFor)).append("\n");
    sb.append("    extendAgreementPeriodToSubscribedTillDate: ").append(toIndentedString(extendAgreementPeriodToSubscribedTillDate)).append("\n");
    sb.append("    renewForUnit: ").append(toIndentedString(renewForUnit)).append("\n");
    sb.append("    renewFor: ").append(toIndentedString(renewFor)).append("\n");
    sb.append("    initialTermType: ").append(toIndentedString(initialTermType)).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    ");
  }

}

