|
| 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 | +package com.adyen.model.balanceplatform; |
| 13 | + |
| 14 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 15 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 16 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 17 | +import com.fasterxml.jackson.core.JsonProcessingException; |
| 18 | +import java.util.*; |
| 19 | +import java.util.ArrayList; |
| 20 | +import java.util.List; |
| 21 | + |
| 22 | +/** ApproveAssociationRequest */ |
| 23 | +@JsonPropertyOrder({ |
| 24 | + ApproveAssociationRequest.JSON_PROPERTY_ENTITY_ID, |
| 25 | + ApproveAssociationRequest.JSON_PROPERTY_ENTITY_TYPE, |
| 26 | + ApproveAssociationRequest.JSON_PROPERTY_SCA_DEVICE_IDS, |
| 27 | + ApproveAssociationRequest.JSON_PROPERTY_STATUS |
| 28 | +}) |
| 29 | +public class ApproveAssociationRequest { |
| 30 | + public static final String JSON_PROPERTY_ENTITY_ID = "entityId"; |
| 31 | + private String entityId; |
| 32 | + |
| 33 | + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; |
| 34 | + private ScaEntityType entityType; |
| 35 | + |
| 36 | + public static final String JSON_PROPERTY_SCA_DEVICE_IDS = "scaDeviceIds"; |
| 37 | + private List<String> scaDeviceIds; |
| 38 | + |
| 39 | + public static final String JSON_PROPERTY_STATUS = "status"; |
| 40 | + private AssociationStatus status; |
| 41 | + |
| 42 | + public ApproveAssociationRequest() {} |
| 43 | + |
| 44 | + /** |
| 45 | + * The unique identifier of the entity. |
| 46 | + * |
| 47 | + * @param entityId The unique identifier of the entity. |
| 48 | + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining |
| 49 | + */ |
| 50 | + public ApproveAssociationRequest entityId(String entityId) { |
| 51 | + this.entityId = entityId; |
| 52 | + return this; |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * The unique identifier of the entity. |
| 57 | + * |
| 58 | + * @return entityId The unique identifier of the entity. |
| 59 | + */ |
| 60 | + @JsonProperty(JSON_PROPERTY_ENTITY_ID) |
| 61 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 62 | + public String getEntityId() { |
| 63 | + return entityId; |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * The unique identifier of the entity. |
| 68 | + * |
| 69 | + * @param entityId The unique identifier of the entity. |
| 70 | + */ |
| 71 | + @JsonProperty(JSON_PROPERTY_ENTITY_ID) |
| 72 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 73 | + public void setEntityId(String entityId) { |
| 74 | + this.entityId = entityId; |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * entityType |
| 79 | + * |
| 80 | + * @param entityType |
| 81 | + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining |
| 82 | + */ |
| 83 | + public ApproveAssociationRequest entityType(ScaEntityType entityType) { |
| 84 | + this.entityType = entityType; |
| 85 | + return this; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Get entityType |
| 90 | + * |
| 91 | + * @return entityType |
| 92 | + */ |
| 93 | + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) |
| 94 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 95 | + public ScaEntityType getEntityType() { |
| 96 | + return entityType; |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * entityType |
| 101 | + * |
| 102 | + * @param entityType |
| 103 | + */ |
| 104 | + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) |
| 105 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 106 | + public void setEntityType(ScaEntityType entityType) { |
| 107 | + this.entityType = entityType; |
| 108 | + } |
| 109 | + |
| 110 | + /** |
| 111 | + * List of device ids associated to the entity that will be approved. |
| 112 | + * |
| 113 | + * @param scaDeviceIds List of device ids associated to the entity that will be approved. |
| 114 | + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining |
| 115 | + */ |
| 116 | + public ApproveAssociationRequest scaDeviceIds(List<String> scaDeviceIds) { |
| 117 | + this.scaDeviceIds = scaDeviceIds; |
| 118 | + return this; |
| 119 | + } |
| 120 | + |
| 121 | + public ApproveAssociationRequest addScaDeviceIdsItem(String scaDeviceIdsItem) { |
| 122 | + if (this.scaDeviceIds == null) { |
| 123 | + this.scaDeviceIds = new ArrayList<>(); |
| 124 | + } |
| 125 | + this.scaDeviceIds.add(scaDeviceIdsItem); |
| 126 | + return this; |
| 127 | + } |
| 128 | + |
| 129 | + /** |
| 130 | + * List of device ids associated to the entity that will be approved. |
| 131 | + * |
| 132 | + * @return scaDeviceIds List of device ids associated to the entity that will be approved. |
| 133 | + */ |
| 134 | + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_IDS) |
| 135 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 136 | + public List<String> getScaDeviceIds() { |
| 137 | + return scaDeviceIds; |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * List of device ids associated to the entity that will be approved. |
| 142 | + * |
| 143 | + * @param scaDeviceIds List of device ids associated to the entity that will be approved. |
| 144 | + */ |
| 145 | + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_IDS) |
| 146 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 147 | + public void setScaDeviceIds(List<String> scaDeviceIds) { |
| 148 | + this.scaDeviceIds = scaDeviceIds; |
| 149 | + } |
| 150 | + |
| 151 | + /** |
| 152 | + * status |
| 153 | + * |
| 154 | + * @param status |
| 155 | + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining |
| 156 | + */ |
| 157 | + public ApproveAssociationRequest status(AssociationStatus status) { |
| 158 | + this.status = status; |
| 159 | + return this; |
| 160 | + } |
| 161 | + |
| 162 | + /** |
| 163 | + * Get status |
| 164 | + * |
| 165 | + * @return status |
| 166 | + */ |
| 167 | + @JsonProperty(JSON_PROPERTY_STATUS) |
| 168 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 169 | + public AssociationStatus getStatus() { |
| 170 | + return status; |
| 171 | + } |
| 172 | + |
| 173 | + /** |
| 174 | + * status |
| 175 | + * |
| 176 | + * @param status |
| 177 | + */ |
| 178 | + @JsonProperty(JSON_PROPERTY_STATUS) |
| 179 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 180 | + public void setStatus(AssociationStatus status) { |
| 181 | + this.status = status; |
| 182 | + } |
| 183 | + |
| 184 | + /** Return true if this ApproveAssociationRequest object is equal to o. */ |
| 185 | + @Override |
| 186 | + public boolean equals(Object o) { |
| 187 | + if (this == o) { |
| 188 | + return true; |
| 189 | + } |
| 190 | + if (o == null || getClass() != o.getClass()) { |
| 191 | + return false; |
| 192 | + } |
| 193 | + ApproveAssociationRequest approveAssociationRequest = (ApproveAssociationRequest) o; |
| 194 | + return Objects.equals(this.entityId, approveAssociationRequest.entityId) |
| 195 | + && Objects.equals(this.entityType, approveAssociationRequest.entityType) |
| 196 | + && Objects.equals(this.scaDeviceIds, approveAssociationRequest.scaDeviceIds) |
| 197 | + && Objects.equals(this.status, approveAssociationRequest.status); |
| 198 | + } |
| 199 | + |
| 200 | + @Override |
| 201 | + public int hashCode() { |
| 202 | + return Objects.hash(entityId, entityType, scaDeviceIds, status); |
| 203 | + } |
| 204 | + |
| 205 | + @Override |
| 206 | + public String toString() { |
| 207 | + StringBuilder sb = new StringBuilder(); |
| 208 | + sb.append("class ApproveAssociationRequest {\n"); |
| 209 | + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); |
| 210 | + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); |
| 211 | + sb.append(" scaDeviceIds: ").append(toIndentedString(scaDeviceIds)).append("\n"); |
| 212 | + sb.append(" status: ").append(toIndentedString(status)).append("\n"); |
| 213 | + sb.append("}"); |
| 214 | + return sb.toString(); |
| 215 | + } |
| 216 | + |
| 217 | + /** |
| 218 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 219 | + */ |
| 220 | + private String toIndentedString(Object o) { |
| 221 | + if (o == null) { |
| 222 | + return "null"; |
| 223 | + } |
| 224 | + return o.toString().replace("\n", "\n "); |
| 225 | + } |
| 226 | + |
| 227 | + /** |
| 228 | + * Create an instance of ApproveAssociationRequest given an JSON string |
| 229 | + * |
| 230 | + * @param jsonString JSON string |
| 231 | + * @return An instance of ApproveAssociationRequest |
| 232 | + * @throws JsonProcessingException if the JSON string is invalid with respect to |
| 233 | + * ApproveAssociationRequest |
| 234 | + */ |
| 235 | + public static ApproveAssociationRequest fromJson(String jsonString) |
| 236 | + throws JsonProcessingException { |
| 237 | + return JSON.getMapper().readValue(jsonString, ApproveAssociationRequest.class); |
| 238 | + } |
| 239 | + |
| 240 | + /** |
| 241 | + * Convert an instance of ApproveAssociationRequest to an JSON string |
| 242 | + * |
| 243 | + * @return JSON string |
| 244 | + */ |
| 245 | + public String toJson() throws JsonProcessingException { |
| 246 | + return JSON.getMapper().writeValueAsString(this); |
| 247 | + } |
| 248 | +} |
0 commit comments