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

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

  /**
   * Gets or Sets matchingType
   */
  @JsonAdapter(MatchingTypeEnum.Adapter.class)
  public enum MatchingTypeEnum {
    A("A"),
    
    M("M"),
    
    A_TIP("A_TIP"),
    
    A_DERICT_DEBIT("A_DERICT_DEBIT");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_MATCHING_TYPE = "matchingType";
  @SerializedName(SERIALIZED_NAME_MATCHING_TYPE)
  private MatchingTypeEnum matchingType;

  public static final String SERIALIZED_NAME_MATCHING_DATE = "matchingDate";
  @SerializedName(SERIALIZED_NAME_MATCHING_DATE)
  private OffsetDateTime matchingDate;

  public static final String SERIALIZED_NAME_MATCHING_AMOUNT = "matchingAmount";
  @SerializedName(SERIALIZED_NAME_MATCHING_AMOUNT)
  private BigDecimal matchingAmount;

  public static final String SERIALIZED_NAME_ACCOUNT_OPERATION_ID = "accountOperationId";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_OPERATION_ID)
  private Long accountOperationId;

  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_TRANSACTION_DATE = "transactionDate";
  @SerializedName(SERIALIZED_NAME_TRANSACTION_DATE)
  private OffsetDateTime transactionDate;

  /**
   * Gets or Sets transactionCategory
   */
  @JsonAdapter(TransactionCategoryEnum.Adapter.class)
  public enum TransactionCategoryEnum {
    DEBIT("DEBIT"),
    
    CREDIT("CREDIT");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_TRANSACTION_CATEGORY = "transactionCategory";
  @SerializedName(SERIALIZED_NAME_TRANSACTION_CATEGORY)
  private TransactionCategoryEnum transactionCategory;

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

  public static final String SERIALIZED_NAME_TRANSACTION_AMOUNT = "transactionAmount";
  @SerializedName(SERIALIZED_NAME_TRANSACTION_AMOUNT)
  private BigDecimal transactionAmount;

  public static final String SERIALIZED_NAME_MATCHED_TRANSACTION_AMOUNT = "matchedTransactionAmount";
  @SerializedName(SERIALIZED_NAME_MATCHED_TRANSACTION_AMOUNT)
  private BigDecimal matchedTransactionAmount;

  /**
   * Gets or Sets matchingStatus
   */
  @JsonAdapter(MatchingStatusEnum.Adapter.class)
  public enum MatchingStatusEnum {
    O("O"),
    
    L("L"),
    
    P("P"),
    
    C("C"),
    
    I("I"),
    
    R("R");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_MATCHING_STATUS = "matchingStatus";
  @SerializedName(SERIALIZED_NAME_MATCHING_STATUS)
  private MatchingStatusEnum matchingStatus;


  public MatchedOperationDto matchingId(Long matchingId) {
    
    this.matchingId = matchingId;
    return this;
  }

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

  public Long getMatchingId() {
    return matchingId;
  }



  public void setMatchingId(Long matchingId) {
    this.matchingId = matchingId;
  }


  public MatchedOperationDto matchingType(MatchingTypeEnum matchingType) {
    
    this.matchingType = matchingType;
    return this;
  }

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

  public MatchingTypeEnum getMatchingType() {
    return matchingType;
  }



  public void setMatchingType(MatchingTypeEnum matchingType) {
    this.matchingType = matchingType;
  }


  public MatchedOperationDto matchingDate(OffsetDateTime matchingDate) {
    
    this.matchingDate = matchingDate;
    return this;
  }

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

  public OffsetDateTime getMatchingDate() {
    return matchingDate;
  }



  public void setMatchingDate(OffsetDateTime matchingDate) {
    this.matchingDate = matchingDate;
  }


  public MatchedOperationDto matchingAmount(BigDecimal matchingAmount) {
    
    this.matchingAmount = matchingAmount;
    return this;
  }

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

  public BigDecimal getMatchingAmount() {
    return matchingAmount;
  }



  public void setMatchingAmount(BigDecimal matchingAmount) {
    this.matchingAmount = matchingAmount;
  }


  public MatchedOperationDto accountOperationId(Long accountOperationId) {
    
    this.accountOperationId = accountOperationId;
    return this;
  }

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

  public Long getAccountOperationId() {
    return accountOperationId;
  }



  public void setAccountOperationId(Long accountOperationId) {
    this.accountOperationId = accountOperationId;
  }


  public MatchedOperationDto 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 MatchedOperationDto 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 MatchedOperationDto transactionDate(OffsetDateTime transactionDate) {
    
    this.transactionDate = transactionDate;
    return this;
  }

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

  public OffsetDateTime getTransactionDate() {
    return transactionDate;
  }



  public void setTransactionDate(OffsetDateTime transactionDate) {
    this.transactionDate = transactionDate;
  }


  public MatchedOperationDto transactionCategory(TransactionCategoryEnum transactionCategory) {
    
    this.transactionCategory = transactionCategory;
    return this;
  }

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

  public TransactionCategoryEnum getTransactionCategory() {
    return transactionCategory;
  }



  public void setTransactionCategory(TransactionCategoryEnum transactionCategory) {
    this.transactionCategory = transactionCategory;
  }


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

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

  public BigDecimal getTransactionAmount() {
    return transactionAmount;
  }



  public void setTransactionAmount(BigDecimal transactionAmount) {
    this.transactionAmount = transactionAmount;
  }


  public MatchedOperationDto matchedTransactionAmount(BigDecimal matchedTransactionAmount) {
    
    this.matchedTransactionAmount = matchedTransactionAmount;
    return this;
  }

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

  public BigDecimal getMatchedTransactionAmount() {
    return matchedTransactionAmount;
  }



  public void setMatchedTransactionAmount(BigDecimal matchedTransactionAmount) {
    this.matchedTransactionAmount = matchedTransactionAmount;
  }


  public MatchedOperationDto matchingStatus(MatchingStatusEnum matchingStatus) {
    
    this.matchingStatus = matchingStatus;
    return this;
  }

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

  public MatchingStatusEnum getMatchingStatus() {
    return matchingStatus;
  }



  public void setMatchingStatus(MatchingStatusEnum matchingStatus) {
    this.matchingStatus = matchingStatus;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MatchedOperationDto matchedOperationDto = (MatchedOperationDto) o;
    return Objects.equals(this.matchingId, matchedOperationDto.matchingId) &&
        Objects.equals(this.matchingType, matchedOperationDto.matchingType) &&
        Objects.equals(this.matchingDate, matchedOperationDto.matchingDate) &&
        Objects.equals(this.matchingAmount, matchedOperationDto.matchingAmount) &&
        Objects.equals(this.accountOperationId, matchedOperationDto.accountOperationId) &&
        Objects.equals(this.code, matchedOperationDto.code) &&
        Objects.equals(this.description, matchedOperationDto.description) &&
        Objects.equals(this.transactionDate, matchedOperationDto.transactionDate) &&
        Objects.equals(this.transactionCategory, matchedOperationDto.transactionCategory) &&
        Objects.equals(this.dueDate, matchedOperationDto.dueDate) &&
        Objects.equals(this.transactionAmount, matchedOperationDto.transactionAmount) &&
        Objects.equals(this.matchedTransactionAmount, matchedOperationDto.matchedTransactionAmount) &&
        Objects.equals(this.matchingStatus, matchedOperationDto.matchingStatus);
  }

  @Override
  public int hashCode() {
    return Objects.hash(matchingId, matchingType, matchingDate, matchingAmount, accountOperationId, code, description, transactionDate, transactionCategory, dueDate, transactionAmount, matchedTransactionAmount, matchingStatus);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MatchedOperationDto {\n");
    sb.append("    matchingId: ").append(toIndentedString(matchingId)).append("\n");
    sb.append("    matchingType: ").append(toIndentedString(matchingType)).append("\n");
    sb.append("    matchingDate: ").append(toIndentedString(matchingDate)).append("\n");
    sb.append("    matchingAmount: ").append(toIndentedString(matchingAmount)).append("\n");
    sb.append("    accountOperationId: ").append(toIndentedString(accountOperationId)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    transactionDate: ").append(toIndentedString(transactionDate)).append("\n");
    sb.append("    transactionCategory: ").append(toIndentedString(transactionCategory)).append("\n");
    sb.append("    dueDate: ").append(toIndentedString(dueDate)).append("\n");
    sb.append("    transactionAmount: ").append(toIndentedString(transactionAmount)).append("\n");
    sb.append("    matchedTransactionAmount: ").append(toIndentedString(matchedTransactionAmount)).append("\n");
    sb.append("    matchingStatus: ").append(toIndentedString(matchingStatus)).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    ");
  }

}

