/*
 * 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.List;
import org.openapitools.client.model.AccountOperation;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.AutomatedPayment;
import org.openapitools.client.model.AutomatedRefund;
import org.openapitools.client.model.DDRequestLOT;
import org.threeten.bp.OffsetDateTime;

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

  public static final String SERIALIZED_NAME_PAYMENT_INFO = "paymentInfo";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO)
  private String paymentInfo;

  public static final String SERIALIZED_NAME_PAYMENT_INFO1 = "paymentInfo1";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO1)
  private String paymentInfo1;

  public static final String SERIALIZED_NAME_PAYMENT_INFO2 = "paymentInfo2";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO2)
  private String paymentInfo2;

  public static final String SERIALIZED_NAME_PAYMENT_INFO3 = "paymentInfo3";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO3)
  private String paymentInfo3;

  public static final String SERIALIZED_NAME_PAYMENT_INFO4 = "paymentInfo4";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO4)
  private String paymentInfo4;

  public static final String SERIALIZED_NAME_PAYMENT_INFO5 = "paymentInfo5";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO5)
  private String paymentInfo5;

  public static final String SERIALIZED_NAME_PAYMENT_INFO6 = "paymentInfo6";
  @SerializedName(SERIALIZED_NAME_PAYMENT_INFO6)
  private String paymentInfo6;

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

  public static final String SERIALIZED_NAME_BILLING_ACCOUNT_NAME = "billingAccountName";
  @SerializedName(SERIALIZED_NAME_BILLING_ACCOUNT_NAME)
  private String billingAccountName;

  public static final String SERIALIZED_NAME_REFERENCE = "reference";
  @SerializedName(SERIALIZED_NAME_REFERENCE)
  private String reference;

  public static final String SERIALIZED_NAME_DD_REQUEST_L_O_T = "ddRequestLOT";
  @SerializedName(SERIALIZED_NAME_DD_REQUEST_L_O_T)
  private DDRequestLOT ddRequestLOT;

  public static final String SERIALIZED_NAME_ACCOUNT_OPERATIONS = "accountOperations";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_OPERATIONS)
  private List<AccountOperation> accountOperations = null;

  public static final String SERIALIZED_NAME_ERROR_MSG = "errorMsg";
  @SerializedName(SERIALIZED_NAME_ERROR_MSG)
  private String errorMsg;

  public static final String SERIALIZED_NAME_AUTOMATED_PAYMENT = "automatedPayment";
  @SerializedName(SERIALIZED_NAME_AUTOMATED_PAYMENT)
  private AutomatedPayment automatedPayment;

  public static final String SERIALIZED_NAME_AUTOMATED_REFUND = "automatedRefund";
  @SerializedName(SERIALIZED_NAME_AUTOMATED_REFUND)
  private AutomatedRefund automatedRefund;

  public static final String SERIALIZED_NAME_REJECTED_FILE_NAME = "rejectedFileName";
  @SerializedName(SERIALIZED_NAME_REJECTED_FILE_NAME)
  private String rejectedFileName;

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


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

  public DDRequestItem 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 DDRequestItem amount(BigDecimal amount) {
    
    this.amount = amount;
    return this;
  }

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

  public BigDecimal getAmount() {
    return amount;
  }



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


  public DDRequestItem paymentInfo(String paymentInfo) {
    
    this.paymentInfo = paymentInfo;
    return this;
  }

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

  public String getPaymentInfo() {
    return paymentInfo;
  }



  public void setPaymentInfo(String paymentInfo) {
    this.paymentInfo = paymentInfo;
  }


  public DDRequestItem paymentInfo1(String paymentInfo1) {
    
    this.paymentInfo1 = paymentInfo1;
    return this;
  }

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

  public String getPaymentInfo1() {
    return paymentInfo1;
  }



  public void setPaymentInfo1(String paymentInfo1) {
    this.paymentInfo1 = paymentInfo1;
  }


  public DDRequestItem paymentInfo2(String paymentInfo2) {
    
    this.paymentInfo2 = paymentInfo2;
    return this;
  }

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

  public String getPaymentInfo2() {
    return paymentInfo2;
  }



  public void setPaymentInfo2(String paymentInfo2) {
    this.paymentInfo2 = paymentInfo2;
  }


  public DDRequestItem paymentInfo3(String paymentInfo3) {
    
    this.paymentInfo3 = paymentInfo3;
    return this;
  }

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

  public String getPaymentInfo3() {
    return paymentInfo3;
  }



  public void setPaymentInfo3(String paymentInfo3) {
    this.paymentInfo3 = paymentInfo3;
  }


  public DDRequestItem paymentInfo4(String paymentInfo4) {
    
    this.paymentInfo4 = paymentInfo4;
    return this;
  }

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

  public String getPaymentInfo4() {
    return paymentInfo4;
  }



  public void setPaymentInfo4(String paymentInfo4) {
    this.paymentInfo4 = paymentInfo4;
  }


  public DDRequestItem paymentInfo5(String paymentInfo5) {
    
    this.paymentInfo5 = paymentInfo5;
    return this;
  }

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

  public String getPaymentInfo5() {
    return paymentInfo5;
  }



  public void setPaymentInfo5(String paymentInfo5) {
    this.paymentInfo5 = paymentInfo5;
  }


  public DDRequestItem paymentInfo6(String paymentInfo6) {
    
    this.paymentInfo6 = paymentInfo6;
    return this;
  }

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

  public String getPaymentInfo6() {
    return paymentInfo6;
  }



  public void setPaymentInfo6(String paymentInfo6) {
    this.paymentInfo6 = paymentInfo6;
  }


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

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

  public OffsetDateTime getDueDate() {
    return dueDate;
  }



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


  public DDRequestItem billingAccountName(String billingAccountName) {
    
    this.billingAccountName = billingAccountName;
    return this;
  }

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

  public String getBillingAccountName() {
    return billingAccountName;
  }



  public void setBillingAccountName(String billingAccountName) {
    this.billingAccountName = billingAccountName;
  }


  public DDRequestItem reference(String reference) {
    
    this.reference = reference;
    return this;
  }

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

  public String getReference() {
    return reference;
  }



  public void setReference(String reference) {
    this.reference = reference;
  }


  public DDRequestItem ddRequestLOT(DDRequestLOT ddRequestLOT) {
    
    this.ddRequestLOT = ddRequestLOT;
    return this;
  }

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

  public DDRequestLOT getDdRequestLOT() {
    return ddRequestLOT;
  }



  public void setDdRequestLOT(DDRequestLOT ddRequestLOT) {
    this.ddRequestLOT = ddRequestLOT;
  }


  public DDRequestItem accountOperations(List<AccountOperation> accountOperations) {
    
    this.accountOperations = accountOperations;
    return this;
  }

  public DDRequestItem addAccountOperationsItem(AccountOperation accountOperationsItem) {
    if (this.accountOperations == null) {
      this.accountOperations = new ArrayList<AccountOperation>();
    }
    this.accountOperations.add(accountOperationsItem);
    return this;
  }

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

  public List<AccountOperation> getAccountOperations() {
    return accountOperations;
  }



  public void setAccountOperations(List<AccountOperation> accountOperations) {
    this.accountOperations = accountOperations;
  }


  public DDRequestItem errorMsg(String errorMsg) {
    
    this.errorMsg = errorMsg;
    return this;
  }

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

  public String getErrorMsg() {
    return errorMsg;
  }



  public void setErrorMsg(String errorMsg) {
    this.errorMsg = errorMsg;
  }


  public DDRequestItem automatedPayment(AutomatedPayment automatedPayment) {
    
    this.automatedPayment = automatedPayment;
    return this;
  }

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

  public AutomatedPayment getAutomatedPayment() {
    return automatedPayment;
  }



  public void setAutomatedPayment(AutomatedPayment automatedPayment) {
    this.automatedPayment = automatedPayment;
  }


  public DDRequestItem automatedRefund(AutomatedRefund automatedRefund) {
    
    this.automatedRefund = automatedRefund;
    return this;
  }

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

  public AutomatedRefund getAutomatedRefund() {
    return automatedRefund;
  }



  public void setAutomatedRefund(AutomatedRefund automatedRefund) {
    this.automatedRefund = automatedRefund;
  }


  public DDRequestItem rejectedFileName(String rejectedFileName) {
    
    this.rejectedFileName = rejectedFileName;
    return this;
  }

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

  public String getRejectedFileName() {
    return rejectedFileName;
  }



  public void setRejectedFileName(String rejectedFileName) {
    this.rejectedFileName = rejectedFileName;
  }


  public DDRequestItem _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;
    }
    DDRequestItem ddRequestItem = (DDRequestItem) o;
    return Objects.equals(this.id, ddRequestItem.id) &&
        Objects.equals(this.version, ddRequestItem.version) &&
        Objects.equals(this.auditable, ddRequestItem.auditable) &&
        Objects.equals(this.historized, ddRequestItem.historized) &&
        Objects.equals(this.notified, ddRequestItem.notified) &&
        Objects.equals(this.auditableFields, ddRequestItem.auditableFields) &&
        Objects.equals(this.amount, ddRequestItem.amount) &&
        Objects.equals(this.paymentInfo, ddRequestItem.paymentInfo) &&
        Objects.equals(this.paymentInfo1, ddRequestItem.paymentInfo1) &&
        Objects.equals(this.paymentInfo2, ddRequestItem.paymentInfo2) &&
        Objects.equals(this.paymentInfo3, ddRequestItem.paymentInfo3) &&
        Objects.equals(this.paymentInfo4, ddRequestItem.paymentInfo4) &&
        Objects.equals(this.paymentInfo5, ddRequestItem.paymentInfo5) &&
        Objects.equals(this.paymentInfo6, ddRequestItem.paymentInfo6) &&
        Objects.equals(this.dueDate, ddRequestItem.dueDate) &&
        Objects.equals(this.billingAccountName, ddRequestItem.billingAccountName) &&
        Objects.equals(this.reference, ddRequestItem.reference) &&
        Objects.equals(this.ddRequestLOT, ddRequestItem.ddRequestLOT) &&
        Objects.equals(this.accountOperations, ddRequestItem.accountOperations) &&
        Objects.equals(this.errorMsg, ddRequestItem.errorMsg) &&
        Objects.equals(this.automatedPayment, ddRequestItem.automatedPayment) &&
        Objects.equals(this.automatedRefund, ddRequestItem.automatedRefund) &&
        Objects.equals(this.rejectedFileName, ddRequestItem.rejectedFileName) &&
        Objects.equals(this._transient, ddRequestItem._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, amount, paymentInfo, paymentInfo1, paymentInfo2, paymentInfo3, paymentInfo4, paymentInfo5, paymentInfo6, dueDate, billingAccountName, reference, ddRequestLOT, accountOperations, errorMsg, automatedPayment, automatedRefund, rejectedFileName, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DDRequestItem {\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("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    paymentInfo: ").append(toIndentedString(paymentInfo)).append("\n");
    sb.append("    paymentInfo1: ").append(toIndentedString(paymentInfo1)).append("\n");
    sb.append("    paymentInfo2: ").append(toIndentedString(paymentInfo2)).append("\n");
    sb.append("    paymentInfo3: ").append(toIndentedString(paymentInfo3)).append("\n");
    sb.append("    paymentInfo4: ").append(toIndentedString(paymentInfo4)).append("\n");
    sb.append("    paymentInfo5: ").append(toIndentedString(paymentInfo5)).append("\n");
    sb.append("    paymentInfo6: ").append(toIndentedString(paymentInfo6)).append("\n");
    sb.append("    dueDate: ").append(toIndentedString(dueDate)).append("\n");
    sb.append("    billingAccountName: ").append(toIndentedString(billingAccountName)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    ddRequestLOT: ").append(toIndentedString(ddRequestLOT)).append("\n");
    sb.append("    accountOperations: ").append(toIndentedString(accountOperations)).append("\n");
    sb.append("    errorMsg: ").append(toIndentedString(errorMsg)).append("\n");
    sb.append("    automatedPayment: ").append(toIndentedString(automatedPayment)).append("\n");
    sb.append("    automatedRefund: ").append(toIndentedString(automatedRefund)).append("\n");
    sb.append("    rejectedFileName: ").append(toIndentedString(rejectedFileName)).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    ");
  }

}

