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.*;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  /** ThreeDSAvailabilityRequest */
  @JsonPropertyOrder({
    ThreeDSAvailabilityRequest.JSON_PROPERTY_ADDITIONAL_DATA,
    ThreeDSAvailabilityRequest.JSON_PROPERTY_BRANDS,
    ThreeDSAvailabilityRequest.JSON_PROPERTY_CARD_NUMBER,
    ThreeDSAvailabilityRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
    ThreeDSAvailabilityRequest.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
    ThreeDSAvailabilityRequest.JSON_PROPERTY_SHOPPER_REFERENCE
  })
  public class ThreeDSAvailabilityRequest {
    public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData";
    private Map<String, String> additionalData;
  
    public static final String JSON_PROPERTY_BRANDS = "brands";
    private List<String> brands;
  
    public static final String JSON_PROPERTY_CARD_NUMBER = "cardNumber";
    private String cardNumber;
  
    public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
    private String merchantAccount;
  
    public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
    private String recurringDetailReference;
  
    public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
    private String shopperReference;
  
    public ThreeDSAvailabilityRequest() {}
  
    /**
     * This field contains additional data, which may be required for a particular request. The
     * &#x60;additionalData&#x60; object consists of entries, each of which includes the key and
     * value.
     *
     * @param additionalData This field contains additional data, which may be required for a
     *     particular request. The &#x60;additionalData&#x60; object consists of entries, each of
     *     which includes the key and value.
     * @return the current {@code ThreeDSAvailabilityRequest} instance, allowing for method chaining
     */
    public ThreeDSAvailabilityRequest additionalData(Map<String, String> additionalData) {
      this.additionalData = additionalData;
      return this;
    }
  
    public ThreeDSAvailabilityRequest putAdditionalDataItem(String key, String additionalDataItem) {
      if (this.additionalData == null) {
        this.additionalData = new HashMap<>();
      }
      this.additionalData.put(key, additionalDataItem);
      return this;
    }
  
    /**
     * This field contains additional data, which may be required for a particular request. The
     * &#x60;additionalData&#x60; object consists of entries, each of which includes the key and
     * value.
     *
     * @return additionalData This field contains additional data, which may be required for a
     *     particular request. The &#x60;additionalData&#x60; object consists of entries, each of
     *     which includes the key and value.
     */
    @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Map<String, String> getAdditionalData() {
      return additionalData;
    }
  
    /**
     * This field contains additional data, which may be required for a particular request. The
     * &#x60;additionalData&#x60; object consists of entries, each of which includes the key and
     * value.
     *
     * @param additionalData This field contains additional data, which may be required for a
     *     particular request. The &#x60;additionalData&#x60; object consists of entries, each of
     *     which includes the key and value.
     */
    @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAdditionalData(Map<String, String> additionalData) {
      this.additionalData = additionalData;
    }
  
    /**
     * List of brands.
     *
     * @param brands List of brands.
     * @return the current {@code ThreeDSAvailabilityRequest} instance, allowing for method chaining
     */
    public ThreeDSAvailabilityRequest brands(List<String> brands) {
      this.brands = brands;
      return this;
    }
  
    public ThreeDSAvailabilityRequest addBrandsItem(String brandsItem) {
      if (this.brands == null) {
        this.brands = new ArrayList<>();
      }
      this.brands.add(brandsItem);
      return this;
    }
  
    /**
     * List of brands.
     *
     * @return brands List of brands.
     */
    @JsonProperty(JSON_PROPERTY_BRANDS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<String> getBrands() {
      return brands;
    }
  
    /**
     * List of brands.
     *
     * @param brands List of brands.
     */
    @JsonProperty(JSON_PROPERTY_BRANDS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBrands(List<String> brands) {
      this.brands = brands;
    }
  
    /**
     * Card number or BIN.
     *
     * @param cardNumber Card number or BIN.
     * @return the current {@code ThreeDSAvailabilityRequest} instance, allowing for method chaining
     */
    public ThreeDSAvailabilityRequest cardNumber(String cardNumber) {
      this.cardNumber = cardNumber;
      return this;
    }
  
    /**
     * Card number or BIN.
     *
     * @return cardNumber Card number or BIN.
     */
    @JsonProperty(JSON_PROPERTY_CARD_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getCardNumber() {
      return cardNumber;
    }
  
    /**
     * Card number or BIN.
     *
     * @param cardNumber Card number or BIN.
     */
    @JsonProperty(JSON_PROPERTY_CARD_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCardNumber(String cardNumber) {
      this.cardNumber = cardNumber;
    }
  
    /**
     * The merchant account identifier.
     *
     * @param merchantAccount The merchant account identifier.
     * @return the current {@code ThreeDSAvailabilityRequest} instance, allowing for method chaining
     */
    public ThreeDSAvailabilityRequest merchantAccount(String merchantAccount) {
      this.merchantAccount = merchantAccount;
      return this;
    }
  
    /**
     * The merchant account identifier.
     *
     * @return merchantAccount The merchant account identifier.
     */
    @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getMerchantAccount() {
      return merchantAccount;
    }
  
    /**
     * The merchant account identifier.
     *
     * @param merchantAccount The merchant account identifier.
     */
    @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setMerchantAccount(String merchantAccount) {
      this.merchantAccount = merchantAccount;
    }
  
    /**
     * A recurring detail reference corresponding to a card.
     *
     * @param recurringDetailReference A recurring detail reference corresponding to a card.
     * @return the current {@code ThreeDSAvailabilityRequest} instance, allowing for method chaining
     */
    public ThreeDSAvailabilityRequest recurringDetailReference(String recurringDetailReference) {
      this.recurringDetailReference = recurringDetailReference;
      return this;
    }
  
    /**
     * A recurring detail reference corresponding to a card.
     *
     * @return recurringDetailReference A recurring detail reference corresponding to a card.
     */
    @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getRecurringDetailReference() {
      return recurringDetailReference;
    }
  
    /**
     * A recurring detail reference corresponding to a card.
     *
     * @param recurringDetailReference A recurring detail reference corresponding to a card.
     */
    @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setRecurringDetailReference(String recurringDetailReference) {
      this.recurringDetailReference = recurringDetailReference;
    }
  
    /**
     * The shopper&#39;s reference to uniquely identify this shopper (e.g. user ID or account ID).
     *
     * @param shopperReference The shopper&#39;s reference to uniquely identify this shopper (e.g.
     *     user ID or account ID).
     * @return the current {@code ThreeDSAvailabilityRequest} instance, allowing for method chaining
     */
    public ThreeDSAvailabilityRequest shopperReference(String shopperReference) {
      this.shopperReference = shopperReference;
      return this;
    }
  
    /**
     * The shopper&#39;s reference to uniquely identify this shopper (e.g. user ID or account ID).
     *
     * @return shopperReference The shopper&#39;s reference to uniquely identify this shopper (e.g.
     *     user ID or account ID).
     */
    @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getShopperReference() {
      return shopperReference;
    }
  
    /**
     * The shopper&#39;s reference to uniquely identify this shopper (e.g. user ID or account ID).
     *
     * @param shopperReference The shopper&#39;s reference to uniquely identify this shopper (e.g.
     *     user ID or account ID).
     */
    @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setShopperReference(String shopperReference) {
      this.shopperReference = shopperReference;
    }
  
    /** Return true if this ThreeDSAvailabilityRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      ThreeDSAvailabilityRequest threeDSAvailabilityRequest = (ThreeDSAvailabilityRequest) o;
      return Objects.equals(this.additionalData, threeDSAvailabilityRequest.additionalData)
          && Objects.equals(this.brands, threeDSAvailabilityRequest.brands)
          && Objects.equals(this.cardNumber, threeDSAvailabilityRequest.cardNumber)
          && Objects.equals(this.merchantAccount, threeDSAvailabilityRequest.merchantAccount)
          && Objects.equals(
              this.recurringDetailReference, threeDSAvailabilityRequest.recurringDetailReference)
          && Objects.equals(this.shopperReference, threeDSAvailabilityRequest.shopperReference);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          additionalData,
          brands,
          cardNumber,
          merchantAccount,
          recurringDetailReference,
          shopperReference);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class ThreeDSAvailabilityRequest {\n");
      sb.append("    additionalData: ").append(toIndentedString(additionalData)).append("\n");
      sb.append("    brands: ").append(toIndentedString(brands)).append("\n");
      sb.append("    cardNumber: ").append(toIndentedString(cardNumber)).append("\n");
      sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
      sb.append("    recurringDetailReference: ")
          .append(toIndentedString(recurringDetailReference))
          .append("\n");
      sb.append("    shopperReference: ").append(toIndentedString(shopperReference)).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 ThreeDSAvailabilityRequest given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of ThreeDSAvailabilityRequest
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     ThreeDSAvailabilityRequest
     */
    public static ThreeDSAvailabilityRequest fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, ThreeDSAvailabilityRequest.class);
    }
  
    /**
     * Convert an instance of ThreeDSAvailabilityRequest to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  