From 64b26769f622d9ea6789da99810bd0aa34acabef Mon Sep 17 00:00:00 2001 From: dvacca-onfido <134616519+dvacca-onfido@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:13:58 +0000 Subject: [PATCH] Upgrade after onfido-openapi-spec change ad80494 --- .release.json | 4 +- src/main/java/com/onfido/JSON.java | 8 +- src/main/java/com/onfido/api/DefaultApi.java | 110 +++---- .../java/com/onfido/model/BiometricToken.java | 69 ++-- .../onfido/model/BiometricTokenResponse.java | 295 ++++++++++++++++++ ...List.java => BiometricTokensResponse.java} | 58 ++-- .../InvalidatedBiometricTokenResponse.java | 295 ++++++++++++++++++ .../InvalidatedBiometricTokenSummary.java | 39 +-- ...> InvalidatedBiometricTokensResponse.java} | 56 ++-- ...ava => UpdatedBiometricTokenResponse.java} | 56 ++-- 10 files changed, 807 insertions(+), 183 deletions(-) create mode 100644 src/main/java/com/onfido/model/BiometricTokenResponse.java rename src/main/java/com/onfido/model/{BiometricTokensList.java => BiometricTokensResponse.java} (83%) create mode 100644 src/main/java/com/onfido/model/InvalidatedBiometricTokenResponse.java rename src/main/java/com/onfido/model/{InvalidatedBiometricTokensSummary.java => InvalidatedBiometricTokensResponse.java} (82%) rename src/main/java/com/onfido/model/{UpdateBiometricToken200Response.java => UpdatedBiometricTokenResponse.java} (80%) diff --git a/.release.json b/.release.json index 0aa3972..8ef9a2b 100644 --- a/.release.json +++ b/.release.json @@ -1,8 +1,8 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "d9d749d", - "long_sha": "d9d749dfbd3873524400efe236f7d398bb9e948e", + "short_sha": "ad80494", + "long_sha": "ad8049477731f42993257dd8cbbbd4a193f06c92", "version": "v6.2.0" }, "release": "v7.3.0" diff --git a/src/main/java/com/onfido/JSON.java b/src/main/java/com/onfido/JSON.java index 794c0d5..32e64b3 100644 --- a/src/main/java/com/onfido/JSON.java +++ b/src/main/java/com/onfido/JSON.java @@ -143,8 +143,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.ApplicantsList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.BiometricToken.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.BiometricTokenData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.BiometricTokenResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.BiometricTokenUpdater.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.BiometricTokensList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.BiometricTokensResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.Check.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.CheckBuilder.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.CheckRequest.CustomTypeAdapterFactory()); @@ -310,9 +311,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.IndiaPanReportAllOfBreakdownDeviceBreakdownPanValid.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.IndiaPanReportAllOfProperties.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.IndiaPanReportAllOfPropertiesDevice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.InvalidatedBiometricTokenResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.InvalidatedBiometricTokenSummary.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.InvalidatedBiometricTokenSummaryDeletedItems.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.InvalidatedBiometricTokensSummary.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.InvalidatedBiometricTokensResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.KnownFacesBreakdown.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.KnownFacesBreakdownImageIntegrity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.KnownFacesBreakdownPreviouslySeenFaces.CustomTypeAdapterFactory()); @@ -363,7 +365,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.Task.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.TaskItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.TimelineFileReference.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UpdateBiometricToken200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UpdatedBiometricTokenResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UsDrivingLicenceBreakdown.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UsDrivingLicenceBreakdownAddress.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UsDrivingLicenceBreakdownAddressBreakdown.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/onfido/api/DefaultApi.java b/src/main/java/com/onfido/api/DefaultApi.java index d26d5a1..d421565 100644 --- a/src/main/java/com/onfido/api/DefaultApi.java +++ b/src/main/java/com/onfido/api/DefaultApi.java @@ -34,9 +34,9 @@ import com.onfido.model.ApplicantConsent; import com.onfido.model.ApplicantUpdater; import com.onfido.model.ApplicantsList; -import com.onfido.model.BiometricToken; +import com.onfido.model.BiometricTokenResponse; import com.onfido.model.BiometricTokenUpdater; -import com.onfido.model.BiometricTokensList; +import com.onfido.model.BiometricTokensResponse; import com.onfido.model.Check; import com.onfido.model.CheckBuilder; import com.onfido.model.ChecksList; @@ -52,8 +52,8 @@ import java.io.File; import com.onfido.model.IdPhoto; import com.onfido.model.IdPhotosList; -import com.onfido.model.InvalidatedBiometricTokenSummary; -import com.onfido.model.InvalidatedBiometricTokensSummary; +import com.onfido.model.InvalidatedBiometricTokenResponse; +import com.onfido.model.InvalidatedBiometricTokensResponse; import com.onfido.model.LivePhoto; import com.onfido.model.LivePhotosList; import com.onfido.model.LiveVideo; @@ -78,7 +78,7 @@ import com.onfido.model.TimelineFileReference; import java.net.URI; import java.util.UUID; -import com.onfido.model.UpdateBiometricToken200Response; +import com.onfido.model.UpdatedBiometricTokenResponse; import com.onfido.model.WatchlistMonitor; import com.onfido.model.WatchlistMonitorBuilder; import com.onfido.model.WatchlistMonitorMatchesList; @@ -5681,16 +5681,16 @@ private okhttp3.Call findBiometricTokenValidateBeforeCall(@javax.annotation.Nonn } - private ApiResponse findBiometricTokenWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid) throws ApiException { + private ApiResponse findBiometricTokenWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid) throws ApiException { okhttp3.Call localVarCall = findBiometricTokenValidateBeforeCall(userId, tokenUuid, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call findBiometricTokenAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findBiometricTokenAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = findBiometricTokenValidateBeforeCall(userId, tokenUuid, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -5725,7 +5725,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { /** * Execute findBiometricToken request - * @return BiometricToken + * @return BiometricTokenResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5735,14 +5735,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Unexpected error -
*/ - public BiometricToken execute() throws ApiException { - ApiResponse localVarResp = findBiometricTokenWithHttpInfo(userId, tokenUuid); + public BiometricTokenResponse execute() throws ApiException { + ApiResponse localVarResp = findBiometricTokenWithHttpInfo(userId, tokenUuid); return localVarResp.getData(); } /** * Execute findBiometricToken request with HTTP info returned - * @return ApiResponse<BiometricToken> + * @return ApiResponse<BiometricTokenResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5752,7 +5752,7 @@ public BiometricToken execute() throws ApiException {
0 Unexpected error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { + public ApiResponse executeWithHttpInfo() throws ApiException { return findBiometricTokenWithHttpInfo(userId, tokenUuid); } @@ -5769,7 +5769,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { 0 Unexpected error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return findBiometricTokenAsync(userId, tokenUuid, _callback); } } @@ -8499,16 +8499,16 @@ private okhttp3.Call invalidateBiometricTokenValidateBeforeCall(@javax.annotatio } - private ApiResponse invalidateBiometricTokenWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid) throws ApiException { + private ApiResponse invalidateBiometricTokenWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid) throws ApiException { okhttp3.Call localVarCall = invalidateBiometricTokenValidateBeforeCall(userId, tokenUuid, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call invalidateBiometricTokenAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, final ApiCallback _callback) throws ApiException { + private okhttp3.Call invalidateBiometricTokenAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = invalidateBiometricTokenValidateBeforeCall(userId, tokenUuid, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -8543,7 +8543,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { /** * Execute invalidateBiometricToken request - * @return InvalidatedBiometricTokenSummary + * @return InvalidatedBiometricTokenResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8553,14 +8553,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Unexpected error -
*/ - public InvalidatedBiometricTokenSummary execute() throws ApiException { - ApiResponse localVarResp = invalidateBiometricTokenWithHttpInfo(userId, tokenUuid); + public InvalidatedBiometricTokenResponse execute() throws ApiException { + ApiResponse localVarResp = invalidateBiometricTokenWithHttpInfo(userId, tokenUuid); return localVarResp.getData(); } /** * Execute invalidateBiometricToken request with HTTP info returned - * @return ApiResponse<InvalidatedBiometricTokenSummary> + * @return ApiResponse<InvalidatedBiometricTokenResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8570,7 +8570,7 @@ public InvalidatedBiometricTokenSummary execute() throws ApiException {
0 Unexpected error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { + public ApiResponse executeWithHttpInfo() throws ApiException { return invalidateBiometricTokenWithHttpInfo(userId, tokenUuid); } @@ -8587,7 +8587,7 @@ public ApiResponse executeWithHttpInfo() throw 0 Unexpected error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return invalidateBiometricTokenAsync(userId, tokenUuid, _callback); } } @@ -8666,16 +8666,16 @@ private okhttp3.Call invalidateBiometricTokensValidateBeforeCall(@javax.annotati } - private ApiResponse invalidateBiometricTokensWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { + private ApiResponse invalidateBiometricTokensWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = invalidateBiometricTokensValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call invalidateBiometricTokensAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call invalidateBiometricTokensAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = invalidateBiometricTokensValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -8707,7 +8707,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { /** * Execute invalidateBiometricTokens request - * @return InvalidatedBiometricTokensSummary + * @return InvalidatedBiometricTokensResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8717,14 +8717,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Unexpected error -
*/ - public InvalidatedBiometricTokensSummary execute() throws ApiException { - ApiResponse localVarResp = invalidateBiometricTokensWithHttpInfo(userId); + public InvalidatedBiometricTokensResponse execute() throws ApiException { + ApiResponse localVarResp = invalidateBiometricTokensWithHttpInfo(userId); return localVarResp.getData(); } /** * Execute invalidateBiometricTokens request with HTTP info returned - * @return ApiResponse<InvalidatedBiometricTokensSummary> + * @return ApiResponse<InvalidatedBiometricTokensResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8734,7 +8734,7 @@ public InvalidatedBiometricTokensSummary execute() throws ApiException {
0 Unexpected error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { + public ApiResponse executeWithHttpInfo() throws ApiException { return invalidateBiometricTokensWithHttpInfo(userId); } @@ -8751,7 +8751,7 @@ public ApiResponse executeWithHttpInfo() thro 0 Unexpected error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return invalidateBiometricTokensAsync(userId, _callback); } } @@ -9030,16 +9030,16 @@ private okhttp3.Call listBiometricTokensValidateBeforeCall(@javax.annotation.Non } - private ApiResponse listBiometricTokensWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { + private ApiResponse listBiometricTokensWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = listBiometricTokensValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call listBiometricTokensAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listBiometricTokensAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listBiometricTokensValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -9071,7 +9071,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { /** * Execute listBiometricTokens request - * @return BiometricTokensList + * @return BiometricTokensResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9081,14 +9081,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Unexpected error -
*/ - public BiometricTokensList execute() throws ApiException { - ApiResponse localVarResp = listBiometricTokensWithHttpInfo(userId); + public BiometricTokensResponse execute() throws ApiException { + ApiResponse localVarResp = listBiometricTokensWithHttpInfo(userId); return localVarResp.getData(); } /** * Execute listBiometricTokens request with HTTP info returned - * @return ApiResponse<BiometricTokensList> + * @return ApiResponse<BiometricTokensResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9098,7 +9098,7 @@ public BiometricTokensList execute() throws ApiException {
0 Unexpected error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { + public ApiResponse executeWithHttpInfo() throws ApiException { return listBiometricTokensWithHttpInfo(userId); } @@ -9115,7 +9115,7 @@ public ApiResponse executeWithHttpInfo() throws ApiExceptio 0 Unexpected error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listBiometricTokensAsync(userId, _callback); } } @@ -12916,16 +12916,16 @@ private okhttp3.Call updateBiometricTokenValidateBeforeCall(@javax.annotation.No } - private ApiResponse updateBiometricTokenWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, @javax.annotation.Nonnull BiometricTokenUpdater biometricTokenUpdater) throws ApiException { + private ApiResponse updateBiometricTokenWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, @javax.annotation.Nonnull BiometricTokenUpdater biometricTokenUpdater) throws ApiException { okhttp3.Call localVarCall = updateBiometricTokenValidateBeforeCall(userId, tokenUuid, biometricTokenUpdater, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call updateBiometricTokenAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, @javax.annotation.Nonnull BiometricTokenUpdater biometricTokenUpdater, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateBiometricTokenAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UUID tokenUuid, @javax.annotation.Nonnull BiometricTokenUpdater biometricTokenUpdater, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateBiometricTokenValidateBeforeCall(userId, tokenUuid, biometricTokenUpdater, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -12963,7 +12963,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { /** * Execute updateBiometricToken request - * @return UpdateBiometricToken200Response + * @return UpdatedBiometricTokenResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -12973,14 +12973,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Unexpected error -
*/ - public UpdateBiometricToken200Response execute() throws ApiException { - ApiResponse localVarResp = updateBiometricTokenWithHttpInfo(userId, tokenUuid, biometricTokenUpdater); + public UpdatedBiometricTokenResponse execute() throws ApiException { + ApiResponse localVarResp = updateBiometricTokenWithHttpInfo(userId, tokenUuid, biometricTokenUpdater); return localVarResp.getData(); } /** * Execute updateBiometricToken request with HTTP info returned - * @return ApiResponse<UpdateBiometricToken200Response> + * @return ApiResponse<UpdatedBiometricTokenResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -12990,7 +12990,7 @@ public UpdateBiometricToken200Response execute() throws ApiException {
0 Unexpected error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { + public ApiResponse executeWithHttpInfo() throws ApiException { return updateBiometricTokenWithHttpInfo(userId, tokenUuid, biometricTokenUpdater); } @@ -13007,7 +13007,7 @@ public ApiResponse executeWithHttpInfo() throws 0 Unexpected error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updateBiometricTokenAsync(userId, tokenUuid, biometricTokenUpdater, _callback); } } diff --git a/src/main/java/com/onfido/model/BiometricToken.java b/src/main/java/com/onfido/model/BiometricToken.java index 6614720..b2d1469 100644 --- a/src/main/java/com/onfido/model/BiometricToken.java +++ b/src/main/java/com/onfido/model/BiometricToken.java @@ -20,8 +20,10 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.onfido.model.BiometricTokenData; import java.io.IOException; import java.util.Arrays; +import java.util.UUID; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,34 +50,58 @@ import com.onfido.JSON; /** - * BiometricToken + * Biometric token. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BiometricToken { - public static final String SERIALIZED_NAME_BIOMETRIC_TOKEN = "biometric_token"; - @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKEN) + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) @javax.annotation.Nonnull - private BiometricToken biometricToken; + private UUID uuid; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private BiometricTokenData data; public BiometricToken() { } - public BiometricToken biometricToken(@javax.annotation.Nonnull BiometricToken biometricToken) { - this.biometricToken = biometricToken; + public BiometricToken uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * The biometric token's unique identifier. + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public BiometricToken data(@javax.annotation.Nonnull BiometricTokenData data) { + this.data = data; return this; } /** - * Get biometricToken - * @return biometricToken + * Get data + * @return data */ @javax.annotation.Nonnull - public BiometricToken getBiometricToken() { - return biometricToken; + public BiometricTokenData getData() { + return data; } - public void setBiometricToken(@javax.annotation.Nonnull BiometricToken biometricToken) { - this.biometricToken = biometricToken; + public void setData(@javax.annotation.Nonnull BiometricTokenData data) { + this.data = data; } /** @@ -133,20 +159,22 @@ public boolean equals(Object o) { return false; } BiometricToken biometricToken = (BiometricToken) o; - return Objects.equals(this.biometricToken, biometricToken.biometricToken)&& + return Objects.equals(this.uuid, biometricToken.uuid) && + Objects.equals(this.data, biometricToken.data)&& Objects.equals(this.additionalProperties, biometricToken.additionalProperties); } @Override public int hashCode() { - return Objects.hash(biometricToken, additionalProperties); + return Objects.hash(uuid, data, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BiometricToken {\n"); - sb.append(" biometricToken: ").append(toIndentedString(biometricToken)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -169,10 +197,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("biometric_token")); + openapiFields = new HashSet(Arrays.asList("uuid", "data")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("biometric_token")); + openapiRequiredFields = new HashSet(Arrays.asList("uuid", "data")); } /** @@ -195,8 +223,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `biometric_token` - BiometricToken.validateJsonElement(jsonObj.get("biometric_token")); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the required field `data` + BiometricTokenData.validateJsonElement(jsonObj.get("data")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/onfido/model/BiometricTokenResponse.java b/src/main/java/com/onfido/model/BiometricTokenResponse.java new file mode 100644 index 0000000..2818b32 --- /dev/null +++ b/src/main/java/com/onfido/model/BiometricTokenResponse.java @@ -0,0 +1,295 @@ +/* + * Onfido Public API v3.6 + * The Onfido Public API (v3.6) + * + * The version of the OpenAPI document: v3.6 + * + * + * 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.onfido.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.onfido.model.BiometricToken; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.onfido.JSON; + +/** + * BiometricTokenResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class BiometricTokenResponse { + public static final String SERIALIZED_NAME_BIOMETRIC_TOKEN = "biometric_token"; + @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKEN) + @javax.annotation.Nonnull + private BiometricToken biometricToken; + + public BiometricTokenResponse() { + } + + public BiometricTokenResponse biometricToken(@javax.annotation.Nonnull BiometricToken biometricToken) { + this.biometricToken = biometricToken; + return this; + } + + /** + * Get biometricToken + * @return biometricToken + */ + @javax.annotation.Nonnull + public BiometricToken getBiometricToken() { + return biometricToken; + } + + public void setBiometricToken(@javax.annotation.Nonnull BiometricToken biometricToken) { + this.biometricToken = biometricToken; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BiometricTokenResponse instance itself + */ + public BiometricTokenResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BiometricTokenResponse biometricTokenResponse = (BiometricTokenResponse) o; + return Objects.equals(this.biometricToken, biometricTokenResponse.biometricToken)&& + Objects.equals(this.additionalProperties, biometricTokenResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(biometricToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BiometricTokenResponse {\n"); + sb.append(" biometricToken: ").append(toIndentedString(biometricToken)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("biometric_token")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("biometric_token")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BiometricTokenResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BiometricTokenResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BiometricTokenResponse is not found in the empty JSON string", BiometricTokenResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BiometricTokenResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `biometric_token` + BiometricToken.validateJsonElement(jsonObj.get("biometric_token")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BiometricTokenResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BiometricTokenResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BiometricTokenResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BiometricTokenResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else if (jsonElement.isJsonObject()) { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BiometricTokenResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BiometricTokenResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BiometricTokenResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BiometricTokenResponse + * @throws IOException if the JSON string is invalid with respect to BiometricTokenResponse + */ + public static BiometricTokenResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BiometricTokenResponse.class); + } + + /** + * Convert an instance of BiometricTokenResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/onfido/model/BiometricTokensList.java b/src/main/java/com/onfido/model/BiometricTokensResponse.java similarity index 83% rename from src/main/java/com/onfido/model/BiometricTokensList.java rename to src/main/java/com/onfido/model/BiometricTokensResponse.java index 02abb42..63f300f 100644 --- a/src/main/java/com/onfido/model/BiometricTokensList.java +++ b/src/main/java/com/onfido/model/BiometricTokensResponse.java @@ -51,24 +51,24 @@ import com.onfido.JSON; /** - * BiometricTokensList + * BiometricTokensResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class BiometricTokensList { +public class BiometricTokensResponse { public static final String SERIALIZED_NAME_BIOMETRIC_TOKENS = "biometric_tokens"; @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKENS) @javax.annotation.Nonnull private List biometricTokens = new ArrayList<>(); - public BiometricTokensList() { + public BiometricTokensResponse() { } - public BiometricTokensList biometricTokens(@javax.annotation.Nonnull List biometricTokens) { + public BiometricTokensResponse biometricTokens(@javax.annotation.Nonnull List biometricTokens) { this.biometricTokens = biometricTokens; return this; } - public BiometricTokensList addBiometricTokensItem(BiometricToken biometricTokensItem) { + public BiometricTokensResponse addBiometricTokensItem(BiometricToken biometricTokensItem) { if (this.biometricTokens == null) { this.biometricTokens = new ArrayList<>(); } @@ -102,9 +102,9 @@ public void setBiometricTokens(@javax.annotation.Nonnull List bi * * @param key name of the property * @param value value of the property - * @return the BiometricTokensList instance itself + * @return the BiometricTokensResponse instance itself */ - public BiometricTokensList putAdditionalProperty(String key, Object value) { + public BiometricTokensResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -143,9 +143,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BiometricTokensList biometricTokensList = (BiometricTokensList) o; - return Objects.equals(this.biometricTokens, biometricTokensList.biometricTokens)&& - Objects.equals(this.additionalProperties, biometricTokensList.additionalProperties); + BiometricTokensResponse biometricTokensResponse = (BiometricTokensResponse) o; + return Objects.equals(this.biometricTokens, biometricTokensResponse.biometricTokens)&& + Objects.equals(this.additionalProperties, biometricTokensResponse.additionalProperties); } @Override @@ -156,7 +156,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class BiometricTokensList {\n"); + sb.append("class BiometricTokensResponse {\n"); sb.append(" biometricTokens: ").append(toIndentedString(biometricTokens)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -190,17 +190,17 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BiometricTokensList + * @throws IOException if the JSON Element is invalid with respect to BiometricTokensResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!BiometricTokensList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BiometricTokensList is not found in the empty JSON string", BiometricTokensList.openapiRequiredFields.toString())); + if (!BiometricTokensResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BiometricTokensResponse is not found in the empty JSON string", BiometricTokensResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BiometricTokensList.openapiRequiredFields) { + for (String requiredField : BiometricTokensResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -222,16 +222,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!BiometricTokensList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BiometricTokensList' and its subtypes + if (!BiometricTokensResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BiometricTokensResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BiometricTokensList.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BiometricTokensResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, BiometricTokensList value) throws IOException { + public void write(JsonWriter out, BiometricTokensResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -259,12 +259,12 @@ else if (entry.getValue() instanceof Character) } @Override - public BiometricTokensList read(JsonReader in) throws IOException { + public BiometricTokensResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - BiometricTokensList instance = thisAdapter.fromJsonTree(jsonObj); + BiometricTokensResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -291,18 +291,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of BiometricTokensList given an JSON string + * Create an instance of BiometricTokensResponse given an JSON string * * @param jsonString JSON string - * @return An instance of BiometricTokensList - * @throws IOException if the JSON string is invalid with respect to BiometricTokensList + * @return An instance of BiometricTokensResponse + * @throws IOException if the JSON string is invalid with respect to BiometricTokensResponse */ - public static BiometricTokensList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BiometricTokensList.class); + public static BiometricTokensResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BiometricTokensResponse.class); } /** - * Convert an instance of BiometricTokensList to an JSON string + * Convert an instance of BiometricTokensResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/onfido/model/InvalidatedBiometricTokenResponse.java b/src/main/java/com/onfido/model/InvalidatedBiometricTokenResponse.java new file mode 100644 index 0000000..e7202ae --- /dev/null +++ b/src/main/java/com/onfido/model/InvalidatedBiometricTokenResponse.java @@ -0,0 +1,295 @@ +/* + * Onfido Public API v3.6 + * The Onfido Public API (v3.6) + * + * The version of the OpenAPI document: v3.6 + * + * + * 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.onfido.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.onfido.model.InvalidatedBiometricTokenSummary; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.onfido.JSON; + +/** + * InvalidatedBiometricTokenResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InvalidatedBiometricTokenResponse { + public static final String SERIALIZED_NAME_BIOMETRIC_TOKEN = "biometric_token"; + @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKEN) + @javax.annotation.Nonnull + private InvalidatedBiometricTokenSummary biometricToken; + + public InvalidatedBiometricTokenResponse() { + } + + public InvalidatedBiometricTokenResponse biometricToken(@javax.annotation.Nonnull InvalidatedBiometricTokenSummary biometricToken) { + this.biometricToken = biometricToken; + return this; + } + + /** + * Get biometricToken + * @return biometricToken + */ + @javax.annotation.Nonnull + public InvalidatedBiometricTokenSummary getBiometricToken() { + return biometricToken; + } + + public void setBiometricToken(@javax.annotation.Nonnull InvalidatedBiometricTokenSummary biometricToken) { + this.biometricToken = biometricToken; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InvalidatedBiometricTokenResponse instance itself + */ + public InvalidatedBiometricTokenResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvalidatedBiometricTokenResponse invalidatedBiometricTokenResponse = (InvalidatedBiometricTokenResponse) o; + return Objects.equals(this.biometricToken, invalidatedBiometricTokenResponse.biometricToken)&& + Objects.equals(this.additionalProperties, invalidatedBiometricTokenResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(biometricToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvalidatedBiometricTokenResponse {\n"); + sb.append(" biometricToken: ").append(toIndentedString(biometricToken)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("biometric_token")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("biometric_token")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvalidatedBiometricTokenResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvalidatedBiometricTokenResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InvalidatedBiometricTokenResponse is not found in the empty JSON string", InvalidatedBiometricTokenResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InvalidatedBiometricTokenResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `biometric_token` + InvalidatedBiometricTokenSummary.validateJsonElement(jsonObj.get("biometric_token")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvalidatedBiometricTokenResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvalidatedBiometricTokenResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvalidatedBiometricTokenResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvalidatedBiometricTokenResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else if (jsonElement.isJsonObject()) { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InvalidatedBiometricTokenResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InvalidatedBiometricTokenResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvalidatedBiometricTokenResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvalidatedBiometricTokenResponse + * @throws IOException if the JSON string is invalid with respect to InvalidatedBiometricTokenResponse + */ + public static InvalidatedBiometricTokenResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvalidatedBiometricTokenResponse.class); + } + + /** + * Convert an instance of InvalidatedBiometricTokenResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/onfido/model/InvalidatedBiometricTokenSummary.java b/src/main/java/com/onfido/model/InvalidatedBiometricTokenSummary.java index 357ae24..57584ac 100644 --- a/src/main/java/com/onfido/model/InvalidatedBiometricTokenSummary.java +++ b/src/main/java/com/onfido/model/InvalidatedBiometricTokenSummary.java @@ -20,6 +20,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.onfido.model.InvalidatedBiometricTokenSummaryDeletedItems; import java.io.IOException; import java.util.Arrays; @@ -48,34 +49,34 @@ import com.onfido.JSON; /** - * InvalidatedBiometricTokenSummary + * Invalidated biometric tokens response payload. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InvalidatedBiometricTokenSummary { - public static final String SERIALIZED_NAME_BIOMETRIC_TOKEN = "biometric_token"; - @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKEN) + public static final String SERIALIZED_NAME_DELETED_ITEMS = "deleted_items"; + @SerializedName(SERIALIZED_NAME_DELETED_ITEMS) @javax.annotation.Nonnull - private InvalidatedBiometricTokenSummary biometricToken; + private InvalidatedBiometricTokenSummaryDeletedItems deletedItems; public InvalidatedBiometricTokenSummary() { } - public InvalidatedBiometricTokenSummary biometricToken(@javax.annotation.Nonnull InvalidatedBiometricTokenSummary biometricToken) { - this.biometricToken = biometricToken; + public InvalidatedBiometricTokenSummary deletedItems(@javax.annotation.Nonnull InvalidatedBiometricTokenSummaryDeletedItems deletedItems) { + this.deletedItems = deletedItems; return this; } /** - * Get biometricToken - * @return biometricToken + * Get deletedItems + * @return deletedItems */ @javax.annotation.Nonnull - public InvalidatedBiometricTokenSummary getBiometricToken() { - return biometricToken; + public InvalidatedBiometricTokenSummaryDeletedItems getDeletedItems() { + return deletedItems; } - public void setBiometricToken(@javax.annotation.Nonnull InvalidatedBiometricTokenSummary biometricToken) { - this.biometricToken = biometricToken; + public void setDeletedItems(@javax.annotation.Nonnull InvalidatedBiometricTokenSummaryDeletedItems deletedItems) { + this.deletedItems = deletedItems; } /** @@ -133,20 +134,20 @@ public boolean equals(Object o) { return false; } InvalidatedBiometricTokenSummary invalidatedBiometricTokenSummary = (InvalidatedBiometricTokenSummary) o; - return Objects.equals(this.biometricToken, invalidatedBiometricTokenSummary.biometricToken)&& + return Objects.equals(this.deletedItems, invalidatedBiometricTokenSummary.deletedItems)&& Objects.equals(this.additionalProperties, invalidatedBiometricTokenSummary.additionalProperties); } @Override public int hashCode() { - return Objects.hash(biometricToken, additionalProperties); + return Objects.hash(deletedItems, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InvalidatedBiometricTokenSummary {\n"); - sb.append(" biometricToken: ").append(toIndentedString(biometricToken)).append("\n"); + sb.append(" deletedItems: ").append(toIndentedString(deletedItems)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -169,10 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("biometric_token")); + openapiFields = new HashSet(Arrays.asList("deleted_items")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("biometric_token")); + openapiRequiredFields = new HashSet(Arrays.asList("deleted_items")); } /** @@ -195,8 +196,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `biometric_token` - InvalidatedBiometricTokenSummary.validateJsonElement(jsonObj.get("biometric_token")); + // validate the required field `deleted_items` + InvalidatedBiometricTokenSummaryDeletedItems.validateJsonElement(jsonObj.get("deleted_items")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/onfido/model/InvalidatedBiometricTokensSummary.java b/src/main/java/com/onfido/model/InvalidatedBiometricTokensResponse.java similarity index 82% rename from src/main/java/com/onfido/model/InvalidatedBiometricTokensSummary.java rename to src/main/java/com/onfido/model/InvalidatedBiometricTokensResponse.java index 211be14..0ef3cf0 100644 --- a/src/main/java/com/onfido/model/InvalidatedBiometricTokensSummary.java +++ b/src/main/java/com/onfido/model/InvalidatedBiometricTokensResponse.java @@ -49,19 +49,19 @@ import com.onfido.JSON; /** - * InvalidatedBiometricTokensSummary + * InvalidatedBiometricTokensResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class InvalidatedBiometricTokensSummary { +public class InvalidatedBiometricTokensResponse { public static final String SERIALIZED_NAME_BIOMETRIC_TOKENS = "biometric_tokens"; @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKENS) @javax.annotation.Nonnull private InvalidatedBiometricTokenSummary biometricTokens; - public InvalidatedBiometricTokensSummary() { + public InvalidatedBiometricTokensResponse() { } - public InvalidatedBiometricTokensSummary biometricTokens(@javax.annotation.Nonnull InvalidatedBiometricTokenSummary biometricTokens) { + public InvalidatedBiometricTokensResponse biometricTokens(@javax.annotation.Nonnull InvalidatedBiometricTokenSummary biometricTokens) { this.biometricTokens = biometricTokens; return this; } @@ -92,9 +92,9 @@ public void setBiometricTokens(@javax.annotation.Nonnull InvalidatedBiometricTok * * @param key name of the property * @param value value of the property - * @return the InvalidatedBiometricTokensSummary instance itself + * @return the InvalidatedBiometricTokensResponse instance itself */ - public InvalidatedBiometricTokensSummary putAdditionalProperty(String key, Object value) { + public InvalidatedBiometricTokensResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -133,9 +133,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InvalidatedBiometricTokensSummary invalidatedBiometricTokensSummary = (InvalidatedBiometricTokensSummary) o; - return Objects.equals(this.biometricTokens, invalidatedBiometricTokensSummary.biometricTokens)&& - Objects.equals(this.additionalProperties, invalidatedBiometricTokensSummary.additionalProperties); + InvalidatedBiometricTokensResponse invalidatedBiometricTokensResponse = (InvalidatedBiometricTokensResponse) o; + return Objects.equals(this.biometricTokens, invalidatedBiometricTokensResponse.biometricTokens)&& + Objects.equals(this.additionalProperties, invalidatedBiometricTokensResponse.additionalProperties); } @Override @@ -146,7 +146,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class InvalidatedBiometricTokensSummary {\n"); + sb.append("class InvalidatedBiometricTokensResponse {\n"); sb.append(" biometricTokens: ").append(toIndentedString(biometricTokens)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -180,17 +180,17 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InvalidatedBiometricTokensSummary + * @throws IOException if the JSON Element is invalid with respect to InvalidatedBiometricTokensResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!InvalidatedBiometricTokensSummary.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InvalidatedBiometricTokensSummary is not found in the empty JSON string", InvalidatedBiometricTokensSummary.openapiRequiredFields.toString())); + if (!InvalidatedBiometricTokensResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InvalidatedBiometricTokensResponse is not found in the empty JSON string", InvalidatedBiometricTokensResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InvalidatedBiometricTokensSummary.openapiRequiredFields) { + for (String requiredField : InvalidatedBiometricTokensResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -204,16 +204,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!InvalidatedBiometricTokensSummary.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InvalidatedBiometricTokensSummary' and its subtypes + if (!InvalidatedBiometricTokensResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvalidatedBiometricTokensResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InvalidatedBiometricTokensSummary.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvalidatedBiometricTokensResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, InvalidatedBiometricTokensSummary value) throws IOException { + public void write(JsonWriter out, InvalidatedBiometricTokensResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -241,12 +241,12 @@ else if (entry.getValue() instanceof Character) } @Override - public InvalidatedBiometricTokensSummary read(JsonReader in) throws IOException { + public InvalidatedBiometricTokensResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - InvalidatedBiometricTokensSummary instance = thisAdapter.fromJsonTree(jsonObj); + InvalidatedBiometricTokensResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -273,18 +273,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of InvalidatedBiometricTokensSummary given an JSON string + * Create an instance of InvalidatedBiometricTokensResponse given an JSON string * * @param jsonString JSON string - * @return An instance of InvalidatedBiometricTokensSummary - * @throws IOException if the JSON string is invalid with respect to InvalidatedBiometricTokensSummary + * @return An instance of InvalidatedBiometricTokensResponse + * @throws IOException if the JSON string is invalid with respect to InvalidatedBiometricTokensResponse */ - public static InvalidatedBiometricTokensSummary fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InvalidatedBiometricTokensSummary.class); + public static InvalidatedBiometricTokensResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvalidatedBiometricTokensResponse.class); } /** - * Convert an instance of InvalidatedBiometricTokensSummary to an JSON string + * Convert an instance of InvalidatedBiometricTokensResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/onfido/model/UpdateBiometricToken200Response.java b/src/main/java/com/onfido/model/UpdatedBiometricTokenResponse.java similarity index 80% rename from src/main/java/com/onfido/model/UpdateBiometricToken200Response.java rename to src/main/java/com/onfido/model/UpdatedBiometricTokenResponse.java index ecbc2b3..b543ae5 100644 --- a/src/main/java/com/onfido/model/UpdateBiometricToken200Response.java +++ b/src/main/java/com/onfido/model/UpdatedBiometricTokenResponse.java @@ -49,19 +49,19 @@ import com.onfido.JSON; /** - * UpdateBiometricToken200Response + * UpdatedBiometricTokenResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class UpdateBiometricToken200Response { +public class UpdatedBiometricTokenResponse { public static final String SERIALIZED_NAME_BIOMETRIC_TOKEN = "biometric_token"; @SerializedName(SERIALIZED_NAME_BIOMETRIC_TOKEN) @javax.annotation.Nonnull private BiometricToken biometricToken; - public UpdateBiometricToken200Response() { + public UpdatedBiometricTokenResponse() { } - public UpdateBiometricToken200Response biometricToken(@javax.annotation.Nonnull BiometricToken biometricToken) { + public UpdatedBiometricTokenResponse biometricToken(@javax.annotation.Nonnull BiometricToken biometricToken) { this.biometricToken = biometricToken; return this; } @@ -92,9 +92,9 @@ public void setBiometricToken(@javax.annotation.Nonnull BiometricToken biometric * * @param key name of the property * @param value value of the property - * @return the UpdateBiometricToken200Response instance itself + * @return the UpdatedBiometricTokenResponse instance itself */ - public UpdateBiometricToken200Response putAdditionalProperty(String key, Object value) { + public UpdatedBiometricTokenResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -133,9 +133,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UpdateBiometricToken200Response updateBiometricToken200Response = (UpdateBiometricToken200Response) o; - return Objects.equals(this.biometricToken, updateBiometricToken200Response.biometricToken)&& - Objects.equals(this.additionalProperties, updateBiometricToken200Response.additionalProperties); + UpdatedBiometricTokenResponse updatedBiometricTokenResponse = (UpdatedBiometricTokenResponse) o; + return Objects.equals(this.biometricToken, updatedBiometricTokenResponse.biometricToken)&& + Objects.equals(this.additionalProperties, updatedBiometricTokenResponse.additionalProperties); } @Override @@ -146,7 +146,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UpdateBiometricToken200Response {\n"); + sb.append("class UpdatedBiometricTokenResponse {\n"); sb.append(" biometricToken: ").append(toIndentedString(biometricToken)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -180,17 +180,17 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateBiometricToken200Response + * @throws IOException if the JSON Element is invalid with respect to UpdatedBiometricTokenResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!UpdateBiometricToken200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateBiometricToken200Response is not found in the empty JSON string", UpdateBiometricToken200Response.openapiRequiredFields.toString())); + if (!UpdatedBiometricTokenResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdatedBiometricTokenResponse is not found in the empty JSON string", UpdatedBiometricTokenResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateBiometricToken200Response.openapiRequiredFields) { + for (String requiredField : UpdatedBiometricTokenResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -204,16 +204,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateBiometricToken200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateBiometricToken200Response' and its subtypes + if (!UpdatedBiometricTokenResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdatedBiometricTokenResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateBiometricToken200Response.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdatedBiometricTokenResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, UpdateBiometricToken200Response value) throws IOException { + public void write(JsonWriter out, UpdatedBiometricTokenResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -241,12 +241,12 @@ else if (entry.getValue() instanceof Character) } @Override - public UpdateBiometricToken200Response read(JsonReader in) throws IOException { + public UpdatedBiometricTokenResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - UpdateBiometricToken200Response instance = thisAdapter.fromJsonTree(jsonObj); + UpdatedBiometricTokenResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -273,18 +273,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of UpdateBiometricToken200Response given an JSON string + * Create an instance of UpdatedBiometricTokenResponse given an JSON string * * @param jsonString JSON string - * @return An instance of UpdateBiometricToken200Response - * @throws IOException if the JSON string is invalid with respect to UpdateBiometricToken200Response + * @return An instance of UpdatedBiometricTokenResponse + * @throws IOException if the JSON string is invalid with respect to UpdatedBiometricTokenResponse */ - public static UpdateBiometricToken200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateBiometricToken200Response.class); + public static UpdatedBiometricTokenResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdatedBiometricTokenResponse.class); } /** - * Convert an instance of UpdateBiometricToken200Response to an JSON string + * Convert an instance of UpdatedBiometricTokenResponse to an JSON string * * @return JSON string */