/*
 * 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.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.Invoice;
import org.openapitools.client.model.PaymentScheduleInstance;
import org.openapitools.client.model.RecordedInvoice;
import org.threeten.bp.OffsetDateTime;

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

  public static final String SERIALIZED_NAME_PAYMENT_SCHEDULE_INSTANCE = "paymentScheduleInstance";
  @SerializedName(SERIALIZED_NAME_PAYMENT_SCHEDULE_INSTANCE)
  private PaymentScheduleInstance paymentScheduleInstance;

  public static final String SERIALIZED_NAME_DUE_DATE = "dueDate";
  @SerializedName(SERIALIZED_NAME_DUE_DATE)
  private OffsetDateTime dueDate;

  public static final String SERIALIZED_NAME_REQUEST_PAYMENT_DATE = "requestPaymentDate";
  @SerializedName(SERIALIZED_NAME_REQUEST_PAYMENT_DATE)
  private OffsetDateTime requestPaymentDate;

  public static final String SERIALIZED_NAME_RECORDED_INVOICE = "recordedInvoice";
  @SerializedName(SERIALIZED_NAME_RECORDED_INVOICE)
  private RecordedInvoice recordedInvoice;

  public static final String SERIALIZED_NAME_INVOICE = "invoice";
  @SerializedName(SERIALIZED_NAME_INVOICE)
  private Invoice invoice;

  public static final String SERIALIZED_NAME_LAST = "last";
  @SerializedName(SERIALIZED_NAME_LAST)
  private Boolean last;

  public static final String SERIALIZED_NAME_PAID = "paid";
  @SerializedName(SERIALIZED_NAME_PAID)
  private Boolean paid;

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

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


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

  public PaymentScheduleInstanceItem 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 PaymentScheduleInstanceItem 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 PaymentScheduleInstanceItem paymentScheduleInstance(PaymentScheduleInstance paymentScheduleInstance) {
    
    this.paymentScheduleInstance = paymentScheduleInstance;
    return this;
  }

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

  public PaymentScheduleInstance getPaymentScheduleInstance() {
    return paymentScheduleInstance;
  }



  public void setPaymentScheduleInstance(PaymentScheduleInstance paymentScheduleInstance) {
    this.paymentScheduleInstance = paymentScheduleInstance;
  }


  public PaymentScheduleInstanceItem dueDate(OffsetDateTime dueDate) {
    
    this.dueDate = dueDate;
    return this;
  }

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

  public OffsetDateTime getDueDate() {
    return dueDate;
  }



  public void setDueDate(OffsetDateTime dueDate) {
    this.dueDate = dueDate;
  }


  public PaymentScheduleInstanceItem requestPaymentDate(OffsetDateTime requestPaymentDate) {
    
    this.requestPaymentDate = requestPaymentDate;
    return this;
  }

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

  public OffsetDateTime getRequestPaymentDate() {
    return requestPaymentDate;
  }



  public void setRequestPaymentDate(OffsetDateTime requestPaymentDate) {
    this.requestPaymentDate = requestPaymentDate;
  }


  public PaymentScheduleInstanceItem recordedInvoice(RecordedInvoice recordedInvoice) {
    
    this.recordedInvoice = recordedInvoice;
    return this;
  }

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

  public RecordedInvoice getRecordedInvoice() {
    return recordedInvoice;
  }



  public void setRecordedInvoice(RecordedInvoice recordedInvoice) {
    this.recordedInvoice = recordedInvoice;
  }


  public PaymentScheduleInstanceItem invoice(Invoice invoice) {
    
    this.invoice = invoice;
    return this;
  }

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

  public Invoice getInvoice() {
    return invoice;
  }



  public void setInvoice(Invoice invoice) {
    this.invoice = invoice;
  }


  public PaymentScheduleInstanceItem last(Boolean last) {
    
    this.last = last;
    return this;
  }

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

  public Boolean getLast() {
    return last;
  }



  public void setLast(Boolean last) {
    this.last = last;
  }


  public PaymentScheduleInstanceItem paid(Boolean paid) {
    
    this.paid = paid;
    return this;
  }

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

  public Boolean getPaid() {
    return paid;
  }



  public void setPaid(Boolean paid) {
    this.paid = paid;
  }


  public PaymentScheduleInstanceItem 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 PaymentScheduleInstanceItem _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;
    }
    PaymentScheduleInstanceItem paymentScheduleInstanceItem = (PaymentScheduleInstanceItem) o;
    return Objects.equals(this.id, paymentScheduleInstanceItem.id) &&
        Objects.equals(this.version, paymentScheduleInstanceItem.version) &&
        Objects.equals(this.auditable, paymentScheduleInstanceItem.auditable) &&
        Objects.equals(this.historized, paymentScheduleInstanceItem.historized) &&
        Objects.equals(this.notified, paymentScheduleInstanceItem.notified) &&
        Objects.equals(this.auditableFields, paymentScheduleInstanceItem.auditableFields) &&
        Objects.equals(this.disabled, paymentScheduleInstanceItem.disabled) &&
        Objects.equals(this.paymentScheduleInstance, paymentScheduleInstanceItem.paymentScheduleInstance) &&
        Objects.equals(this.dueDate, paymentScheduleInstanceItem.dueDate) &&
        Objects.equals(this.requestPaymentDate, paymentScheduleInstanceItem.requestPaymentDate) &&
        Objects.equals(this.recordedInvoice, paymentScheduleInstanceItem.recordedInvoice) &&
        Objects.equals(this.invoice, paymentScheduleInstanceItem.invoice) &&
        Objects.equals(this.last, paymentScheduleInstanceItem.last) &&
        Objects.equals(this.paid, paymentScheduleInstanceItem.paid) &&
        Objects.equals(this.active, paymentScheduleInstanceItem.active) &&
        Objects.equals(this._transient, paymentScheduleInstanceItem._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, disabled, paymentScheduleInstance, dueDate, requestPaymentDate, recordedInvoice, invoice, last, paid, active, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentScheduleInstanceItem {\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("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    paymentScheduleInstance: ").append(toIndentedString(paymentScheduleInstance)).append("\n");
    sb.append("    dueDate: ").append(toIndentedString(dueDate)).append("\n");
    sb.append("    requestPaymentDate: ").append(toIndentedString(requestPaymentDate)).append("\n");
    sb.append("    recordedInvoice: ").append(toIndentedString(recordedInvoice)).append("\n");
    sb.append("    invoice: ").append(toIndentedString(invoice)).append("\n");
    sb.append("    last: ").append(toIndentedString(last)).append("\n");
    sb.append("    paid: ").append(toIndentedString(paid)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).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    ");
  }

}

