/*
 * 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;

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

  /**
   * 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_CREDIT = "matchingAmountCredit";
  @SerializedName(SERIALIZED_NAME_MATCHING_AMOUNT_CREDIT)
  private BigDecimal matchingAmountCredit;

  public static final String SERIALIZED_NAME_MATCHING_AMOUNT_DEBIT = "matchingAmountDebit";
  @SerializedName(SERIALIZED_NAME_MATCHING_AMOUNT_DEBIT)
  private BigDecimal matchingAmountDebit;


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

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

  public BigDecimal getMatchingAmountCredit() {
    return matchingAmountCredit;
  }



  public void setMatchingAmountCredit(BigDecimal matchingAmountCredit) {
    this.matchingAmountCredit = matchingAmountCredit;
  }


  public MatchingCodeDto matchingAmountDebit(BigDecimal matchingAmountDebit) {
    
    this.matchingAmountDebit = matchingAmountDebit;
    return this;
  }

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

  public BigDecimal getMatchingAmountDebit() {
    return matchingAmountDebit;
  }



  public void setMatchingAmountDebit(BigDecimal matchingAmountDebit) {
    this.matchingAmountDebit = matchingAmountDebit;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MatchingCodeDto matchingCodeDto = (MatchingCodeDto) o;
    return Objects.equals(this.code, matchingCodeDto.code) &&
        Objects.equals(this.matchingType, matchingCodeDto.matchingType) &&
        Objects.equals(this.matchingDate, matchingCodeDto.matchingDate) &&
        Objects.equals(this.matchingAmountCredit, matchingCodeDto.matchingAmountCredit) &&
        Objects.equals(this.matchingAmountDebit, matchingCodeDto.matchingAmountDebit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(code, matchingType, matchingDate, matchingAmountCredit, matchingAmountDebit);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MatchingCodeDto {\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    matchingType: ").append(toIndentedString(matchingType)).append("\n");
    sb.append("    matchingDate: ").append(toIndentedString(matchingDate)).append("\n");
    sb.append("    matchingAmountCredit: ").append(toIndentedString(matchingAmountCredit)).append("\n");
    sb.append("    matchingAmountDebit: ").append(toIndentedString(matchingAmountDebit)).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    ");
  }

}

