content: /*
   * Adyen BinLookup API
   *
   * The version of the OpenAPI document: 54
   *
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  package com.adyen.model.binlookup;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  
  /** CostEstimateResponse */
  @JsonPropertyOrder({
    CostEstimateResponse.JSON_PROPERTY_CARD_BIN,
    CostEstimateResponse.JSON_PROPERTY_COST_ESTIMATE_AMOUNT,
    CostEstimateResponse.JSON_PROPERTY_COST_ESTIMATE_REFERENCE,
    CostEstimateResponse.JSON_PROPERTY_RESULT_CODE
  })
  public class CostEstimateResponse {
    public static final String JSON_PROPERTY_CARD_BIN = "cardBin";
    private CardBin cardBin;
  
    public static final String JSON_PROPERTY_COST_ESTIMATE_AMOUNT = "costEstimateAmount";
    private Amount costEstimateAmount;
  
    public static final String JSON_PROPERTY_COST_ESTIMATE_REFERENCE = "costEstimateReference";
    private String costEstimateReference;
  
    public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
    private String resultCode;
  
    public CostEstimateResponse() {}
  
    /**
     * cardBin
     *
     * @param cardBin
     * @return the current {@code CostEstimateResponse} instance, allowing for method chaining
     */
    public CostEstimateResponse cardBin(CardBin cardBin) {
      this.cardBin = cardBin;
      return this;
    }
  
    /**
     * Get cardBin
     *
     * @return cardBin
     */
    @JsonProperty(JSON_PROPERTY_CARD_BIN)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public CardBin getCardBin() {
      return cardBin;
    }
  
    /**
     * cardBin
     *
     * @param cardBin
     */
    @JsonProperty(JSON_PROPERTY_CARD_BIN)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCardBin(CardBin cardBin) {
      this.cardBin = cardBin;
    }
  
    /**
     * costEstimateAmount
     *
     * @param costEstimateAmount
     * @return the current {@code CostEstimateResponse} instance, allowing for method chaining
     */
    public CostEstimateResponse costEstimateAmount(Amount costEstimateAmount) {
      this.costEstimateAmount = costEstimateAmount;
      return this;
    }
  
    /**
     * Get costEstimateAmount
     *
     * @return costEstimateAmount
     */
    @JsonProperty(JSON_PROPERTY_COST_ESTIMATE_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Amount getCostEstimateAmount() {
      return costEstimateAmount;
    }
  
    /**
     * costEstimateAmount
     *
     * @param costEstimateAmount
     */
    @JsonProperty(JSON_PROPERTY_COST_ESTIMATE_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCostEstimateAmount(Amount costEstimateAmount) {
      this.costEstimateAmount = costEstimateAmount;
    }
  
    /**
     * Adyen&#39;s 16-character reference associated with the request.
     *
     * @param costEstimateReference Adyen&#39;s 16-character reference associated with the request.
     * @return the current {@code CostEstimateResponse} instance, allowing for method chaining
     */
    public CostEstimateResponse costEstimateReference(String costEstimateReference) {
      this.costEstimateReference = costEstimateReference;
      return this;
    }
  
    /**
     * Adyen&#39;s 16-character reference associated with the request.
     *
     * @return costEstimateReference Adyen&#39;s 16-character reference associated with the request.
     */
    @JsonProperty(JSON_PROPERTY_COST_ESTIMATE_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getCostEstimateReference() {
      return costEstimateReference;
    }
  
    /**
     * Adyen&#39;s 16-character reference associated with the request.
     *
     * @param costEstimateReference Adyen&#39;s 16-character reference associated with the request.
     */
    @JsonProperty(JSON_PROPERTY_COST_ESTIMATE_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCostEstimateReference(String costEstimateReference) {
      this.costEstimateReference = costEstimateReference;
    }
  
    /**
     * The result of the cost estimation.
     *
     * @param resultCode The result of the cost estimation.
     * @return the current {@code CostEstimateResponse} instance, allowing for method chaining
     */
    public CostEstimateResponse resultCode(String resultCode) {
      this.resultCode = resultCode;
      return this;
    }
  
    /**
     * The result of the cost estimation.
     *
     * @return resultCode The result of the cost estimation.
     */
    @JsonProperty(JSON_PROPERTY_RESULT_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getResultCode() {
      return resultCode;
    }
  
    /**
     * The result of the cost estimation.
     *
     * @param resultCode The result of the cost estimation.
     */
    @JsonProperty(JSON_PROPERTY_RESULT_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setResultCode(String resultCode) {
      this.resultCode = resultCode;
    }
  
    /** Return true if this CostEstimateResponse object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      CostEstimateResponse costEstimateResponse = (CostEstimateResponse) o;
      return Objects.equals(this.cardBin, costEstimateResponse.cardBin)
          && Objects.equals(this.costEstimateAmount, costEstimateResponse.costEstimateAmount)
          && Objects.equals(this.costEstimateReference, costEstimateResponse.costEstimateReference)
          && Objects.equals(this.resultCode, costEstimateResponse.resultCode);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(cardBin, costEstimateAmount, costEstimateReference, resultCode);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class CostEstimateResponse {\n");
      sb.append("    cardBin: ").append(toIndentedString(cardBin)).append("\n");
      sb.append("    costEstimateAmount: ").append(toIndentedString(costEstimateAmount)).append("\n");
      sb.append("    costEstimateReference: ")
          .append(toIndentedString(costEstimateReference))
          .append("\n");
      sb.append("    resultCode: ").append(toIndentedString(resultCode)).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(Object o) {
      if (o == null) {
        return "null";
      }
      return o.toString().replace("\n", "\n    ");
    }
  
    /**
     * Create an instance of CostEstimateResponse given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of CostEstimateResponse
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     CostEstimateResponse
     */
    public static CostEstimateResponse fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, CostEstimateResponse.class);
    }
  
    /**
     * Convert an instance of CostEstimateResponse to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  