/*
 * 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.CustomerAccount;
import org.openapitools.client.model.OtherTransaction;
import org.threeten.bp.OffsetDateTime;

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

  public static final String SERIALIZED_NAME_ACCOUNT_OPERATION = "accountOperation";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_OPERATION)
  private AccountOperation accountOperation;

  public static final String SERIALIZED_NAME_NEW_O_T = "newOT";
  @SerializedName(SERIALIZED_NAME_NEW_O_T)
  private OtherTransaction newOT;

  public static final String SERIALIZED_NAME_CUSTOMER_ACCOUNT = "customerAccount";
  @SerializedName(SERIALIZED_NAME_CUSTOMER_ACCOUNT)
  private CustomerAccount customerAccount;

  public static final String SERIALIZED_NAME_VENTILATION_AMOUNT = "ventilationAmount";
  @SerializedName(SERIALIZED_NAME_VENTILATION_AMOUNT)
  private BigDecimal ventilationAmount;

  public static final String SERIALIZED_NAME_VENTILATION_DATE = "ventilationDate";
  @SerializedName(SERIALIZED_NAME_VENTILATION_DATE)
  private OffsetDateTime ventilationDate;

  /**
   * Gets or Sets ventilationActionStatus
   */
  @JsonAdapter(VentilationActionStatusEnum.Adapter.class)
  public enum VentilationActionStatusEnum {
    V("V"),
    
    U("U");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_VENTILATION_ACTION_STATUS = "ventilationActionStatus";
  @SerializedName(SERIALIZED_NAME_VENTILATION_ACTION_STATUS)
  private VentilationActionStatusEnum ventilationActionStatus;

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


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

  public PaymentVentilation 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 PaymentVentilation originalOT(OtherTransaction originalOT) {
    
    this.originalOT = originalOT;
    return this;
  }

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

  public OtherTransaction getOriginalOT() {
    return originalOT;
  }



  public void setOriginalOT(OtherTransaction originalOT) {
    this.originalOT = originalOT;
  }


  public PaymentVentilation accountOperation(AccountOperation accountOperation) {
    
    this.accountOperation = accountOperation;
    return this;
  }

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

  public AccountOperation getAccountOperation() {
    return accountOperation;
  }



  public void setAccountOperation(AccountOperation accountOperation) {
    this.accountOperation = accountOperation;
  }


  public PaymentVentilation newOT(OtherTransaction newOT) {
    
    this.newOT = newOT;
    return this;
  }

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

  public OtherTransaction getNewOT() {
    return newOT;
  }



  public void setNewOT(OtherTransaction newOT) {
    this.newOT = newOT;
  }


  public PaymentVentilation customerAccount(CustomerAccount customerAccount) {
    
    this.customerAccount = customerAccount;
    return this;
  }

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

  public CustomerAccount getCustomerAccount() {
    return customerAccount;
  }



  public void setCustomerAccount(CustomerAccount customerAccount) {
    this.customerAccount = customerAccount;
  }


  public PaymentVentilation ventilationAmount(BigDecimal ventilationAmount) {
    
    this.ventilationAmount = ventilationAmount;
    return this;
  }

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

  public BigDecimal getVentilationAmount() {
    return ventilationAmount;
  }



  public void setVentilationAmount(BigDecimal ventilationAmount) {
    this.ventilationAmount = ventilationAmount;
  }


  public PaymentVentilation ventilationDate(OffsetDateTime ventilationDate) {
    
    this.ventilationDate = ventilationDate;
    return this;
  }

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

  public OffsetDateTime getVentilationDate() {
    return ventilationDate;
  }



  public void setVentilationDate(OffsetDateTime ventilationDate) {
    this.ventilationDate = ventilationDate;
  }


  public PaymentVentilation ventilationActionStatus(VentilationActionStatusEnum ventilationActionStatus) {
    
    this.ventilationActionStatus = ventilationActionStatus;
    return this;
  }

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

  public VentilationActionStatusEnum getVentilationActionStatus() {
    return ventilationActionStatus;
  }



  public void setVentilationActionStatus(VentilationActionStatusEnum ventilationActionStatus) {
    this.ventilationActionStatus = ventilationActionStatus;
  }


  public PaymentVentilation _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;
    }
    PaymentVentilation paymentVentilation = (PaymentVentilation) o;
    return Objects.equals(this.id, paymentVentilation.id) &&
        Objects.equals(this.version, paymentVentilation.version) &&
        Objects.equals(this.auditable, paymentVentilation.auditable) &&
        Objects.equals(this.historized, paymentVentilation.historized) &&
        Objects.equals(this.notified, paymentVentilation.notified) &&
        Objects.equals(this.auditableFields, paymentVentilation.auditableFields) &&
        Objects.equals(this.originalOT, paymentVentilation.originalOT) &&
        Objects.equals(this.accountOperation, paymentVentilation.accountOperation) &&
        Objects.equals(this.newOT, paymentVentilation.newOT) &&
        Objects.equals(this.customerAccount, paymentVentilation.customerAccount) &&
        Objects.equals(this.ventilationAmount, paymentVentilation.ventilationAmount) &&
        Objects.equals(this.ventilationDate, paymentVentilation.ventilationDate) &&
        Objects.equals(this.ventilationActionStatus, paymentVentilation.ventilationActionStatus) &&
        Objects.equals(this._transient, paymentVentilation._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, originalOT, accountOperation, newOT, customerAccount, ventilationAmount, ventilationDate, ventilationActionStatus, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentVentilation {\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("    originalOT: ").append(toIndentedString(originalOT)).append("\n");
    sb.append("    accountOperation: ").append(toIndentedString(accountOperation)).append("\n");
    sb.append("    newOT: ").append(toIndentedString(newOT)).append("\n");
    sb.append("    customerAccount: ").append(toIndentedString(customerAccount)).append("\n");
    sb.append("    ventilationAmount: ").append(toIndentedString(ventilationAmount)).append("\n");
    sb.append("    ventilationDate: ").append(toIndentedString(ventilationDate)).append("\n");
    sb.append("    ventilationActionStatus: ").append(toIndentedString(ventilationActionStatus)).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    ");
  }

}

