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

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

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  /**
   * Gets or Sets paymentMethod
   */
  @JsonAdapter(PaymentMethodEnum.Adapter.class)
  public enum PaymentMethodEnum {
    CHECK("CHECK"),
    
    DIRECTDEBIT("DIRECTDEBIT"),
    
    WIRETRANSFER("WIRETRANSFER"),
    
    CARD("CARD");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD)
  private PaymentMethodEnum paymentMethod;

  public static final String SERIALIZED_NAME_OCC_TEMPLATE_CODE = "occTemplateCode";
  @SerializedName(SERIALIZED_NAME_OCC_TEMPLATE_CODE)
  private String occTemplateCode;

  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private BigDecimal amount;

  public static final String SERIALIZED_NAME_CUSTOMER_ACCOUNT_CODE = "customerAccountCode";
  @SerializedName(SERIALIZED_NAME_CUSTOMER_ACCOUNT_CODE)
  private String customerAccountCode;

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

  public static final String SERIALIZED_NAME_BANK_LOT = "bankLot";
  @SerializedName(SERIALIZED_NAME_BANK_LOT)
  private String bankLot;

  public static final String SERIALIZED_NAME_DEPOSIT_DATE = "depositDate";
  @SerializedName(SERIALIZED_NAME_DEPOSIT_DATE)
  private OffsetDateTime depositDate;

  public static final String SERIALIZED_NAME_BANK_COLLECTION_DATE = "bankCollectionDate";
  @SerializedName(SERIALIZED_NAME_BANK_COLLECTION_DATE)
  private OffsetDateTime bankCollectionDate;

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

  public static final String SERIALIZED_NAME_TRANSACTION_DATE = "transactionDate";
  @SerializedName(SERIALIZED_NAME_TRANSACTION_DATE)
  private OffsetDateTime transactionDate;

  public static final String SERIALIZED_NAME_LIST_O_C_C_REFERENCEFOR_MATCHING = "listOCCReferenceforMatching";
  @SerializedName(SERIALIZED_NAME_LIST_O_C_C_REFERENCEFOR_MATCHING)
  private List<String> listOCCReferenceforMatching = null;

  public static final String SERIALIZED_NAME_LIST_AO_IDS_FOR_MATCHING = "listAoIdsForMatching";
  @SerializedName(SERIALIZED_NAME_LIST_AO_IDS_FOR_MATCHING)
  private List<Long> listAoIdsForMatching = null;

  public static final String SERIALIZED_NAME_PAYMENT_ORDER = "paymentOrder";
  @SerializedName(SERIALIZED_NAME_PAYMENT_ORDER)
  private String paymentOrder;

  public static final String SERIALIZED_NAME_FEES = "fees";
  @SerializedName(SERIALIZED_NAME_FEES)
  private BigDecimal fees;

  public static final String SERIALIZED_NAME_COMMENT = "comment";
  @SerializedName(SERIALIZED_NAME_COMMENT)
  private String comment;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "customFields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  private CustomFieldsDto customFields;

  public static final String SERIALIZED_NAME_TO_MATCHING = "toMatching";
  @SerializedName(SERIALIZED_NAME_TO_MATCHING)
  private Boolean toMatching;


  public PaymentDto 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 PaymentDto 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 PaymentDto paymentMethod(PaymentMethodEnum paymentMethod) {
    
    this.paymentMethod = paymentMethod;
    return this;
  }

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

  public PaymentMethodEnum getPaymentMethod() {
    return paymentMethod;
  }



  public void setPaymentMethod(PaymentMethodEnum paymentMethod) {
    this.paymentMethod = paymentMethod;
  }


  public PaymentDto occTemplateCode(String occTemplateCode) {
    
    this.occTemplateCode = occTemplateCode;
    return this;
  }

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

  public String getOccTemplateCode() {
    return occTemplateCode;
  }



  public void setOccTemplateCode(String occTemplateCode) {
    this.occTemplateCode = occTemplateCode;
  }


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

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

  public String getCustomerAccountCode() {
    return customerAccountCode;
  }



  public void setCustomerAccountCode(String customerAccountCode) {
    this.customerAccountCode = customerAccountCode;
  }


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

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

  public String getBankLot() {
    return bankLot;
  }



  public void setBankLot(String bankLot) {
    this.bankLot = bankLot;
  }


  public PaymentDto depositDate(OffsetDateTime depositDate) {
    
    this.depositDate = depositDate;
    return this;
  }

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

  public OffsetDateTime getDepositDate() {
    return depositDate;
  }



  public void setDepositDate(OffsetDateTime depositDate) {
    this.depositDate = depositDate;
  }


  public PaymentDto bankCollectionDate(OffsetDateTime bankCollectionDate) {
    
    this.bankCollectionDate = bankCollectionDate;
    return this;
  }

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

  public OffsetDateTime getBankCollectionDate() {
    return bankCollectionDate;
  }



  public void setBankCollectionDate(OffsetDateTime bankCollectionDate) {
    this.bankCollectionDate = bankCollectionDate;
  }


  public PaymentDto 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 PaymentDto 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 PaymentDto listOCCReferenceforMatching(List<String> listOCCReferenceforMatching) {
    
    this.listOCCReferenceforMatching = listOCCReferenceforMatching;
    return this;
  }

  public PaymentDto addListOCCReferenceforMatchingItem(String listOCCReferenceforMatchingItem) {
    if (this.listOCCReferenceforMatching == null) {
      this.listOCCReferenceforMatching = new ArrayList<String>();
    }
    this.listOCCReferenceforMatching.add(listOCCReferenceforMatchingItem);
    return this;
  }

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

  public List<String> getListOCCReferenceforMatching() {
    return listOCCReferenceforMatching;
  }



  public void setListOCCReferenceforMatching(List<String> listOCCReferenceforMatching) {
    this.listOCCReferenceforMatching = listOCCReferenceforMatching;
  }


  public PaymentDto listAoIdsForMatching(List<Long> listAoIdsForMatching) {
    
    this.listAoIdsForMatching = listAoIdsForMatching;
    return this;
  }

  public PaymentDto addListAoIdsForMatchingItem(Long listAoIdsForMatchingItem) {
    if (this.listAoIdsForMatching == null) {
      this.listAoIdsForMatching = new ArrayList<Long>();
    }
    this.listAoIdsForMatching.add(listAoIdsForMatchingItem);
    return this;
  }

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

  public List<Long> getListAoIdsForMatching() {
    return listAoIdsForMatching;
  }



  public void setListAoIdsForMatching(List<Long> listAoIdsForMatching) {
    this.listAoIdsForMatching = listAoIdsForMatching;
  }


  public PaymentDto paymentOrder(String paymentOrder) {
    
    this.paymentOrder = paymentOrder;
    return this;
  }

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

  public String getPaymentOrder() {
    return paymentOrder;
  }



  public void setPaymentOrder(String paymentOrder) {
    this.paymentOrder = paymentOrder;
  }


  public PaymentDto fees(BigDecimal fees) {
    
    this.fees = fees;
    return this;
  }

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

  public BigDecimal getFees() {
    return fees;
  }



  public void setFees(BigDecimal fees) {
    this.fees = fees;
  }


  public PaymentDto comment(String comment) {
    
    this.comment = comment;
    return this;
  }

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

  public String getComment() {
    return comment;
  }



  public void setComment(String comment) {
    this.comment = comment;
  }


  public PaymentDto customFields(CustomFieldsDto customFields) {
    
    this.customFields = customFields;
    return this;
  }

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

  public CustomFieldsDto getCustomFields() {
    return customFields;
  }



  public void setCustomFields(CustomFieldsDto customFields) {
    this.customFields = customFields;
  }


  public PaymentDto toMatching(Boolean toMatching) {
    
    this.toMatching = toMatching;
    return this;
  }

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

  public Boolean getToMatching() {
    return toMatching;
  }



  public void setToMatching(Boolean toMatching) {
    this.toMatching = toMatching;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentDto paymentDto = (PaymentDto) o;
    return Objects.equals(this.type, paymentDto.type) &&
        Objects.equals(this.description, paymentDto.description) &&
        Objects.equals(this.paymentMethod, paymentDto.paymentMethod) &&
        Objects.equals(this.occTemplateCode, paymentDto.occTemplateCode) &&
        Objects.equals(this.amount, paymentDto.amount) &&
        Objects.equals(this.customerAccountCode, paymentDto.customerAccountCode) &&
        Objects.equals(this.reference, paymentDto.reference) &&
        Objects.equals(this.bankLot, paymentDto.bankLot) &&
        Objects.equals(this.depositDate, paymentDto.depositDate) &&
        Objects.equals(this.bankCollectionDate, paymentDto.bankCollectionDate) &&
        Objects.equals(this.dueDate, paymentDto.dueDate) &&
        Objects.equals(this.transactionDate, paymentDto.transactionDate) &&
        Objects.equals(this.listOCCReferenceforMatching, paymentDto.listOCCReferenceforMatching) &&
        Objects.equals(this.listAoIdsForMatching, paymentDto.listAoIdsForMatching) &&
        Objects.equals(this.paymentOrder, paymentDto.paymentOrder) &&
        Objects.equals(this.fees, paymentDto.fees) &&
        Objects.equals(this.comment, paymentDto.comment) &&
        Objects.equals(this.customFields, paymentDto.customFields) &&
        Objects.equals(this.toMatching, paymentDto.toMatching);
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, description, paymentMethod, occTemplateCode, amount, customerAccountCode, reference, bankLot, depositDate, bankCollectionDate, dueDate, transactionDate, listOCCReferenceforMatching, listAoIdsForMatching, paymentOrder, fees, comment, customFields, toMatching);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentDto {\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n");
    sb.append("    occTemplateCode: ").append(toIndentedString(occTemplateCode)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    customerAccountCode: ").append(toIndentedString(customerAccountCode)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    bankLot: ").append(toIndentedString(bankLot)).append("\n");
    sb.append("    depositDate: ").append(toIndentedString(depositDate)).append("\n");
    sb.append("    bankCollectionDate: ").append(toIndentedString(bankCollectionDate)).append("\n");
    sb.append("    dueDate: ").append(toIndentedString(dueDate)).append("\n");
    sb.append("    transactionDate: ").append(toIndentedString(transactionDate)).append("\n");
    sb.append("    listOCCReferenceforMatching: ").append(toIndentedString(listOCCReferenceforMatching)).append("\n");
    sb.append("    listAoIdsForMatching: ").append(toIndentedString(listAoIdsForMatching)).append("\n");
    sb.append("    paymentOrder: ").append(toIndentedString(paymentOrder)).append("\n");
    sb.append("    fees: ").append(toIndentedString(fees)).append("\n");
    sb.append("    comment: ").append(toIndentedString(comment)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    toMatching: ").append(toIndentedString(toMatching)).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    ");
  }

}

