From 14c13178a64e002e7f39563a585e9b354bd47a95 Mon Sep 17 00:00:00 2001 From: Natal Vande Casteele Date: Wed, 17 Jan 2024 15:28:21 +0100 Subject: [PATCH] Correct region string compare --- .../autodesk/client/api/DerivativesApi.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/autodesk/client/api/DerivativesApi.java b/src/main/java/com/autodesk/client/api/DerivativesApi.java index 7b5f2f9..930bb2b 100755 --- a/src/main/java/com/autodesk/client/api/DerivativesApi.java +++ b/src/main/java/com/autodesk/client/api/DerivativesApi.java @@ -98,8 +98,8 @@ public ApiResponse deleteManifest(String urn, Authentication oauth2, Cre // create path and map variables String localVarPath = "/modelderivative/v2/designdata/{urn}/manifest".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); - - if(this.region == "emea") { + + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/manifest".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); } @@ -168,8 +168,8 @@ public ApiResponse getDerivativeManifest(String urn, String derivativeUrn, .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())) .replaceAll("\\{" + "derivativeUrn" + "\\}", apiClient.escapeString(derivativeUrn.toString())); - - if(this.region == "emea") { + + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/manifest/{derivativeUrn}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())) @@ -281,7 +281,7 @@ public ApiResponse getManifest(String urn, String acceptEncoding, Auth // create path and map variables String localVarPath = "/modelderivative/v2/designdata/{urn}/manifest".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); - if(this.region == "emea") { + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/manifest".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); } @@ -336,8 +336,8 @@ public ApiResponse getMetadata(String urn, String acceptEncoding, Auth // create path and map variables String localVarPath = "/modelderivative/v2/designdata/{urn}/metadata".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); - - if(this.region == "emea") { + + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/metadata".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); } @@ -405,8 +405,8 @@ public ApiResponse getModelviewMetadata(String urn, String guid, Strin String localVarPath = "/modelderivative/v2/designdata/{urn}/metadata/{guid}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())) .replaceAll("\\{" + "guid" + "\\}", apiClient.escapeString(guid.toString())); - - if(this.region == "emea") { + + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/metadata/{guid}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())) .replaceAll("\\{" + "guid" + "\\}", apiClient.escapeString(guid.toString())); @@ -465,8 +465,8 @@ public ApiResponse getModelviewProperties(String urn, String guid, Str String localVarPath = "/modelderivative/v2/designdata/{urn}/metadata/{guid}/properties".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())) .replaceAll("\\{" + "guid" + "\\}", apiClient.escapeString(guid.toString())); - - if(this.region == "emea") { + + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/metadata/{guid}/properties".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())) .replaceAll("\\{" + "guid" + "\\}", apiClient.escapeString(guid.toString())); @@ -555,8 +555,8 @@ public ApiResponse getThumbnail(String urn, Integer width, Integer height, // create path and map variables String localVarPath = "/modelderivative/v2/designdata/{urn}/thumbnail".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); - - if(this.region == "emea") { + + if (this.region != null && this.region.equalsIgnoreCase("emea")) { localVarPath = "/modelderivative/v2/regions/eu/designdata/{urn}/thumbnail".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString())); }