/*
 * 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.DunningLOT;
import org.threeten.bp.OffsetDateTime;

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

  public static final String SERIALIZED_NAME_EXECUTION_DATE = "executionDate";
  @SerializedName(SERIALIZED_NAME_EXECUTION_DATE)
  private OffsetDateTime executionDate;

  public static final String SERIALIZED_NAME_LINES_READ = "linesRead";
  @SerializedName(SERIALIZED_NAME_LINES_READ)
  private Integer linesRead;

  public static final String SERIALIZED_NAME_LINES_INSERTED = "linesInserted";
  @SerializedName(SERIALIZED_NAME_LINES_INSERTED)
  private Integer linesInserted;

  public static final String SERIALIZED_NAME_LINES_REJECTED = "linesRejected";
  @SerializedName(SERIALIZED_NAME_LINES_REJECTED)
  private Integer linesRejected;

  public static final String SERIALIZED_NAME_DUNNING_LOTS = "dunningLots";
  @SerializedName(SERIALIZED_NAME_DUNNING_LOTS)
  private List<DunningLOT> dunningLots = null;

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


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

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

  public String getType() {
    return type;
  }



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


  public DunningHistory executionDate(OffsetDateTime executionDate) {
    
    this.executionDate = executionDate;
    return this;
  }

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

  public OffsetDateTime getExecutionDate() {
    return executionDate;
  }



  public void setExecutionDate(OffsetDateTime executionDate) {
    this.executionDate = executionDate;
  }


  public DunningHistory linesRead(Integer linesRead) {
    
    this.linesRead = linesRead;
    return this;
  }

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

  public Integer getLinesRead() {
    return linesRead;
  }



  public void setLinesRead(Integer linesRead) {
    this.linesRead = linesRead;
  }


  public DunningHistory linesInserted(Integer linesInserted) {
    
    this.linesInserted = linesInserted;
    return this;
  }

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

  public Integer getLinesInserted() {
    return linesInserted;
  }



  public void setLinesInserted(Integer linesInserted) {
    this.linesInserted = linesInserted;
  }


  public DunningHistory linesRejected(Integer linesRejected) {
    
    this.linesRejected = linesRejected;
    return this;
  }

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

  public Integer getLinesRejected() {
    return linesRejected;
  }



  public void setLinesRejected(Integer linesRejected) {
    this.linesRejected = linesRejected;
  }


  public DunningHistory dunningLots(List<DunningLOT> dunningLots) {
    
    this.dunningLots = dunningLots;
    return this;
  }

  public DunningHistory addDunningLotsItem(DunningLOT dunningLotsItem) {
    if (this.dunningLots == null) {
      this.dunningLots = new ArrayList<DunningLOT>();
    }
    this.dunningLots.add(dunningLotsItem);
    return this;
  }

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

  public List<DunningLOT> getDunningLots() {
    return dunningLots;
  }



  public void setDunningLots(List<DunningLOT> dunningLots) {
    this.dunningLots = dunningLots;
  }


  public DunningHistory _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;
    }
    DunningHistory dunningHistory = (DunningHistory) o;
    return Objects.equals(this.id, dunningHistory.id) &&
        Objects.equals(this.version, dunningHistory.version) &&
        Objects.equals(this.type, dunningHistory.type) &&
        Objects.equals(this.executionDate, dunningHistory.executionDate) &&
        Objects.equals(this.linesRead, dunningHistory.linesRead) &&
        Objects.equals(this.linesInserted, dunningHistory.linesInserted) &&
        Objects.equals(this.linesRejected, dunningHistory.linesRejected) &&
        Objects.equals(this.dunningLots, dunningHistory.dunningLots) &&
        Objects.equals(this._transient, dunningHistory._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, type, executionDate, linesRead, linesInserted, linesRejected, dunningLots, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DunningHistory {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    executionDate: ").append(toIndentedString(executionDate)).append("\n");
    sb.append("    linesRead: ").append(toIndentedString(linesRead)).append("\n");
    sb.append("    linesInserted: ").append(toIndentedString(linesInserted)).append("\n");
    sb.append("    linesRejected: ").append(toIndentedString(linesRejected)).append("\n");
    sb.append("    dunningLots: ").append(toIndentedString(dunningLots)).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    ");
  }

}

