content: /*
   * Authentication webhooks
   *
   * The version of the OpenAPI document: 1
   *
   *
   * 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.acswebhooks;
  
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.Arrays;
  import java.util.logging.Logger;
  
  /** AuthenticationNotificationData */
  @JsonPropertyOrder({
    AuthenticationNotificationData.JSON_PROPERTY_AUTHENTICATION,
    AuthenticationNotificationData.JSON_PROPERTY_BALANCE_PLATFORM,
    AuthenticationNotificationData.JSON_PROPERTY_ID,
    AuthenticationNotificationData.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID,
    AuthenticationNotificationData.JSON_PROPERTY_PURCHASE,
    AuthenticationNotificationData.JSON_PROPERTY_STATUS
  })
  public class AuthenticationNotificationData {
    public static final String JSON_PROPERTY_AUTHENTICATION = "authentication";
    private AuthenticationInfo authentication;
  
    public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
    private String balancePlatform;
  
    public static final String JSON_PROPERTY_ID = "id";
    private String id;
  
    public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId";
    private String paymentInstrumentId;
  
    public static final String JSON_PROPERTY_PURCHASE = "purchase";
    private PurchaseInfo purchase;
  
    /** Outcome of the authentication. Allowed values: * authenticated * rejected * error */
    public enum StatusEnum {
      AUTHENTICATED(String.valueOf("authenticated")),
  
      REJECTED(String.valueOf("rejected")),
  
      ERROR(String.valueOf("error"));
  
      private static final Logger LOG = Logger.getLogger(StatusEnum.class.getName());
  
      private String value;
  
      StatusEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static StatusEnum fromValue(String value) {
        for (StatusEnum b : StatusEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        // handling unexpected value
        LOG.warning(
            "StatusEnum: unexpected enum value '"
                + value
                + "' - Supported values are "
                + Arrays.toString(StatusEnum.values()));
        return null;
      }
    }
  
    public static final String JSON_PROPERTY_STATUS = "status";
    private StatusEnum status;
  
    public AuthenticationNotificationData() {}
  
    /**
     * authentication
     *
     * @param authentication
     * @return the current {@code AuthenticationNotificationData} instance, allowing for method
     *     chaining
     */
    public AuthenticationNotificationData authentication(AuthenticationInfo authentication) {
      this.authentication = authentication;
      return this;
    }
  
    /**
     * Get authentication
     *
     * @return authentication
     */
    @JsonProperty(JSON_PROPERTY_AUTHENTICATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public AuthenticationInfo getAuthentication() {
      return authentication;
    }
  
    /**
     * authentication
     *
     * @param authentication
     */
    @JsonProperty(JSON_PROPERTY_AUTHENTICATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAuthentication(AuthenticationInfo authentication) {
      this.authentication = authentication;
    }
  
    /**
     * The unique identifier of the balance platform.
     *
     * @param balancePlatform The unique identifier of the balance platform.
     * @return the current {@code AuthenticationNotificationData} instance, allowing for method
     *     chaining
     */
    public AuthenticationNotificationData balancePlatform(String balancePlatform) {
      this.balancePlatform = balancePlatform;
      return this;
    }
  
    /**
     * The unique identifier of the balance platform.
     *
     * @return balancePlatform The unique identifier of the balance platform.
     */
    @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBalancePlatform() {
      return balancePlatform;
    }
  
    /**
     * The unique identifier of the balance platform.
     *
     * @param balancePlatform The unique identifier of the balance platform.
     */
    @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBalancePlatform(String balancePlatform) {
      this.balancePlatform = balancePlatform;
    }
  
    /**
     * The unique identifier of the authentication.
     *
     * @param id The unique identifier of the authentication.
     * @return the current {@code AuthenticationNotificationData} instance, allowing for method
     *     chaining
     */
    public AuthenticationNotificationData id(String id) {
      this.id = id;
      return this;
    }
  
    /**
     * The unique identifier of the authentication.
     *
     * @return id The unique identifier of the authentication.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getId() {
      return id;
    }
  
    /**
     * The unique identifier of the authentication.
     *
     * @param id The unique identifier of the authentication.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setId(String id) {
      this.id = id;
    }
  
    /**
     * The unique identifier of the payment instrument that was used for the authentication.
     *
     * @param paymentInstrumentId The unique identifier of the payment instrument that was used for
     *     the authentication.
     * @return the current {@code AuthenticationNotificationData} instance, allowing for method
     *     chaining
     */
    public AuthenticationNotificationData paymentInstrumentId(String paymentInstrumentId) {
      this.paymentInstrumentId = paymentInstrumentId;
      return this;
    }
  
    /**
     * The unique identifier of the payment instrument that was used for the authentication.
     *
     * @return paymentInstrumentId The unique identifier of the payment instrument that was used for
     *     the authentication.
     */
    @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getPaymentInstrumentId() {
      return paymentInstrumentId;
    }
  
    /**
     * The unique identifier of the payment instrument that was used for the authentication.
     *
     * @param paymentInstrumentId The unique identifier of the payment instrument that was used for
     *     the authentication.
     */
    @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPaymentInstrumentId(String paymentInstrumentId) {
      this.paymentInstrumentId = paymentInstrumentId;
    }
  
    /**
     * purchase
     *
     * @param purchase
     * @return the current {@code AuthenticationNotificationData} instance, allowing for method
     *     chaining
     */
    public AuthenticationNotificationData purchase(PurchaseInfo purchase) {
      this.purchase = purchase;
      return this;
    }
  
    /**
     * Get purchase
     *
     * @return purchase
     */
    @JsonProperty(JSON_PROPERTY_PURCHASE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public PurchaseInfo getPurchase() {
      return purchase;
    }
  
    /**
     * purchase
     *
     * @param purchase
     */
    @JsonProperty(JSON_PROPERTY_PURCHASE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPurchase(PurchaseInfo purchase) {
      this.purchase = purchase;
    }
  
    /**
     * Outcome of the authentication. Allowed values: * authenticated * rejected * error
     *
     * @param status Outcome of the authentication. Allowed values: * authenticated * rejected * error
     * @return the current {@code AuthenticationNotificationData} instance, allowing for method
     *     chaining
     */
    public AuthenticationNotificationData status(StatusEnum status) {
      this.status = status;
      return this;
    }
  
    /**
     * Outcome of the authentication. Allowed values: * authenticated * rejected * error
     *
     * @return status Outcome of the authentication. Allowed values: * authenticated * rejected *
     *     error
     */
    @JsonProperty(JSON_PROPERTY_STATUS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public StatusEnum getStatus() {
      return status;
    }
  
    /**
     * Outcome of the authentication. Allowed values: * authenticated * rejected * error
     *
     * @param status Outcome of the authentication. Allowed values: * authenticated * rejected * error
     */
    @JsonProperty(JSON_PROPERTY_STATUS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setStatus(StatusEnum status) {
      this.status = status;
    }
  
    /** Return true if this AuthenticationNotificationData object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      AuthenticationNotificationData authenticationNotificationData =
          (AuthenticationNotificationData) o;
      return Objects.equals(this.authentication, authenticationNotificationData.authentication)
          && Objects.equals(this.balancePlatform, authenticationNotificationData.balancePlatform)
          && Objects.equals(this.id, authenticationNotificationData.id)
          && Objects.equals(
              this.paymentInstrumentId, authenticationNotificationData.paymentInstrumentId)
          && Objects.equals(this.purchase, authenticationNotificationData.purchase)
          && Objects.equals(this.status, authenticationNotificationData.status);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(authentication, balancePlatform, id, paymentInstrumentId, purchase, status);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class AuthenticationNotificationData {\n");
      sb.append("    authentication: ").append(toIndentedString(authentication)).append("\n");
      sb.append("    balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    paymentInstrumentId: ")
          .append(toIndentedString(paymentInstrumentId))
          .append("\n");
      sb.append("    purchase: ").append(toIndentedString(purchase)).append("\n");
      sb.append("    status: ").append(toIndentedString(status)).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 AuthenticationNotificationData given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of AuthenticationNotificationData
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     AuthenticationNotificationData
     */
    public static AuthenticationNotificationData fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, AuthenticationNotificationData.class);
    }
  
    /**
     * Convert an instance of AuthenticationNotificationData to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  