|
| 1 | +/* |
| 2 | + * Authentication webhooks |
| 3 | + * |
| 4 | + * The version of the OpenAPI document: 1 |
| 5 | + * |
| 6 | + * |
| 7 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 8 | + * https://openapi-generator.tech |
| 9 | + * Do not edit the class manually. |
| 10 | + */ |
| 11 | + |
| 12 | + |
| 13 | +package com.adyen.model.acswebhooks; |
| 14 | + |
| 15 | +import java.util.Objects; |
| 16 | +import java.util.Map; |
| 17 | +import java.util.HashMap; |
| 18 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 19 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 20 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 21 | +import com.fasterxml.jackson.annotation.JsonTypeName; |
| 22 | +import com.fasterxml.jackson.annotation.JsonValue; |
| 23 | +import java.util.Arrays; |
| 24 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 25 | +import com.fasterxml.jackson.core.JsonProcessingException; |
| 26 | + |
| 27 | + |
| 28 | +/** |
| 29 | + * AuthenticationDecision |
| 30 | + */ |
| 31 | +@JsonPropertyOrder({ |
| 32 | + AuthenticationDecision.JSON_PROPERTY_STATUS |
| 33 | +}) |
| 34 | + |
| 35 | +public class AuthenticationDecision { |
| 36 | + /** |
| 37 | + * The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). |
| 38 | + */ |
| 39 | + public enum StatusEnum { |
| 40 | + PROCEED(String.valueOf("proceed")), |
| 41 | + |
| 42 | + REFUSED(String.valueOf("refused")); |
| 43 | + |
| 44 | + private String value; |
| 45 | + |
| 46 | + StatusEnum(String value) { |
| 47 | + this.value = value; |
| 48 | + } |
| 49 | + |
| 50 | + @JsonValue |
| 51 | + public String getValue() { |
| 52 | + return value; |
| 53 | + } |
| 54 | + |
| 55 | + @Override |
| 56 | + public String toString() { |
| 57 | + return String.valueOf(value); |
| 58 | + } |
| 59 | + |
| 60 | + @JsonCreator |
| 61 | + public static StatusEnum fromValue(String value) { |
| 62 | + for (StatusEnum b : StatusEnum.values()) { |
| 63 | + if (b.value.equals(value)) { |
| 64 | + return b; |
| 65 | + } |
| 66 | + } |
| 67 | + throw new IllegalArgumentException("Unexpected value '" + value + "'"); |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + public static final String JSON_PROPERTY_STATUS = "status"; |
| 72 | + private StatusEnum status; |
| 73 | + |
| 74 | + public AuthenticationDecision() { |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). |
| 79 | + * |
| 80 | + * @param status |
| 81 | + * @return the current {@code AuthenticationDecision} instance, allowing for method chaining |
| 82 | + */ |
| 83 | + public AuthenticationDecision status(StatusEnum status) { |
| 84 | + this.status = status; |
| 85 | + return this; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). |
| 90 | + * @return status |
| 91 | + */ |
| 92 | + @JsonProperty(JSON_PROPERTY_STATUS) |
| 93 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 94 | + public StatusEnum getStatus() { |
| 95 | + return status; |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). |
| 100 | + * |
| 101 | + * @param status |
| 102 | + */ |
| 103 | + @JsonProperty(JSON_PROPERTY_STATUS) |
| 104 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 105 | + public void setStatus(StatusEnum status) { |
| 106 | + this.status = status; |
| 107 | + } |
| 108 | + |
| 109 | + /** |
| 110 | + * Return true if this AuthenticationDecision object is equal to o. |
| 111 | + */ |
| 112 | + @Override |
| 113 | + public boolean equals(Object o) { |
| 114 | + if (this == o) { |
| 115 | + return true; |
| 116 | + } |
| 117 | + if (o == null || getClass() != o.getClass()) { |
| 118 | + return false; |
| 119 | + } |
| 120 | + AuthenticationDecision authenticationDecision = (AuthenticationDecision) o; |
| 121 | + return Objects.equals(this.status, authenticationDecision.status); |
| 122 | + } |
| 123 | + |
| 124 | + @Override |
| 125 | + public int hashCode() { |
| 126 | + return Objects.hash(status); |
| 127 | + } |
| 128 | + |
| 129 | + @Override |
| 130 | + public String toString() { |
| 131 | + StringBuilder sb = new StringBuilder(); |
| 132 | + sb.append("class AuthenticationDecision {\n"); |
| 133 | + sb.append(" status: ").append(toIndentedString(status)).append("\n"); |
| 134 | + sb.append("}"); |
| 135 | + return sb.toString(); |
| 136 | + } |
| 137 | + |
| 138 | + /** |
| 139 | + * Convert the given object to string with each line indented by 4 spaces |
| 140 | + * (except the first line). |
| 141 | + */ |
| 142 | + private String toIndentedString(Object o) { |
| 143 | + if (o == null) { |
| 144 | + return "null"; |
| 145 | + } |
| 146 | + return o.toString().replace("\n", "\n "); |
| 147 | + } |
| 148 | + |
| 149 | +/** |
| 150 | + * Create an instance of AuthenticationDecision given an JSON string |
| 151 | + * |
| 152 | + * @param jsonString JSON string |
| 153 | + * @return An instance of AuthenticationDecision |
| 154 | + * @throws JsonProcessingException if the JSON string is invalid with respect to AuthenticationDecision |
| 155 | + */ |
| 156 | + public static AuthenticationDecision fromJson(String jsonString) throws JsonProcessingException { |
| 157 | + return JSON.getMapper().readValue(jsonString, AuthenticationDecision.class); |
| 158 | + } |
| 159 | +/** |
| 160 | + * Convert an instance of AuthenticationDecision to an JSON string |
| 161 | + * |
| 162 | + * @return JSON string |
| 163 | + */ |
| 164 | + public String toJson() throws JsonProcessingException { |
| 165 | + return JSON.getMapper().writeValueAsString(this); |
| 166 | + } |
| 167 | +} |
0 commit comments