From 2380734ddab564b339986da59325aa63e811453c Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Tue, 12 May 2026 08:56:44 +0000 Subject: [PATCH] [sessionauthentication] Automated update from Adyen/adyen-openapi@d422828 --- sdk-generation-log/sessionauthentication.json | 8 + .../BalanceAccountResource.java | 198 ----------------- .../sessionauthentication/InvalidField.java | 104 ++++----- .../MerchantAccountResource.java | 201 ------------------ .../sessionauthentication/ProductType.java | 11 +- .../model/sessionauthentication/Resource.java | 4 - .../sessionauthentication/ResourceType.java | 15 +- 7 files changed, 80 insertions(+), 461 deletions(-) create mode 100644 sdk-generation-log/sessionauthentication.json delete mode 100644 src/main/java/com/adyen/model/sessionauthentication/BalanceAccountResource.java delete mode 100644 src/main/java/com/adyen/model/sessionauthentication/MerchantAccountResource.java diff --git a/sdk-generation-log/sessionauthentication.json b/sdk-generation-log/sessionauthentication.json new file mode 100644 index 000000000..ec3c10442 --- /dev/null +++ b/sdk-generation-log/sessionauthentication.json @@ -0,0 +1,8 @@ +{ + "service": "sessionauthentication", + "project": "java", + "generatedAt": "2026-05-12T08:56:44Z", + "openapiCommitSha": "d422828d831ea1bcbb81e7fb483ea2811ff47848", + "automationCommitSha": "0b7ef4e0ed6a7963ab005efe76eab748250edafc", + "libraryCommitSha": "3653edbb62e06f986f9d010b6e9f0a9c5945cf6f" +} diff --git a/src/main/java/com/adyen/model/sessionauthentication/BalanceAccountResource.java b/src/main/java/com/adyen/model/sessionauthentication/BalanceAccountResource.java deleted file mode 100644 index 4c7820aa5..000000000 --- a/src/main/java/com/adyen/model/sessionauthentication/BalanceAccountResource.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Session authentication API - * - * 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.sessionauthentication; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.util.*; - -/** BalanceAccountResource */ -@JsonPropertyOrder({BalanceAccountResource.JSON_PROPERTY_BALANCE_ACCOUNT_ID}) -@JsonIgnoreProperties( - value = - "type", // ignore manually set type, it will be automatically generated by Jackson during - // serialization - allowSetters = true // allows the type to be set during deserialization - ) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type", - visible = true) -public class BalanceAccountResource extends Resource { - public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId"; - private String balanceAccountId; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetBalanceAccountId = false; - - /** - * Sets whether attributes with null values should be explicitly included in the JSON payload. - * Default is false. - */ - @JsonIgnore private boolean includeNullValues = false; - - public BalanceAccountResource() {} - - /** - * balanceAccountId - * - * @param balanceAccountId - * @return the current {@code BalanceAccountResource} instance, allowing for method chaining - */ - public BalanceAccountResource balanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; - isSetBalanceAccountId = true; // mark as set - return this; - } - - /** - * Get balanceAccountId - * - * @return balanceAccountId - */ - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBalanceAccountId() { - return balanceAccountId; - } - - /** - * balanceAccountId - * - * @param balanceAccountId - */ - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBalanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; - isSetBalanceAccountId = true; // mark as set - } - - /** - * Configures whether null values are explicitly serialized in the JSON payload. Default is false. - */ - public BalanceAccountResource includeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - return this; - } - - /** Returns whether null values are explicitly serialized in the JSON payload. */ - public boolean isIncludeNullValues() { - return includeNullValues; - } - - /** - * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. - */ - public void setIncludeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - } - - /** Return true if this BalanceAccountResource object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BalanceAccountResource balanceAccountResource = (BalanceAccountResource) o; - return Objects.equals(this.balanceAccountId, balanceAccountResource.balanceAccountId) - && Objects.equals(this.isSetBalanceAccountId, balanceAccountResource.isSetBalanceAccountId) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(balanceAccountId, isSetBalanceAccountId, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BalanceAccountResource {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("BalanceAccountResource", BalanceAccountResource.class); - JSON.registerDiscriminator(BalanceAccountResource.class, "type", mappings); - } - - /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ - @JsonInclude(JsonInclude.Include.ALWAYS) - @JsonAnyGetter - public Map getExplicitNulls() { - if (!this.includeNullValues) { - return Collections.emptyMap(); - } - - Map nulls = new HashMap<>(); - - if (isSetBalanceAccountId) { - addIfNull(nulls, JSON_PROPERTY_BALANCE_ACCOUNT_ID, this.balanceAccountId); - } - - return nulls; - } - - // add to map when value is null - private void addIfNull(Map map, String key, Object value) { - if (value == null) { - map.put(key, null); - } - } - - /** - * Create an instance of BalanceAccountResource given an JSON string - * - * @param jsonString JSON string - * @return An instance of BalanceAccountResource - * @throws JsonProcessingException if the JSON string is invalid with respect to - * BalanceAccountResource - */ - public static BalanceAccountResource fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, BalanceAccountResource.class); - } - - /** - * Convert an instance of BalanceAccountResource to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/model/sessionauthentication/InvalidField.java b/src/main/java/com/adyen/model/sessionauthentication/InvalidField.java index 843fe3995..b04cb9ca5 100644 --- a/src/main/java/com/adyen/model/sessionauthentication/InvalidField.java +++ b/src/main/java/com/adyen/model/sessionauthentication/InvalidField.java @@ -21,11 +21,17 @@ /** InvalidField */ @JsonPropertyOrder({ + InvalidField.JSON_PROPERTY_MESSAGE, InvalidField.JSON_PROPERTY_NAME, - InvalidField.JSON_PROPERTY_VALUE, - InvalidField.JSON_PROPERTY_MESSAGE + InvalidField.JSON_PROPERTY_VALUE }) public class InvalidField { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMessage = false; + public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -38,12 +44,6 @@ public class InvalidField { /** Mark when the attribute has been explicitly set. */ private boolean isSetValue = false; - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetMessage = false; - /** * Sets whether attributes with null values should be explicitly included in the JSON payload. * Default is false. @@ -52,6 +52,41 @@ public class InvalidField { public InvalidField() {} + /** + * Description of the validation error. + * + * @param message Description of the validation error. + * @return the current {@code InvalidField} instance, allowing for method chaining + */ + public InvalidField message(String message) { + this.message = message; + isSetMessage = true; // mark as set + return this; + } + + /** + * Description of the validation error. + * + * @return message Description of the validation error. + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + /** + * Description of the validation error. + * + * @param message Description of the validation error. + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + isSetMessage = true; // mark as set + } + /** * The field that has an invalid value. * @@ -122,41 +157,6 @@ public void setValue(String value) { isSetValue = true; // mark as set } - /** - * Description of the validation error. - * - * @param message Description of the validation error. - * @return the current {@code InvalidField} instance, allowing for method chaining - */ - public InvalidField message(String message) { - this.message = message; - isSetMessage = true; // mark as set - return this; - } - - /** - * Description of the validation error. - * - * @return message Description of the validation error. - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - /** - * Description of the validation error. - * - * @param message Description of the validation error. - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - isSetMessage = true; // mark as set - } - /** * Configures whether null values are explicitly serialized in the JSON payload. Default is false. */ @@ -187,26 +187,26 @@ public boolean equals(Object o) { return false; } InvalidField invalidField = (InvalidField) o; - return Objects.equals(this.name, invalidField.name) + return Objects.equals(this.message, invalidField.message) + && Objects.equals(this.isSetMessage, invalidField.isSetMessage) + && Objects.equals(this.name, invalidField.name) && Objects.equals(this.isSetName, invalidField.isSetName) && Objects.equals(this.value, invalidField.value) - && Objects.equals(this.isSetValue, invalidField.isSetValue) - && Objects.equals(this.message, invalidField.message) - && Objects.equals(this.isSetMessage, invalidField.isSetMessage); + && Objects.equals(this.isSetValue, invalidField.isSetValue); } @Override public int hashCode() { - return Objects.hash(name, isSetName, value, isSetValue, message, isSetMessage); + return Objects.hash(message, isSetMessage, name, isSetName, value, isSetValue); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InvalidField {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append("}"); return sb.toString(); } @@ -231,15 +231,15 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetMessage) { + addIfNull(nulls, JSON_PROPERTY_MESSAGE, this.message); + } if (isSetName) { addIfNull(nulls, JSON_PROPERTY_NAME, this.name); } if (isSetValue) { addIfNull(nulls, JSON_PROPERTY_VALUE, this.value); } - if (isSetMessage) { - addIfNull(nulls, JSON_PROPERTY_MESSAGE, this.message); - } return nulls; } diff --git a/src/main/java/com/adyen/model/sessionauthentication/MerchantAccountResource.java b/src/main/java/com/adyen/model/sessionauthentication/MerchantAccountResource.java deleted file mode 100644 index 52f5d1532..000000000 --- a/src/main/java/com/adyen/model/sessionauthentication/MerchantAccountResource.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Session authentication API - * - * 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.sessionauthentication; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.util.*; - -/** MerchantAccountResource */ -@JsonPropertyOrder({MerchantAccountResource.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE}) -@JsonIgnoreProperties( - value = - "type", // ignore manually set type, it will be automatically generated by Jackson during - // serialization - allowSetters = true // allows the type to be set during deserialization - ) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type", - visible = true) -public class MerchantAccountResource extends Resource { - public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; - private String merchantAccountCode; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetMerchantAccountCode = false; - - /** - * Sets whether attributes with null values should be explicitly included in the JSON payload. - * Default is false. - */ - @JsonIgnore private boolean includeNullValues = false; - - public MerchantAccountResource() {} - - /** - * merchantAccountCode - * - * @param merchantAccountCode - * @return the current {@code MerchantAccountResource} instance, allowing for method chaining - */ - public MerchantAccountResource merchantAccountCode(String merchantAccountCode) { - this.merchantAccountCode = merchantAccountCode; - isSetMerchantAccountCode = true; // mark as set - return this; - } - - /** - * Get merchantAccountCode - * - * @return merchantAccountCode - */ - @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMerchantAccountCode() { - return merchantAccountCode; - } - - /** - * merchantAccountCode - * - * @param merchantAccountCode - */ - @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMerchantAccountCode(String merchantAccountCode) { - this.merchantAccountCode = merchantAccountCode; - isSetMerchantAccountCode = true; // mark as set - } - - /** - * Configures whether null values are explicitly serialized in the JSON payload. Default is false. - */ - public MerchantAccountResource includeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - return this; - } - - /** Returns whether null values are explicitly serialized in the JSON payload. */ - public boolean isIncludeNullValues() { - return includeNullValues; - } - - /** - * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. - */ - public void setIncludeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - } - - /** Return true if this MerchantAccountResource object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MerchantAccountResource merchantAccountResource = (MerchantAccountResource) o; - return Objects.equals(this.merchantAccountCode, merchantAccountResource.merchantAccountCode) - && Objects.equals( - this.isSetMerchantAccountCode, merchantAccountResource.isSetMerchantAccountCode) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(merchantAccountCode, isSetMerchantAccountCode, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MerchantAccountResource {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" merchantAccountCode: ") - .append(toIndentedString(merchantAccountCode)) - .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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("MerchantAccountResource", MerchantAccountResource.class); - JSON.registerDiscriminator(MerchantAccountResource.class, "type", mappings); - } - - /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ - @JsonInclude(JsonInclude.Include.ALWAYS) - @JsonAnyGetter - public Map getExplicitNulls() { - if (!this.includeNullValues) { - return Collections.emptyMap(); - } - - Map nulls = new HashMap<>(); - - if (isSetMerchantAccountCode) { - addIfNull(nulls, JSON_PROPERTY_MERCHANT_ACCOUNT_CODE, this.merchantAccountCode); - } - - return nulls; - } - - // add to map when value is null - private void addIfNull(Map map, String key, Object value) { - if (value == null) { - map.put(key, null); - } - } - - /** - * Create an instance of MerchantAccountResource given an JSON string - * - * @param jsonString JSON string - * @return An instance of MerchantAccountResource - * @throws JsonProcessingException if the JSON string is invalid with respect to - * MerchantAccountResource - */ - public static MerchantAccountResource fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, MerchantAccountResource.class); - } - - /** - * Convert an instance of MerchantAccountResource to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/model/sessionauthentication/ProductType.java b/src/main/java/com/adyen/model/sessionauthentication/ProductType.java index 9784a9393..33555cf64 100644 --- a/src/main/java/com/adyen/model/sessionauthentication/ProductType.java +++ b/src/main/java/com/adyen/model/sessionauthentication/ProductType.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.*; +import java.util.logging.Logger; /** Gets or Sets ProductType */ public enum ProductType { @@ -23,6 +24,8 @@ public enum ProductType { BANK("bank"); + private static final Logger LOG = Logger.getLogger(ProductType.class.getName()); + private String value; ProductType(String value) { @@ -46,6 +49,12 @@ public static ProductType fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + // handling unexpected value + LOG.warning( + "ProductType: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(ProductType.values())); + return null; } } diff --git a/src/main/java/com/adyen/model/sessionauthentication/Resource.java b/src/main/java/com/adyen/model/sessionauthentication/Resource.java index c8cc4b455..1560e30fb 100644 --- a/src/main/java/com/adyen/model/sessionauthentication/Resource.java +++ b/src/main/java/com/adyen/model/sessionauthentication/Resource.java @@ -37,9 +37,7 @@ visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = AccountHolderResource.class, name = "accountHolder"), - @JsonSubTypes.Type(value = BalanceAccountResource.class, name = "balanceAccount"), @JsonSubTypes.Type(value = LegalEntityResource.class, name = "legalEntity"), - @JsonSubTypes.Type(value = MerchantAccountResource.class, name = "merchantAccount"), @JsonSubTypes.Type(value = PaymentInstrumentResource.class, name = "paymentInstrument"), }) public class Resource { @@ -154,9 +152,7 @@ private String toIndentedString(Object o) { // Initialize and register the discriminator mappings. Map> mappings = new HashMap<>(); mappings.put("accountHolder", AccountHolderResource.class); - mappings.put("balanceAccount", BalanceAccountResource.class); mappings.put("legalEntity", LegalEntityResource.class); - mappings.put("merchantAccount", MerchantAccountResource.class); mappings.put("paymentInstrument", PaymentInstrumentResource.class); mappings.put("Resource", Resource.class); JSON.registerDiscriminator(Resource.class, "type", mappings); diff --git a/src/main/java/com/adyen/model/sessionauthentication/ResourceType.java b/src/main/java/com/adyen/model/sessionauthentication/ResourceType.java index 3dfe0b78d..e48464663 100644 --- a/src/main/java/com/adyen/model/sessionauthentication/ResourceType.java +++ b/src/main/java/com/adyen/model/sessionauthentication/ResourceType.java @@ -14,19 +14,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.*; +import java.util.logging.Logger; /** Gets or Sets ResourceType */ public enum ResourceType { LEGALENTITY("legalEntity"), - BALANCEACCOUNT("balanceAccount"), - ACCOUNTHOLDER("accountHolder"), - MERCHANTACCOUNT("merchantAccount"), - PAYMENTINSTRUMENT("paymentInstrument"); + private static final Logger LOG = Logger.getLogger(ResourceType.class.getName()); + private String value; ResourceType(String value) { @@ -50,6 +49,12 @@ public static ResourceType fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + // handling unexpected value + LOG.warning( + "ResourceType: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(ResourceType.values())); + return null; } }