|
| 1 | +/* |
| 2 | + * Configuration API |
| 3 | + * |
| 4 | + * The version of the OpenAPI document: 2 |
| 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.balanceplatform; |
| 14 | + |
| 15 | +import java.util.Objects; |
| 16 | +import java.util.Arrays; |
| 17 | +import java.util.Map; |
| 18 | +import java.util.HashMap; |
| 19 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 20 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 21 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 22 | +import com.fasterxml.jackson.annotation.JsonTypeName; |
| 23 | +import com.fasterxml.jackson.annotation.JsonValue; |
| 24 | +import io.swagger.annotations.ApiModel; |
| 25 | +import io.swagger.annotations.ApiModelProperty; |
| 26 | +import java.util.ArrayList; |
| 27 | +import java.util.List; |
| 28 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 29 | +import com.fasterxml.jackson.core.JsonProcessingException; |
| 30 | + |
| 31 | + |
| 32 | +/** |
| 33 | + * PriorityRestriction |
| 34 | + */ |
| 35 | +@JsonPropertyOrder({ |
| 36 | + PriorityRestriction.JSON_PROPERTY_OPERATION, |
| 37 | + PriorityRestriction.JSON_PROPERTY_VALUE |
| 38 | +}) |
| 39 | + |
| 40 | +public class PriorityRestriction { |
| 41 | + public static final String JSON_PROPERTY_OPERATION = "operation"; |
| 42 | + private String operation; |
| 43 | + |
| 44 | + /** |
| 45 | + * Gets or Sets value |
| 46 | + */ |
| 47 | + public enum ValueEnum { |
| 48 | + CROSSBORDER("crossBorder"), |
| 49 | + |
| 50 | + FAST("fast"), |
| 51 | + |
| 52 | + INSTANT("instant"), |
| 53 | + |
| 54 | + INTRABANK("intraBank"), |
| 55 | + |
| 56 | + REGULAR("regular"); |
| 57 | + |
| 58 | + private String value; |
| 59 | + |
| 60 | + ValueEnum(String value) { |
| 61 | + this.value = value; |
| 62 | + } |
| 63 | + |
| 64 | + @JsonValue |
| 65 | + public String getValue() { |
| 66 | + return value; |
| 67 | + } |
| 68 | + |
| 69 | + @Override |
| 70 | + public String toString() { |
| 71 | + return String.valueOf(value); |
| 72 | + } |
| 73 | + |
| 74 | + @JsonCreator |
| 75 | + public static ValueEnum fromValue(String value) { |
| 76 | + for (ValueEnum b : ValueEnum.values()) { |
| 77 | + if (b.value.equals(value)) { |
| 78 | + return b; |
| 79 | + } |
| 80 | + } |
| 81 | + throw new IllegalArgumentException("Unexpected value '" + value + "'"); |
| 82 | + } |
| 83 | + } |
| 84 | + |
| 85 | + public static final String JSON_PROPERTY_VALUE = "value"; |
| 86 | + private List<ValueEnum> value = null; |
| 87 | + |
| 88 | + public PriorityRestriction() { |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * Defines how the condition must be evaluated. |
| 93 | + * |
| 94 | + * @param operation |
| 95 | + * @return the current {@code PriorityRestriction} instance, allowing for method chaining |
| 96 | + */ |
| 97 | + public PriorityRestriction operation(String operation) { |
| 98 | + this.operation = operation; |
| 99 | + return this; |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Defines how the condition must be evaluated. |
| 104 | + * @return operation |
| 105 | + */ |
| 106 | + @ApiModelProperty(required = true, value = "Defines how the condition must be evaluated.") |
| 107 | + @JsonProperty(JSON_PROPERTY_OPERATION) |
| 108 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 109 | + public String getOperation() { |
| 110 | + return operation; |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Defines how the condition must be evaluated. |
| 115 | + * |
| 116 | + * @param operation |
| 117 | + */ |
| 118 | + @JsonProperty(JSON_PROPERTY_OPERATION) |
| 119 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 120 | + public void setOperation(String operation) { |
| 121 | + this.operation = operation; |
| 122 | + } |
| 123 | + |
| 124 | + /** |
| 125 | + * value |
| 126 | + * |
| 127 | + * @param value |
| 128 | + * @return the current {@code PriorityRestriction} instance, allowing for method chaining |
| 129 | + */ |
| 130 | + public PriorityRestriction value(List<ValueEnum> value) { |
| 131 | + this.value = value; |
| 132 | + return this; |
| 133 | + } |
| 134 | + |
| 135 | + public PriorityRestriction addValueItem(ValueEnum valueItem) { |
| 136 | + if (this.value == null) { |
| 137 | + this.value = new ArrayList<>(); |
| 138 | + } |
| 139 | + this.value.add(valueItem); |
| 140 | + return this; |
| 141 | + } |
| 142 | + |
| 143 | + /** |
| 144 | + * value |
| 145 | + * @return value |
| 146 | + */ |
| 147 | + @ApiModelProperty(value = "") |
| 148 | + @JsonProperty(JSON_PROPERTY_VALUE) |
| 149 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 150 | + public List<ValueEnum> getValue() { |
| 151 | + return value; |
| 152 | + } |
| 153 | + |
| 154 | + /** |
| 155 | + * value |
| 156 | + * |
| 157 | + * @param value |
| 158 | + */ |
| 159 | + @JsonProperty(JSON_PROPERTY_VALUE) |
| 160 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 161 | + public void setValue(List<ValueEnum> value) { |
| 162 | + this.value = value; |
| 163 | + } |
| 164 | + |
| 165 | + /** |
| 166 | + * Return true if this PriorityRestriction object is equal to o. |
| 167 | + */ |
| 168 | + @Override |
| 169 | + public boolean equals(Object o) { |
| 170 | + if (this == o) { |
| 171 | + return true; |
| 172 | + } |
| 173 | + if (o == null || getClass() != o.getClass()) { |
| 174 | + return false; |
| 175 | + } |
| 176 | + PriorityRestriction priorityRestriction = (PriorityRestriction) o; |
| 177 | + return Objects.equals(this.operation, priorityRestriction.operation) && |
| 178 | + Objects.equals(this.value, priorityRestriction.value); |
| 179 | + } |
| 180 | + |
| 181 | + @Override |
| 182 | + public int hashCode() { |
| 183 | + return Objects.hash(operation, value); |
| 184 | + } |
| 185 | + |
| 186 | + @Override |
| 187 | + public String toString() { |
| 188 | + StringBuilder sb = new StringBuilder(); |
| 189 | + sb.append("class PriorityRestriction {\n"); |
| 190 | + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); |
| 191 | + sb.append(" value: ").append(toIndentedString(value)).append("\n"); |
| 192 | + sb.append("}"); |
| 193 | + return sb.toString(); |
| 194 | + } |
| 195 | + |
| 196 | + /** |
| 197 | + * Convert the given object to string with each line indented by 4 spaces |
| 198 | + * (except the first line). |
| 199 | + */ |
| 200 | + private String toIndentedString(Object o) { |
| 201 | + if (o == null) { |
| 202 | + return "null"; |
| 203 | + } |
| 204 | + return o.toString().replace("\n", "\n "); |
| 205 | + } |
| 206 | + |
| 207 | +/** |
| 208 | + * Create an instance of PriorityRestriction given an JSON string |
| 209 | + * |
| 210 | + * @param jsonString JSON string |
| 211 | + * @return An instance of PriorityRestriction |
| 212 | + * @throws JsonProcessingException if the JSON string is invalid with respect to PriorityRestriction |
| 213 | + */ |
| 214 | + public static PriorityRestriction fromJson(String jsonString) throws JsonProcessingException { |
| 215 | + return JSON.getMapper().readValue(jsonString, PriorityRestriction.class); |
| 216 | + } |
| 217 | +/** |
| 218 | + * Convert an instance of PriorityRestriction to an JSON string |
| 219 | + * |
| 220 | + * @return JSON string |
| 221 | + */ |
| 222 | + public String toJson() throws JsonProcessingException { |
| 223 | + return JSON.getMapper().writeValueAsString(this); |
| 224 | + } |
| 225 | +} |
0 commit comments