From d84279844f6e690bc11a54f95f22a2bda9df25b7 Mon Sep 17 00:00:00 2001 From: "equinix-labs@auto-commit-workflow" Date: Fri, 30 Sep 2022 10:57:11 +0000 Subject: [PATCH 1/7] Auto commit generated client changes - Fri Sep 30 10:57:11 UTC 2022 --- equinix-openapi-metal/.openapi-generator/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinix-openapi-metal/.openapi-generator/VERSION b/equinix-openapi-metal/.openapi-generator/VERSION index 7b7e20b57..ed829dbcd 100644 --- a/equinix-openapi-metal/.openapi-generator/VERSION +++ b/equinix-openapi-metal/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.1-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file From 2adb9f15234e33b453f9039469dd9847dfe7e3c3 Mon Sep 17 00:00:00 2001 From: "equinix-labs@auto-commit-workflow" Date: Sun, 9 Oct 2022 21:18:07 +0000 Subject: [PATCH 2/7] Auto commit generated client changes - Sun Oct 9 21:18:07 UTC 2022 --- .../openapi/metal/v1/model/Address.java | 10 +++---- .../openapi/metal/v1/model/AuthToken.java | 4 +-- .../metal/v1/model/AuthTokenInput.java | 4 +-- .../openapi/metal/v1/model/AuthTokenList.java | 4 +-- .../metal/v1/model/AuthTokenProject.java | 4 +-- .../openapi/metal/v1/model/AuthTokenUser.java | 6 ++-- .../metal/v1/model/BGPSessionInput.java | 4 +-- .../equinix/openapi/metal/v1/model/Batch.java | 6 ++-- .../openapi/metal/v1/model/BatchesList.java | 4 +-- .../openapi/metal/v1/model/BgpConfig.java | 4 +-- .../metal/v1/model/BgpConfigRequestInput.java | 6 ++-- .../metal/v1/model/BgpNeighborData.java | 6 ++-- .../model/BgpNeighborDataRoutesInInner.java | 4 +-- .../model/BgpNeighborDataRoutesOutInner.java | 4 +-- .../openapi/metal/v1/model/BgpSession.java | 8 ++--- .../metal/v1/model/BgpSessionList.java | 4 +-- .../metal/v1/model/BgpSessionNeighbors.java | 4 +-- .../model/CapacityCheckPerFacilityInfo.java | 4 +-- .../model/CapacityCheckPerFacilityList.java | 4 +-- .../v1/model/CapacityCheckPerMetroInfo.java | 4 +-- .../v1/model/CapacityCheckPerMetroList.java | 4 +-- .../openapi/metal/v1/model/CapacityInput.java | 4 +-- .../v1/model/CapacityLevelPerBaremetal.java | 4 +-- .../openapi/metal/v1/model/CapacityList.java | 4 +-- .../metal/v1/model/CapacityPerFacility.java | 4 +-- .../metal/v1/model/CapacityPerMetroInput.java | 4 +-- .../v1/model/CapacityPerNewFacility.java | 4 +-- .../metal/v1/model/CapacityReport.java | 4 +-- .../openapi/metal/v1/model/Coordinates.java | 4 +-- .../metal/v1/model/CreateEmailInput.java | 6 ++-- .../CreateSelfServiceReservationRequest.java | 4 +-- ...teSelfServiceReservationRequestPeriod.java | 4 +-- .../metal/v1/model/DefaultIPReservation.java | 4 +-- .../v1/model/DefaultIPReservationAllOf.java | 4 +-- .../DefaultIPReservationCreateInput.java | 8 ++--- .../openapi/metal/v1/model/Device.java | 6 ++-- .../metal/v1/model/DeviceActionsInner.java | 4 +-- .../metal/v1/model/DeviceCreateInput.java | 18 +++++------ .../DeviceCreateInputIpAddressesInner.java | 6 ++-- .../metal/v1/model/DeviceCreatedBy.java | 8 ++--- .../openapi/metal/v1/model/DeviceList.java | 4 +-- .../openapi/metal/v1/model/DeviceMetro.java | 4 +-- .../openapi/metal/v1/model/DeviceProject.java | 6 ++-- .../metal/v1/model/DeviceProjectLite.java | 6 ++-- .../metal/v1/model/DeviceUpdateInput.java | 6 ++-- .../openapi/metal/v1/model/DeviceUsage.java | 4 +-- .../metal/v1/model/DeviceUsageList.java | 4 +-- .../equinix/openapi/metal/v1/model/Email.java | 4 +-- .../openapi/metal/v1/model/EmailInput.java | 6 ++-- .../openapi/metal/v1/model/Entitlement.java | 8 ++--- .../equinix/openapi/metal/v1/model/Error.java | 6 ++-- .../equinix/openapi/metal/v1/model/Event.java | 4 +-- .../openapi/metal/v1/model/EventList.java | 4 +-- .../metal/v1/model/FabricServiceToken.java | 4 +-- .../openapi/metal/v1/model/Facility.java | 8 ++--- .../openapi/metal/v1/model/FacilityList.java | 4 +-- .../metal/v1/model/GlobalBgpRange.java | 4 +-- .../metal/v1/model/GlobalBgpRangeList.java | 4 +-- .../metal/v1/model/HardwareReservation.java | 4 +-- .../v1/model/HardwareReservationList.java | 4 +-- .../equinix/openapi/metal/v1/model/Href.java | 6 ++-- .../openapi/metal/v1/model/HrefOnly.java | 6 ++-- .../openapi/metal/v1/model/IPAssignment.java | 4 +-- .../metal/v1/model/IPAssignmentInput.java | 6 ++-- .../metal/v1/model/IPAssignmentList.java | 4 +-- .../metal/v1/model/IPAssignmentMetro.java | 4 +-- .../metal/v1/model/IPAvailabilitiesList.java | 6 ++-- .../openapi/metal/v1/model/IPReservation.java | 4 +-- .../metal/v1/model/IPReservationList.java | 4 +-- .../metal/v1/model/IPReservationMetro.java | 4 +-- .../v1/model/InstancesBatchCreateInput.java | 4 +-- ...InstancesBatchCreateInputBatchesInner.java | 16 +++++----- ...eateInputBatchesInnerIpAddressesInner.java | 6 ++-- .../metal/v1/model/Interconnection.java | 6 ++-- .../v1/model/InterconnectionCreateInput.java | 16 +++++----- .../metal/v1/model/InterconnectionList.java | 4 +-- .../metal/v1/model/InterconnectionMetro.java | 4 +-- .../metal/v1/model/InterconnectionPort.java | 4 +-- .../v1/model/InterconnectionPortList.java | 4 +-- .../v1/model/InterconnectionUpdateInput.java | 6 ++-- .../openapi/metal/v1/model/Invitation.java | 8 ++--- .../metal/v1/model/InvitationInput.java | 10 +++---- .../metal/v1/model/InvitationList.java | 4 +-- .../openapi/metal/v1/model/License.java | 4 +-- .../metal/v1/model/LicenseCreateInput.java | 4 +-- .../openapi/metal/v1/model/LicenseList.java | 4 +-- .../metal/v1/model/LicenseUpdateInput.java | 4 +-- .../openapi/metal/v1/model/Membership.java | 6 ++-- .../metal/v1/model/MembershipInput.java | 6 ++-- .../metal/v1/model/MembershipList.java | 4 +-- .../equinix/openapi/metal/v1/model/Meta.java | 4 +-- .../openapi/metal/v1/model/MetalGateway.java | 4 +-- .../v1/model/MetalGatewayCreateInput.java | 6 ++-- .../metal/v1/model/MetalGatewayList.java | 4 +-- .../metal/v1/model/MetalGatewayLite.java | 4 +-- .../equinix/openapi/metal/v1/model/Metro.java | 4 +-- .../metal/v1/model/MetroCapacityList.java | 4 +-- .../metal/v1/model/MetroCapacityReport.java | 4 +-- .../openapi/metal/v1/model/MetroList.java | 4 +-- .../metal/v1/model/MetroServerInfo.java | 4 +-- .../openapi/metal/v1/model/NewPassword.java | 4 +-- .../metal/v1/model/OperatingSystem.java | 6 ++-- .../metal/v1/model/OperatingSystemList.java | 4 +-- .../openapi/metal/v1/model/Organization.java | 4 +-- .../metal/v1/model/OrganizationInput.java | 4 +-- .../metal/v1/model/OrganizationList.java | 4 +-- .../openapi/metal/v1/model/ParentBlock.java | 4 +-- .../openapi/metal/v1/model/PaymentMethod.java | 4 +-- .../v1/model/PaymentMethodBillingAddress.java | 4 +-- .../v1/model/PaymentMethodCreateInput.java | 8 ++--- .../metal/v1/model/PaymentMethodList.java | 4 +-- .../v1/model/PaymentMethodUpdateInput.java | 4 +-- .../equinix/openapi/metal/v1/model/Plan.java | 6 ++-- .../v1/model/PlanAvailableInMetrosInner.java | 4 +-- .../PlanAvailableInMetrosInnerPrice.java | 4 +-- .../openapi/metal/v1/model/PlanList.java | 4 +-- .../equinix/openapi/metal/v1/model/Port.java | 4 +-- .../metal/v1/model/PortAssignInput.java | 4 +-- .../v1/model/PortConvertLayer3Input.java | 4 +-- ...PortConvertLayer3InputRequestIpsInner.java | 4 +-- .../metal/v1/model/PortVlanAssignment.java | 4 +-- .../v1/model/PortVlanAssignmentBatch.java | 6 ++-- .../PortVlanAssignmentBatchCreateInput.java | 4 +-- ...tBatchCreateInputVlanAssignmentsInner.java | 4 +-- .../v1/model/PortVlanAssignmentBatchList.java | 4 +-- ...anAssignmentBatchVlanAssignmentsInner.java | 4 +-- .../v1/model/PortVlanAssignmentList.java | 4 +-- .../openapi/metal/v1/model/Project.java | 4 +-- .../v1/model/ProjectCreateFromRootInput.java | 6 ++-- .../metal/v1/model/ProjectCreateInput.java | 6 ++-- .../openapi/metal/v1/model/ProjectList.java | 4 +-- .../metal/v1/model/ProjectUpdateInput.java | 4 +-- .../openapi/metal/v1/model/ProjectUsage.java | 4 +-- .../metal/v1/model/ProjectUsageList.java | 4 +-- .../metal/v1/model/RecoveryCodeList.java | 6 ++-- .../openapi/metal/v1/model/SSHKey.java | 4 +-- .../metal/v1/model/SSHKeyCreateInput.java | 6 ++-- .../openapi/metal/v1/model/SSHKeyInput.java | 4 +-- .../openapi/metal/v1/model/SSHKeyList.java | 4 +-- .../SelfServiceReservationItemRequest.java | 4 +-- .../SelfServiceReservationItemResponse.java | 4 +-- .../v1/model/SelfServiceReservationList.java | 4 +-- .../model/SelfServiceReservationResponse.java | 4 +-- .../openapi/metal/v1/model/ServerInfo.java | 4 +-- .../metal/v1/model/SpotMarketPricesList.java | 4 +-- .../model/SpotMarketPricesPerMetroList.java | 4 +-- .../model/SpotMarketPricesPerMetroReport.java | 4 +-- .../metal/v1/model/SpotMarketRequest.java | 4 +-- .../model/SpotMarketRequestCreateInput.java | 6 ++-- ...tRequestCreateInputInstanceAttributes.java | 14 ++++----- .../metal/v1/model/SpotMarketRequestList.java | 4 +-- .../v1/model/SpotMarketRequestMetro.java | 4 +-- .../metal/v1/model/SpotPricesDatapoints.java | 6 ++-- .../v1/model/SpotPricesHistoryReport.java | 4 +-- .../v1/model/SpotPricesPerBaremetal.java | 4 +-- .../metal/v1/model/SpotPricesPerFacility.java | 4 +-- .../v1/model/SpotPricesPerNewFacility.java | 4 +-- .../metal/v1/model/SpotPricesReport.java | 4 +-- .../metal/v1/model/SupportRequestInput.java | 8 ++--- .../openapi/metal/v1/model/Timeframe.java | 4 +-- .../metal/v1/model/TransferRequest.java | 4 +-- .../metal/v1/model/TransferRequestInput.java | 4 +-- .../metal/v1/model/TransferRequestList.java | 4 +-- .../metal/v1/model/UpdateEmailInput.java | 4 +-- .../equinix/openapi/metal/v1/model/User.java | 6 ++-- .../metal/v1/model/UserCreateInput.java | 30 ++++++++----------- .../openapi/metal/v1/model/UserList.java | 4 +-- .../openapi/metal/v1/model/UserLite.java | 8 ++--- .../metal/v1/model/UserUpdateInput.java | 4 +-- .../metal/v1/model/VirtualCircuit.java | 30 +++++++------------ .../v1/model/VirtualCircuitCreateInput.java | 6 ++-- .../metal/v1/model/VirtualCircuitList.java | 4 +-- .../v1/model/VirtualCircuitUpdateInput.java | 6 ++-- .../metal/v1/model/VirtualNetwork.java | 4 +-- .../v1/model/VirtualNetworkCreateInput.java | 4 +-- .../metal/v1/model/VirtualNetworkList.java | 4 +-- .../equinix/openapi/metal/v1/model/Vrf.java | 6 ++-- .../metal/v1/model/VrfCreateInput.java | 10 +++---- .../metal/v1/model/VrfIPReservation.java | 10 ++----- .../metal/v1/model/VrfIPReservationAllOf.java | 4 +-- .../v1/model/VrfIPReservationCreateInput.java | 12 ++++---- .../metal/v1/model/VrfIPReservationList.java | 4 +-- .../openapi/metal/v1/model/VrfList.java | 4 +-- .../v1/model/VrfMetalGatewayCreateInput.java | 8 ++--- .../metal/v1/model/VrfUpdateInput.java | 6 ++-- .../metal/v1/model/VrfVirtualCircuit.java | 6 ++-- .../model/VrfVirtualCircuitCreateInput.java | 12 ++++---- .../model/VrfVirtualCircuitUpdateInput.java | 6 ++-- 188 files changed, 310 insertions(+), 698 deletions(-) diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java index 4fc3a1789..e93fdba23 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java @@ -359,9 +359,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Address.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); } } @@ -372,7 +370,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { @@ -385,13 +383,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("coordinates") != null && !jsonObj.get("coordinates").isJsonNull()) { Coordinates.validateJsonObject(jsonObj.getAsJsonObject("coordinates")); } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { + if (!jsonObj.get("country").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } - if ((jsonObj.get("zip_code") != null && !jsonObj.get("zip_code").isJsonNull()) && !jsonObj.get("zip_code").isJsonPrimitive()) { + if (!jsonObj.get("zip_code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip_code").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java index 909d96070..51bc2357a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java @@ -389,9 +389,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (AuthToken.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!AuthToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in AuthToken is not found in the empty JSON string", AuthToken.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java index 0ca3dec19..67b61eeb3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (AuthTokenInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!AuthTokenInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenInput is not found in the empty JSON string", AuthTokenInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java index 384d55027..cef69b3e2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (AuthTokenList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!AuthTokenList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenList is not found in the empty JSON string", AuthTokenList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java index d24a8ee20..415c7286c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java @@ -648,9 +648,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (AuthTokenProject.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!AuthTokenProject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenProject is not found in the empty JSON string", AuthTokenProject.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java index deffb4c68..206940cbf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java @@ -796,9 +796,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (AuthTokenUser.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!AuthTokenUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenUser is not found in the empty JSON string", AuthTokenUser.openapiRequiredFields.toString())); } } @@ -856,7 +854,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); } // ensure the json data is an array - if ((jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) && !jsonObj.get("features").isJsonArray()) { + if (!jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java index b972f0a19..e0a9ba5db 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java @@ -252,9 +252,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BGPSessionInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BGPSessionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BGPSessionInput is not found in the empty JSON string", BGPSessionInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java index 1409dd8d9..8711f1b28 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java @@ -406,9 +406,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Batch.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Batch.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Batch is not found in the empty JSON string", Batch.openapiRequiredFields.toString())); } } @@ -427,7 +425,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } } // ensure the json data is an array - if ((jsonObj.get("error_messages") != null && !jsonObj.get("error_messages").isJsonNull()) && !jsonObj.get("error_messages").isJsonArray()) { + if (!jsonObj.get("error_messages").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `error_messages` to be an array in the JSON string but got `%s`", jsonObj.get("error_messages").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java index e302aba2a..168c8820c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BatchesList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BatchesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BatchesList is not found in the empty JSON string", BatchesList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java index 00583a774..d81b55607 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java @@ -666,9 +666,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpConfig.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpConfig is not found in the empty JSON string", BgpConfig.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java index d1f1d0138..3a42cf5db 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java @@ -267,9 +267,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpConfigRequestInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpConfigRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpConfigRequestInput is not found in the empty JSON string", BgpConfigRequestInput.openapiRequiredFields.toString())); } } @@ -280,7 +278,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("deployment_type") != null && !jsonObj.get("deployment_type").isJsonNull()) && !jsonObj.get("deployment_type").isJsonPrimitive()) { + if (!jsonObj.get("deployment_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `deployment_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deployment_type").toString())); } if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java index 39c5fe47d..2b92de81c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java @@ -474,9 +474,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpNeighborData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpNeighborData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpNeighborData is not found in the empty JSON string", BgpNeighborData.openapiRequiredFields.toString())); } } @@ -487,7 +485,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `md5_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5_password").toString())); } // ensure the json data is an array - if ((jsonObj.get("peer_ips") != null && !jsonObj.get("peer_ips").isJsonNull()) && !jsonObj.get("peer_ips").isJsonArray()) { + if (!jsonObj.get("peer_ips").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `peer_ips` to be an array in the JSON string but got `%s`", jsonObj.get("peer_ips").toString())); } if (jsonObj.get("routes_in") != null && !jsonObj.get("routes_in").isJsonNull()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java index dd2d06838..797a3bd11 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpNeighborDataRoutesInInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpNeighborDataRoutesInInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpNeighborDataRoutesInInner is not found in the empty JSON string", BgpNeighborDataRoutesInInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java index cd4d3a465..f5101f34e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpNeighborDataRoutesOutInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpNeighborDataRoutesOutInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpNeighborDataRoutesOutInner is not found in the empty JSON string", BgpNeighborDataRoutesOutInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java index 23e2cc0e2..3dca6aaca 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java @@ -525,9 +525,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpSession.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpSession is not found in the empty JSON string", BgpSession.openapiRequiredFields.toString())); } } @@ -538,7 +536,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("address_family") != null && !jsonObj.get("address_family").isJsonNull()) && !jsonObj.get("address_family").isJsonPrimitive()) { + if (!jsonObj.get("address_family").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address_family` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address_family").toString())); } // validate the optional field `device` @@ -552,7 +550,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the json data is an array - if ((jsonObj.get("learned_routes") != null && !jsonObj.get("learned_routes").isJsonNull()) && !jsonObj.get("learned_routes").isJsonArray()) { + if (!jsonObj.get("learned_routes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `learned_routes` to be an array in the JSON string but got `%s`", jsonObj.get("learned_routes").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java index aa3f2dce1..9c7b0a16c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpSessionList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpSessionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpSessionList is not found in the empty JSON string", BgpSessionList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java index e661f0d36..3035e71c2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (BgpSessionNeighbors.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!BgpSessionNeighbors.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in BgpSessionNeighbors is not found in the empty JSON string", BgpSessionNeighbors.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java index 4baea4a03..68211269b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java @@ -265,9 +265,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityCheckPerFacilityInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityCheckPerFacilityInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerFacilityInfo is not found in the empty JSON string", CapacityCheckPerFacilityInfo.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java index 5b2a03fe7..ee2dcf5e9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityCheckPerFacilityList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityCheckPerFacilityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerFacilityList is not found in the empty JSON string", CapacityCheckPerFacilityList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java index 1b335c2e1..1afc44d44 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java @@ -265,9 +265,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityCheckPerMetroInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityCheckPerMetroInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerMetroInfo is not found in the empty JSON string", CapacityCheckPerMetroInfo.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java index ffb1aee96..5a492a0e4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityCheckPerMetroList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityCheckPerMetroList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerMetroList is not found in the empty JSON string", CapacityCheckPerMetroList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java index 37c5ec469..a35f90251 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityInput is not found in the empty JSON string", CapacityInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java index aec92fedc..65c927015 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java @@ -175,9 +175,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityLevelPerBaremetal.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityLevelPerBaremetal.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityLevelPerBaremetal is not found in the empty JSON string", CapacityLevelPerBaremetal.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java index b45ba408d..5ca3457b1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityList is not found in the empty JSON string", CapacityList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java index 24d855b5b..ee2ffb0f4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java @@ -416,9 +416,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityPerFacility.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityPerFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityPerFacility is not found in the empty JSON string", CapacityPerFacility.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java index a69ea4c71..b4a293bd2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityPerMetroInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityPerMetroInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityPerMetroInput is not found in the empty JSON string", CapacityPerMetroInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java index 542540563..5a28def40 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityPerNewFacility.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityPerNewFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityPerNewFacility is not found in the empty JSON string", CapacityPerNewFacility.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java index 88238a19d..360f612ce 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java @@ -567,9 +567,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CapacityReport.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CapacityReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityReport is not found in the empty JSON string", CapacityReport.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java index ad555ff7b..2aefcf96c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Coordinates.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Coordinates.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Coordinates is not found in the empty JSON string", Coordinates.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java index 05854af74..3afcca523 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CreateEmailInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CreateEmailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateEmailInput is not found in the empty JSON string", CreateEmailInput.openapiRequiredFields.toString())); } } @@ -189,7 +187,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java index b8a655f12..97720b36e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java @@ -278,9 +278,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CreateSelfServiceReservationRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CreateSelfServiceReservationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSelfServiceReservationRequest is not found in the empty JSON string", CreateSelfServiceReservationRequest.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java index 94620cbaf..050553764 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java @@ -298,9 +298,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (CreateSelfServiceReservationRequestPeriod.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!CreateSelfServiceReservationRequestPeriod.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSelfServiceReservationRequestPeriod is not found in the empty JSON string", CreateSelfServiceReservationRequestPeriod.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java index e85c44982..830f32fca 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java @@ -363,9 +363,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DefaultIPReservation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DefaultIPReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultIPReservation is not found in the empty JSON string", DefaultIPReservation.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java index d2ac5cbaf..e07af5c40 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java @@ -368,9 +368,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DefaultIPReservationAllOf.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DefaultIPReservationAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultIPReservationAllOf is not found in the empty JSON string", DefaultIPReservationAllOf.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java index 6e8894c43..cd73ad43d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java @@ -427,9 +427,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DefaultIPReservationCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DefaultIPReservationCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultIPReservationCreateInput is not found in the empty JSON string", DefaultIPReservationCreateInput.openapiRequiredFields.toString())); } } @@ -453,10 +451,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java index d261435cb..571f7bf46 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java @@ -1440,9 +1440,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Device.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Device.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Device is not found in the empty JSON string", Device.openapiRequiredFields.toString())); } } @@ -1585,7 +1583,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `switch_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("switch_uuid").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java index 5a02fd854..ad65f7d1e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceActionsInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceActionsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceActionsInner is not found in the empty JSON string", DeviceActionsInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java index fa59753c7..9beb1b155 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java @@ -1023,9 +1023,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreateInput is not found in the empty JSON string", DeviceCreateInput.openapiRequiredFields.toString())); } } @@ -1043,11 +1041,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the json data is an array - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonArray()) { + if (!jsonObj.get("facility").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); } // ensure the json data is an array - if ((jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) && !jsonObj.get("features").isJsonArray()) { + if (!jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("hardware_reservation_id") != null && !jsonObj.get("hardware_reservation_id").isJsonNull()) && !jsonObj.get("hardware_reservation_id").isJsonPrimitive()) { @@ -1076,14 +1074,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); } - if ((jsonObj.get("operating_system") != null && !jsonObj.get("operating_system").isJsonNull()) && !jsonObj.get("operating_system").isJsonPrimitive()) { + if (!jsonObj.get("operating_system").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { + if (!jsonObj.get("plan").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); } // ensure the json data is an array - if ((jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull()) && !jsonObj.get("project_ssh_keys").isJsonArray()) { + if (!jsonObj.get("project_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); } if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { @@ -1101,11 +1099,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // ensure the json data is an array - if ((jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull()) && !jsonObj.get("user_ssh_keys").isJsonArray()) { + if (!jsonObj.get("user_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java index d5b22ae23..10f2143bb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java @@ -323,14 +323,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceCreateInputIpAddressesInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceCreateInputIpAddressesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreateInputIpAddressesInner is not found in the empty JSON string", DeviceCreateInputIpAddressesInner.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("ip_reservations") != null && !jsonObj.get("ip_reservations").isJsonNull()) && !jsonObj.get("ip_reservations").isJsonArray()) { + if (!jsonObj.get("ip_reservations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_reservations` to be an array in the JSON string but got `%s`", jsonObj.get("ip_reservations").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java index b18456b4b..04c421977 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java @@ -449,9 +449,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceCreatedBy.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceCreatedBy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreatedBy is not found in the empty JSON string", DeviceCreatedBy.openapiRequiredFields.toString())); } } @@ -477,13 +475,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); } - if ((jsonObj.get("short_id") != null && !jsonObj.get("short_id").isJsonNull()) && !jsonObj.get("short_id").isJsonPrimitive()) { + if (!jsonObj.get("short_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java index 5ef437acc..bbe1a3881 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java @@ -217,9 +217,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceList is not found in the empty JSON string", DeviceList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java index 82bace1c2..0aa0f6672 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceMetro.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceMetro is not found in the empty JSON string", DeviceMetro.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java index 6189d3900..7737a57cc 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceProject.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceProject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceProject is not found in the empty JSON string", DeviceProject.openapiRequiredFields.toString())); } } @@ -189,7 +187,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + if (!jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java index 1aa4b67ef..e90b2099d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceProjectLite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceProjectLite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceProjectLite is not found in the empty JSON string", DeviceProjectLite.openapiRequiredFields.toString())); } } @@ -189,7 +187,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + if (!jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java index 91df9162e..381dda31c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java @@ -485,9 +485,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceUpdateInput is not found in the empty JSON string", DeviceUpdateInput.openapiRequiredFields.toString())); } } @@ -504,7 +502,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java index c2b4592ee..03cdcb715 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java @@ -235,9 +235,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceUsage.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceUsage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceUsage is not found in the empty JSON string", DeviceUsage.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java index b3ac0265a..3e634d3f8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (DeviceUsageList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!DeviceUsageList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceUsageList is not found in the empty JSON string", DeviceUsageList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java index 98ef3235b..6b4eb3df6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java @@ -296,9 +296,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Email.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Email.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Email is not found in the empty JSON string", Email.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java index 95905bcba..c768faac3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java @@ -206,9 +206,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (EmailInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!EmailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in EmailInput is not found in the empty JSON string", EmailInput.openapiRequiredFields.toString())); } } @@ -219,7 +217,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java index 775ec9fed..2c02c5614 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java @@ -509,9 +509,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Entitlement.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Entitlement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Entitlement is not found in the empty JSON string", Entitlement.openapiRequiredFields.toString())); } } @@ -528,13 +526,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) { + if (!jsonObj.get("slug").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java index 29b0150e8..1c724f07a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java @@ -216,9 +216,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Error.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } @@ -226,7 +224,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } // ensure the json data is an array - if ((jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) && !jsonObj.get("errors").isJsonArray()) { + if (!jsonObj.get("errors").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java index 7e22e532c..6fdcc16fe 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java @@ -398,9 +398,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Event.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Event is not found in the empty JSON string", Event.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java index 144ffdc75..968f27ba1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java @@ -217,9 +217,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (EventList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!EventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in EventList is not found in the empty JSON string", EventList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java index e095f9c49..1413fd2db 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java @@ -468,9 +468,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (FabricServiceToken.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!FabricServiceToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in FabricServiceToken is not found in the empty JSON string", FabricServiceToken.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java index 746f60882..d3e078545 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java @@ -429,9 +429,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Facility.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Facility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Facility is not found in the empty JSON string", Facility.openapiRequiredFields.toString())); } } @@ -443,14 +441,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } // ensure the json data is an array - if ((jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) && !jsonObj.get("features").isJsonArray()) { + if (!jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the json data is an array - if ((jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull()) && !jsonObj.get("ip_ranges").isJsonArray()) { + if (!jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } // validate the optional field `metro` diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java index a4cac1989..f691d4f37 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (FacilityList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!FacilityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in FacilityList is not found in the empty JSON string", FacilityList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java index d257b63d9..646f61b30 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java @@ -297,9 +297,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (GlobalBgpRange.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!GlobalBgpRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in GlobalBgpRange is not found in the empty JSON string", GlobalBgpRange.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java index d8193da78..3b92ced6d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (GlobalBgpRangeList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!GlobalBgpRangeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in GlobalBgpRangeList is not found in the empty JSON string", GlobalBgpRangeList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java index 8012c35ba..9cc461755 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java @@ -541,9 +541,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (HardwareReservation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!HardwareReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HardwareReservation is not found in the empty JSON string", HardwareReservation.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java index 488dc9fad..edd19ec14 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java @@ -217,9 +217,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (HardwareReservationList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!HardwareReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HardwareReservationList is not found in the empty JSON string", HardwareReservationList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java index 5b21271cd..d8d491530 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Href.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Href.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Href is not found in the empty JSON string", Href.openapiRequiredFields.toString())); } } @@ -189,7 +187,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + if (!jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java index 63b348a97..bbbd0d72c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java @@ -139,9 +139,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (HrefOnly.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!HrefOnly.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HrefOnly is not found in the empty JSON string", HrefOnly.openapiRequiredFields.toString())); } } @@ -160,7 +158,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + if (!jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java index 340c79a36..a5637e32d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java @@ -660,9 +660,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPAssignment.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPAssignment.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignment is not found in the empty JSON string", IPAssignment.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java index 129a72e86..52bcf0061 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java @@ -236,9 +236,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPAssignmentInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPAssignmentInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentInput is not found in the empty JSON string", IPAssignmentInput.openapiRequiredFields.toString())); } } @@ -249,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java index be7508099..f833a2429 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPAssignmentList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPAssignmentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentList is not found in the empty JSON string", IPAssignmentList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java index 5d37ea097..b98e9939f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPAssignmentMetro.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPAssignmentMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentMetro is not found in the empty JSON string", IPAssignmentMetro.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java index 9c8085038..2c67b6e94 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java @@ -185,14 +185,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPAvailabilitiesList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPAvailabilitiesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPAvailabilitiesList is not found in the empty JSON string", IPAvailabilitiesList.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("available") != null && !jsonObj.get("available").isJsonNull()) && !jsonObj.get("available").isJsonArray()) { + if (!jsonObj.get("available").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `available` to be an array in the JSON string but got `%s`", jsonObj.get("available").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java index 63d5dd137..0f4e75fe4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java @@ -824,9 +824,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPReservation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservation is not found in the empty JSON string", IPReservation.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java index be0c12804..5c3012780 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPReservationList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservationList is not found in the empty JSON string", IPReservationList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java index 6446254f5..c294782ee 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (IPReservationMetro.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!IPReservationMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservationMetro is not found in the empty JSON string", IPReservationMetro.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java index 1ab719fa5..7c89fd676 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InstancesBatchCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InstancesBatchCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InstancesBatchCreateInput is not found in the empty JSON string", InstancesBatchCreateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java index 24d5cc857..d0bfd5b92 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java @@ -776,9 +776,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InstancesBatchCreateInputBatchesInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InstancesBatchCreateInputBatchesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InstancesBatchCreateInputBatchesInner is not found in the empty JSON string", InstancesBatchCreateInputBatchesInner.openapiRequiredFields.toString())); } } @@ -789,18 +787,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the json data is an array - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonArray()) { + if (!jsonObj.get("facility").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); } // ensure the json data is an array - if ((jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) && !jsonObj.get("features").isJsonArray()) { + if (!jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } // ensure the json data is an array - if ((jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonNull()) && !jsonObj.get("hostnames").isJsonArray()) { + if (!jsonObj.get("hostnames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); } if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { @@ -827,15 +825,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); } // ensure the json data is an array - if ((jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull()) && !jsonObj.get("project_ssh_keys").isJsonArray()) { + if (!jsonObj.get("project_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // ensure the json data is an array - if ((jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull()) && !jsonObj.get("user_ssh_keys").isJsonArray()) { + if (!jsonObj.get("user_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java index b328dd24c..0ad3aba41 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java @@ -323,14 +323,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InstancesBatchCreateInputBatchesInnerIpAddressesInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InstancesBatchCreateInputBatchesInnerIpAddressesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InstancesBatchCreateInputBatchesInnerIpAddressesInner is not found in the empty JSON string", InstancesBatchCreateInputBatchesInnerIpAddressesInner.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("ip_reservations") != null && !jsonObj.get("ip_reservations").isJsonNull()) && !jsonObj.get("ip_reservations").isJsonArray()) { + if (!jsonObj.get("ip_reservations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_reservations` to be an array in the JSON string but got `%s`", jsonObj.get("ip_reservations").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java index 8dddc03a3..63b3c8276 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java @@ -673,9 +673,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Interconnection.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Interconnection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Interconnection is not found in the empty JSON string", Interconnection.openapiRequiredFields.toString())); } } @@ -741,7 +739,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java index c239707e5..fd729b2a0 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java @@ -619,9 +619,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InterconnectionCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InterconnectionCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionCreateInput is not found in the empty JSON string", InterconnectionCreateInput.openapiRequiredFields.toString())); } } @@ -638,19 +636,19 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { + if (!jsonObj.get("metro").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); } if ((jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) && !jsonObj.get("mode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mode").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); } - if ((jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) && !jsonObj.get("redundancy").isJsonPrimitive()) { + if (!jsonObj.get("redundancy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); } if ((jsonObj.get("service_token_type") != null && !jsonObj.get("service_token_type").isJsonNull()) && !jsonObj.get("service_token_type").isJsonPrimitive()) { @@ -660,14 +658,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // ensure the json data is an array - if ((jsonObj.get("vlans") != null && !jsonObj.get("vlans").isJsonNull()) && !jsonObj.get("vlans").isJsonArray()) { + if (!jsonObj.get("vlans").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `vlans` to be an array in the JSON string but got `%s`", jsonObj.get("vlans").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java index a30c9222e..b617426a1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InterconnectionList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InterconnectionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionList is not found in the empty JSON string", InterconnectionList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java index f0ade9a44..6b68c68b2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InterconnectionMetro.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InterconnectionMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionMetro is not found in the empty JSON string", InterconnectionMetro.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java index aa7d90682..3d451cf45 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java @@ -328,9 +328,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InterconnectionPort.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InterconnectionPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionPort is not found in the empty JSON string", InterconnectionPort.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java index cde2a5e27..4ad42f515 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InterconnectionPortList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InterconnectionPortList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionPortList is not found in the empty JSON string", InterconnectionPortList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java index c96c34ee3..cb28aa97b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java @@ -382,9 +382,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InterconnectionUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InterconnectionUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionUpdateInput is not found in the empty JSON string", InterconnectionUpdateInput.openapiRequiredFields.toString())); } } @@ -404,7 +402,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java index 89f625132..c7085b93e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java @@ -466,9 +466,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Invitation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Invitation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Invitation is not found in the empty JSON string", Invitation.openapiRequiredFields.toString())); } } @@ -494,11 +492,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { Href.validateJsonObject(jsonObj.getAsJsonObject("organization")); } // ensure the json data is an array - if ((jsonObj.get("projects_ids") != null && !jsonObj.get("projects_ids").isJsonNull()) && !jsonObj.get("projects_ids").isJsonArray()) { + if (!jsonObj.get("projects_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `projects_ids` to be an array in the JSON string but got `%s`", jsonObj.get("projects_ids").toString())); } // ensure the json data is an array - if ((jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) && !jsonObj.get("roles").isJsonArray()) { + if (!jsonObj.get("roles").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java index 8a1e14f97..c2e01700c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java @@ -284,9 +284,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InvitationInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InvitationInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationInput is not found in the empty JSON string", InvitationInput.openapiRequiredFields.toString())); } } @@ -297,18 +295,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("invitee") != null && !jsonObj.get("invitee").isJsonNull()) && !jsonObj.get("invitee").isJsonPrimitive()) { + if (!jsonObj.get("invitee").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `invitee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invitee").toString())); } if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } // ensure the json data is an array - if ((jsonObj.get("projects_ids") != null && !jsonObj.get("projects_ids").isJsonNull()) && !jsonObj.get("projects_ids").isJsonArray()) { + if (!jsonObj.get("projects_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `projects_ids` to be an array in the JSON string but got `%s`", jsonObj.get("projects_ids").toString())); } // ensure the json data is an array - if ((jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) && !jsonObj.get("roles").isJsonArray()) { + if (!jsonObj.get("roles").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java index 1cec6d6e0..ab689426d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (InvitationList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!InvitationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationList is not found in the empty JSON string", InvitationList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java index c6add5284..37c26bae2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java @@ -328,9 +328,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (License.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!License.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in License is not found in the empty JSON string", License.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java index 2b010e0b6..ba89903c1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java @@ -236,9 +236,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (LicenseCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!LicenseCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseCreateInput is not found in the empty JSON string", LicenseCreateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java index 5fceb288a..c808715cf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (LicenseList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!LicenseList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseList is not found in the empty JSON string", LicenseList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java index 63a9ac0ed..ca03a9b42 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java @@ -206,9 +206,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (LicenseUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!LicenseUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseUpdateInput is not found in the empty JSON string", LicenseUpdateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java index 6f761468e..5cc790c94 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java @@ -368,9 +368,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Membership.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Membership.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Membership is not found in the empty JSON string", Membership.openapiRequiredFields.toString())); } } @@ -385,7 +383,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { Href.validateJsonObject(jsonObj.getAsJsonObject("project")); } // ensure the json data is an array - if ((jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) && !jsonObj.get("roles").isJsonArray()) { + if (!jsonObj.get("roles").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } // validate the optional field `user` diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java index fe8474f20..fba66e7db 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java @@ -185,14 +185,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MembershipInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MembershipInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MembershipInput is not found in the empty JSON string", MembershipInput.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonArray()) { + if (!jsonObj.get("role").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be an array in the JSON string but got `%s`", jsonObj.get("role").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java index e0c500e9a..028cfbf1c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MembershipList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MembershipList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MembershipList is not found in the empty JSON string", MembershipList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java index f775c2fa4..b0321a9b1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java @@ -326,9 +326,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Meta.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Meta.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Meta is not found in the empty JSON string", Meta.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java index d9c3c3cca..4254c8d81 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java @@ -501,9 +501,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetalGateway.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetalGateway.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGateway is not found in the empty JSON string", MetalGateway.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java index 045073083..886a0e2ca 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java @@ -237,9 +237,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetalGatewayCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetalGatewayCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayCreateInput is not found in the empty JSON string", MetalGatewayCreateInput.openapiRequiredFields.toString())); } } @@ -253,7 +251,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("ip_reservation_id") != null && !jsonObj.get("ip_reservation_id").isJsonNull()) && !jsonObj.get("ip_reservation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ip_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_reservation_id").toString())); } - if ((jsonObj.get("virtual_network_id") != null && !jsonObj.get("virtual_network_id").isJsonNull()) && !jsonObj.get("virtual_network_id").isJsonPrimitive()) { + if (!jsonObj.get("virtual_network_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `virtual_network_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("virtual_network_id").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java index a69a92884..851d30cb7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetalGatewayList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetalGatewayList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayList is not found in the empty JSON string", MetalGatewayList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java index 56a6647e3..de6a84208 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java @@ -407,9 +407,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetalGatewayLite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetalGatewayLite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayLite is not found in the empty JSON string", MetalGatewayLite.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java index cfd604f63..3f8fbe71d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Metro.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Metro.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Metro is not found in the empty JSON string", Metro.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java index d304f7614..d865f8abd 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetroCapacityList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetroCapacityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetroCapacityList is not found in the empty JSON string", MetroCapacityList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java index 9b1a57b87..9e8791853 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java @@ -746,9 +746,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetroCapacityReport.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetroCapacityReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetroCapacityReport is not found in the empty JSON string", MetroCapacityReport.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java index 8fa19899f..8effc839a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetroList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetroList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetroList is not found in the empty JSON string", MetroList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java index 78da4b42a..87ece2339 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java @@ -235,9 +235,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (MetroServerInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!MetroServerInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MetroServerInfo is not found in the empty JSON string", MetroServerInfo.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java index 4fc8a15e2..8f5efcbc5 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java @@ -175,9 +175,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (NewPassword.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!NewPassword.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in NewPassword is not found in the empty JSON string", NewPassword.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java index 98a4bbcd1..1a301418c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java @@ -426,9 +426,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (OperatingSystem.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!OperatingSystem.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OperatingSystem is not found in the empty JSON string", OperatingSystem.openapiRequiredFields.toString())); } } @@ -442,7 +440,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the json data is an array - if ((jsonObj.get("provisionable_on") != null && !jsonObj.get("provisionable_on").isJsonNull()) && !jsonObj.get("provisionable_on").isJsonArray()) { + if (!jsonObj.get("provisionable_on").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `provisionable_on` to be an array in the JSON string but got `%s`", jsonObj.get("provisionable_on").toString())); } if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java index 3c4bd8eca..7adbef667 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (OperatingSystemList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!OperatingSystemList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OperatingSystemList is not found in the empty JSON string", OperatingSystemList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java index 19ddc6b16..627f8dcf6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java @@ -686,9 +686,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Organization.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Organization.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Organization is not found in the empty JSON string", Organization.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java index 1e24c84c0..27be295b2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java @@ -418,9 +418,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (OrganizationInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!OrganizationInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationInput is not found in the empty JSON string", OrganizationInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java index 6ecc11862..5f17126f7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java @@ -217,9 +217,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (OrganizationList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!OrganizationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationList is not found in the empty JSON string", OrganizationList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java index 0af5b3588..209ae1119 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java @@ -265,9 +265,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ParentBlock.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ParentBlock.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ParentBlock is not found in the empty JSON string", ParentBlock.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java index 708831dd1..35047147a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java @@ -609,9 +609,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PaymentMethod.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PaymentMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethod is not found in the empty JSON string", PaymentMethod.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java index 8cdfc1607..dd33a9dc7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java @@ -235,9 +235,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PaymentMethodBillingAddress.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PaymentMethodBillingAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodBillingAddress is not found in the empty JSON string", PaymentMethodBillingAddress.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java index b810ec567..14851f3d9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java @@ -237,9 +237,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PaymentMethodCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PaymentMethodCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodCreateInput is not found in the empty JSON string", PaymentMethodCreateInput.openapiRequiredFields.toString())); } } @@ -250,10 +248,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("nonce") != null && !jsonObj.get("nonce").isJsonNull()) && !jsonObj.get("nonce").isJsonPrimitive()) { + if (!jsonObj.get("nonce").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonce").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java index 4fa006004..8ac47d26f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PaymentMethodList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PaymentMethodList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodList is not found in the empty JSON string", PaymentMethodList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java index 95f12149f..98ad58701 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java @@ -325,9 +325,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PaymentMethodUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PaymentMethodUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodUpdateInput is not found in the empty JSON string", PaymentMethodUpdateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java index 4d4c5690e..e995a841a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java @@ -534,9 +534,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Plan.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Plan.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Plan is not found in the empty JSON string", Plan.openapiRequiredFields.toString())); } } @@ -555,7 +553,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } } // ensure the json data is an array - if ((jsonObj.get("deployment_types") != null && !jsonObj.get("deployment_types").isJsonNull()) && !jsonObj.get("deployment_types").isJsonArray()) { + if (!jsonObj.get("deployment_types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `deployment_types` to be an array in the JSON string but got `%s`", jsonObj.get("deployment_types").toString())); } if (jsonObj.get("available_in_metros") != null && !jsonObj.get("available_in_metros").isJsonNull()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java index 886f4742f..31f7487d9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java @@ -206,9 +206,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PlanAvailableInMetrosInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PlanAvailableInMetrosInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PlanAvailableInMetrosInner is not found in the empty JSON string", PlanAvailableInMetrosInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java index 1bad8f361..5ee4c660b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java @@ -175,9 +175,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PlanAvailableInMetrosInnerPrice.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PlanAvailableInMetrosInnerPrice.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PlanAvailableInMetrosInnerPrice is not found in the empty JSON string", PlanAvailableInMetrosInnerPrice.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java index 1b879f10a..ae240e662 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PlanList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PlanList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PlanList is not found in the empty JSON string", PlanList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java index 3553e6c59..463640d69 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java @@ -367,9 +367,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Port.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Port.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Port is not found in the empty JSON string", Port.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java index a150d4a4e..bb47b9bf4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java @@ -175,9 +175,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortAssignInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortAssignInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortAssignInput is not found in the empty JSON string", PortAssignInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java index cc938c525..9e66a7489 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortConvertLayer3Input.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortConvertLayer3Input.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortConvertLayer3Input is not found in the empty JSON string", PortConvertLayer3Input.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java index 9bb2fc85c..fa021a6ff 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortConvertLayer3InputRequestIpsInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortConvertLayer3InputRequestIpsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortConvertLayer3InputRequestIpsInner is not found in the empty JSON string", PortConvertLayer3InputRequestIpsInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java index 61f9ede69..ac917f6d3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java @@ -435,9 +435,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignment.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignment.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignment is not found in the empty JSON string", PortVlanAssignment.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java index db6919aa5..5990d9433 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java @@ -458,14 +458,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignmentBatch.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignmentBatch.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatch is not found in the empty JSON string", PortVlanAssignmentBatch.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("error_messages") != null && !jsonObj.get("error_messages").isJsonNull()) && !jsonObj.get("error_messages").isJsonArray()) { + if (!jsonObj.get("error_messages").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `error_messages` to be an array in the JSON string but got `%s`", jsonObj.get("error_messages").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java index 265e740c5..f0daf15ec 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignmentBatchCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignmentBatchCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchCreateInput is not found in the empty JSON string", PortVlanAssignmentBatchCreateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java index f7d5249ae..9bb8554bd 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java @@ -282,9 +282,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchCreateInputVlanAssignmentsInner is not found in the empty JSON string", PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java index 21350541b..ee52326ee 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignmentBatchList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignmentBatchList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchList is not found in the empty JSON string", PortVlanAssignmentBatchList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java index b4605fea7..cab45da8c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java @@ -313,9 +313,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignmentBatchVlanAssignmentsInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignmentBatchVlanAssignmentsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchVlanAssignmentsInner is not found in the empty JSON string", PortVlanAssignmentBatchVlanAssignmentsInner.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java index 8f789f281..935e878e3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (PortVlanAssignmentList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!PortVlanAssignmentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentList is not found in the empty JSON string", PortVlanAssignmentList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java index 890327f9b..a96db5551 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java @@ -648,9 +648,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Project.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Project.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Project is not found in the empty JSON string", Project.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java index de071f33f..d434c3eb9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java @@ -267,9 +267,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ProjectCreateFromRootInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ProjectCreateFromRootInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectCreateFromRootInput is not found in the empty JSON string", ProjectCreateFromRootInput.openapiRequiredFields.toString())); } } @@ -280,7 +278,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("organization_id") != null && !jsonObj.get("organization_id").isJsonNull()) && !jsonObj.get("organization_id").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java index 5f6fe2226..4cca41ecf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java @@ -237,9 +237,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ProjectCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ProjectCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectCreateInput is not found in the empty JSON string", ProjectCreateInput.openapiRequiredFields.toString())); } } @@ -250,7 +248,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("payment_method_id") != null && !jsonObj.get("payment_method_id").isJsonNull()) && !jsonObj.get("payment_method_id").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java index 3309bd7a6..7bcffa2fc 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java @@ -217,9 +217,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ProjectList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ProjectList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectList is not found in the empty JSON string", ProjectList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java index f20f667f1..18a1e5c23 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ProjectUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ProjectUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectUpdateInput is not found in the empty JSON string", ProjectUpdateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java index fea166952..610dec122 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java @@ -415,9 +415,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ProjectUsage.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ProjectUsage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectUsage is not found in the empty JSON string", ProjectUsage.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java index 127bfef85..901325f39 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ProjectUsageList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ProjectUsageList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectUsageList is not found in the empty JSON string", ProjectUsageList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java index ad62e8b97..aaa96ca0e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java @@ -185,14 +185,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (RecoveryCodeList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!RecoveryCodeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in RecoveryCodeList is not found in the empty JSON string", RecoveryCodeList.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("recovery_codes") != null && !jsonObj.get("recovery_codes").isJsonNull()) && !jsonObj.get("recovery_codes").isJsonArray()) { + if (!jsonObj.get("recovery_codes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `recovery_codes` to be an array in the JSON string but got `%s`", jsonObj.get("recovery_codes").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java index f1ec98e42..8569eae1e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java @@ -388,9 +388,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SSHKey.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SSHKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKey is not found in the empty JSON string", SSHKey.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java index 7ba30a4c8..14f4dc86e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java @@ -246,14 +246,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SSHKeyCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SSHKeyCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyCreateInput is not found in the empty JSON string", SSHKeyCreateInput.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("instances_ids") != null && !jsonObj.get("instances_ids").isJsonNull()) && !jsonObj.get("instances_ids").isJsonArray()) { + if (!jsonObj.get("instances_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `instances_ids` to be an array in the JSON string but got `%s`", jsonObj.get("instances_ids").toString())); } if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java index 2aef8672d..0167f0c8a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SSHKeyInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SSHKeyInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyInput is not found in the empty JSON string", SSHKeyInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java index a2f4e37ea..ec1c80363 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SSHKeyList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SSHKeyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyList is not found in the empty JSON string", SSHKeyList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java index 226f9b4e1..8650df184 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java @@ -296,9 +296,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SelfServiceReservationItemRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SelfServiceReservationItemRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationItemRequest is not found in the empty JSON string", SelfServiceReservationItemRequest.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java index 03d4d0fe8..9804856f8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java @@ -446,9 +446,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SelfServiceReservationItemResponse.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SelfServiceReservationItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationItemResponse is not found in the empty JSON string", SelfServiceReservationItemResponse.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java index dad53fb2b..e385dc465 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SelfServiceReservationList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SelfServiceReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationList is not found in the empty JSON string", SelfServiceReservationList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java index 4188acdcf..5291e3639 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java @@ -489,9 +489,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SelfServiceReservationResponse.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SelfServiceReservationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationResponse is not found in the empty JSON string", SelfServiceReservationResponse.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java index b3a1fc780..ff3b7d0ac 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java @@ -235,9 +235,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (ServerInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!ServerInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in ServerInfo is not found in the empty JSON string", ServerInfo.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java index 77aa975f6..e3f060c9d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketPricesList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketPricesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketPricesList is not found in the empty JSON string", SpotMarketPricesList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java index b404f74c3..dc778cc99 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketPricesPerMetroList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketPricesPerMetroList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketPricesPerMetroList is not found in the empty JSON string", SpotMarketPricesPerMetroList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java index 506a87e76..0e1fcb6c8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java @@ -356,9 +356,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketPricesPerMetroReport.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketPricesPerMetroReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketPricesPerMetroReport is not found in the empty JSON string", SpotMarketPricesPerMetroReport.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java index 7617d1491..28bb56588 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java @@ -479,9 +479,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequest is not found in the empty JSON string", SpotMarketRequest.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java index a11fa8012..8f5efb436 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java @@ -368,14 +368,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketRequestCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketRequestCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestCreateInput is not found in the empty JSON string", SpotMarketRequestCreateInput.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("facilities") != null && !jsonObj.get("facilities").isJsonNull()) && !jsonObj.get("facilities").isJsonArray()) { + if (!jsonObj.get("facilities").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `facilities` to be an array in the JSON string but got `%s`", jsonObj.get("facilities").toString())); } // validate the optional field `instance_attributes` diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java index 61e677922..48c696c60 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java @@ -729,9 +729,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketRequestCreateInputInstanceAttributes.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketRequestCreateInputInstanceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestCreateInputInstanceAttributes is not found in the empty JSON string", SpotMarketRequestCreateInputInstanceAttributes.openapiRequiredFields.toString())); } } @@ -742,14 +740,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the json data is an array - if ((jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) && !jsonObj.get("features").isJsonArray()) { + if (!jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } // ensure the json data is an array - if ((jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonNull()) && !jsonObj.get("hostnames").isJsonArray()) { + if (!jsonObj.get("hostnames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); } if ((jsonObj.get("operating_system") != null && !jsonObj.get("operating_system").isJsonNull()) && !jsonObj.get("operating_system").isJsonPrimitive()) { @@ -759,15 +757,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); } // ensure the json data is an array - if ((jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull()) && !jsonObj.get("project_ssh_keys").isJsonArray()) { + if (!jsonObj.get("project_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // ensure the json data is an array - if ((jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull()) && !jsonObj.get("user_ssh_keys").isJsonArray()) { + if (!jsonObj.get("user_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java index 0c4156f31..7b8ec2696 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketRequestList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketRequestList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestList is not found in the empty JSON string", SpotMarketRequestList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java index e2e9e400b..767cd83a6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java @@ -266,9 +266,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotMarketRequestMetro.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotMarketRequestMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestMetro is not found in the empty JSON string", SpotMarketRequestMetro.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java index e1bab00c6..079a9b9b3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java @@ -186,14 +186,12 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotPricesDatapoints.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotPricesDatapoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesDatapoints is not found in the empty JSON string", SpotPricesDatapoints.openapiRequiredFields.toString())); } } // ensure the json data is an array - if ((jsonObj.get("datapoints") != null && !jsonObj.get("datapoints").isJsonNull()) && !jsonObj.get("datapoints").isJsonArray()) { + if (!jsonObj.get("datapoints").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `datapoints` to be an array in the JSON string but got `%s`", jsonObj.get("datapoints").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java index b373bfa0b..bd72dc392 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotPricesHistoryReport.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotPricesHistoryReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesHistoryReport is not found in the empty JSON string", SpotPricesHistoryReport.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java index 558872b07..72954b639 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java @@ -175,9 +175,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotPricesPerBaremetal.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotPricesPerBaremetal.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesPerBaremetal is not found in the empty JSON string", SpotPricesPerBaremetal.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java index 4d1682e3b..239ce18bf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java @@ -416,9 +416,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotPricesPerFacility.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotPricesPerFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesPerFacility is not found in the empty JSON string", SpotPricesPerFacility.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java index d319e9ab9..9f51db63a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotPricesPerNewFacility.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotPricesPerNewFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesPerNewFacility is not found in the empty JSON string", SpotPricesPerNewFacility.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java index e5ee12edf..8daa80c77 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java @@ -567,9 +567,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SpotPricesReport.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SpotPricesReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesReport is not found in the empty JSON string", SpotPricesReport.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java index ad03b8446..320ff655d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java @@ -348,9 +348,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (SupportRequestInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!SupportRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in SupportRequestInput is not found in the empty JSON string", SupportRequestInput.openapiRequiredFields.toString())); } } @@ -364,7 +362,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("device_id") != null && !jsonObj.get("device_id").isJsonNull()) && !jsonObj.get("device_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `device_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("device_id").toString())); } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + if (!jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } if ((jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) && !jsonObj.get("priority").isJsonPrimitive()) { @@ -373,7 +371,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("project_id") != null && !jsonObj.get("project_id").isJsonNull()) && !jsonObj.get("project_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_id").toString())); } - if ((jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonNull()) && !jsonObj.get("subject").isJsonPrimitive()) { + if (!jsonObj.get("subject").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java index 3a624bd7c..40430a427 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java @@ -208,9 +208,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Timeframe.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Timeframe.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Timeframe is not found in the empty JSON string", Timeframe.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java index b4a848889..f65cc39df 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java @@ -328,9 +328,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (TransferRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!TransferRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in TransferRequest is not found in the empty JSON string", TransferRequest.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java index 1ebe2990b..df0768514 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java @@ -176,9 +176,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (TransferRequestInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!TransferRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in TransferRequestInput is not found in the empty JSON string", TransferRequestInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java index 0840f4d44..8d8590009 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (TransferRequestList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!TransferRequestList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in TransferRequestList is not found in the empty JSON string", TransferRequestList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java index dd166c756..20e310174 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java @@ -175,9 +175,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (UpdateEmailInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!UpdateEmailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateEmailInput is not found in the empty JSON string", UpdateEmailInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java index e1ce7a454..afe58bc40 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java @@ -796,9 +796,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (User.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } } @@ -856,7 +854,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); } // ensure the json data is an array - if ((jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) && !jsonObj.get("features").isJsonArray()) { + if (!jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java index b28156a33..261539a15 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java @@ -638,9 +638,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (UserCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!UserCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in UserCreateInput is not found in the empty JSON string", UserCreateInput.openapiRequiredFields.toString())); } } @@ -657,24 +655,20 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("company_url") != null && !jsonObj.get("company_url").isJsonNull()) && !jsonObj.get("company_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `company_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("company_url").toString())); } - if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull()) { - JsonArray jsonArrayemails = jsonObj.getAsJsonArray("emails"); - if (jsonArrayemails != null) { - // ensure the json data is an array - if (!jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); - } - - // validate the optional field `emails` (array) - for (int i = 0; i < jsonArrayemails.size(); i++) { - EmailInput.validateJsonObject(jsonArrayemails.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); } - if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { + + JsonArray jsonArrayemails = jsonObj.getAsJsonArray("emails"); + // validate the required field `emails` (array) + for (int i = 0; i < jsonArrayemails.size(); i++) { + EmailInput.validateJsonObject(jsonArrayemails.get(i).getAsJsonObject()); + }; + if (!jsonObj.get("first_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); } - if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { + if (!jsonObj.get("last_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); } if ((jsonObj.get("level") != null && !jsonObj.get("level").isJsonNull()) && !jsonObj.get("level").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java index fe90b808b..50c8fa152 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java @@ -217,9 +217,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (UserList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!UserList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in UserList is not found in the empty JSON string", UserList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java index fdb5c0fab..b40e9e085 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java @@ -449,9 +449,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (UserLite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!UserLite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in UserLite is not found in the empty JSON string", UserLite.openapiRequiredFields.toString())); } } @@ -477,13 +475,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); } - if ((jsonObj.get("short_id") != null && !jsonObj.get("short_id").isJsonNull()) && !jsonObj.get("short_id").isJsonPrimitive()) { + if (!jsonObj.get("short_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java index 84c7daf09..623ebd2ae 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java @@ -325,9 +325,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (UserUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!UserUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in UserUpdateInput is not found in the empty JSON string", UserUpdateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java index 0830b0a12..f5f920981 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java @@ -525,9 +525,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualCircuit.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualCircuit.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualCircuit is not found in the empty JSON string", VirtualCircuit.openapiRequiredFields.toString())); } } @@ -538,34 +536,28 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the optional field `port` - if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { - Href.validateJsonObject(jsonObj.getAsJsonObject("port")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonObject(jsonObj.getAsJsonObject("project")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + // validate the required field `port` + Href.validateJsonObject(jsonObj.getAsJsonObject("port")); + // validate the required field `project` + Href.validateJsonObject(jsonObj.getAsJsonObject("project")); + if (!jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } // ensure the json data is an array if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // validate the optional field `virtual_network` - if (jsonObj.get("virtual_network") != null && !jsonObj.get("virtual_network").isJsonNull()) { - Href.validateJsonObject(jsonObj.getAsJsonObject("virtual_network")); - } + // validate the required field `virtual_network` + Href.validateJsonObject(jsonObj.getAsJsonObject("virtual_network")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java index 977803c9a..aab62bf37 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java @@ -368,9 +368,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualCircuitCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualCircuitCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualCircuitCreateInput is not found in the empty JSON string", VirtualCircuitCreateInput.openapiRequiredFields.toString())); } } @@ -384,7 +382,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java index 54898ae27..1cfb722c8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualCircuitList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualCircuitList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualCircuitList is not found in the empty JSON string", VirtualCircuitList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java index 5da81dd2f..8dd3666a6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java @@ -305,9 +305,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualCircuitUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualCircuitUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualCircuitUpdateInput is not found in the empty JSON string", VirtualCircuitUpdateInput.openapiRequiredFields.toString())); } } @@ -321,7 +319,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java index 7aa13091f..ff70aa984 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java @@ -495,9 +495,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualNetwork.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualNetwork.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualNetwork is not found in the empty JSON string", VirtualNetwork.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java index 58782de5c..9f581af55 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java @@ -265,9 +265,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualNetworkCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualNetworkCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualNetworkCreateInput is not found in the empty JSON string", VirtualNetworkCreateInput.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java index ac3382ae7..64701f6da 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VirtualNetworkList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VirtualNetworkList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualNetworkList is not found in the empty JSON string", VirtualNetworkList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java index 00c0c8147..458e568ec 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java @@ -429,9 +429,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (Vrf.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!Vrf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Vrf is not found in the empty JSON string", Vrf.openapiRequiredFields.toString())); } } @@ -445,7 +443,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the json data is an array - if ((jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull()) && !jsonObj.get("ip_ranges").isJsonArray()) { + if (!jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } // validate the optional field `project` diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java index 0fb1daaea..d1f751cce 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java @@ -307,9 +307,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfCreateInput is not found in the empty JSON string", VrfCreateInput.openapiRequiredFields.toString())); } } @@ -324,13 +322,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the json data is an array - if ((jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull()) && !jsonObj.get("ip_ranges").isJsonArray()) { + if (!jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { + if (!jsonObj.get("metro").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java index d88a7feda..03c6bb3c3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java @@ -205,9 +205,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfIPReservation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfIPReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIPReservation is not found in the empty JSON string", VrfIPReservation.openapiRequiredFields.toString())); } } @@ -226,10 +224,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - // validate the optional field `vrf` - if (jsonObj.get("vrf") != null && !jsonObj.get("vrf").isJsonNull()) { - Vrf.validateJsonObject(jsonObj.getAsJsonObject("vrf")); - } + // validate the required field `vrf` + Vrf.validateJsonObject(jsonObj.getAsJsonObject("vrf")); // validate the optional field `created_by` if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { User.validateJsonObject(jsonObj.getAsJsonObject("created_by")); diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java index ce944208e..2b6715416 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java @@ -207,9 +207,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfIPReservationAllOf.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfIPReservationAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIPReservationAllOf is not found in the empty JSON string", VrfIPReservationAllOf.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java index 9130772cc..ec6dd8e7f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java @@ -370,9 +370,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfIPReservationCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfIPReservationCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIPReservationCreateInput is not found in the empty JSON string", VrfIPReservationCreateInput.openapiRequiredFields.toString())); } } @@ -386,17 +384,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { + if (!jsonObj.get("network").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - if ((jsonObj.get("vrf_id") != null && !jsonObj.get("vrf_id").isJsonNull()) && !jsonObj.get("vrf_id").isJsonPrimitive()) { + if (!jsonObj.get("vrf_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vrf_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vrf_id").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java index 72fd0a62b..7f911dcdd 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfIPReservationList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfIPReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIPReservationList is not found in the empty JSON string", VrfIPReservationList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java index ebeee058d..b3e9600ea 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java @@ -186,9 +186,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfList.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfList is not found in the empty JSON string", VrfList.openapiRequiredFields.toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java index 7eb546b50..8f3a7e8f8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java @@ -208,9 +208,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfMetalGatewayCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfMetalGatewayCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfMetalGatewayCreateInput is not found in the empty JSON string", VrfMetalGatewayCreateInput.openapiRequiredFields.toString())); } } @@ -221,10 +219,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("ip_reservation_id") != null && !jsonObj.get("ip_reservation_id").isJsonNull()) && !jsonObj.get("ip_reservation_id").isJsonPrimitive()) { + if (!jsonObj.get("ip_reservation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ip_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_reservation_id").toString())); } - if ((jsonObj.get("virtual_network_id") != null && !jsonObj.get("virtual_network_id").isJsonNull()) && !jsonObj.get("virtual_network_id").isJsonPrimitive()) { + if (!jsonObj.get("virtual_network_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `virtual_network_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("virtual_network_id").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java index 752b71fad..57125ce4f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java @@ -275,9 +275,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfUpdateInput is not found in the empty JSON string", VrfUpdateInput.openapiRequiredFields.toString())); } } @@ -285,7 +283,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the json data is an array - if ((jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull()) && !jsonObj.get("ip_ranges").isJsonArray()) { + if (!jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java index 0e47f4da7..20bf8a47e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java @@ -608,9 +608,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfVirtualCircuit.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfVirtualCircuit.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuit is not found in the empty JSON string", VrfVirtualCircuit.openapiRequiredFields.toString())); } } @@ -647,7 +645,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // validate the optional field `vrf` diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java index 84c3efa92..8a274a875 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java @@ -535,9 +535,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfVirtualCircuitCreateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfVirtualCircuitCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuitCreateInput is not found in the empty JSON string", VrfVirtualCircuitCreateInput.openapiRequiredFields.toString())); } } @@ -563,17 +561,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { + if (!jsonObj.get("project").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); } - if ((jsonObj.get("subnet") != null && !jsonObj.get("subnet").isJsonNull()) && !jsonObj.get("subnet").isJsonPrimitive()) { + if (!jsonObj.get("subnet").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - if ((jsonObj.get("vrf") != null && !jsonObj.get("vrf").isJsonNull()) && !jsonObj.get("vrf").isJsonPrimitive()) { + if (!jsonObj.get("vrf").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vrf` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vrf").toString())); } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java index 3cc09e5a5..a969857ea 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java @@ -275,9 +275,7 @@ private String toIndentedString(Object o) { */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (VrfVirtualCircuitUpdateInput.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + if (!VrfVirtualCircuitUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuitUpdateInput is not found in the empty JSON string", VrfVirtualCircuitUpdateInput.openapiRequiredFields.toString())); } } @@ -291,7 +289,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); } // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } From ce9399c17a192016a4feb5052f3d4e5e4b68be4b Mon Sep 17 00:00:00 2001 From: tbandwala Date: Mon, 9 Jan 2023 11:50:09 +0530 Subject: [PATCH 3/7] Patch findHWReservationdById response schema and customdata default value --- ...devicecreateinput-customdata-default.patch | 50 +++++++++++++++++++ spec/oas3.patched.json | 4 +- 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch diff --git a/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch b/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch new file mode 100644 index 000000000..71f8db898 --- /dev/null +++ b/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch @@ -0,0 +1,50 @@ +diff --git a/spec/oas3.patched.json b/spec/oas3.patched.json +index aff92d5..8ed228d 100644 +--- a/spec/oas3.patched.json ++++ b/spec/oas3.patched.json +@@ -1001,21 +1001,21 @@ + "enum": [ + "hourly", + "daily", + "monthly", + "yearly" + ], + "type": "string" + }, + "customdata": { + "description": "Customdata is an arbitrary JSON value that can be accessed via the\nmetadata service.", +- "default": {} ++ "default": null + }, + "description": { + "description": "Any description of the device or how it will be used. This may be used\nto inform other API consumers with project access.", + "type": "string" + }, + "facility": { + "description": "The datacenter where the device should be created.\n\nEither metro or facility must be provided.\n\nThe API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`.\n\nAdditionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail.", + "type": "array", + "items": { + "type": "string" +@@ -7734,21 +7734,21 @@ + }, + { + "$ref": "#/components/parameters/Exclude" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { +- "$ref": "#/components/schemas/Device" ++ "$ref": "#/components/schemas/HardwareReservation" + } + } + }, + "description": "ok" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" diff --git a/spec/oas3.patched.json b/spec/oas3.patched.json index aff92d54b..8ed228dfc 100644 --- a/spec/oas3.patched.json +++ b/spec/oas3.patched.json @@ -1008,7 +1008,7 @@ }, "customdata": { "description": "Customdata is an arbitrary JSON value that can be accessed via the\nmetadata service.", - "default": {} + "default": null }, "description": { "description": "Any description of the device or how it will be used. This may be used\nto inform other API consumers with project access.", @@ -7741,7 +7741,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/HardwareReservation" } } }, From 25334da9fb0d2a60038b7051cde8ab5ff91dcc6b Mon Sep 17 00:00:00 2001 From: "equinix-labs@auto-commit-workflow" Date: Mon, 9 Jan 2023 06:21:57 +0000 Subject: [PATCH 4/7] Auto commit generated client changes - Mon Jan 9 06:21:57 UTC 2023 --- .../.openapi-generator/VERSION | 2 +- equinix-openapi-metal/api/openapi.yaml | 3 +- equinix-openapi-metal/build.gradle | 18 +-- equinix-openapi-metal/build.sbt | 13 +- .../docs/HardwareReservationsApi.md | 6 +- equinix-openapi-metal/pom.xml | 30 ++-- .../java/com/equinix/openapi/ApiClient.java | 73 +++++++-- .../com/equinix/openapi/ApiException.java | 2 +- .../equinix/openapi/ServerConfiguration.java | 2 +- .../metal/v1/api/AuthenticationApi.java | 44 ++---- .../openapi/metal/v1/api/BatchesApi.java | 33 ++-- .../equinix/openapi/metal/v1/api/BgpApi.java | 58 ++----- .../openapi/metal/v1/api/CapacityApi.java | 38 +---- .../openapi/metal/v1/api/ConnectionsApi.java | 129 +++++----------- .../openapi/metal/v1/api/DevicesApi.java | 145 ++++++------------ .../openapi/metal/v1/api/EmailsApi.java | 30 +--- .../openapi/metal/v1/api/EventsApi.java | 66 ++------ .../openapi/metal/v1/api/FacilitiesApi.java | 22 +-- .../metal/v1/api/HardwareReservationsApi.java | 42 ++--- .../openapi/metal/v1/api/IncidentsApi.java | 6 +- .../openapi/metal/v1/api/InvitationsApi.java | 24 +-- .../openapi/metal/v1/api/IpAddressesApi.java | 63 +++----- .../openapi/metal/v1/api/LicensesApi.java | 42 ++--- .../openapi/metal/v1/api/MembershipsApi.java | 25 +-- .../metal/v1/api/MetalGatewaysApi.java | 33 ++-- .../openapi/metal/v1/api/MetrosApi.java | 14 +- .../metal/v1/api/OperatingSystemsApi.java | 12 +- .../metal/v1/api/OrganizationsApi.java | 119 ++++---------- .../equinix/openapi/metal/v1/api/OtpsApi.java | 26 +--- .../metal/v1/api/PasswordResetTokensApi.java | 12 +- .../metal/v1/api/PaymentMethodsApi.java | 25 +-- .../openapi/metal/v1/api/PlansApi.java | 14 +- .../openapi/metal/v1/api/PortsApi.java | 123 +++++---------- .../openapi/metal/v1/api/ProjectsApi.java | 90 +++-------- .../v1/api/SelfServiceReservationsApi.java | 29 ++-- .../openapi/metal/v1/api/SpotMarketApi.java | 57 ++----- .../openapi/metal/v1/api/SshKeysApi.java | 61 ++------ .../metal/v1/api/SupportRequestApi.java | 5 +- .../metal/v1/api/TransferRequestsApi.java | 24 +-- .../metal/v1/api/TwoFactorAuthApi.java | 24 +-- .../openapi/metal/v1/api/UsagesApi.java | 16 +- .../v1/api/UserVerificationTokensApi.java | 12 +- .../openapi/metal/v1/api/UserdataApi.java | 6 +- .../openapi/metal/v1/api/UsersApi.java | 44 ++---- .../openapi/metal/v1/api/VlansApi.java | 33 ++-- .../equinix/openapi/metal/v1/api/VrfsApi.java | 50 ++---- .../openapi/metal/v1/model/Address.java | 27 ++-- .../openapi/metal/v1/model/AuthToken.java | 28 ++-- .../metal/v1/model/AuthTokenInput.java | 22 ++- .../openapi/metal/v1/model/AuthTokenList.java | 21 ++- .../metal/v1/model/AuthTokenProject.java | 35 ++--- .../openapi/metal/v1/model/AuthTokenUser.java | 45 ++---- .../metal/v1/model/BGPSessionInput.java | 22 ++- .../equinix/openapi/metal/v1/model/Batch.java | 32 ++-- .../openapi/metal/v1/model/BatchesList.java | 21 ++- .../openapi/metal/v1/model/BgpConfig.java | 33 ++-- .../metal/v1/model/BgpConfigRequestInput.java | 24 +-- .../metal/v1/model/BgpNeighborData.java | 34 ++-- .../model/BgpNeighborDataRoutesInInner.java | 22 ++- .../model/BgpNeighborDataRoutesOutInner.java | 22 ++- .../openapi/metal/v1/model/BgpSession.java | 33 ++-- .../metal/v1/model/BgpSessionList.java | 21 ++- .../metal/v1/model/BgpSessionNeighbors.java | 21 ++- .../model/CapacityCheckPerFacilityInfo.java | 24 +-- .../model/CapacityCheckPerFacilityList.java | 21 ++- .../v1/model/CapacityCheckPerMetroInfo.java | 24 +-- .../v1/model/CapacityCheckPerMetroList.java | 21 ++- .../openapi/metal/v1/model/CapacityInput.java | 21 ++- .../v1/model/CapacityLevelPerBaremetal.java | 21 ++- .../openapi/metal/v1/model/CapacityList.java | 21 ++- .../metal/v1/model/CapacityPerFacility.java | 29 ++-- .../metal/v1/model/CapacityPerMetroInput.java | 21 ++- .../v1/model/CapacityPerNewFacility.java | 21 ++- .../metal/v1/model/CapacityReport.java | 34 ++-- .../openapi/metal/v1/model/Coordinates.java | 22 ++- ...nnectionPortVirtualCircuit201Response.java | 2 - ...teConnectionPortVirtualCircuitRequest.java | 2 - .../metal/v1/model/CreateEmailInput.java | 21 ++- .../v1/model/CreateMetalGatewayRequest.java | 2 - .../CreateSelfServiceReservationRequest.java | 24 +-- ...teSelfServiceReservationRequestPeriod.java | 22 ++- .../metal/v1/model/DefaultIPReservation.java | 10 +- .../v1/model/DefaultIPReservationAllOf.java | 27 ++-- .../DefaultIPReservationCreateInput.java | 33 ++-- .../openapi/metal/v1/model/Device.java | 63 ++------ .../metal/v1/model/DeviceActionsInner.java | 22 ++- .../metal/v1/model/DeviceCreateInput.java | 65 +++----- .../DeviceCreateInputIpAddressesInner.java | 28 ++-- .../metal/v1/model/DeviceCreatedBy.java | 30 ++-- .../openapi/metal/v1/model/DeviceList.java | 22 ++- .../openapi/metal/v1/model/DeviceMetro.java | 24 +-- .../openapi/metal/v1/model/DeviceProject.java | 21 ++- .../metal/v1/model/DeviceProjectLite.java | 21 ++- .../metal/v1/model/DeviceUpdateInput.java | 35 ++--- .../openapi/metal/v1/model/DeviceUsage.java | 23 ++- .../metal/v1/model/DeviceUsageList.java | 21 ++- .../equinix/openapi/metal/v1/model/Email.java | 25 +-- .../openapi/metal/v1/model/EmailInput.java | 22 ++- .../openapi/metal/v1/model/Entitlement.java | 32 ++-- .../equinix/openapi/metal/v1/model/Error.java | 27 ++-- .../equinix/openapi/metal/v1/model/Event.java | 28 ++-- .../openapi/metal/v1/model/EventList.java | 22 ++- .../metal/v1/model/FabricServiceToken.java | 26 ++-- .../openapi/metal/v1/model/Facility.java | 35 +++-- .../openapi/metal/v1/model/FacilityList.java | 21 ++- .../model/FindIPAddressById200Response.java | 2 - .../metal/v1/model/GlobalBgpRange.java | 25 +-- .../metal/v1/model/GlobalBgpRangeList.java | 21 ++- .../metal/v1/model/HardwareReservation.java | 33 ++-- .../v1/model/HardwareReservationList.java | 22 ++- .../equinix/openapi/metal/v1/model/Href.java | 21 ++- .../openapi/metal/v1/model/HrefOnly.java | 4 +- .../openapi/metal/v1/model/IPAssignment.java | 37 ++--- .../metal/v1/model/IPAssignmentInput.java | 23 ++- .../metal/v1/model/IPAssignmentList.java | 21 ++- .../metal/v1/model/IPAssignmentMetro.java | 24 +-- .../metal/v1/model/IPAvailabilitiesList.java | 25 ++- .../openapi/metal/v1/model/IPReservation.java | 35 ++--- .../metal/v1/model/IPReservationList.java | 21 ++- .../metal/v1/model/IPReservationMetro.java | 24 +-- .../v1/model/InstancesBatchCreateInput.java | 21 ++- ...InstancesBatchCreateInputBatchesInner.java | 63 ++++---- ...eateInputBatchesInnerIpAddressesInner.java | 28 ++-- .../metal/v1/model/Interconnection.java | 39 ++--- .../v1/model/InterconnectionCreateInput.java | 40 +++-- .../metal/v1/model/InterconnectionList.java | 21 ++- .../metal/v1/model/InterconnectionMetro.java | 24 +-- .../metal/v1/model/InterconnectionPort.java | 26 ++-- .../v1/model/InterconnectionPortList.java | 21 ++- .../v1/model/InterconnectionUpdateInput.java | 30 ++-- .../openapi/metal/v1/model/Invitation.java | 38 ++--- .../metal/v1/model/InvitationInput.java | 32 ++-- .../metal/v1/model/InvitationList.java | 21 ++- .../openapi/metal/v1/model/License.java | 26 ++-- .../metal/v1/model/LicenseCreateInput.java | 23 ++- .../openapi/metal/v1/model/LicenseList.java | 21 ++- .../metal/v1/model/LicenseUpdateInput.java | 22 ++- .../openapi/metal/v1/model/Membership.java | 31 ++-- .../metal/v1/model/MembershipInput.java | 25 ++- .../metal/v1/model/MembershipList.java | 21 ++- .../equinix/openapi/metal/v1/model/Meta.java | 26 ++-- .../openapi/metal/v1/model/MetalGateway.java | 30 ++-- .../v1/model/MetalGatewayCreateInput.java | 23 ++- .../v1/model/MetalGatewayIpReservation.java | 2 - .../metal/v1/model/MetalGatewayList.java | 21 ++- .../metal/v1/model/MetalGatewayLite.java | 27 ++-- .../equinix/openapi/metal/v1/model/Metro.java | 24 +-- .../metal/v1/model/MetroCapacityList.java | 21 ++- .../metal/v1/model/MetroCapacityReport.java | 40 ++--- .../openapi/metal/v1/model/MetroList.java | 21 ++- .../metal/v1/model/MetroServerInfo.java | 23 ++- .../openapi/metal/v1/model/NewPassword.java | 21 ++- .../metal/v1/model/OperatingSystem.java | 33 ++-- .../metal/v1/model/OperatingSystemList.java | 21 ++- .../openapi/metal/v1/model/Organization.java | 37 ++--- .../metal/v1/model/OrganizationInput.java | 29 ++-- .../metal/v1/model/OrganizationList.java | 22 ++- .../openapi/metal/v1/model/ParentBlock.java | 24 +-- .../openapi/metal/v1/model/PaymentMethod.java | 35 ++--- .../v1/model/PaymentMethodBillingAddress.java | 23 ++- .../v1/model/PaymentMethodCreateInput.java | 23 ++- .../metal/v1/model/PaymentMethodList.java | 21 ++- .../v1/model/PaymentMethodUpdateInput.java | 26 ++-- .../equinix/openapi/metal/v1/model/Plan.java | 36 ++--- .../v1/model/PlanAvailableInMetrosInner.java | 22 ++- .../PlanAvailableInMetrosInnerPrice.java | 21 ++- .../openapi/metal/v1/model/PlanList.java | 21 ++- .../equinix/openapi/metal/v1/model/Port.java | 27 ++-- .../metal/v1/model/PortAssignInput.java | 21 ++- .../v1/model/PortConvertLayer3Input.java | 21 ++- ...PortConvertLayer3InputRequestIpsInner.java | 22 ++- .../metal/v1/model/PortVlanAssignment.java | 28 ++-- .../v1/model/PortVlanAssignmentBatch.java | 32 ++-- .../PortVlanAssignmentBatchCreateInput.java | 21 ++- ...tBatchCreateInputVlanAssignmentsInner.java | 23 ++- .../v1/model/PortVlanAssignmentBatchList.java | 21 ++- ...anAssignmentBatchVlanAssignmentsInner.java | 24 +-- .../v1/model/PortVlanAssignmentList.java | 21 ++- .../openapi/metal/v1/model/Project.java | 35 ++--- .../v1/model/ProjectCreateFromRootInput.java | 24 +-- .../metal/v1/model/ProjectCreateInput.java | 23 ++- .../openapi/metal/v1/model/ProjectList.java | 22 ++- .../metal/v1/model/ProjectUpdateInput.java | 24 +-- .../openapi/metal/v1/model/ProjectUsage.java | 29 ++-- .../metal/v1/model/ProjectUsageList.java | 21 ++- .../metal/v1/model/RecoveryCodeList.java | 25 ++- .../v1/model/RequestIPReservationRequest.java | 2 - .../openapi/metal/v1/model/SSHKey.java | 28 ++-- .../metal/v1/model/SSHKeyCreateInput.java | 27 ++-- .../openapi/metal/v1/model/SSHKeyInput.java | 22 ++- .../openapi/metal/v1/model/SSHKeyList.java | 21 ++- .../SelfServiceReservationItemRequest.java | 25 +-- .../SelfServiceReservationItemResponse.java | 30 ++-- .../v1/model/SelfServiceReservationList.java | 21 ++- .../model/SelfServiceReservationResponse.java | 31 ++-- .../openapi/metal/v1/model/ServerInfo.java | 23 ++- .../metal/v1/model/SpotMarketPricesList.java | 21 ++- .../model/SpotMarketPricesPerMetroList.java | 21 ++- .../model/SpotMarketPricesPerMetroReport.java | 27 ++-- .../metal/v1/model/SpotMarketRequest.java | 31 ++-- .../model/SpotMarketRequestCreateInput.java | 31 ++-- ...tRequestCreateInputInstanceAttributes.java | 58 +++---- .../metal/v1/model/SpotMarketRequestList.java | 21 ++- .../v1/model/SpotMarketRequestMetro.java | 24 +-- .../metal/v1/model/SpotPricesDatapoints.java | 25 ++- .../v1/model/SpotPricesHistoryReport.java | 21 ++- .../v1/model/SpotPricesPerBaremetal.java | 21 ++- .../metal/v1/model/SpotPricesPerFacility.java | 29 ++-- .../v1/model/SpotPricesPerNewFacility.java | 21 ++- .../metal/v1/model/SpotPricesReport.java | 34 ++-- .../metal/v1/model/SupportRequestInput.java | 25 +-- .../openapi/metal/v1/model/Timeframe.java | 22 ++- .../metal/v1/model/TransferRequest.java | 26 ++-- .../metal/v1/model/TransferRequestInput.java | 21 ++- .../metal/v1/model/TransferRequestList.java | 21 ++- .../metal/v1/model/UpdateEmailInput.java | 21 ++- .../v1/model/UpdateVirtualCircuitRequest.java | 2 - .../equinix/openapi/metal/v1/model/User.java | 45 ++---- .../metal/v1/model/UserCreateInput.java | 36 ++--- .../openapi/metal/v1/model/UserList.java | 22 ++- .../openapi/metal/v1/model/UserLite.java | 30 ++-- .../metal/v1/model/UserUpdateInput.java | 26 ++-- .../metal/v1/model/VirtualCircuit.java | 38 ++--- .../v1/model/VirtualCircuitCreateInput.java | 31 ++-- .../metal/v1/model/VirtualCircuitList.java | 21 ++- ...irtualCircuitListVirtualCircuitsInner.java | 2 - .../v1/model/VirtualCircuitUpdateInput.java | 29 ++-- .../metal/v1/model/VirtualNetwork.java | 31 ++-- .../v1/model/VirtualNetworkCreateInput.java | 24 +-- .../metal/v1/model/VirtualNetworkList.java | 21 ++- .../equinix/openapi/metal/v1/model/Vrf.java | 33 ++-- .../metal/v1/model/VrfCreateInput.java | 29 ++-- .../metal/v1/model/VrfIPReservation.java | 5 +- .../metal/v1/model/VrfIPReservationAllOf.java | 22 ++- .../v1/model/VrfIPReservationCreateInput.java | 31 ++-- .../metal/v1/model/VrfIPReservationList.java | 21 ++- .../openapi/metal/v1/model/VrfList.java | 21 ++- .../v1/model/VrfMetalGatewayCreateInput.java | 22 ++- .../metal/v1/model/VrfUpdateInput.java | 28 ++-- .../metal/v1/model/VrfVirtualCircuit.java | 39 ++--- .../model/VrfVirtualCircuitCreateInput.java | 36 ++--- .../model/VrfVirtualCircuitUpdateInput.java | 28 ++-- .../v1/api/HardwareReservationsApiTest.java | 3 +- .../openapi/metal/v1/model/AddressTest.java | 2 - .../metal/v1/model/AuthTokenInputTest.java | 2 - .../metal/v1/model/AuthTokenListTest.java | 2 - .../metal/v1/model/AuthTokenProjectTest.java | 2 - .../openapi/metal/v1/model/AuthTokenTest.java | 2 - .../metal/v1/model/AuthTokenUserTest.java | 2 - .../metal/v1/model/BGPSessionInputTest.java | 2 - .../openapi/metal/v1/model/BatchTest.java | 2 - .../metal/v1/model/BatchesListTest.java | 2 - .../v1/model/BgpConfigRequestInputTest.java | 2 - .../openapi/metal/v1/model/BgpConfigTest.java | 2 - .../BgpNeighborDataRoutesInInnerTest.java | 2 - .../BgpNeighborDataRoutesOutInnerTest.java | 2 - .../metal/v1/model/BgpNeighborDataTest.java | 2 - .../metal/v1/model/BgpSessionListTest.java | 2 - .../v1/model/BgpSessionNeighborsTest.java | 2 - .../metal/v1/model/BgpSessionTest.java | 2 - .../CapacityCheckPerFacilityInfoTest.java | 2 - .../CapacityCheckPerFacilityListTest.java | 2 - .../model/CapacityCheckPerMetroInfoTest.java | 2 - .../model/CapacityCheckPerMetroListTest.java | 2 - .../metal/v1/model/CapacityInputTest.java | 2 - .../model/CapacityLevelPerBaremetalTest.java | 2 - .../metal/v1/model/CapacityListTest.java | 2 - .../v1/model/CapacityPerFacilityTest.java | 2 - .../v1/model/CapacityPerMetroInputTest.java | 2 - .../v1/model/CapacityPerNewFacilityTest.java | 2 - .../metal/v1/model/CapacityReportTest.java | 2 - .../metal/v1/model/CoordinatesTest.java | 2 - ...tionPortVirtualCircuit201ResponseTest.java | 2 - ...nnectionPortVirtualCircuitRequestTest.java | 2 - .../metal/v1/model/CreateEmailInputTest.java | 2 - .../model/CreateMetalGatewayRequestTest.java | 2 - ...lfServiceReservationRequestPeriodTest.java | 2 - ...eateSelfServiceReservationRequestTest.java | 2 - .../model/DefaultIPReservationAllOfTest.java | 2 - .../DefaultIPReservationCreateInputTest.java | 2 - .../v1/model/DefaultIPReservationTest.java | 2 - .../v1/model/DeviceActionsInnerTest.java | 2 - ...DeviceCreateInputIpAddressesInnerTest.java | 2 - .../metal/v1/model/DeviceCreateInputTest.java | 2 - .../metal/v1/model/DeviceCreatedByTest.java | 2 - .../metal/v1/model/DeviceListTest.java | 2 - .../metal/v1/model/DeviceMetroTest.java | 2 - .../metal/v1/model/DeviceProjectLiteTest.java | 2 - .../metal/v1/model/DeviceProjectTest.java | 2 - .../openapi/metal/v1/model/DeviceTest.java | 2 - .../metal/v1/model/DeviceUpdateInputTest.java | 2 - .../metal/v1/model/DeviceUsageListTest.java | 2 - .../metal/v1/model/DeviceUsageTest.java | 2 - .../metal/v1/model/EmailInputTest.java | 2 - .../openapi/metal/v1/model/EmailTest.java | 2 - .../metal/v1/model/EntitlementTest.java | 2 - .../openapi/metal/v1/model/ErrorTest.java | 2 - .../openapi/metal/v1/model/EventListTest.java | 2 - .../openapi/metal/v1/model/EventTest.java | 2 - .../v1/model/FabricServiceTokenTest.java | 2 - .../metal/v1/model/FacilityListTest.java | 2 - .../openapi/metal/v1/model/FacilityTest.java | 2 - .../FindIPAddressById200ResponseTest.java | 2 - .../v1/model/GlobalBgpRangeListTest.java | 2 - .../metal/v1/model/GlobalBgpRangeTest.java | 2 - .../v1/model/HardwareReservationListTest.java | 2 - .../v1/model/HardwareReservationTest.java | 2 - .../openapi/metal/v1/model/HrefOnlyTest.java | 2 - .../openapi/metal/v1/model/HrefTest.java | 2 - .../metal/v1/model/IPAssignmentInputTest.java | 2 - .../metal/v1/model/IPAssignmentListTest.java | 2 - .../metal/v1/model/IPAssignmentMetroTest.java | 2 - .../metal/v1/model/IPAssignmentTest.java | 2 - .../v1/model/IPAvailabilitiesListTest.java | 2 - .../metal/v1/model/IPReservationListTest.java | 2 - .../v1/model/IPReservationMetroTest.java | 2 - .../metal/v1/model/IPReservationTest.java | 2 - ...InputBatchesInnerIpAddressesInnerTest.java | 2 - ...ancesBatchCreateInputBatchesInnerTest.java | 2 - .../model/InstancesBatchCreateInputTest.java | 2 - .../model/InterconnectionCreateInputTest.java | 2 - .../v1/model/InterconnectionListTest.java | 2 - .../v1/model/InterconnectionMetroTest.java | 2 - .../v1/model/InterconnectionPortListTest.java | 2 - .../v1/model/InterconnectionPortTest.java | 2 - .../metal/v1/model/InterconnectionTest.java | 2 - .../model/InterconnectionUpdateInputTest.java | 2 - .../metal/v1/model/InvitationInputTest.java | 2 - .../metal/v1/model/InvitationListTest.java | 2 - .../metal/v1/model/InvitationTest.java | 2 - .../v1/model/LicenseCreateInputTest.java | 2 - .../metal/v1/model/LicenseListTest.java | 2 - .../openapi/metal/v1/model/LicenseTest.java | 2 - .../v1/model/LicenseUpdateInputTest.java | 2 - .../metal/v1/model/MembershipInputTest.java | 2 - .../metal/v1/model/MembershipListTest.java | 2 - .../metal/v1/model/MembershipTest.java | 2 - .../openapi/metal/v1/model/MetaTest.java | 2 - .../v1/model/MetalGatewayCreateInputTest.java | 2 - .../model/MetalGatewayIpReservationTest.java | 2 - .../metal/v1/model/MetalGatewayListTest.java | 2 - .../metal/v1/model/MetalGatewayLiteTest.java | 2 - .../metal/v1/model/MetalGatewayTest.java | 2 - .../metal/v1/model/MetroCapacityListTest.java | 2 - .../v1/model/MetroCapacityReportTest.java | 2 - .../openapi/metal/v1/model/MetroListTest.java | 2 - .../metal/v1/model/MetroServerInfoTest.java | 2 - .../openapi/metal/v1/model/MetroTest.java | 2 - .../metal/v1/model/NewPasswordTest.java | 2 - .../v1/model/OperatingSystemListTest.java | 2 - .../metal/v1/model/OperatingSystemTest.java | 2 - .../metal/v1/model/OrganizationInputTest.java | 2 - .../metal/v1/model/OrganizationListTest.java | 2 - .../metal/v1/model/OrganizationTest.java | 2 - .../metal/v1/model/ParentBlockTest.java | 2 - .../PaymentMethodBillingAddressTest.java | 2 - .../model/PaymentMethodCreateInputTest.java | 2 - .../metal/v1/model/PaymentMethodListTest.java | 2 - .../metal/v1/model/PaymentMethodTest.java | 2 - .../model/PaymentMethodUpdateInputTest.java | 2 - .../PlanAvailableInMetrosInnerPriceTest.java | 2 - .../model/PlanAvailableInMetrosInnerTest.java | 2 - .../openapi/metal/v1/model/PlanListTest.java | 2 - .../openapi/metal/v1/model/PlanTest.java | 2 - .../metal/v1/model/PortAssignInputTest.java | 2 - ...ConvertLayer3InputRequestIpsInnerTest.java | 2 - .../v1/model/PortConvertLayer3InputTest.java | 2 - .../openapi/metal/v1/model/PortTest.java | 2 - ...ortVlanAssignmentBatchCreateInputTest.java | 2 - ...chCreateInputVlanAssignmentsInnerTest.java | 2 - .../PortVlanAssignmentBatchListTest.java | 2 - .../v1/model/PortVlanAssignmentBatchTest.java | 2 - ...signmentBatchVlanAssignmentsInnerTest.java | 2 - .../v1/model/PortVlanAssignmentListTest.java | 2 - .../v1/model/PortVlanAssignmentTest.java | 2 - .../model/ProjectCreateFromRootInputTest.java | 2 - .../v1/model/ProjectCreateInputTest.java | 2 - .../metal/v1/model/ProjectListTest.java | 2 - .../openapi/metal/v1/model/ProjectTest.java | 2 - .../v1/model/ProjectUpdateInputTest.java | 2 - .../metal/v1/model/ProjectUsageListTest.java | 2 - .../metal/v1/model/ProjectUsageTest.java | 2 - .../metal/v1/model/RecoveryCodeListTest.java | 2 - .../RequestIPReservationRequestTest.java | 2 - .../metal/v1/model/SSHKeyCreateInputTest.java | 2 - .../metal/v1/model/SSHKeyInputTest.java | 2 - .../metal/v1/model/SSHKeyListTest.java | 2 - .../openapi/metal/v1/model/SSHKeyTest.java | 2 - ...SelfServiceReservationItemRequestTest.java | 2 - ...elfServiceReservationItemResponseTest.java | 2 - .../model/SelfServiceReservationListTest.java | 2 - .../SelfServiceReservationResponseTest.java | 2 - .../metal/v1/model/ServerInfoTest.java | 2 - .../v1/model/SpotMarketPricesListTest.java | 2 - .../SpotMarketPricesPerMetroListTest.java | 2 - .../SpotMarketPricesPerMetroReportTest.java | 2 - ...uestCreateInputInstanceAttributesTest.java | 2 - .../SpotMarketRequestCreateInputTest.java | 2 - .../v1/model/SpotMarketRequestListTest.java | 2 - .../v1/model/SpotMarketRequestMetroTest.java | 2 - .../metal/v1/model/SpotMarketRequestTest.java | 2 - .../v1/model/SpotPricesDatapointsTest.java | 2 - .../v1/model/SpotPricesHistoryReportTest.java | 2 - .../v1/model/SpotPricesPerBaremetalTest.java | 2 - .../v1/model/SpotPricesPerFacilityTest.java | 2 - .../model/SpotPricesPerNewFacilityTest.java | 2 - .../metal/v1/model/SpotPricesReportTest.java | 2 - .../v1/model/SupportRequestInputTest.java | 2 - .../openapi/metal/v1/model/TimeframeTest.java | 2 - .../v1/model/TransferRequestInputTest.java | 2 - .../v1/model/TransferRequestListTest.java | 2 - .../metal/v1/model/TransferRequestTest.java | 2 - .../metal/v1/model/UpdateEmailInputTest.java | 2 - .../UpdateVirtualCircuitRequestTest.java | 2 - .../metal/v1/model/UserCreateInputTest.java | 2 - .../openapi/metal/v1/model/UserListTest.java | 2 - .../openapi/metal/v1/model/UserLiteTest.java | 2 - .../openapi/metal/v1/model/UserTest.java | 2 - .../metal/v1/model/UserUpdateInputTest.java | 2 - .../model/VirtualCircuitCreateInputTest.java | 2 - .../v1/model/VirtualCircuitListTest.java | 2 - ...alCircuitListVirtualCircuitsInnerTest.java | 2 - .../metal/v1/model/VirtualCircuitTest.java | 2 - .../model/VirtualCircuitUpdateInputTest.java | 2 - .../model/VirtualNetworkCreateInputTest.java | 2 - .../v1/model/VirtualNetworkListTest.java | 2 - .../metal/v1/model/VirtualNetworkTest.java | 2 - .../metal/v1/model/VrfCreateInputTest.java | 2 - .../v1/model/VrfIPReservationAllOfTest.java | 2 - .../VrfIPReservationCreateInputTest.java | 2 - .../v1/model/VrfIPReservationListTest.java | 2 - .../metal/v1/model/VrfIPReservationTest.java | 2 - .../openapi/metal/v1/model/VrfListTest.java | 2 - .../model/VrfMetalGatewayCreateInputTest.java | 2 - .../openapi/metal/v1/model/VrfTest.java | 2 - .../metal/v1/model/VrfUpdateInputTest.java | 2 - .../VrfVirtualCircuitCreateInputTest.java | 2 - .../metal/v1/model/VrfVirtualCircuitTest.java | 2 - .../VrfVirtualCircuitUpdateInputTest.java | 2 - 439 files changed, 3416 insertions(+), 3695 deletions(-) diff --git a/equinix-openapi-metal/.openapi-generator/VERSION b/equinix-openapi-metal/.openapi-generator/VERSION index ed829dbcd..d6b4ec4aa 100644 --- a/equinix-openapi-metal/.openapi-generator/VERSION +++ b/equinix-openapi-metal/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/equinix-openapi-metal/api/openapi.yaml b/equinix-openapi-metal/api/openapi.yaml index 2a15ffcb1..666ef2405 100644 --- a/equinix-openapi-metal/api/openapi.yaml +++ b/equinix-openapi-metal/api/openapi.yaml @@ -2560,7 +2560,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Device' + $ref: '#/components/schemas/HardwareReservation' description: ok "401": content: @@ -12550,6 +12550,7 @@ components: - yearly type: string customdata: + default: null description: |- Customdata is an arbitrary JSON value that can be accessed via the metadata service. diff --git a/equinix-openapi-metal/build.gradle b/equinix-openapi-metal/build.gradle index e1da36370..abdd505b7 100644 --- a/equinix-openapi-metal/build.gradle +++ b/equinix-openapi-metal/build.gradle @@ -13,7 +13,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.+' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' } } @@ -65,7 +65,7 @@ if(hasProperty('target') && target == 'android') { task.from variant.javaCompile.destinationDir task.destinationDir = project.file("${project.buildDir}/outputs/jar") task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); + artifacts.add('archives', task) } } @@ -106,20 +106,20 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.6.5' + implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.3' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' - implementation 'com.google.code.gson:gson:2.9.0' + implementation 'com.squareup.okhttp3:okhttp:4.10.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' + implementation 'com.google.code.gson:gson:2.9.1' implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.3' + implementation 'org.openapitools:jackson-databind-nullable:0.2.4' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' } javadoc { diff --git a/equinix-openapi-metal/build.sbt b/equinix-openapi-metal/build.sbt index 172abd703..24e6f1eac 100644 --- a/equinix-openapi-metal/build.sbt +++ b/equinix-openapi-metal/build.sbt @@ -10,18 +10,19 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.9.3", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", - "com.google.code.gson" % "gson" % "2.9.0", + "com.squareup.okhttp3" % "okhttp" % "4.10.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", + "com.google.code.gson" % "gson" % "2.9.1", "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.3", + "org.openapitools" % "jackson-databind-nullable" % "0.2.4", "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" ) ) diff --git a/equinix-openapi-metal/docs/HardwareReservationsApi.md b/equinix-openapi-metal/docs/HardwareReservationsApi.md index b06a11254..53f169fbf 100644 --- a/equinix-openapi-metal/docs/HardwareReservationsApi.md +++ b/equinix-openapi-metal/docs/HardwareReservationsApi.md @@ -11,7 +11,7 @@ All URIs are relative to *https://api.equinix.com/metal/v1* # **findHardwareReservationById** -> Device findHardwareReservationById(id, include, exclude) +> HardwareReservation findHardwareReservationById(id, include, exclude) Retrieve a hardware reservation @@ -43,7 +43,7 @@ public class Example { List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. try { - Device result = apiInstance.findHardwareReservationById(id, include, exclude); + HardwareReservation result = apiInstance.findHardwareReservationById(id, include, exclude); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling HardwareReservationsApi#findHardwareReservationById"); @@ -66,7 +66,7 @@ public class Example { ### Return type -[**Device**](Device.md) +[**HardwareReservation**](HardwareReservation.md) ### Authorization diff --git a/equinix-openapi-metal/pom.xml b/equinix-openapi-metal/pom.xml index ae9426d4c..f685b30a8 100644 --- a/equinix-openapi-metal/pom.xml +++ b/equinix-openapi-metal/pom.xml @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.1.0 enforce-maven @@ -93,6 +93,7 @@ maven-dependency-plugin + 3.3.0 package @@ -109,7 +110,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.3.0 @@ -123,7 +124,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -154,7 +155,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.1 attach-javadocs @@ -177,7 +178,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.0 + 3.2.1 attach-sources @@ -257,11 +258,6 @@ - - io.swagger - swagger-annotations - ${swagger-core-version} - com.google.code.findbugs @@ -339,18 +335,18 @@ ${java.version} ${java.version} 1.8.5 - 1.6.5 - 4.9.3 - 2.9.0 + 1.6.6 + 4.10.0 + 2.9.1 3.12.0 - 0.2.3 + 0.2.4 1.3.5 - 5.8.2 - 1.6.2 + 5.9.1 + 1.9.1 3.12.4 2.1.1 1.1.1 UTF-8 - 2.21.0 + 2.27.2 diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java index 64f60d474..c03af00c5 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java @@ -61,6 +61,15 @@ public class ApiClient { private String basePath = "https://api.equinix.com/metal/v1"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://api.equinix.com/metal/v1", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); private Map defaultCookieMap = new HashMap(); @@ -156,6 +165,33 @@ public ApiClient setBasePath(String basePath) { return this; } + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + /** * Get HTTP client * @@ -280,7 +316,7 @@ public DateFormat getDateFormat() { * @return a {@link com.equinix.openapi.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { - this.json.setDateFormat(dateFormat); + JSON.setDateFormat(dateFormat); return this; } @@ -291,7 +327,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) { * @return a {@link com.equinix.openapi.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); + JSON.setSqlDateFormat(dateFormat); return this; } @@ -302,7 +338,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { * @return a {@link com.equinix.openapi.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - this.json.setOffsetDateTimeFormat(dateFormat); + JSON.setOffsetDateTimeFormat(dateFormat); return this; } @@ -313,7 +349,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { * @return a {@link com.equinix.openapi.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - this.json.setLocalDateFormat(dateFormat); + JSON.setLocalDateFormat(dateFormat); return this; } @@ -324,7 +360,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { * @return a {@link com.equinix.openapi.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { - this.json.setLenientOnJson(lenientOnJson); + JSON.setLenientOnJson(lenientOnJson); return this; } @@ -585,7 +621,7 @@ public String parameterToString(Object param) { return ""; } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { //Serialize to json string and remove the " enclosing characters - String jsonStr = json.serialize(param); + String jsonStr = JSON.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); @@ -593,7 +629,7 @@ public String parameterToString(Object param) { if (b.length() > 0) { b.append(","); } - b.append(String.valueOf(o)); + b.append(o); } return b.toString(); } else { @@ -844,7 +880,7 @@ public T deserialize(Response response, Type returnType) throws ApiException contentType = "application/json"; } if (isJsonMime(contentType)) { - return json.deserialize(respBody, returnType); + return JSON.deserialize(respBody, returnType); } else if (returnType.equals(String.class)) { // Expecting string, return the raw response body. return (T) respBody; @@ -878,13 +914,13 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException } else if (isJsonMime(contentType)) { String content; if (obj != null) { - content = json.serialize(obj); + content = JSON.serialize(obj); } else { content = null; } return RequestBody.create(content, MediaType.parse(contentType)); } else if (obj instanceof String) { - return RequestBody.create(MediaType.parse(contentType), (String) obj); + return RequestBody.create((String) obj, MediaType.parse(contentType)); } else { throw new ApiException("Content type \"" + contentType + "\" is not supported"); } @@ -1175,7 +1211,18 @@ public String buildUrl(String baseUrl, String path, List queryParams, List if (baseUrl != null) { url.append(baseUrl).append(path); } else { - url.append(basePath).append(path); + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); } if (queryParams != null && !queryParams.isEmpty()) { @@ -1357,7 +1404,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k } else { String content; if (obj != null) { - content = json.serialize(obj); + content = JSON.serialize(obj); } else { content = null; } @@ -1435,7 +1482,7 @@ public boolean verify(String hostname, SSLSession session) { KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); + String certificateAlias = "ca" + (index++); caKeyStore.setCertificateEntry(certificateAlias, certificate); } trustManagerFactory.init(caKeyStore); diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java index abc57a412..5538c1006 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java @@ -99,7 +99,7 @@ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java index f4b7da386..1d7908cdb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java @@ -42,7 +42,7 @@ public String URL(Map variables) { throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } - url = url.replaceAll("\\{" + name + "\\}", value); + url = url.replace("{" + name + "}", value); } return url; } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java index 5e4a2fd8b..34b012a18 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java @@ -139,15 +139,12 @@ public okhttp3.Call createAPIKeyCall(AuthTokenInput authTokenInput, final ApiCal @SuppressWarnings("rawtypes") private okhttp3.Call createAPIKeyValidateBeforeCall(AuthTokenInput authTokenInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'authTokenInput' is set if (authTokenInput == null) { throw new ApiException("Missing the required parameter 'authTokenInput' when calling createAPIKey(Async)"); } - - okhttp3.Call localVarCall = createAPIKeyCall(authTokenInput, _callback); - return localVarCall; + return createAPIKeyCall(authTokenInput, _callback); } @@ -249,7 +246,7 @@ public okhttp3.Call createProjectAPIKeyCall(UUID id, AuthTokenInput authTokenInp // create path and map variables String localVarPath = "/projects/{id}/api-keys" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -279,20 +276,17 @@ public okhttp3.Call createProjectAPIKeyCall(UUID id, AuthTokenInput authTokenInp @SuppressWarnings("rawtypes") private okhttp3.Call createProjectAPIKeyValidateBeforeCall(UUID id, AuthTokenInput authTokenInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createProjectAPIKey(Async)"); } - + // verify the required parameter 'authTokenInput' is set if (authTokenInput == null) { throw new ApiException("Missing the required parameter 'authTokenInput' when calling createProjectAPIKey(Async)"); } - - okhttp3.Call localVarCall = createProjectAPIKeyCall(id, authTokenInput, _callback); - return localVarCall; + return createProjectAPIKeyCall(id, authTokenInput, _callback); } @@ -395,7 +389,7 @@ public okhttp3.Call deleteAPIKeyCall(UUID id, final ApiCallback _callback) throw // create path and map variables String localVarPath = "/api-keys/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -412,7 +406,6 @@ public okhttp3.Call deleteAPIKeyCall(UUID id, final ApiCallback _callback) throw } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -425,15 +418,12 @@ public okhttp3.Call deleteAPIKeyCall(UUID id, final ApiCallback _callback) throw @SuppressWarnings("rawtypes") private okhttp3.Call deleteAPIKeyValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteAPIKey(Async)"); } - - okhttp3.Call localVarCall = deleteAPIKeyCall(id, _callback); - return localVarCall; + return deleteAPIKeyCall(id, _callback); } @@ -526,7 +516,7 @@ public okhttp3.Call deleteUserAPIKeyCall(UUID id, final ApiCallback _callback) t // create path and map variables String localVarPath = "/user/api-keys/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -543,7 +533,6 @@ public okhttp3.Call deleteUserAPIKeyCall(UUID id, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -556,15 +545,12 @@ public okhttp3.Call deleteUserAPIKeyCall(UUID id, final ApiCallback _callback) t @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserAPIKeyValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteUserAPIKey(Async)"); } - - okhttp3.Call localVarCall = deleteUserAPIKeyCall(id, _callback); - return localVarCall; + return deleteUserAPIKeyCall(id, _callback); } @@ -682,7 +668,6 @@ public okhttp3.Call findAPIKeysCall(List include, List exclude, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -695,10 +680,7 @@ public okhttp3.Call findAPIKeysCall(List include, List exclude, @SuppressWarnings("rawtypes") private okhttp3.Call findAPIKeysValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findAPIKeysCall(include, exclude, _callback); - return localVarCall; + return findAPIKeysCall(include, exclude, _callback); } @@ -800,7 +782,7 @@ public okhttp3.Call findProjectAPIKeysCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -825,7 +807,6 @@ public okhttp3.Call findProjectAPIKeysCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectAPIKeys(Async)"); } - - okhttp3.Call localVarCall = findProjectAPIKeysCall(id, include, exclude, _callback); - return localVarCall; + return findProjectAPIKeysCall(id, include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java index 63957e37b..62063033b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java @@ -112,7 +112,7 @@ public okhttp3.Call createDeviceBatchCall(UUID id, InstancesBatchCreateInput ins // create path and map variables String localVarPath = "/projects/{id}/devices/batch" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -142,20 +142,17 @@ public okhttp3.Call createDeviceBatchCall(UUID id, InstancesBatchCreateInput ins @SuppressWarnings("rawtypes") private okhttp3.Call createDeviceBatchValidateBeforeCall(UUID id, InstancesBatchCreateInput instancesBatchCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createDeviceBatch(Async)"); } - + // verify the required parameter 'instancesBatchCreateInput' is set if (instancesBatchCreateInput == null) { throw new ApiException("Missing the required parameter 'instancesBatchCreateInput' when calling createDeviceBatch(Async)"); } - - okhttp3.Call localVarCall = createDeviceBatchCall(id, instancesBatchCreateInput, _callback); - return localVarCall; + return createDeviceBatchCall(id, instancesBatchCreateInput, _callback); } @@ -262,7 +259,7 @@ public okhttp3.Call deleteBatchCall(UUID id, Boolean removeAssociatedInstances, // create path and map variables String localVarPath = "/batches/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -283,7 +280,6 @@ public okhttp3.Call deleteBatchCall(UUID id, Boolean removeAssociatedInstances, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -296,15 +292,12 @@ public okhttp3.Call deleteBatchCall(UUID id, Boolean removeAssociatedInstances, @SuppressWarnings("rawtypes") private okhttp3.Call deleteBatchValidateBeforeCall(UUID id, Boolean removeAssociatedInstances, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteBatch(Async)"); } - - okhttp3.Call localVarCall = deleteBatchCall(id, removeAssociatedInstances, _callback); - return localVarCall; + return deleteBatchCall(id, removeAssociatedInstances, _callback); } @@ -402,7 +395,7 @@ public okhttp3.Call findBatchByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -427,7 +420,6 @@ public okhttp3.Call findBatchByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findBatchById(Async)"); } - - okhttp3.Call localVarCall = findBatchByIdCall(id, include, exclude, _callback); - return localVarCall; + return findBatchByIdCall(id, include, exclude, _callback); } @@ -554,7 +543,7 @@ public okhttp3.Call findBatchesByProjectCall(UUID id, List include, List // create path and map variables String localVarPath = "/projects/{id}/batches" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -579,7 +568,6 @@ public okhttp3.Call findBatchesByProjectCall(UUID id, List include, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -592,15 +580,12 @@ public okhttp3.Call findBatchesByProjectCall(UUID id, List include, List @SuppressWarnings("rawtypes") private okhttp3.Call findBatchesByProjectValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findBatchesByProject(Async)"); } - - okhttp3.Call localVarCall = findBatchesByProjectCall(id, include, exclude, _callback); - return localVarCall; + return findBatchesByProjectCall(id, include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java index b095d9882..91ae9fe56 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java @@ -112,7 +112,7 @@ public okhttp3.Call deleteBgpSessionCall(UUID id, final ApiCallback _callback) t // create path and map variables String localVarPath = "/bgp/sessions/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -129,7 +129,6 @@ public okhttp3.Call deleteBgpSessionCall(UUID id, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -142,15 +141,12 @@ public okhttp3.Call deleteBgpSessionCall(UUID id, final ApiCallback _callback) t @SuppressWarnings("rawtypes") private okhttp3.Call deleteBgpSessionValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteBgpSession(Async)"); } - - okhttp3.Call localVarCall = deleteBgpSessionCall(id, _callback); - return localVarCall; + return deleteBgpSessionCall(id, _callback); } @@ -249,7 +245,7 @@ public okhttp3.Call findBgpConfigByProjectCall(UUID id, List include, Li // create path and map variables String localVarPath = "/projects/{id}/bgp-config" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -274,7 +270,6 @@ public okhttp3.Call findBgpConfigByProjectCall(UUID id, List include, Li } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -287,15 +282,12 @@ public okhttp3.Call findBgpConfigByProjectCall(UUID id, List include, Li @SuppressWarnings("rawtypes") private okhttp3.Call findBgpConfigByProjectValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findBgpConfigByProject(Async)"); } - - okhttp3.Call localVarCall = findBgpConfigByProjectCall(id, include, exclude, _callback); - return localVarCall; + return findBgpConfigByProjectCall(id, include, exclude, _callback); } @@ -404,7 +396,7 @@ public okhttp3.Call findBgpSessionByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -429,7 +421,6 @@ public okhttp3.Call findBgpSessionByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findBgpSessionById(Async)"); } - - okhttp3.Call localVarCall = findBgpSessionByIdCall(id, include, exclude, _callback); - return localVarCall; + return findBgpSessionByIdCall(id, include, exclude, _callback); } @@ -557,7 +545,7 @@ public okhttp3.Call findGlobalBgpRangesCall(UUID id, final ApiCallback _callback // create path and map variables String localVarPath = "/projects/{id}/global-bgp-ranges" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -574,7 +562,6 @@ public okhttp3.Call findGlobalBgpRangesCall(UUID id, final ApiCallback _callback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -587,15 +574,12 @@ public okhttp3.Call findGlobalBgpRangesCall(UUID id, final ApiCallback _callback @SuppressWarnings("rawtypes") private okhttp3.Call findGlobalBgpRangesValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findGlobalBgpRanges(Async)"); } - - okhttp3.Call localVarCall = findGlobalBgpRangesCall(id, _callback); - return localVarCall; + return findGlobalBgpRangesCall(id, _callback); } @@ -695,7 +679,7 @@ public okhttp3.Call findProjectBgpSessionsCall(UUID id, final ApiCallback _callb // create path and map variables String localVarPath = "/projects/{id}/bgp/sessions" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -712,7 +696,6 @@ public okhttp3.Call findProjectBgpSessionsCall(UUID id, final ApiCallback _callb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -725,15 +708,12 @@ public okhttp3.Call findProjectBgpSessionsCall(UUID id, final ApiCallback _callb @SuppressWarnings("rawtypes") private okhttp3.Call findProjectBgpSessionsValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectBgpSessions(Async)"); } - - okhttp3.Call localVarCall = findProjectBgpSessionsCall(id, _callback); - return localVarCall; + return findProjectBgpSessionsCall(id, _callback); } @@ -833,7 +813,7 @@ public okhttp3.Call requestBgpConfigCall(UUID id, BgpConfigRequestInput bgpConfi // create path and map variables String localVarPath = "/projects/{id}/bgp-configs" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -863,20 +843,17 @@ public okhttp3.Call requestBgpConfigCall(UUID id, BgpConfigRequestInput bgpConfi @SuppressWarnings("rawtypes") private okhttp3.Call requestBgpConfigValidateBeforeCall(UUID id, BgpConfigRequestInput bgpConfigRequestInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling requestBgpConfig(Async)"); } - + // verify the required parameter 'bgpConfigRequestInput' is set if (bgpConfigRequestInput == null) { throw new ApiException("Missing the required parameter 'bgpConfigRequestInput' when calling requestBgpConfig(Async)"); } - - okhttp3.Call localVarCall = requestBgpConfigCall(id, bgpConfigRequestInput, _callback); - return localVarCall; + return requestBgpConfigCall(id, bgpConfigRequestInput, _callback); } @@ -981,7 +958,7 @@ public okhttp3.Call updateBgpSessionCall(UUID id, Boolean body, final ApiCallbac // create path and map variables String localVarPath = "/bgp/sessions/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1011,20 +988,17 @@ public okhttp3.Call updateBgpSessionCall(UUID id, Boolean body, final ApiCallbac @SuppressWarnings("rawtypes") private okhttp3.Call updateBgpSessionValidateBeforeCall(UUID id, Boolean body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateBgpSession(Async)"); } - + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updateBgpSession(Async)"); } - - okhttp3.Call localVarCall = updateBgpSessionCall(id, body, _callback); - return localVarCall; + return updateBgpSessionCall(id, body, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java index 56ec8be53..bb11ae68a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java @@ -141,15 +141,12 @@ public okhttp3.Call checkCapacityForFacilityCall(CapacityInput capacityInput, fi @SuppressWarnings("rawtypes") private okhttp3.Call checkCapacityForFacilityValidateBeforeCall(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'capacityInput' is set if (capacityInput == null) { throw new ApiException("Missing the required parameter 'capacityInput' when calling checkCapacityForFacility(Async)"); } - - okhttp3.Call localVarCall = checkCapacityForFacilityCall(capacityInput, _callback); - return localVarCall; + return checkCapacityForFacilityCall(capacityInput, _callback); } @@ -275,15 +272,12 @@ public okhttp3.Call checkCapacityForMetroCall(CapacityPerMetroInput capacityPerM @SuppressWarnings("rawtypes") private okhttp3.Call checkCapacityForMetroValidateBeforeCall(CapacityPerMetroInput capacityPerMetroInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'capacityPerMetroInput' is set if (capacityPerMetroInput == null) { throw new ApiException("Missing the required parameter 'capacityPerMetroInput' when calling checkCapacityForMetro(Async)"); } - - okhttp3.Call localVarCall = checkCapacityForMetroCall(capacityPerMetroInput, _callback); - return localVarCall; + return checkCapacityForMetroCall(capacityPerMetroInput, _callback); } @@ -394,7 +388,6 @@ public okhttp3.Call findCapacityForFacilityCall(final ApiCallback _callback) thr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -407,10 +400,7 @@ public okhttp3.Call findCapacityForFacilityCall(final ApiCallback _callback) thr @SuppressWarnings("rawtypes") private okhttp3.Call findCapacityForFacilityValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findCapacityForFacilityCall(_callback); - return localVarCall; + return findCapacityForFacilityCall(_callback); } @@ -515,7 +505,6 @@ public okhttp3.Call findCapacityForMetroCall(final ApiCallback _callback) throws } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -528,10 +517,7 @@ public okhttp3.Call findCapacityForMetroCall(final ApiCallback _callback) throws @SuppressWarnings("rawtypes") private okhttp3.Call findCapacityForMetroValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findCapacityForMetroCall(_callback); - return localVarCall; + return findCapacityForMetroCall(_callback); } @@ -622,7 +608,7 @@ public okhttp3.Call findOrganizationCapacityPerFacilityCall(UUID id, final ApiCa // create path and map variables String localVarPath = "/organizations/{id}/capacity" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -639,7 +625,6 @@ public okhttp3.Call findOrganizationCapacityPerFacilityCall(UUID id, final ApiCa } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -652,15 +637,12 @@ public okhttp3.Call findOrganizationCapacityPerFacilityCall(UUID id, final ApiCa @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationCapacityPerFacilityValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationCapacityPerFacility(Async)"); } - - okhttp3.Call localVarCall = findOrganizationCapacityPerFacilityCall(id, _callback); - return localVarCall; + return findOrganizationCapacityPerFacilityCall(id, _callback); } @@ -757,7 +739,7 @@ public okhttp3.Call findOrganizationCapacityPerMetroCall(UUID id, final ApiCallb // create path and map variables String localVarPath = "/organizations/{id}/capacity/metros" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -774,7 +756,6 @@ public okhttp3.Call findOrganizationCapacityPerMetroCall(UUID id, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -787,15 +768,12 @@ public okhttp3.Call findOrganizationCapacityPerMetroCall(UUID id, final ApiCallb @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationCapacityPerMetroValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationCapacityPerMetro(Async)"); } - - okhttp3.Call localVarCall = findOrganizationCapacityPerMetroCall(id, _callback); - return localVarCall; + return findOrganizationCapacityPerMetroCall(id, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConnectionsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConnectionsApi.java index e176d5197..3e6348073 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConnectionsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConnectionsApi.java @@ -118,8 +118,8 @@ public okhttp3.Call createConnectionPortVirtualCircuitCall(UUID connectionId, UU // create path and map variables String localVarPath = "/connections/{connection_id}/ports/{port_id}/virtual-circuits" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())) - .replaceAll("\\{" + "port_id" + "\\}", localVarApiClient.escapeString(portId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) + .replace("{" + "port_id" + "}", localVarApiClient.escapeString(portId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -149,25 +149,22 @@ public okhttp3.Call createConnectionPortVirtualCircuitCall(UUID connectionId, UU @SuppressWarnings("rawtypes") private okhttp3.Call createConnectionPortVirtualCircuitValidateBeforeCall(UUID connectionId, UUID portId, CreateConnectionPortVirtualCircuitRequest createConnectionPortVirtualCircuitRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling createConnectionPortVirtualCircuit(Async)"); } - + // verify the required parameter 'portId' is set if (portId == null) { throw new ApiException("Missing the required parameter 'portId' when calling createConnectionPortVirtualCircuit(Async)"); } - + // verify the required parameter 'createConnectionPortVirtualCircuitRequest' is set if (createConnectionPortVirtualCircuitRequest == null) { throw new ApiException("Missing the required parameter 'createConnectionPortVirtualCircuitRequest' when calling createConnectionPortVirtualCircuit(Async)"); } - - okhttp3.Call localVarCall = createConnectionPortVirtualCircuitCall(connectionId, portId, createConnectionPortVirtualCircuitRequest, _callback); - return localVarCall; + return createConnectionPortVirtualCircuitCall(connectionId, portId, createConnectionPortVirtualCircuitRequest, _callback); } @@ -272,7 +269,7 @@ public okhttp3.Call createOrganizationInterconnectionCall(UUID organizationId, I // create path and map variables String localVarPath = "/organizations/{organization_id}/connections" - .replaceAll("\\{" + "organization_id" + "\\}", localVarApiClient.escapeString(organizationId.toString())); + .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -302,20 +299,17 @@ public okhttp3.Call createOrganizationInterconnectionCall(UUID organizationId, I @SuppressWarnings("rawtypes") private okhttp3.Call createOrganizationInterconnectionValidateBeforeCall(UUID organizationId, InterconnectionCreateInput interconnectionCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling createOrganizationInterconnection(Async)"); } - + // verify the required parameter 'interconnectionCreateInput' is set if (interconnectionCreateInput == null) { throw new ApiException("Missing the required parameter 'interconnectionCreateInput' when calling createOrganizationInterconnection(Async)"); } - - okhttp3.Call localVarCall = createOrganizationInterconnectionCall(organizationId, interconnectionCreateInput, _callback); - return localVarCall; + return createOrganizationInterconnectionCall(organizationId, interconnectionCreateInput, _callback); } @@ -419,7 +413,7 @@ public okhttp3.Call createProjectInterconnectionCall(UUID projectId, Interconnec // create path and map variables String localVarPath = "/projects/{project_id}/connections" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -449,20 +443,17 @@ public okhttp3.Call createProjectInterconnectionCall(UUID projectId, Interconnec @SuppressWarnings("rawtypes") private okhttp3.Call createProjectInterconnectionValidateBeforeCall(UUID projectId, InterconnectionCreateInput interconnectionCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling createProjectInterconnection(Async)"); } - + // verify the required parameter 'interconnectionCreateInput' is set if (interconnectionCreateInput == null) { throw new ApiException("Missing the required parameter 'interconnectionCreateInput' when calling createProjectInterconnection(Async)"); } - - okhttp3.Call localVarCall = createProjectInterconnectionCall(projectId, interconnectionCreateInput, _callback); - return localVarCall; + return createProjectInterconnectionCall(projectId, interconnectionCreateInput, _callback); } @@ -562,7 +553,7 @@ public okhttp3.Call deleteInterconnectionCall(UUID connectionId, final ApiCallba // create path and map variables String localVarPath = "/connections/{connection_id}" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -579,7 +570,6 @@ public okhttp3.Call deleteInterconnectionCall(UUID connectionId, final ApiCallba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -592,15 +582,12 @@ public okhttp3.Call deleteInterconnectionCall(UUID connectionId, final ApiCallba @SuppressWarnings("rawtypes") private okhttp3.Call deleteInterconnectionValidateBeforeCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling deleteInterconnection(Async)"); } - - okhttp3.Call localVarCall = deleteInterconnectionCall(connectionId, _callback); - return localVarCall; + return deleteInterconnectionCall(connectionId, _callback); } @@ -697,7 +684,7 @@ public okhttp3.Call deleteVirtualCircuitCall(UUID id, final ApiCallback _callbac // create path and map variables String localVarPath = "/virtual-circuits/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -714,7 +701,6 @@ public okhttp3.Call deleteVirtualCircuitCall(UUID id, final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -727,15 +713,12 @@ public okhttp3.Call deleteVirtualCircuitCall(UUID id, final ApiCallback _callbac @SuppressWarnings("rawtypes") private okhttp3.Call deleteVirtualCircuitValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteVirtualCircuit(Async)"); } - - okhttp3.Call localVarCall = deleteVirtualCircuitCall(id, _callback); - return localVarCall; + return deleteVirtualCircuitCall(id, _callback); } @@ -833,8 +816,8 @@ public okhttp3.Call getConnectionPortCall(UUID connectionId, UUID id, final ApiC // create path and map variables String localVarPath = "/connections/{connection_id}/ports/{id}" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -851,7 +834,6 @@ public okhttp3.Call getConnectionPortCall(UUID connectionId, UUID id, final ApiC } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -864,20 +846,17 @@ public okhttp3.Call getConnectionPortCall(UUID connectionId, UUID id, final ApiC @SuppressWarnings("rawtypes") private okhttp3.Call getConnectionPortValidateBeforeCall(UUID connectionId, UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling getConnectionPort(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getConnectionPort(Async)"); } - - okhttp3.Call localVarCall = getConnectionPortCall(connectionId, id, _callback); - return localVarCall; + return getConnectionPortCall(connectionId, id, _callback); } @@ -977,7 +956,7 @@ public okhttp3.Call getInterconnectionCall(UUID connectionId, final ApiCallback // create path and map variables String localVarPath = "/connections/{connection_id}" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -994,7 +973,6 @@ public okhttp3.Call getInterconnectionCall(UUID connectionId, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1007,15 +985,12 @@ public okhttp3.Call getInterconnectionCall(UUID connectionId, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call getInterconnectionValidateBeforeCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling getInterconnection(Async)"); } - - okhttp3.Call localVarCall = getInterconnectionCall(connectionId, _callback); - return localVarCall; + return getInterconnectionCall(connectionId, _callback); } @@ -1112,7 +1087,7 @@ public okhttp3.Call getVirtualCircuitCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/virtual-circuits/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1129,7 +1104,6 @@ public okhttp3.Call getVirtualCircuitCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1142,15 +1116,12 @@ public okhttp3.Call getVirtualCircuitCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call getVirtualCircuitValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getVirtualCircuit(Async)"); } - - okhttp3.Call localVarCall = getVirtualCircuitCall(id, _callback); - return localVarCall; + return getVirtualCircuitCall(id, _callback); } @@ -1248,8 +1219,8 @@ public okhttp3.Call listConnectionPortVirtualCircuitsCall(UUID connectionId, UUI // create path and map variables String localVarPath = "/connections/{connection_id}/ports/{port_id}/virtual-circuits" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())) - .replaceAll("\\{" + "port_id" + "\\}", localVarApiClient.escapeString(portId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) + .replace("{" + "port_id" + "}", localVarApiClient.escapeString(portId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1266,7 +1237,6 @@ public okhttp3.Call listConnectionPortVirtualCircuitsCall(UUID connectionId, UUI } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1279,20 +1249,17 @@ public okhttp3.Call listConnectionPortVirtualCircuitsCall(UUID connectionId, UUI @SuppressWarnings("rawtypes") private okhttp3.Call listConnectionPortVirtualCircuitsValidateBeforeCall(UUID connectionId, UUID portId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling listConnectionPortVirtualCircuits(Async)"); } - + // verify the required parameter 'portId' is set if (portId == null) { throw new ApiException("Missing the required parameter 'portId' when calling listConnectionPortVirtualCircuits(Async)"); } - - okhttp3.Call localVarCall = listConnectionPortVirtualCircuitsCall(connectionId, portId, _callback); - return localVarCall; + return listConnectionPortVirtualCircuitsCall(connectionId, portId, _callback); } @@ -1392,7 +1359,7 @@ public okhttp3.Call listConnectionPortsCall(UUID connectionId, final ApiCallback // create path and map variables String localVarPath = "/connections/{connection_id}/ports" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1409,7 +1376,6 @@ public okhttp3.Call listConnectionPortsCall(UUID connectionId, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1422,15 +1388,12 @@ public okhttp3.Call listConnectionPortsCall(UUID connectionId, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call listConnectionPortsValidateBeforeCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling listConnectionPorts(Async)"); } - - okhttp3.Call localVarCall = listConnectionPortsCall(connectionId, _callback); - return localVarCall; + return listConnectionPortsCall(connectionId, _callback); } @@ -1527,7 +1490,7 @@ public okhttp3.Call organizationListInterconnectionsCall(UUID organizationId, fi // create path and map variables String localVarPath = "/organizations/{organization_id}/connections" - .replaceAll("\\{" + "organization_id" + "\\}", localVarApiClient.escapeString(organizationId.toString())); + .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1544,7 +1507,6 @@ public okhttp3.Call organizationListInterconnectionsCall(UUID organizationId, fi } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1557,15 +1519,12 @@ public okhttp3.Call organizationListInterconnectionsCall(UUID organizationId, fi @SuppressWarnings("rawtypes") private okhttp3.Call organizationListInterconnectionsValidateBeforeCall(UUID organizationId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling organizationListInterconnections(Async)"); } - - okhttp3.Call localVarCall = organizationListInterconnectionsCall(organizationId, _callback); - return localVarCall; + return organizationListInterconnectionsCall(organizationId, _callback); } @@ -1662,7 +1621,7 @@ public okhttp3.Call projectListInterconnectionsCall(UUID projectId, final ApiCal // create path and map variables String localVarPath = "/projects/{project_id}/connections" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1679,7 +1638,6 @@ public okhttp3.Call projectListInterconnectionsCall(UUID projectId, final ApiCal } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1692,15 +1650,12 @@ public okhttp3.Call projectListInterconnectionsCall(UUID projectId, final ApiCal @SuppressWarnings("rawtypes") private okhttp3.Call projectListInterconnectionsValidateBeforeCall(UUID projectId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling projectListInterconnections(Async)"); } - - okhttp3.Call localVarCall = projectListInterconnectionsCall(projectId, _callback); - return localVarCall; + return projectListInterconnectionsCall(projectId, _callback); } @@ -1798,7 +1753,7 @@ public okhttp3.Call updateInterconnectionCall(UUID connectionId, Interconnection // create path and map variables String localVarPath = "/connections/{connection_id}" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1828,20 +1783,17 @@ public okhttp3.Call updateInterconnectionCall(UUID connectionId, Interconnection @SuppressWarnings("rawtypes") private okhttp3.Call updateInterconnectionValidateBeforeCall(UUID connectionId, InterconnectionUpdateInput interconnectionUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling updateInterconnection(Async)"); } - + // verify the required parameter 'interconnectionUpdateInput' is set if (interconnectionUpdateInput == null) { throw new ApiException("Missing the required parameter 'interconnectionUpdateInput' when calling updateInterconnection(Async)"); } - - okhttp3.Call localVarCall = updateInterconnectionCall(connectionId, interconnectionUpdateInput, _callback); - return localVarCall; + return updateInterconnectionCall(connectionId, interconnectionUpdateInput, _callback); } @@ -1943,7 +1895,7 @@ public okhttp3.Call updateVirtualCircuitCall(UUID id, UpdateVirtualCircuitReques // create path and map variables String localVarPath = "/virtual-circuits/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1973,20 +1925,17 @@ public okhttp3.Call updateVirtualCircuitCall(UUID id, UpdateVirtualCircuitReques @SuppressWarnings("rawtypes") private okhttp3.Call updateVirtualCircuitValidateBeforeCall(UUID id, UpdateVirtualCircuitRequest updateVirtualCircuitRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateVirtualCircuit(Async)"); } - + // verify the required parameter 'updateVirtualCircuitRequest' is set if (updateVirtualCircuitRequest == null) { throw new ApiException("Missing the required parameter 'updateVirtualCircuitRequest' when calling updateVirtualCircuit(Async)"); } - - okhttp3.Call localVarCall = updateVirtualCircuitCall(id, updateVirtualCircuitRequest, _callback); - return localVarCall; + return updateVirtualCircuitCall(id, updateVirtualCircuitRequest, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java index 4c9b7122b..674794e90 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java @@ -120,7 +120,7 @@ public okhttp3.Call createBgpSessionCall(UUID id, BGPSessionInput bgPSessionInpu // create path and map variables String localVarPath = "/devices/{id}/bgp/sessions" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -150,20 +150,17 @@ public okhttp3.Call createBgpSessionCall(UUID id, BGPSessionInput bgPSessionInpu @SuppressWarnings("rawtypes") private okhttp3.Call createBgpSessionValidateBeforeCall(UUID id, BGPSessionInput bgPSessionInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createBgpSession(Async)"); } - + // verify the required parameter 'bgPSessionInput' is set if (bgPSessionInput == null) { throw new ApiException("Missing the required parameter 'bgPSessionInput' when calling createBgpSession(Async)"); } - - okhttp3.Call localVarCall = createBgpSessionCall(id, bgPSessionInput, _callback); - return localVarCall; + return createBgpSessionCall(id, bgPSessionInput, _callback); } @@ -269,7 +266,7 @@ public okhttp3.Call createDeviceCall(UUID id, DeviceCreateInput deviceCreateInpu // create path and map variables String localVarPath = "/projects/{id}/devices" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -299,20 +296,17 @@ public okhttp3.Call createDeviceCall(UUID id, DeviceCreateInput deviceCreateInpu @SuppressWarnings("rawtypes") private okhttp3.Call createDeviceValidateBeforeCall(UUID id, DeviceCreateInput deviceCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createDevice(Async)"); } - + // verify the required parameter 'deviceCreateInput' is set if (deviceCreateInput == null) { throw new ApiException("Missing the required parameter 'deviceCreateInput' when calling createDevice(Async)"); } - - okhttp3.Call localVarCall = createDeviceCall(id, deviceCreateInput, _callback); - return localVarCall; + return createDeviceCall(id, deviceCreateInput, _callback); } @@ -420,7 +414,7 @@ public okhttp3.Call createIPAssignmentCall(UUID id, IPAssignmentInput ipAssignme // create path and map variables String localVarPath = "/devices/{id}/ips" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -450,20 +444,17 @@ public okhttp3.Call createIPAssignmentCall(UUID id, IPAssignmentInput ipAssignme @SuppressWarnings("rawtypes") private okhttp3.Call createIPAssignmentValidateBeforeCall(UUID id, IPAssignmentInput ipAssignmentInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createIPAssignment(Async)"); } - + // verify the required parameter 'ipAssignmentInput' is set if (ipAssignmentInput == null) { throw new ApiException("Missing the required parameter 'ipAssignmentInput' when calling createIPAssignment(Async)"); } - - okhttp3.Call localVarCall = createIPAssignmentCall(id, ipAssignmentInput, _callback); - return localVarCall; + return createIPAssignmentCall(id, ipAssignmentInput, _callback); } @@ -569,7 +560,7 @@ public okhttp3.Call deleteDeviceCall(UUID id, Boolean forceDelete, final ApiCall // create path and map variables String localVarPath = "/devices/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -590,7 +581,6 @@ public okhttp3.Call deleteDeviceCall(UUID id, Boolean forceDelete, final ApiCall } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -603,15 +593,12 @@ public okhttp3.Call deleteDeviceCall(UUID id, Boolean forceDelete, final ApiCall @SuppressWarnings("rawtypes") private okhttp3.Call deleteDeviceValidateBeforeCall(UUID id, Boolean forceDelete, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteDevice(Async)"); } - - okhttp3.Call localVarCall = deleteDeviceCall(id, forceDelete, _callback); - return localVarCall; + return deleteDeviceCall(id, forceDelete, _callback); } @@ -713,7 +700,7 @@ public okhttp3.Call findBgpSessionsCall(UUID id, final ApiCallback _callback) th // create path and map variables String localVarPath = "/devices/{id}/bgp/sessions" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -730,7 +717,6 @@ public okhttp3.Call findBgpSessionsCall(UUID id, final ApiCallback _callback) th } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -743,15 +729,12 @@ public okhttp3.Call findBgpSessionsCall(UUID id, final ApiCallback _callback) th @SuppressWarnings("rawtypes") private okhttp3.Call findBgpSessionsValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findBgpSessions(Async)"); } - - okhttp3.Call localVarCall = findBgpSessionsCall(id, _callback); - return localVarCall; + return findBgpSessionsCall(id, _callback); } @@ -851,7 +834,7 @@ public okhttp3.Call findDeviceByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -876,7 +859,6 @@ public okhttp3.Call findDeviceByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findDeviceById(Async)"); } - - okhttp3.Call localVarCall = findDeviceByIdCall(id, include, exclude, _callback); - return localVarCall; + return findDeviceByIdCall(id, include, exclude, _callback); } @@ -1004,7 +983,7 @@ public okhttp3.Call findDeviceCustomdataCall(UUID id, final ApiCallback _callbac // create path and map variables String localVarPath = "/devices/{id}/customdata" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1021,7 +1000,6 @@ public okhttp3.Call findDeviceCustomdataCall(UUID id, final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1034,15 +1012,12 @@ public okhttp3.Call findDeviceCustomdataCall(UUID id, final ApiCallback _callbac @SuppressWarnings("rawtypes") private okhttp3.Call findDeviceCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findDeviceCustomdata(Async)"); } - - okhttp3.Call localVarCall = findDeviceCustomdataCall(id, _callback); - return localVarCall; + return findDeviceCustomdataCall(id, _callback); } @@ -1140,8 +1115,8 @@ public okhttp3.Call findIPAssignmentCustomdataCall(UUID instanceId, UUID id, fin // create path and map variables String localVarPath = "/devices/{instance_id}/ips/{id}/customdata" - .replaceAll("\\{" + "instance_id" + "\\}", localVarApiClient.escapeString(instanceId.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1158,7 +1133,6 @@ public okhttp3.Call findIPAssignmentCustomdataCall(UUID instanceId, UUID id, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1171,20 +1145,17 @@ public okhttp3.Call findIPAssignmentCustomdataCall(UUID instanceId, UUID id, fin @SuppressWarnings("rawtypes") private okhttp3.Call findIPAssignmentCustomdataValidateBeforeCall(UUID instanceId, UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling findIPAssignmentCustomdata(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPAssignmentCustomdata(Async)"); } - - okhttp3.Call localVarCall = findIPAssignmentCustomdataCall(instanceId, id, _callback); - return localVarCall; + return findIPAssignmentCustomdataCall(instanceId, id, _callback); } @@ -1285,7 +1256,7 @@ public okhttp3.Call findIPAssignmentsCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1310,7 +1281,6 @@ public okhttp3.Call findIPAssignmentsCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPAssignments(Async)"); } - - okhttp3.Call localVarCall = findIPAssignmentsCall(id, include, exclude, _callback); - return localVarCall; + return findIPAssignmentsCall(id, include, exclude, _callback); } @@ -1436,7 +1403,7 @@ public okhttp3.Call findInstanceBandwidthCall(UUID id, String from, String until // create path and map variables String localVarPath = "/devices/{id}/bandwidth" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1461,7 +1428,6 @@ public okhttp3.Call findInstanceBandwidthCall(UUID id, String from, String until } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1474,25 +1440,22 @@ public okhttp3.Call findInstanceBandwidthCall(UUID id, String from, String until @SuppressWarnings("rawtypes") private okhttp3.Call findInstanceBandwidthValidateBeforeCall(UUID id, String from, String until, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findInstanceBandwidth(Async)"); } - + // verify the required parameter 'from' is set if (from == null) { throw new ApiException("Missing the required parameter 'from' when calling findInstanceBandwidth(Async)"); } - + // verify the required parameter 'until' is set if (until == null) { throw new ApiException("Missing the required parameter 'until' when calling findInstanceBandwidth(Async)"); } - - okhttp3.Call localVarCall = findInstanceBandwidthCall(id, from, until, _callback); - return localVarCall; + return findInstanceBandwidthCall(id, from, until, _callback); } @@ -1601,7 +1564,7 @@ public okhttp3.Call findOrganizationDevicesCall(UUID id, String facility, String // create path and map variables String localVarPath = "/organizations/{id}/devices" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1654,7 +1617,6 @@ public okhttp3.Call findOrganizationDevicesCall(UUID id, String facility, String } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1667,15 +1629,12 @@ public okhttp3.Call findOrganizationDevicesCall(UUID id, String facility, String @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationDevicesValidateBeforeCall(UUID id, String facility, String hostname, Boolean reserved, String tag, String type, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationDevices(Async)"); } - - okhttp3.Call localVarCall = findOrganizationDevicesCall(id, facility, hostname, reserved, tag, type, include, exclude, page, perPage, _callback); - return localVarCall; + return findOrganizationDevicesCall(id, facility, hostname, reserved, tag, type, include, exclude, page, perPage, _callback); } @@ -1812,7 +1771,7 @@ public okhttp3.Call findProjectDevicesCall(UUID id, String facility, String host // create path and map variables String localVarPath = "/projects/{id}/devices" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1865,7 +1824,6 @@ public okhttp3.Call findProjectDevicesCall(UUID id, String facility, String host } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1878,15 +1836,12 @@ public okhttp3.Call findProjectDevicesCall(UUID id, String facility, String host @SuppressWarnings("rawtypes") private okhttp3.Call findProjectDevicesValidateBeforeCall(UUID id, String facility, String hostname, Boolean reserved, String tag, String type, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectDevices(Async)"); } - - okhttp3.Call localVarCall = findProjectDevicesCall(id, facility, hostname, reserved, tag, type, include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectDevicesCall(id, facility, hostname, reserved, tag, type, include, exclude, page, perPage, _callback); } @@ -2018,7 +1973,7 @@ public okhttp3.Call findTrafficCall(UUID id, String direction, Timeframe timefra // create path and map variables String localVarPath = "/devices/{id}/traffic" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2060,25 +2015,22 @@ public okhttp3.Call findTrafficCall(UUID id, String direction, Timeframe timefra @SuppressWarnings("rawtypes") private okhttp3.Call findTrafficValidateBeforeCall(UUID id, String direction, Timeframe timeframe, String interval, String bucket, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findTraffic(Async)"); } - + // verify the required parameter 'direction' is set if (direction == null) { throw new ApiException("Missing the required parameter 'direction' when calling findTraffic(Async)"); } - + // verify the required parameter 'timeframe' is set if (timeframe == null) { throw new ApiException("Missing the required parameter 'timeframe' when calling findTraffic(Async)"); } - - okhttp3.Call localVarCall = findTrafficCall(id, direction, timeframe, interval, bucket, _callback); - return localVarCall; + return findTrafficCall(id, direction, timeframe, interval, bucket, _callback); } @@ -2187,7 +2139,7 @@ public okhttp3.Call getBgpNeighborDataCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/devices/{id}/bgp/neighbors" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2204,7 +2156,6 @@ public okhttp3.Call getBgpNeighborDataCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2217,15 +2168,12 @@ public okhttp3.Call getBgpNeighborDataCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call getBgpNeighborDataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getBgpNeighborData(Async)"); } - - okhttp3.Call localVarCall = getBgpNeighborDataCall(id, _callback); - return localVarCall; + return getBgpNeighborDataCall(id, _callback); } @@ -2327,7 +2275,7 @@ public okhttp3.Call performActionCall(UUID id, String type, final ApiCallback _c // create path and map variables String localVarPath = "/devices/{id}/actions" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2348,7 +2296,6 @@ public okhttp3.Call performActionCall(UUID id, String type, final ApiCallback _c } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2361,20 +2308,17 @@ public okhttp3.Call performActionCall(UUID id, String type, final ApiCallback _c @SuppressWarnings("rawtypes") private okhttp3.Call performActionValidateBeforeCall(UUID id, String type, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling performAction(Async)"); } - + // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling performAction(Async)"); } - - okhttp3.Call localVarCall = performActionCall(id, type, _callback); - return localVarCall; + return performActionCall(id, type, _callback); } @@ -2476,7 +2420,7 @@ public okhttp3.Call updateDeviceCall(UUID id, DeviceUpdateInput deviceUpdateInpu // create path and map variables String localVarPath = "/devices/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2506,20 +2450,17 @@ public okhttp3.Call updateDeviceCall(UUID id, DeviceUpdateInput deviceUpdateInpu @SuppressWarnings("rawtypes") private okhttp3.Call updateDeviceValidateBeforeCall(UUID id, DeviceUpdateInput deviceUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateDevice(Async)"); } - + // verify the required parameter 'deviceUpdateInput' is set if (deviceUpdateInput == null) { throw new ApiException("Missing the required parameter 'deviceUpdateInput' when calling updateDevice(Async)"); } - - okhttp3.Call localVarCall = updateDeviceCall(id, deviceUpdateInput, _callback); - return localVarCall; + return updateDeviceCall(id, deviceUpdateInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java index 17f79ba35..e7039ca33 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java @@ -138,15 +138,12 @@ public okhttp3.Call createEmailCall(CreateEmailInput createEmailInput, final Api @SuppressWarnings("rawtypes") private okhttp3.Call createEmailValidateBeforeCall(CreateEmailInput createEmailInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createEmailInput' is set if (createEmailInput == null) { throw new ApiException("Missing the required parameter 'createEmailInput' when calling createEmail(Async)"); } - - okhttp3.Call localVarCall = createEmailCall(createEmailInput, _callback); - return localVarCall; + return createEmailCall(createEmailInput, _callback); } @@ -244,7 +241,7 @@ public okhttp3.Call deleteEmailCall(UUID id, final ApiCallback _callback) throws // create path and map variables String localVarPath = "/emails/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -261,7 +258,6 @@ public okhttp3.Call deleteEmailCall(UUID id, final ApiCallback _callback) throws } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -274,15 +270,12 @@ public okhttp3.Call deleteEmailCall(UUID id, final ApiCallback _callback) throws @SuppressWarnings("rawtypes") private okhttp3.Call deleteEmailValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteEmail(Async)"); } - - okhttp3.Call localVarCall = deleteEmailCall(id, _callback); - return localVarCall; + return deleteEmailCall(id, _callback); } @@ -381,7 +374,7 @@ public okhttp3.Call findEmailByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -406,7 +399,6 @@ public okhttp3.Call findEmailByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findEmailById(Async)"); } - - okhttp3.Call localVarCall = findEmailByIdCall(id, include, exclude, _callback); - return localVarCall; + return findEmailByIdCall(id, include, exclude, _callback); } @@ -536,7 +525,7 @@ public okhttp3.Call updateEmailCall(UUID id, UpdateEmailInput updateEmailInput, // create path and map variables String localVarPath = "/emails/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -566,20 +555,17 @@ public okhttp3.Call updateEmailCall(UUID id, UpdateEmailInput updateEmailInput, @SuppressWarnings("rawtypes") private okhttp3.Call updateEmailValidateBeforeCall(UUID id, UpdateEmailInput updateEmailInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateEmail(Async)"); } - + // verify the required parameter 'updateEmailInput' is set if (updateEmailInput == null) { throw new ApiException("Missing the required parameter 'updateEmailInput' when calling updateEmail(Async)"); } - - okhttp3.Call localVarCall = updateEmailCall(id, updateEmailInput, _callback); - return localVarCall; + return updateEmailCall(id, updateEmailInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java index d5b834f50..5f159e30d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java @@ -113,7 +113,7 @@ public okhttp3.Call findConnectionEventsCall(UUID connectionId, List inc // create path and map variables String localVarPath = "/connections/{connection_id}/events" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -146,7 +146,6 @@ public okhttp3.Call findConnectionEventsCall(UUID connectionId, List inc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -159,15 +158,12 @@ public okhttp3.Call findConnectionEventsCall(UUID connectionId, List inc @SuppressWarnings("rawtypes") private okhttp3.Call findConnectionEventsValidateBeforeCall(UUID connectionId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling findConnectionEvents(Async)"); } - - okhttp3.Call localVarCall = findConnectionEventsCall(connectionId, include, exclude, page, perPage, _callback); - return localVarCall; + return findConnectionEventsCall(connectionId, include, exclude, page, perPage, _callback); } @@ -285,8 +281,8 @@ public okhttp3.Call findConnectionPortEventsCall(UUID connectionId, UUID id, Lis // create path and map variables String localVarPath = "/connections/{connection_id}/ports/{id}/events" - .replaceAll("\\{" + "connection_id" + "\\}", localVarApiClient.escapeString(connectionId.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -319,7 +315,6 @@ public okhttp3.Call findConnectionPortEventsCall(UUID connectionId, UUID id, Lis } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -332,20 +327,17 @@ public okhttp3.Call findConnectionPortEventsCall(UUID connectionId, UUID id, Lis @SuppressWarnings("rawtypes") private okhttp3.Call findConnectionPortEventsValidateBeforeCall(UUID connectionId, UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling findConnectionPortEvents(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findConnectionPortEvents(Async)"); } - - okhttp3.Call localVarCall = findConnectionPortEventsCall(connectionId, id, include, exclude, page, perPage, _callback); - return localVarCall; + return findConnectionPortEventsCall(connectionId, id, include, exclude, page, perPage, _callback); } @@ -465,7 +457,7 @@ public okhttp3.Call findDeviceEventsCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -498,7 +490,6 @@ public okhttp3.Call findDeviceEventsCall(UUID id, List include, List include, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findDeviceEvents(Async)"); } - - okhttp3.Call localVarCall = findDeviceEventsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findDeviceEventsCall(id, include, exclude, page, perPage, _callback); } @@ -634,7 +622,7 @@ public okhttp3.Call findEventByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -659,7 +647,6 @@ public okhttp3.Call findEventByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findEventById(Async)"); } - - okhttp3.Call localVarCall = findEventByIdCall(id, include, exclude, _callback); - return localVarCall; + return findEventByIdCall(id, include, exclude, _callback); } @@ -820,7 +804,6 @@ public okhttp3.Call findEventsCall(List include, List exclude, I } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -833,10 +816,7 @@ public okhttp3.Call findEventsCall(List include, List exclude, I @SuppressWarnings("rawtypes") private okhttp3.Call findEventsValidateBeforeCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findEventsCall(include, exclude, page, perPage, _callback); - return localVarCall; + return findEventsCall(include, exclude, page, perPage, _callback); } @@ -944,7 +924,7 @@ public okhttp3.Call findOrganizationEventsCall(UUID id, List include, Li // create path and map variables String localVarPath = "/organizations/{id}/events" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -977,7 +957,6 @@ public okhttp3.Call findOrganizationEventsCall(UUID id, List include, Li } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -990,15 +969,12 @@ public okhttp3.Call findOrganizationEventsCall(UUID id, List include, Li @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationEvents(Async)"); } - - okhttp3.Call localVarCall = findOrganizationEventsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findOrganizationEventsCall(id, include, exclude, page, perPage, _callback); } @@ -1115,7 +1091,7 @@ public okhttp3.Call findProjectEventsCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1148,7 +1124,6 @@ public okhttp3.Call findProjectEventsCall(UUID id, List include, List include, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectEvents(Async)"); } - - okhttp3.Call localVarCall = findProjectEventsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectEventsCall(id, include, exclude, page, perPage, _callback); } @@ -1286,7 +1258,7 @@ public okhttp3.Call findVirtualCircuitEventsCall(UUID id, List include, // create path and map variables String localVarPath = "/virtual-circuit/{id}/events" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1319,7 +1291,6 @@ public okhttp3.Call findVirtualCircuitEventsCall(UUID id, List include, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1332,15 +1303,12 @@ public okhttp3.Call findVirtualCircuitEventsCall(UUID id, List include, @SuppressWarnings("rawtypes") private okhttp3.Call findVirtualCircuitEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findVirtualCircuitEvents(Async)"); } - - okhttp3.Call localVarCall = findVirtualCircuitEventsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findVirtualCircuitEventsCall(id, include, exclude, page, perPage, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java index b74e1e107..eb69f47b9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java @@ -131,7 +131,6 @@ public okhttp3.Call findFacilitiesCall(List include, List exclud } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -144,10 +143,7 @@ public okhttp3.Call findFacilitiesCall(List include, List exclud @SuppressWarnings("rawtypes") private okhttp3.Call findFacilitiesValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findFacilitiesCall(include, exclude, _callback); - return localVarCall; + return findFacilitiesCall(include, exclude, _callback); } @@ -247,7 +243,7 @@ public okhttp3.Call findFacilitiesByOrganizationCall(UUID id, List inclu // create path and map variables String localVarPath = "/organizations/{id}/facilities" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -272,7 +268,6 @@ public okhttp3.Call findFacilitiesByOrganizationCall(UUID id, List inclu } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -285,15 +280,12 @@ public okhttp3.Call findFacilitiesByOrganizationCall(UUID id, List inclu @SuppressWarnings("rawtypes") private okhttp3.Call findFacilitiesByOrganizationValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findFacilitiesByOrganization(Async)"); } - - okhttp3.Call localVarCall = findFacilitiesByOrganizationCall(id, include, exclude, _callback); - return localVarCall; + return findFacilitiesByOrganizationCall(id, include, exclude, _callback); } @@ -402,7 +394,7 @@ public okhttp3.Call findFacilitiesByProjectCall(UUID id, List include, L // create path and map variables String localVarPath = "/projects/{id}/facilities" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -427,7 +419,6 @@ public okhttp3.Call findFacilitiesByProjectCall(UUID id, List include, L } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -440,15 +431,12 @@ public okhttp3.Call findFacilitiesByProjectCall(UUID id, List include, L @SuppressWarnings("rawtypes") private okhttp3.Call findFacilitiesByProjectValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findFacilitiesByProject(Async)"); } - - okhttp3.Call localVarCall = findFacilitiesByProjectCall(id, include, exclude, _callback); - return localVarCall; + return findFacilitiesByProjectCall(id, include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java index 9babee025..7bf8f5439 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java @@ -27,7 +27,6 @@ import java.io.IOException; -import com.equinix.openapi.metal.v1.model.Device; import com.equinix.openapi.metal.v1.model.Error; import com.equinix.openapi.metal.v1.model.HardwareReservation; import com.equinix.openapi.metal.v1.model.HardwareReservationList; @@ -112,7 +111,7 @@ public okhttp3.Call findHardwareReservationByIdCall(UUID id, List includ // create path and map variables String localVarPath = "/hardware-reservations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -137,7 +136,6 @@ public okhttp3.Call findHardwareReservationByIdCall(UUID id, List includ } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -150,15 +148,12 @@ public okhttp3.Call findHardwareReservationByIdCall(UUID id, List includ @SuppressWarnings("rawtypes") private okhttp3.Call findHardwareReservationByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findHardwareReservationById(Async)"); } - - okhttp3.Call localVarCall = findHardwareReservationByIdCall(id, include, exclude, _callback); - return localVarCall; + return findHardwareReservationByIdCall(id, include, exclude, _callback); } @@ -168,7 +163,7 @@ private okhttp3.Call findHardwareReservationByIdValidateBeforeCall(UUID id, List * @param id HardwareReservation UUID (required) * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Device + * @return HardwareReservation * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +174,8 @@ private okhttp3.Call findHardwareReservationByIdValidateBeforeCall(UUID id, List
404 not found -
*/ - public Device findHardwareReservationById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findHardwareReservationByIdWithHttpInfo(id, include, exclude); + public HardwareReservation findHardwareReservationById(UUID id, List include, List exclude) throws ApiException { + ApiResponse localVarResp = findHardwareReservationByIdWithHttpInfo(id, include, exclude); return localVarResp.getData(); } @@ -190,7 +185,7 @@ public Device findHardwareReservationById(UUID id, List include, List @@ -201,9 +196,9 @@ public Device findHardwareReservationById(UUID id, List include, List 404 not found - */ - public ApiResponse findHardwareReservationByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { + public ApiResponse findHardwareReservationByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { okhttp3.Call localVarCall = findHardwareReservationByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -225,10 +220,10 @@ public ApiResponse findHardwareReservationByIdWithHttpInfo(UUID id, List 404 not found - */ - public okhttp3.Call findHardwareReservationByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findHardwareReservationByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = findHardwareReservationByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -269,7 +264,7 @@ public okhttp3.Call findProjectHardwareReservationsCall(UUID id, List in // create path and map variables String localVarPath = "/projects/{id}/hardware-reservations" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -302,7 +297,6 @@ public okhttp3.Call findProjectHardwareReservationsCall(UUID id, List in } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -315,15 +309,12 @@ public okhttp3.Call findProjectHardwareReservationsCall(UUID id, List in @SuppressWarnings("rawtypes") private okhttp3.Call findProjectHardwareReservationsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectHardwareReservations(Async)"); } - - okhttp3.Call localVarCall = findProjectHardwareReservationsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectHardwareReservationsCall(id, include, exclude, page, perPage, _callback); } @@ -437,7 +428,7 @@ public okhttp3.Call moveHardwareReservationCall(UUID id, UUID body, final ApiCal // create path and map variables String localVarPath = "/hardware-reservations/{id}/move" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -467,20 +458,17 @@ public okhttp3.Call moveHardwareReservationCall(UUID id, UUID body, final ApiCal @SuppressWarnings("rawtypes") private okhttp3.Call moveHardwareReservationValidateBeforeCall(UUID id, UUID body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling moveHardwareReservation(Async)"); } - + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling moveHardwareReservation(Async)"); } - - okhttp3.Call localVarCall = moveHardwareReservationCall(id, body, _callback); - return localVarCall; + return moveHardwareReservationCall(id, body, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java index 42cc60347..f90dc2000 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java @@ -129,7 +129,6 @@ public okhttp3.Call findIncidentsCall(List include, List exclude } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -142,10 +141,7 @@ public okhttp3.Call findIncidentsCall(List include, List exclude @SuppressWarnings("rawtypes") private okhttp3.Call findIncidentsValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findIncidentsCall(include, exclude, _callback); - return localVarCall; + return findIncidentsCall(include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java index 8f392b41f..c46e99abc 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java @@ -109,7 +109,7 @@ public okhttp3.Call acceptInvitationCall(UUID id, final ApiCallback _callback) t // create path and map variables String localVarPath = "/invitations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,7 +126,6 @@ public okhttp3.Call acceptInvitationCall(UUID id, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -139,15 +138,12 @@ public okhttp3.Call acceptInvitationCall(UUID id, final ApiCallback _callback) t @SuppressWarnings("rawtypes") private okhttp3.Call acceptInvitationValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling acceptInvitation(Async)"); } - - okhttp3.Call localVarCall = acceptInvitationCall(id, _callback); - return localVarCall; + return acceptInvitationCall(id, _callback); } @@ -248,7 +244,7 @@ public okhttp3.Call declineInvitationCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/invitations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -265,7 +261,6 @@ public okhttp3.Call declineInvitationCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -278,15 +273,12 @@ public okhttp3.Call declineInvitationCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call declineInvitationValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling declineInvitation(Async)"); } - - okhttp3.Call localVarCall = declineInvitationCall(id, _callback); - return localVarCall; + return declineInvitationCall(id, _callback); } @@ -385,7 +377,7 @@ public okhttp3.Call findInvitationByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -410,7 +402,6 @@ public okhttp3.Call findInvitationByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findInvitationById(Async)"); } - - okhttp3.Call localVarCall = findInvitationByIdCall(id, include, exclude, _callback); - return localVarCall; + return findInvitationByIdCall(id, include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java index 02d4d4e4e..b721a5226 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java @@ -112,7 +112,7 @@ public okhttp3.Call deleteIPAddressCall(UUID id, final ApiCallback _callback) th // create path and map variables String localVarPath = "/ips/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -129,7 +129,6 @@ public okhttp3.Call deleteIPAddressCall(UUID id, final ApiCallback _callback) th } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -142,15 +141,12 @@ public okhttp3.Call deleteIPAddressCall(UUID id, final ApiCallback _callback) th @SuppressWarnings("rawtypes") private okhttp3.Call deleteIPAddressValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteIPAddress(Async)"); } - - okhttp3.Call localVarCall = deleteIPAddressCall(id, _callback); - return localVarCall; + return deleteIPAddressCall(id, _callback); } @@ -249,7 +245,7 @@ public okhttp3.Call findIPAddressByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -274,7 +270,6 @@ public okhttp3.Call findIPAddressByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPAddressById(Async)"); } - - okhttp3.Call localVarCall = findIPAddressByIdCall(id, include, exclude, _callback); - return localVarCall; + return findIPAddressByIdCall(id, include, exclude, _callback); } @@ -402,7 +394,7 @@ public okhttp3.Call findIPAddressCustomdataCall(UUID id, final ApiCallback _call // create path and map variables String localVarPath = "/ips/{id}/customdata" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -419,7 +411,6 @@ public okhttp3.Call findIPAddressCustomdataCall(UUID id, final ApiCallback _call } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -432,15 +423,12 @@ public okhttp3.Call findIPAddressCustomdataCall(UUID id, final ApiCallback _call @SuppressWarnings("rawtypes") private okhttp3.Call findIPAddressCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPAddressCustomdata(Async)"); } - - okhttp3.Call localVarCall = findIPAddressCustomdataCall(id, _callback); - return localVarCall; + return findIPAddressCustomdataCall(id, _callback); } @@ -538,7 +526,7 @@ public okhttp3.Call findIPAvailabilitiesCall(UUID id, String cidr, final ApiCall // create path and map variables String localVarPath = "/ips/{id}/available" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -559,7 +547,6 @@ public okhttp3.Call findIPAvailabilitiesCall(UUID id, String cidr, final ApiCall } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -572,20 +559,17 @@ public okhttp3.Call findIPAvailabilitiesCall(UUID id, String cidr, final ApiCall @SuppressWarnings("rawtypes") private okhttp3.Call findIPAvailabilitiesValidateBeforeCall(UUID id, String cidr, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPAvailabilities(Async)"); } - + // verify the required parameter 'cidr' is set if (cidr == null) { throw new ApiException("Missing the required parameter 'cidr' when calling findIPAvailabilities(Async)"); } - - okhttp3.Call localVarCall = findIPAvailabilitiesCall(id, cidr, _callback); - return localVarCall; + return findIPAvailabilitiesCall(id, cidr, _callback); } @@ -692,7 +676,7 @@ public okhttp3.Call findIPReservationsCall(UUID id, List types, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -721,7 +705,6 @@ public okhttp3.Call findIPReservationsCall(UUID id, List types, List types, List types, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPReservations(Async)"); } - - okhttp3.Call localVarCall = findIPReservationsCall(id, types, include, exclude, _callback); - return localVarCall; + return findIPReservationsCall(id, types, include, exclude, _callback); } @@ -854,7 +834,7 @@ public okhttp3.Call requestIPReservationCall(UUID id, RequestIPReservationReques // create path and map variables String localVarPath = "/projects/{id}/ips" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -884,20 +864,17 @@ public okhttp3.Call requestIPReservationCall(UUID id, RequestIPReservationReques @SuppressWarnings("rawtypes") private okhttp3.Call requestIPReservationValidateBeforeCall(UUID id, RequestIPReservationRequest requestIPReservationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling requestIPReservation(Async)"); } - + // verify the required parameter 'requestIPReservationRequest' is set if (requestIPReservationRequest == null) { throw new ApiException("Missing the required parameter 'requestIPReservationRequest' when calling requestIPReservation(Async)"); } - - okhttp3.Call localVarCall = requestIPReservationCall(id, requestIPReservationRequest, _callback); - return localVarCall; + return requestIPReservationCall(id, requestIPReservationRequest, _callback); } @@ -1006,7 +983,7 @@ public okhttp3.Call updateIPAddressCall(UUID id, String details, String customda // create path and map variables String localVarPath = "/ips/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1031,7 +1008,6 @@ public okhttp3.Call updateIPAddressCall(UUID id, String details, String customda } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1044,25 +1020,22 @@ public okhttp3.Call updateIPAddressCall(UUID id, String details, String customda @SuppressWarnings("rawtypes") private okhttp3.Call updateIPAddressValidateBeforeCall(UUID id, String details, String customdata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateIPAddress(Async)"); } - + // verify the required parameter 'details' is set if (details == null) { throw new ApiException("Missing the required parameter 'details' when calling updateIPAddress(Async)"); } - + // verify the required parameter 'customdata' is set if (customdata == null) { throw new ApiException("Missing the required parameter 'customdata' when calling updateIPAddress(Async)"); } - - okhttp3.Call localVarCall = updateIPAddressCall(id, details, customdata, _callback); - return localVarCall; + return updateIPAddressCall(id, details, customdata, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java index 3abeb9cee..d1b15de2a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java @@ -113,7 +113,7 @@ public okhttp3.Call createLicenseCall(UUID id, LicenseCreateInput licenseCreateI // create path and map variables String localVarPath = "/projects/{id}/licenses" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -143,20 +143,17 @@ public okhttp3.Call createLicenseCall(UUID id, LicenseCreateInput licenseCreateI @SuppressWarnings("rawtypes") private okhttp3.Call createLicenseValidateBeforeCall(UUID id, LicenseCreateInput licenseCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createLicense(Async)"); } - + // verify the required parameter 'licenseCreateInput' is set if (licenseCreateInput == null) { throw new ApiException("Missing the required parameter 'licenseCreateInput' when calling createLicense(Async)"); } - - okhttp3.Call localVarCall = createLicenseCall(id, licenseCreateInput, _callback); - return localVarCall; + return createLicenseCall(id, licenseCreateInput, _callback); } @@ -263,7 +260,7 @@ public okhttp3.Call deleteLicenseCall(UUID id, final ApiCallback _callback) thro // create path and map variables String localVarPath = "/licenses/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -280,7 +277,6 @@ public okhttp3.Call deleteLicenseCall(UUID id, final ApiCallback _callback) thro } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -293,15 +289,12 @@ public okhttp3.Call deleteLicenseCall(UUID id, final ApiCallback _callback) thro @SuppressWarnings("rawtypes") private okhttp3.Call deleteLicenseValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteLicense(Async)"); } - - okhttp3.Call localVarCall = deleteLicenseCall(id, _callback); - return localVarCall; + return deleteLicenseCall(id, _callback); } @@ -400,7 +393,7 @@ public okhttp3.Call findLicenseByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -425,7 +418,6 @@ public okhttp3.Call findLicenseByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findLicenseById(Async)"); } - - okhttp3.Call localVarCall = findLicenseByIdCall(id, include, exclude, _callback); - return localVarCall; + return findLicenseByIdCall(id, include, exclude, _callback); } @@ -557,7 +546,7 @@ public okhttp3.Call findProjectLicensesCall(UUID id, List include, List< // create path and map variables String localVarPath = "/projects/{id}/licenses" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -590,7 +579,6 @@ public okhttp3.Call findProjectLicensesCall(UUID id, List include, List< } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -603,15 +591,12 @@ public okhttp3.Call findProjectLicensesCall(UUID id, List include, List< @SuppressWarnings("rawtypes") private okhttp3.Call findProjectLicensesValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectLicenses(Async)"); } - - okhttp3.Call localVarCall = findProjectLicensesCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectLicensesCall(id, include, exclude, page, perPage, _callback); } @@ -726,7 +711,7 @@ public okhttp3.Call updateLicenseCall(UUID id, LicenseUpdateInput licenseUpdateI // create path and map variables String localVarPath = "/licenses/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -756,20 +741,17 @@ public okhttp3.Call updateLicenseCall(UUID id, LicenseUpdateInput licenseUpdateI @SuppressWarnings("rawtypes") private okhttp3.Call updateLicenseValidateBeforeCall(UUID id, LicenseUpdateInput licenseUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateLicense(Async)"); } - + // verify the required parameter 'licenseUpdateInput' is set if (licenseUpdateInput == null) { throw new ApiException("Missing the required parameter 'licenseUpdateInput' when calling updateLicense(Async)"); } - - okhttp3.Call localVarCall = updateLicenseCall(id, licenseUpdateInput, _callback); - return localVarCall; + return updateLicenseCall(id, licenseUpdateInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java index 087d51c20..79591544a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java @@ -109,7 +109,7 @@ public okhttp3.Call deleteMembershipCall(UUID id, final ApiCallback _callback) t // create path and map variables String localVarPath = "/memberships/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,7 +126,6 @@ public okhttp3.Call deleteMembershipCall(UUID id, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -139,15 +138,12 @@ public okhttp3.Call deleteMembershipCall(UUID id, final ApiCallback _callback) t @SuppressWarnings("rawtypes") private okhttp3.Call deleteMembershipValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteMembership(Async)"); } - - okhttp3.Call localVarCall = deleteMembershipCall(id, _callback); - return localVarCall; + return deleteMembershipCall(id, _callback); } @@ -246,7 +242,7 @@ public okhttp3.Call findMembershipByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -271,7 +267,6 @@ public okhttp3.Call findMembershipByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findMembershipById(Async)"); } - - okhttp3.Call localVarCall = findMembershipByIdCall(id, include, exclude, _callback); - return localVarCall; + return findMembershipByIdCall(id, include, exclude, _callback); } @@ -401,7 +393,7 @@ public okhttp3.Call updateMembershipCall(UUID id, MembershipInput membershipInpu // create path and map variables String localVarPath = "/memberships/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -431,20 +423,17 @@ public okhttp3.Call updateMembershipCall(UUID id, MembershipInput membershipInpu @SuppressWarnings("rawtypes") private okhttp3.Call updateMembershipValidateBeforeCall(UUID id, MembershipInput membershipInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateMembership(Async)"); } - + // verify the required parameter 'membershipInput' is set if (membershipInput == null) { throw new ApiException("Missing the required parameter 'membershipInput' when calling updateMembership(Async)"); } - - okhttp3.Call localVarCall = updateMembershipCall(id, membershipInput, _callback); - return localVarCall; + return updateMembershipCall(id, membershipInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java index 3f5c592cd..998b01581 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java @@ -113,7 +113,7 @@ public okhttp3.Call createMetalGatewayCall(UUID projectId, CreateMetalGatewayReq // create path and map variables String localVarPath = "/projects/{project_id}/metal-gateways" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -151,20 +151,17 @@ public okhttp3.Call createMetalGatewayCall(UUID projectId, CreateMetalGatewayReq @SuppressWarnings("rawtypes") private okhttp3.Call createMetalGatewayValidateBeforeCall(UUID projectId, CreateMetalGatewayRequest createMetalGatewayRequest, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling createMetalGateway(Async)"); } - + // verify the required parameter 'createMetalGatewayRequest' is set if (createMetalGatewayRequest == null) { throw new ApiException("Missing the required parameter 'createMetalGatewayRequest' when calling createMetalGateway(Async)"); } - - okhttp3.Call localVarCall = createMetalGatewayCall(projectId, createMetalGatewayRequest, page, perPage, _callback); - return localVarCall; + return createMetalGatewayCall(projectId, createMetalGatewayRequest, page, perPage, _callback); } @@ -273,7 +270,7 @@ public okhttp3.Call deleteMetalGatewayCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/metal-gateways/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -290,7 +287,6 @@ public okhttp3.Call deleteMetalGatewayCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -303,15 +299,12 @@ public okhttp3.Call deleteMetalGatewayCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call deleteMetalGatewayValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteMetalGateway(Async)"); } - - okhttp3.Call localVarCall = deleteMetalGatewayCall(id, _callback); - return localVarCall; + return deleteMetalGatewayCall(id, _callback); } @@ -406,7 +399,7 @@ public okhttp3.Call findMetalGatewayByIdCall(UUID id, List include, List // create path and map variables String localVarPath = "/metal-gateways/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -431,7 +424,6 @@ public okhttp3.Call findMetalGatewayByIdCall(UUID id, List include, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -444,15 +436,12 @@ public okhttp3.Call findMetalGatewayByIdCall(UUID id, List include, List @SuppressWarnings("rawtypes") private okhttp3.Call findMetalGatewayByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findMetalGatewayById(Async)"); } - - okhttp3.Call localVarCall = findMetalGatewayByIdCall(id, include, exclude, _callback); - return localVarCall; + return findMetalGatewayByIdCall(id, include, exclude, _callback); } @@ -557,7 +546,7 @@ public okhttp3.Call findMetalGatewaysByProjectCall(UUID projectId, Integer page, // create path and map variables String localVarPath = "/projects/{project_id}/metal-gateways" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -582,7 +571,6 @@ public okhttp3.Call findMetalGatewaysByProjectCall(UUID projectId, Integer page, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -595,15 +583,12 @@ public okhttp3.Call findMetalGatewaysByProjectCall(UUID projectId, Integer page, @SuppressWarnings("rawtypes") private okhttp3.Call findMetalGatewaysByProjectValidateBeforeCall(UUID projectId, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling findMetalGatewaysByProject(Async)"); } - - okhttp3.Call localVarCall = findMetalGatewaysByProjectCall(projectId, page, perPage, _callback); - return localVarCall; + return findMetalGatewaysByProjectCall(projectId, page, perPage, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java index fc8b182e3..5261662a2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java @@ -122,7 +122,6 @@ public okhttp3.Call findMetrosCall(final ApiCallback _callback) throws ApiExcept } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -135,10 +134,7 @@ public okhttp3.Call findMetrosCall(final ApiCallback _callback) throws ApiExcept @SuppressWarnings("rawtypes") private okhttp3.Call findMetrosValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findMetrosCall(_callback); - return localVarCall; + return findMetrosCall(_callback); } @@ -228,7 +224,7 @@ public okhttp3.Call getMetroCall(UUID id, final ApiCallback _callback) throws Ap // create path and map variables String localVarPath = "/locations/metros/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -245,7 +241,6 @@ public okhttp3.Call getMetroCall(UUID id, final ApiCallback _callback) throws Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -258,15 +253,12 @@ public okhttp3.Call getMetroCall(UUID id, final ApiCallback _callback) throws Ap @SuppressWarnings("rawtypes") private okhttp3.Call getMetroValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getMetro(Async)"); } - - okhttp3.Call localVarCall = getMetroCall(id, _callback); - return localVarCall; + return getMetroCall(id, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java index e876af695..a79e809f5 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java @@ -120,7 +120,6 @@ public okhttp3.Call findOperatingSystemVersionCall(final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -133,10 +132,7 @@ public okhttp3.Call findOperatingSystemVersionCall(final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call findOperatingSystemVersionValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findOperatingSystemVersionCall(_callback); - return localVarCall; + return findOperatingSystemVersionCall(_callback); } @@ -241,7 +237,6 @@ public okhttp3.Call findOperatingSystemsCall(final ApiCallback _callback) throws } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -254,10 +249,7 @@ public okhttp3.Call findOperatingSystemsCall(final ApiCallback _callback) throws @SuppressWarnings("rawtypes") private okhttp3.Call findOperatingSystemsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findOperatingSystemsCall(_callback); - return localVarCall; + return findOperatingSystemsCall(_callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java index 622f579c6..593b89094 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java @@ -151,15 +151,12 @@ public okhttp3.Call createOrganizationCall(OrganizationInput organizationInput, @SuppressWarnings("rawtypes") private okhttp3.Call createOrganizationValidateBeforeCall(OrganizationInput organizationInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationInput' is set if (organizationInput == null) { throw new ApiException("Missing the required parameter 'organizationInput' when calling createOrganization(Async)"); } - - okhttp3.Call localVarCall = createOrganizationCall(organizationInput, _callback); - return localVarCall; + return createOrganizationCall(organizationInput, _callback); } @@ -262,7 +259,7 @@ public okhttp3.Call createOrganizationInvitationCall(UUID id, InvitationInput in // create path and map variables String localVarPath = "/organizations/{id}/invitations" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -292,20 +289,17 @@ public okhttp3.Call createOrganizationInvitationCall(UUID id, InvitationInput in @SuppressWarnings("rawtypes") private okhttp3.Call createOrganizationInvitationValidateBeforeCall(UUID id, InvitationInput invitationInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createOrganizationInvitation(Async)"); } - + // verify the required parameter 'invitationInput' is set if (invitationInput == null) { throw new ApiException("Missing the required parameter 'invitationInput' when calling createOrganizationInvitation(Async)"); } - - okhttp3.Call localVarCall = createOrganizationInvitationCall(id, invitationInput, _callback); - return localVarCall; + return createOrganizationInvitationCall(id, invitationInput, _callback); } @@ -412,7 +406,7 @@ public okhttp3.Call createOrganizationProjectCall(UUID id, ProjectCreateInput pr // create path and map variables String localVarPath = "/organizations/{id}/projects" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -442,20 +436,17 @@ public okhttp3.Call createOrganizationProjectCall(UUID id, ProjectCreateInput pr @SuppressWarnings("rawtypes") private okhttp3.Call createOrganizationProjectValidateBeforeCall(UUID id, ProjectCreateInput projectCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createOrganizationProject(Async)"); } - + // verify the required parameter 'projectCreateInput' is set if (projectCreateInput == null) { throw new ApiException("Missing the required parameter 'projectCreateInput' when calling createOrganizationProject(Async)"); } - - okhttp3.Call localVarCall = createOrganizationProjectCall(id, projectCreateInput, _callback); - return localVarCall; + return createOrganizationProjectCall(id, projectCreateInput, _callback); } @@ -557,7 +548,7 @@ public okhttp3.Call createPaymentMethodCall(UUID id, PaymentMethodCreateInput pa // create path and map variables String localVarPath = "/organizations/{id}/payment-methods" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -587,20 +578,17 @@ public okhttp3.Call createPaymentMethodCall(UUID id, PaymentMethodCreateInput pa @SuppressWarnings("rawtypes") private okhttp3.Call createPaymentMethodValidateBeforeCall(UUID id, PaymentMethodCreateInput paymentMethodCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createPaymentMethod(Async)"); } - + // verify the required parameter 'paymentMethodCreateInput' is set if (paymentMethodCreateInput == null) { throw new ApiException("Missing the required parameter 'paymentMethodCreateInput' when calling createPaymentMethod(Async)"); } - - okhttp3.Call localVarCall = createPaymentMethodCall(id, paymentMethodCreateInput, _callback); - return localVarCall; + return createPaymentMethodCall(id, paymentMethodCreateInput, _callback); } @@ -703,7 +691,7 @@ public okhttp3.Call deleteOrganizationCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/organizations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -720,7 +708,6 @@ public okhttp3.Call deleteOrganizationCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -733,15 +720,12 @@ public okhttp3.Call deleteOrganizationCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call deleteOrganizationValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteOrganization(Async)"); } - - okhttp3.Call localVarCall = deleteOrganizationCall(id, _callback); - return localVarCall; + return deleteOrganizationCall(id, _callback); } @@ -837,7 +821,7 @@ public okhttp3.Call findOperatingSystemsByOrganizationCall(UUID id, List // create path and map variables String localVarPath = "/organizations/{id}/operating-systems" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -862,7 +846,6 @@ public okhttp3.Call findOperatingSystemsByOrganizationCall(UUID id, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -875,15 +858,12 @@ public okhttp3.Call findOperatingSystemsByOrganizationCall(UUID id, List @SuppressWarnings("rawtypes") private okhttp3.Call findOperatingSystemsByOrganizationValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOperatingSystemsByOrganization(Async)"); } - - okhttp3.Call localVarCall = findOperatingSystemsByOrganizationCall(id, include, exclude, _callback); - return localVarCall; + return findOperatingSystemsByOrganizationCall(id, include, exclude, _callback); } @@ -992,7 +972,7 @@ public okhttp3.Call findOrganizationByIdCall(UUID id, List include, List // create path and map variables String localVarPath = "/organizations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1017,7 +997,6 @@ public okhttp3.Call findOrganizationByIdCall(UUID id, List include, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1030,15 +1009,12 @@ public okhttp3.Call findOrganizationByIdCall(UUID id, List include, List @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationById(Async)"); } - - okhttp3.Call localVarCall = findOrganizationByIdCall(id, include, exclude, _callback); - return localVarCall; + return findOrganizationByIdCall(id, include, exclude, _callback); } @@ -1145,7 +1121,7 @@ public okhttp3.Call findOrganizationCustomdataCall(UUID id, final ApiCallback _c // create path and map variables String localVarPath = "/organizations/{id}/customdata" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1162,7 +1138,6 @@ public okhttp3.Call findOrganizationCustomdataCall(UUID id, final ApiCallback _c } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1175,15 +1150,12 @@ public okhttp3.Call findOrganizationCustomdataCall(UUID id, final ApiCallback _c @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationCustomdata(Async)"); } - - okhttp3.Call localVarCall = findOrganizationCustomdataCall(id, _callback); - return localVarCall; + return findOrganizationCustomdataCall(id, _callback); } @@ -1284,7 +1256,7 @@ public okhttp3.Call findOrganizationInvitationsCall(UUID id, List includ // create path and map variables String localVarPath = "/organizations/{id}/invitations" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1317,7 +1289,6 @@ public okhttp3.Call findOrganizationInvitationsCall(UUID id, List includ } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1330,15 +1301,12 @@ public okhttp3.Call findOrganizationInvitationsCall(UUID id, List includ @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationInvitationsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationInvitations(Async)"); } - - okhttp3.Call localVarCall = findOrganizationInvitationsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findOrganizationInvitationsCall(id, include, exclude, page, perPage, _callback); } @@ -1454,7 +1422,7 @@ public okhttp3.Call findOrganizationPaymentMethodsCall(UUID id, List inc // create path and map variables String localVarPath = "/organizations/{id}/payment-methods" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1487,7 +1455,6 @@ public okhttp3.Call findOrganizationPaymentMethodsCall(UUID id, List inc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1500,15 +1467,12 @@ public okhttp3.Call findOrganizationPaymentMethodsCall(UUID id, List inc @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationPaymentMethodsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationPaymentMethods(Async)"); } - - okhttp3.Call localVarCall = findOrganizationPaymentMethodsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findOrganizationPaymentMethodsCall(id, include, exclude, page, perPage, _callback); } @@ -1620,7 +1584,7 @@ public okhttp3.Call findOrganizationProjectsCall(UUID id, List include, // create path and map variables String localVarPath = "/organizations/{id}/projects" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1653,7 +1617,6 @@ public okhttp3.Call findOrganizationProjectsCall(UUID id, List include, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1666,15 +1629,12 @@ public okhttp3.Call findOrganizationProjectsCall(UUID id, List include, @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationProjectsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationProjects(Async)"); } - - okhttp3.Call localVarCall = findOrganizationProjectsCall(id, include, exclude, page, perPage, _callback); - return localVarCall; + return findOrganizationProjectsCall(id, include, exclude, page, perPage, _callback); } @@ -1782,7 +1742,7 @@ public okhttp3.Call findOrganizationTransfersCall(UUID id, List include, // create path and map variables String localVarPath = "/organizations/{id}/transfers" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1807,7 +1767,6 @@ public okhttp3.Call findOrganizationTransfersCall(UUID id, List include, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1820,15 +1779,12 @@ public okhttp3.Call findOrganizationTransfersCall(UUID id, List include, @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationTransfersValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findOrganizationTransfers(Async)"); } - - okhttp3.Call localVarCall = findOrganizationTransfersCall(id, include, exclude, _callback); - return localVarCall; + return findOrganizationTransfersCall(id, include, exclude, _callback); } @@ -1975,7 +1931,6 @@ public okhttp3.Call findOrganizationsCall(String personal, String withoutProject } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1988,10 +1943,7 @@ public okhttp3.Call findOrganizationsCall(String personal, String withoutProject @SuppressWarnings("rawtypes") private okhttp3.Call findOrganizationsValidateBeforeCall(String personal, String withoutProjects, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findOrganizationsCall(personal, withoutProjects, include, exclude, page, perPage, _callback); - return localVarCall; + return findOrganizationsCall(personal, withoutProjects, include, exclude, page, perPage, _callback); } @@ -2103,7 +2055,7 @@ public okhttp3.Call findPlansByOrganizationCall(UUID id, List include, L // create path and map variables String localVarPath = "/organizations/{id}/plans" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2128,7 +2080,6 @@ public okhttp3.Call findPlansByOrganizationCall(UUID id, List include, L } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2141,15 +2092,12 @@ public okhttp3.Call findPlansByOrganizationCall(UUID id, List include, L @SuppressWarnings("rawtypes") private okhttp3.Call findPlansByOrganizationValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPlansByOrganization(Async)"); } - - okhttp3.Call localVarCall = findPlansByOrganizationCall(id, include, exclude, _callback); - return localVarCall; + return findPlansByOrganizationCall(id, include, exclude, _callback); } @@ -2258,7 +2206,7 @@ public okhttp3.Call updateOrganizationCall(UUID id, OrganizationInput organizati // create path and map variables String localVarPath = "/organizations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2288,20 +2236,17 @@ public okhttp3.Call updateOrganizationCall(UUID id, OrganizationInput organizati @SuppressWarnings("rawtypes") private okhttp3.Call updateOrganizationValidateBeforeCall(UUID id, OrganizationInput organizationInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateOrganization(Async)"); } - + // verify the required parameter 'organizationInput' is set if (organizationInput == null) { throw new ApiException("Missing the required parameter 'organizationInput' when calling updateOrganization(Async)"); } - - okhttp3.Call localVarCall = updateOrganizationCall(id, organizationInput, _callback); - return localVarCall; + return updateOrganizationCall(id, organizationInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java index 3781647bb..a749c8d35 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java @@ -106,7 +106,7 @@ public okhttp3.Call findEnsureOtpCall(String otp, final ApiCallback _callback) t // create path and map variables String localVarPath = "/user/otp/verify/{otp}" - .replaceAll("\\{" + "otp" + "\\}", localVarApiClient.escapeString(otp.toString())); + .replace("{" + "otp" + "}", localVarApiClient.escapeString(otp.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -123,7 +123,6 @@ public okhttp3.Call findEnsureOtpCall(String otp, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -136,15 +135,12 @@ public okhttp3.Call findEnsureOtpCall(String otp, final ApiCallback _callback) t @SuppressWarnings("rawtypes") private okhttp3.Call findEnsureOtpValidateBeforeCall(String otp, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'otp' is set if (otp == null) { throw new ApiException("Missing the required parameter 'otp' when calling findEnsureOtp(Async)"); } - - okhttp3.Call localVarCall = findEnsureOtpCall(otp, _callback); - return localVarCall; + return findEnsureOtpCall(otp, _callback); } @@ -253,7 +249,6 @@ public okhttp3.Call findRecoveryCodesCall(final ApiCallback _callback) throws Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -266,10 +261,7 @@ public okhttp3.Call findRecoveryCodesCall(final ApiCallback _callback) throws Ap @SuppressWarnings("rawtypes") private okhttp3.Call findRecoveryCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findRecoveryCodesCall(_callback); - return localVarCall; + return findRecoveryCodesCall(_callback); } @@ -383,7 +375,6 @@ public okhttp3.Call receiveCodesCall(final ApiCallback _callback) throws ApiExce } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -396,10 +387,7 @@ public okhttp3.Call receiveCodesCall(final ApiCallback _callback) throws ApiExce @SuppressWarnings("rawtypes") private okhttp3.Call receiveCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = receiveCodesCall(_callback); - return localVarCall; + return receiveCodesCall(_callback); } @@ -511,7 +499,6 @@ public okhttp3.Call regenerateCodesCall(final ApiCallback _callback) throws ApiE } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -524,10 +511,7 @@ public okhttp3.Call regenerateCodesCall(final ApiCallback _callback) throws ApiE @SuppressWarnings("rawtypes") private okhttp3.Call regenerateCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = regenerateCodesCall(_callback); - return localVarCall; + return regenerateCodesCall(_callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java index 3bb5bb7d2..5471f6477 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java @@ -126,7 +126,6 @@ public okhttp3.Call createPasswordResetTokenCall(String email, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -139,15 +138,12 @@ public okhttp3.Call createPasswordResetTokenCall(String email, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call createPasswordResetTokenValidateBeforeCall(String email, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'email' is set if (email == null) { throw new ApiException("Missing the required parameter 'email' when calling createPasswordResetToken(Async)"); } - - okhttp3.Call localVarCall = createPasswordResetTokenCall(email, _callback); - return localVarCall; + return createPasswordResetTokenCall(email, _callback); } @@ -255,7 +251,6 @@ public okhttp3.Call resetPasswordCall(final ApiCallback _callback) throws ApiExc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -268,10 +263,7 @@ public okhttp3.Call resetPasswordCall(final ApiCallback _callback) throws ApiExc @SuppressWarnings("rawtypes") private okhttp3.Call resetPasswordValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = resetPasswordCall(_callback); - return localVarCall; + return resetPasswordCall(_callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java index 402dbfe17..1a3347e9f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java @@ -108,7 +108,7 @@ public okhttp3.Call deletePaymentMethodCall(UUID id, final ApiCallback _callback // create path and map variables String localVarPath = "/payment-methods/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -125,7 +125,6 @@ public okhttp3.Call deletePaymentMethodCall(UUID id, final ApiCallback _callback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -138,15 +137,12 @@ public okhttp3.Call deletePaymentMethodCall(UUID id, final ApiCallback _callback @SuppressWarnings("rawtypes") private okhttp3.Call deletePaymentMethodValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deletePaymentMethod(Async)"); } - - okhttp3.Call localVarCall = deletePaymentMethodCall(id, _callback); - return localVarCall; + return deletePaymentMethodCall(id, _callback); } @@ -241,7 +237,7 @@ public okhttp3.Call findPaymentMethodByIdCall(UUID id, List include, Lis // create path and map variables String localVarPath = "/payment-methods/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -266,7 +262,6 @@ public okhttp3.Call findPaymentMethodByIdCall(UUID id, List include, Lis } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -279,15 +274,12 @@ public okhttp3.Call findPaymentMethodByIdCall(UUID id, List include, Lis @SuppressWarnings("rawtypes") private okhttp3.Call findPaymentMethodByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPaymentMethodById(Async)"); } - - okhttp3.Call localVarCall = findPaymentMethodByIdCall(id, include, exclude, _callback); - return localVarCall; + return findPaymentMethodByIdCall(id, include, exclude, _callback); } @@ -392,7 +384,7 @@ public okhttp3.Call updatePaymentMethodCall(UUID id, PaymentMethodUpdateInput pa // create path and map variables String localVarPath = "/payment-methods/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -422,20 +414,17 @@ public okhttp3.Call updatePaymentMethodCall(UUID id, PaymentMethodUpdateInput pa @SuppressWarnings("rawtypes") private okhttp3.Call updatePaymentMethodValidateBeforeCall(UUID id, PaymentMethodUpdateInput paymentMethodUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updatePaymentMethod(Async)"); } - + // verify the required parameter 'paymentMethodUpdateInput' is set if (paymentMethodUpdateInput == null) { throw new ApiException("Missing the required parameter 'paymentMethodUpdateInput' when calling updatePaymentMethod(Async)"); } - - okhttp3.Call localVarCall = updatePaymentMethodCall(id, paymentMethodUpdateInput, _callback); - return localVarCall; + return updatePaymentMethodCall(id, paymentMethodUpdateInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java index 180a100cc..b01130a5b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java @@ -131,7 +131,6 @@ public okhttp3.Call findPlansCall(List include, List exclude, fi } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -144,10 +143,7 @@ public okhttp3.Call findPlansCall(List include, List exclude, fi @SuppressWarnings("rawtypes") private okhttp3.Call findPlansValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findPlansCall(include, exclude, _callback); - return localVarCall; + return findPlansCall(include, exclude, _callback); } @@ -247,7 +243,7 @@ public okhttp3.Call findPlansByProjectCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -272,7 +268,6 @@ public okhttp3.Call findPlansByProjectCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPlansByProject(Async)"); } - - okhttp3.Call localVarCall = findPlansByProjectCall(id, include, exclude, _callback); - return localVarCall; + return findPlansByProjectCall(id, include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java index c440a5729..4838b6c27 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java @@ -116,7 +116,7 @@ public okhttp3.Call assignNativeVlanCall(UUID id, String vnid, final ApiCallback // create path and map variables String localVarPath = "/ports/{id}/native-vlan" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -137,7 +137,6 @@ public okhttp3.Call assignNativeVlanCall(UUID id, String vnid, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -150,20 +149,17 @@ public okhttp3.Call assignNativeVlanCall(UUID id, String vnid, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call assignNativeVlanValidateBeforeCall(UUID id, String vnid, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling assignNativeVlan(Async)"); } - + // verify the required parameter 'vnid' is set if (vnid == null) { throw new ApiException("Missing the required parameter 'vnid' when calling assignNativeVlan(Async)"); } - - okhttp3.Call localVarCall = assignNativeVlanCall(id, vnid, _callback); - return localVarCall; + return assignNativeVlanCall(id, vnid, _callback); } @@ -269,7 +265,7 @@ public okhttp3.Call assignPortCall(UUID id, PortAssignInput portAssignInput, fin // create path and map variables String localVarPath = "/ports/{id}/assign" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -299,20 +295,17 @@ public okhttp3.Call assignPortCall(UUID id, PortAssignInput portAssignInput, fin @SuppressWarnings("rawtypes") private okhttp3.Call assignPortValidateBeforeCall(UUID id, PortAssignInput portAssignInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling assignPort(Async)"); } - + // verify the required parameter 'portAssignInput' is set if (portAssignInput == null) { throw new ApiException("Missing the required parameter 'portAssignInput' when calling assignPort(Async)"); } - - okhttp3.Call localVarCall = assignPortCall(id, portAssignInput, _callback); - return localVarCall; + return assignPortCall(id, portAssignInput, _callback); } @@ -421,7 +414,7 @@ public okhttp3.Call bondPortCall(UUID id, Boolean bulkEnable, final ApiCallback // create path and map variables String localVarPath = "/ports/{id}/bond" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -442,7 +435,6 @@ public okhttp3.Call bondPortCall(UUID id, Boolean bulkEnable, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -455,15 +447,12 @@ public okhttp3.Call bondPortCall(UUID id, Boolean bulkEnable, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call bondPortValidateBeforeCall(UUID id, Boolean bulkEnable, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling bondPort(Async)"); } - - okhttp3.Call localVarCall = bondPortCall(id, bulkEnable, _callback); - return localVarCall; + return bondPortCall(id, bulkEnable, _callback); } @@ -572,7 +561,7 @@ public okhttp3.Call convertLayer2Call(UUID id, PortAssignInput portAssignInput, // create path and map variables String localVarPath = "/ports/{id}/convert/layer-2" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -602,15 +591,12 @@ public okhttp3.Call convertLayer2Call(UUID id, PortAssignInput portAssignInput, @SuppressWarnings("rawtypes") private okhttp3.Call convertLayer2ValidateBeforeCall(UUID id, PortAssignInput portAssignInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling convertLayer2(Async)"); } - - okhttp3.Call localVarCall = convertLayer2Call(id, portAssignInput, _callback); - return localVarCall; + return convertLayer2Call(id, portAssignInput, _callback); } @@ -719,7 +705,7 @@ public okhttp3.Call convertLayer3Call(UUID id, PortConvertLayer3Input portConver // create path and map variables String localVarPath = "/ports/{id}/convert/layer-3" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -749,15 +735,12 @@ public okhttp3.Call convertLayer3Call(UUID id, PortConvertLayer3Input portConver @SuppressWarnings("rawtypes") private okhttp3.Call convertLayer3ValidateBeforeCall(UUID id, PortConvertLayer3Input portConvertLayer3Input, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling convertLayer3(Async)"); } - - okhttp3.Call localVarCall = convertLayer3Call(id, portConvertLayer3Input, _callback); - return localVarCall; + return convertLayer3Call(id, portConvertLayer3Input, _callback); } @@ -866,7 +849,7 @@ public okhttp3.Call createPortVlanAssignmentBatchCall(UUID id, PortVlanAssignmen // create path and map variables String localVarPath = "/ports/{id}/vlan-assignments/batches" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -896,20 +879,17 @@ public okhttp3.Call createPortVlanAssignmentBatchCall(UUID id, PortVlanAssignmen @SuppressWarnings("rawtypes") private okhttp3.Call createPortVlanAssignmentBatchValidateBeforeCall(UUID id, PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createPortVlanAssignmentBatch(Async)"); } - + // verify the required parameter 'portVlanAssignmentBatchCreateInput' is set if (portVlanAssignmentBatchCreateInput == null) { throw new ApiException("Missing the required parameter 'portVlanAssignmentBatchCreateInput' when calling createPortVlanAssignmentBatch(Async)"); } - - okhttp3.Call localVarCall = createPortVlanAssignmentBatchCall(id, portVlanAssignmentBatchCreateInput, _callback); - return localVarCall; + return createPortVlanAssignmentBatchCall(id, portVlanAssignmentBatchCreateInput, _callback); } @@ -1016,7 +996,7 @@ public okhttp3.Call deleteNativeVlanCall(UUID id, final ApiCallback _callback) t // create path and map variables String localVarPath = "/ports/{id}/native-vlan" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1033,7 +1013,6 @@ public okhttp3.Call deleteNativeVlanCall(UUID id, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1046,15 +1025,12 @@ public okhttp3.Call deleteNativeVlanCall(UUID id, final ApiCallback _callback) t @SuppressWarnings("rawtypes") private okhttp3.Call deleteNativeVlanValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteNativeVlan(Async)"); } - - okhttp3.Call localVarCall = deleteNativeVlanCall(id, _callback); - return localVarCall; + return deleteNativeVlanCall(id, _callback); } @@ -1157,7 +1133,7 @@ public okhttp3.Call disbondPortCall(UUID id, Boolean bulkDisable, final ApiCallb // create path and map variables String localVarPath = "/ports/{id}/disbond" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1178,7 +1154,6 @@ public okhttp3.Call disbondPortCall(UUID id, Boolean bulkDisable, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1191,15 +1166,12 @@ public okhttp3.Call disbondPortCall(UUID id, Boolean bulkDisable, final ApiCallb @SuppressWarnings("rawtypes") private okhttp3.Call disbondPortValidateBeforeCall(UUID id, Boolean bulkDisable, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling disbondPort(Async)"); } - - okhttp3.Call localVarCall = disbondPortCall(id, bulkDisable, _callback); - return localVarCall; + return disbondPortCall(id, bulkDisable, _callback); } @@ -1307,7 +1279,7 @@ public okhttp3.Call findPortByIdCall(UUID id, List include, List // create path and map variables String localVarPath = "/ports/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1332,7 +1304,6 @@ public okhttp3.Call findPortByIdCall(UUID id, List include, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1345,15 +1316,12 @@ public okhttp3.Call findPortByIdCall(UUID id, List include, List @SuppressWarnings("rawtypes") private okhttp3.Call findPortByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPortById(Async)"); } - - okhttp3.Call localVarCall = findPortByIdCall(id, include, exclude, _callback); - return localVarCall; + return findPortByIdCall(id, include, exclude, _callback); } @@ -1458,8 +1426,8 @@ public okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdCall(UUID id, U // create path and map variables String localVarPath = "/ports/{id}/vlan-assignments/batches/{batch_id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())) - .replaceAll("\\{" + "batch_id" + "\\}", localVarApiClient.escapeString(batchId.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) + .replace("{" + "batch_id" + "}", localVarApiClient.escapeString(batchId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1476,7 +1444,6 @@ public okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdCall(UUID id, U } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1489,20 +1456,17 @@ public okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdCall(UUID id, U @SuppressWarnings("rawtypes") private okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdValidateBeforeCall(UUID id, UUID batchId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignmentBatchByPortIdAndBatchId(Async)"); } - + // verify the required parameter 'batchId' is set if (batchId == null) { throw new ApiException("Missing the required parameter 'batchId' when calling findPortVlanAssignmentBatchByPortIdAndBatchId(Async)"); } - - okhttp3.Call localVarCall = findPortVlanAssignmentBatchByPortIdAndBatchIdCall(id, batchId, _callback); - return localVarCall; + return findPortVlanAssignmentBatchByPortIdAndBatchIdCall(id, batchId, _callback); } @@ -1606,7 +1570,7 @@ public okhttp3.Call findPortVlanAssignmentBatchesCall(UUID id, final ApiCallback // create path and map variables String localVarPath = "/ports/{id}/vlan-assignments/batches" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1623,7 +1587,6 @@ public okhttp3.Call findPortVlanAssignmentBatchesCall(UUID id, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1636,15 +1599,12 @@ public okhttp3.Call findPortVlanAssignmentBatchesCall(UUID id, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call findPortVlanAssignmentBatchesValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignmentBatches(Async)"); } - - okhttp3.Call localVarCall = findPortVlanAssignmentBatchesCall(id, _callback); - return localVarCall; + return findPortVlanAssignmentBatchesCall(id, _callback); } @@ -1748,8 +1708,8 @@ public okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdCall(UUID id, U // create path and map variables String localVarPath = "/ports/{id}/vlan-assignments/{assignment_id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())) - .replaceAll("\\{" + "assignment_id" + "\\}", localVarApiClient.escapeString(assignmentId.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) + .replace("{" + "assignment_id" + "}", localVarApiClient.escapeString(assignmentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1774,7 +1734,6 @@ public okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdCall(UUID id, U } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1787,20 +1746,17 @@ public okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdCall(UUID id, U @SuppressWarnings("rawtypes") private okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdValidateBeforeCall(UUID id, UUID assignmentId, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignmentByPortIdAndAssignmentId(Async)"); } - + // verify the required parameter 'assignmentId' is set if (assignmentId == null) { throw new ApiException("Missing the required parameter 'assignmentId' when calling findPortVlanAssignmentByPortIdAndAssignmentId(Async)"); } - - okhttp3.Call localVarCall = findPortVlanAssignmentByPortIdAndAssignmentIdCall(id, assignmentId, include, exclude, _callback); - return localVarCall; + return findPortVlanAssignmentByPortIdAndAssignmentIdCall(id, assignmentId, include, exclude, _callback); } @@ -1912,7 +1868,7 @@ public okhttp3.Call findPortVlanAssignmentsCall(UUID id, List include, L // create path and map variables String localVarPath = "/ports/{id}/vlan-assignments" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1937,7 +1893,6 @@ public okhttp3.Call findPortVlanAssignmentsCall(UUID id, List include, L } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1950,15 +1905,12 @@ public okhttp3.Call findPortVlanAssignmentsCall(UUID id, List include, L @SuppressWarnings("rawtypes") private okhttp3.Call findPortVlanAssignmentsValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignments(Async)"); } - - okhttp3.Call localVarCall = findPortVlanAssignmentsCall(id, include, exclude, _callback); - return localVarCall; + return findPortVlanAssignmentsCall(id, include, exclude, _callback); } @@ -2067,7 +2019,7 @@ public okhttp3.Call unassignPortCall(UUID id, PortAssignInput portAssignInput, f // create path and map variables String localVarPath = "/ports/{id}/unassign" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2097,20 +2049,17 @@ public okhttp3.Call unassignPortCall(UUID id, PortAssignInput portAssignInput, f @SuppressWarnings("rawtypes") private okhttp3.Call unassignPortValidateBeforeCall(UUID id, PortAssignInput portAssignInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling unassignPort(Async)"); } - + // verify the required parameter 'portAssignInput' is set if (portAssignInput == null) { throw new ApiException("Missing the required parameter 'portAssignInput' when calling unassignPort(Async)"); } - - okhttp3.Call localVarCall = unassignPortCall(id, portAssignInput, _callback); - return localVarCall; + return unassignPortCall(id, portAssignInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java index cf35c1a96..515019173 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java @@ -145,15 +145,12 @@ public okhttp3.Call createProjectCall(ProjectCreateFromRootInput projectCreateFr @SuppressWarnings("rawtypes") private okhttp3.Call createProjectValidateBeforeCall(ProjectCreateFromRootInput projectCreateFromRootInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectCreateFromRootInput' is set if (projectCreateFromRootInput == null) { throw new ApiException("Missing the required parameter 'projectCreateFromRootInput' when calling createProject(Async)"); } - - okhttp3.Call localVarCall = createProjectCall(projectCreateFromRootInput, _callback); - return localVarCall; + return createProjectCall(projectCreateFromRootInput, _callback); } @@ -253,7 +250,7 @@ public okhttp3.Call createProjectInvitationCall(UUID projectId, InvitationInput // create path and map variables String localVarPath = "/projects/{project_id}/invitations" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -283,20 +280,17 @@ public okhttp3.Call createProjectInvitationCall(UUID projectId, InvitationInput @SuppressWarnings("rawtypes") private okhttp3.Call createProjectInvitationValidateBeforeCall(UUID projectId, InvitationInput invitationInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling createProjectInvitation(Async)"); } - + // verify the required parameter 'invitationInput' is set if (invitationInput == null) { throw new ApiException("Missing the required parameter 'invitationInput' when calling createProjectInvitation(Async)"); } - - okhttp3.Call localVarCall = createProjectInvitationCall(projectId, invitationInput, _callback); - return localVarCall; + return createProjectInvitationCall(projectId, invitationInput, _callback); } @@ -405,7 +399,7 @@ public okhttp3.Call createTransferRequestCall(UUID id, TransferRequestInput tran // create path and map variables String localVarPath = "/projects/{id}/transfers" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -435,20 +429,17 @@ public okhttp3.Call createTransferRequestCall(UUID id, TransferRequestInput tran @SuppressWarnings("rawtypes") private okhttp3.Call createTransferRequestValidateBeforeCall(UUID id, TransferRequestInput transferRequestInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createTransferRequest(Async)"); } - + // verify the required parameter 'transferRequestInput' is set if (transferRequestInput == null) { throw new ApiException("Missing the required parameter 'transferRequestInput' when calling createTransferRequest(Async)"); } - - okhttp3.Call localVarCall = createTransferRequestCall(id, transferRequestInput, _callback); - return localVarCall; + return createTransferRequestCall(id, transferRequestInput, _callback); } @@ -555,7 +546,7 @@ public okhttp3.Call deleteProjectCall(UUID id, final ApiCallback _callback) thro // create path and map variables String localVarPath = "/projects/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -572,7 +563,6 @@ public okhttp3.Call deleteProjectCall(UUID id, final ApiCallback _callback) thro } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -585,15 +575,12 @@ public okhttp3.Call deleteProjectCall(UUID id, final ApiCallback _callback) thro @SuppressWarnings("rawtypes") private okhttp3.Call deleteProjectValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteProject(Async)"); } - - okhttp3.Call localVarCall = deleteProjectCall(id, _callback); - return localVarCall; + return deleteProjectCall(id, _callback); } @@ -691,8 +678,8 @@ public okhttp3.Call findIPReservationCustomdataCall(UUID projectId, UUID id, fin // create path and map variables String localVarPath = "/projects/{project_id}/ips/{id}/customdata" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -709,7 +696,6 @@ public okhttp3.Call findIPReservationCustomdataCall(UUID projectId, UUID id, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -722,20 +708,17 @@ public okhttp3.Call findIPReservationCustomdataCall(UUID projectId, UUID id, fin @SuppressWarnings("rawtypes") private okhttp3.Call findIPReservationCustomdataValidateBeforeCall(UUID projectId, UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling findIPReservationCustomdata(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findIPReservationCustomdata(Async)"); } - - okhttp3.Call localVarCall = findIPReservationCustomdataCall(projectId, id, _callback); - return localVarCall; + return findIPReservationCustomdataCall(projectId, id, _callback); } @@ -837,7 +820,7 @@ public okhttp3.Call findProjectByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -862,7 +845,6 @@ public okhttp3.Call findProjectByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectById(Async)"); } - - okhttp3.Call localVarCall = findProjectByIdCall(id, include, exclude, _callback); - return localVarCall; + return findProjectByIdCall(id, include, exclude, _callback); } @@ -990,7 +969,7 @@ public okhttp3.Call findProjectCustomdataCall(UUID id, final ApiCallback _callba // create path and map variables String localVarPath = "/projects/{id}/customdata" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1007,7 +986,6 @@ public okhttp3.Call findProjectCustomdataCall(UUID id, final ApiCallback _callba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1020,15 +998,12 @@ public okhttp3.Call findProjectCustomdataCall(UUID id, final ApiCallback _callba @SuppressWarnings("rawtypes") private okhttp3.Call findProjectCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectCustomdata(Async)"); } - - okhttp3.Call localVarCall = findProjectCustomdataCall(id, _callback); - return localVarCall; + return findProjectCustomdataCall(id, _callback); } @@ -1129,7 +1104,7 @@ public okhttp3.Call findProjectInvitationsCall(UUID projectId, List incl // create path and map variables String localVarPath = "/projects/{project_id}/invitations" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1162,7 +1137,6 @@ public okhttp3.Call findProjectInvitationsCall(UUID projectId, List incl } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1175,15 +1149,12 @@ public okhttp3.Call findProjectInvitationsCall(UUID projectId, List incl @SuppressWarnings("rawtypes") private okhttp3.Call findProjectInvitationsValidateBeforeCall(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling findProjectInvitations(Async)"); } - - okhttp3.Call localVarCall = findProjectInvitationsCall(projectId, include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectInvitationsCall(projectId, include, exclude, page, perPage, _callback); } @@ -1300,7 +1271,7 @@ public okhttp3.Call findProjectMembershipsCall(UUID projectId, List incl // create path and map variables String localVarPath = "/projects/{project_id}/memberships" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1333,7 +1304,6 @@ public okhttp3.Call findProjectMembershipsCall(UUID projectId, List incl } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1346,15 +1316,12 @@ public okhttp3.Call findProjectMembershipsCall(UUID projectId, List incl @SuppressWarnings("rawtypes") private okhttp3.Call findProjectMembershipsValidateBeforeCall(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling findProjectMemberships(Async)"); } - - okhttp3.Call localVarCall = findProjectMembershipsCall(projectId, include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectMembershipsCall(projectId, include, exclude, page, perPage, _callback); } @@ -1500,7 +1467,6 @@ public okhttp3.Call findProjectsCall(List include, List exclude, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1513,10 +1479,7 @@ public okhttp3.Call findProjectsCall(List include, List exclude, @SuppressWarnings("rawtypes") private okhttp3.Call findProjectsValidateBeforeCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findProjectsCall(include, exclude, page, perPage, _callback); - return localVarCall; + return findProjectsCall(include, exclude, page, perPage, _callback); } @@ -1622,7 +1585,7 @@ public okhttp3.Call updateProjectCall(UUID id, ProjectUpdateInput projectUpdateI // create path and map variables String localVarPath = "/projects/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1652,20 +1615,17 @@ public okhttp3.Call updateProjectCall(UUID id, ProjectUpdateInput projectUpdateI @SuppressWarnings("rawtypes") private okhttp3.Call updateProjectValidateBeforeCall(UUID id, ProjectUpdateInput projectUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateProject(Async)"); } - + // verify the required parameter 'projectUpdateInput' is set if (projectUpdateInput == null) { throw new ApiException("Missing the required parameter 'projectUpdateInput' when calling updateProject(Async)"); } - - okhttp3.Call localVarCall = updateProjectCall(id, projectUpdateInput, _callback); - return localVarCall; + return updateProjectCall(id, projectUpdateInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java index 52b51c29e..8ab177fb1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java @@ -110,7 +110,7 @@ public okhttp3.Call createSelfServiceReservationCall(UUID projectId, CreateSelfS // create path and map variables String localVarPath = "/projects/{project_id}/self-service/reservations" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -140,20 +140,17 @@ public okhttp3.Call createSelfServiceReservationCall(UUID projectId, CreateSelfS @SuppressWarnings("rawtypes") private okhttp3.Call createSelfServiceReservationValidateBeforeCall(UUID projectId, CreateSelfServiceReservationRequest createSelfServiceReservationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling createSelfServiceReservation(Async)"); } - + // verify the required parameter 'createSelfServiceReservationRequest' is set if (createSelfServiceReservationRequest == null) { throw new ApiException("Missing the required parameter 'createSelfServiceReservationRequest' when calling createSelfServiceReservation(Async)"); } - - okhttp3.Call localVarCall = createSelfServiceReservationCall(projectId, createSelfServiceReservationRequest, _callback); - return localVarCall; + return createSelfServiceReservationCall(projectId, createSelfServiceReservationRequest, _callback); } @@ -254,8 +251,8 @@ public okhttp3.Call findSelfServiceReservationCall(UUID id, UUID projectId, fina // create path and map variables String localVarPath = "/projects/{project_id}/self-service/reservations/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())) - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -272,7 +269,6 @@ public okhttp3.Call findSelfServiceReservationCall(UUID id, UUID projectId, fina } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -285,20 +281,17 @@ public okhttp3.Call findSelfServiceReservationCall(UUID id, UUID projectId, fina @SuppressWarnings("rawtypes") private okhttp3.Call findSelfServiceReservationValidateBeforeCall(UUID id, UUID projectId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findSelfServiceReservation(Async)"); } - + // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling findSelfServiceReservation(Async)"); } - - okhttp3.Call localVarCall = findSelfServiceReservationCall(id, projectId, _callback); - return localVarCall; + return findSelfServiceReservationCall(id, projectId, _callback); } @@ -399,7 +392,7 @@ public okhttp3.Call findSelfServiceReservationsCall(UUID projectId, Integer page // create path and map variables String localVarPath = "/projects/{project_id}/self-service/reservations" - .replaceAll("\\{" + "project_id" + "\\}", localVarApiClient.escapeString(projectId.toString())); + .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -424,7 +417,6 @@ public okhttp3.Call findSelfServiceReservationsCall(UUID projectId, Integer page } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -437,15 +429,12 @@ public okhttp3.Call findSelfServiceReservationsCall(UUID projectId, Integer page @SuppressWarnings("rawtypes") private okhttp3.Call findSelfServiceReservationsValidateBeforeCall(UUID projectId, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling findSelfServiceReservations(Async)"); } - - okhttp3.Call localVarCall = findSelfServiceReservationsCall(projectId, page, perPage, _callback); - return localVarCall; + return findSelfServiceReservationsCall(projectId, page, perPage, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java index 2c077a1c3..87d09160f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java @@ -114,7 +114,7 @@ public okhttp3.Call createSpotMarketRequestCall(UUID id, SpotMarketRequestCreate // create path and map variables String localVarPath = "/projects/{id}/spot-market-requests" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -144,20 +144,17 @@ public okhttp3.Call createSpotMarketRequestCall(UUID id, SpotMarketRequestCreate @SuppressWarnings("rawtypes") private okhttp3.Call createSpotMarketRequestValidateBeforeCall(UUID id, SpotMarketRequestCreateInput spotMarketRequestCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createSpotMarketRequest(Async)"); } - + // verify the required parameter 'spotMarketRequestCreateInput' is set if (spotMarketRequestCreateInput == null) { throw new ApiException("Missing the required parameter 'spotMarketRequestCreateInput' when calling createSpotMarketRequest(Async)"); } - - okhttp3.Call localVarCall = createSpotMarketRequestCall(id, spotMarketRequestCreateInput, _callback); - return localVarCall; + return createSpotMarketRequestCall(id, spotMarketRequestCreateInput, _callback); } @@ -262,7 +259,7 @@ public okhttp3.Call deleteSpotMarketRequestCall(UUID id, Boolean forceTerminatio // create path and map variables String localVarPath = "/spot-market-requests/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -283,7 +280,6 @@ public okhttp3.Call deleteSpotMarketRequestCall(UUID id, Boolean forceTerminatio } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -296,15 +292,12 @@ public okhttp3.Call deleteSpotMarketRequestCall(UUID id, Boolean forceTerminatio @SuppressWarnings("rawtypes") private okhttp3.Call deleteSpotMarketRequestValidateBeforeCall(UUID id, Boolean forceTermination, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteSpotMarketRequest(Async)"); } - - okhttp3.Call localVarCall = deleteSpotMarketRequestCall(id, forceTermination, _callback); - return localVarCall; + return deleteSpotMarketRequestCall(id, forceTermination, _callback); } @@ -428,7 +421,6 @@ public okhttp3.Call findMetroSpotMarketPricesCall(String metro, String plan, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -441,10 +433,7 @@ public okhttp3.Call findMetroSpotMarketPricesCall(String metro, String plan, fin @SuppressWarnings("rawtypes") private okhttp3.Call findMetroSpotMarketPricesValidateBeforeCall(String metro, String plan, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findMetroSpotMarketPricesCall(metro, plan, _callback); - return localVarCall; + return findMetroSpotMarketPricesCall(metro, plan, _callback); } @@ -569,7 +558,6 @@ public okhttp3.Call findSpotMarketPricesCall(String facility, String plan, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -582,10 +570,7 @@ public okhttp3.Call findSpotMarketPricesCall(String facility, String plan, final @SuppressWarnings("rawtypes") private okhttp3.Call findSpotMarketPricesValidateBeforeCall(String facility, String plan, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findSpotMarketPricesCall(facility, plan, _callback); - return localVarCall; + return findSpotMarketPricesCall(facility, plan, _callback); } @@ -725,7 +710,6 @@ public okhttp3.Call findSpotMarketPricesHistoryCall(String facility, String plan } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -738,30 +722,27 @@ public okhttp3.Call findSpotMarketPricesHistoryCall(String facility, String plan @SuppressWarnings("rawtypes") private okhttp3.Call findSpotMarketPricesHistoryValidateBeforeCall(String facility, String plan, String from, String until, String metro, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'facility' is set if (facility == null) { throw new ApiException("Missing the required parameter 'facility' when calling findSpotMarketPricesHistory(Async)"); } - + // verify the required parameter 'plan' is set if (plan == null) { throw new ApiException("Missing the required parameter 'plan' when calling findSpotMarketPricesHistory(Async)"); } - + // verify the required parameter 'from' is set if (from == null) { throw new ApiException("Missing the required parameter 'from' when calling findSpotMarketPricesHistory(Async)"); } - + // verify the required parameter 'until' is set if (until == null) { throw new ApiException("Missing the required parameter 'until' when calling findSpotMarketPricesHistory(Async)"); } - - okhttp3.Call localVarCall = findSpotMarketPricesHistoryCall(facility, plan, from, until, metro, _callback); - return localVarCall; + return findSpotMarketPricesHistoryCall(facility, plan, from, until, metro, _callback); } @@ -873,7 +854,7 @@ public okhttp3.Call findSpotMarketRequestByIdCall(UUID id, List include, // create path and map variables String localVarPath = "/spot-market-requests/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -898,7 +879,6 @@ public okhttp3.Call findSpotMarketRequestByIdCall(UUID id, List include, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -911,15 +891,12 @@ public okhttp3.Call findSpotMarketRequestByIdCall(UUID id, List include, @SuppressWarnings("rawtypes") private okhttp3.Call findSpotMarketRequestByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findSpotMarketRequestById(Async)"); } - - okhttp3.Call localVarCall = findSpotMarketRequestByIdCall(id, include, exclude, _callback); - return localVarCall; + return findSpotMarketRequestByIdCall(id, include, exclude, _callback); } @@ -1025,7 +1002,7 @@ public okhttp3.Call listSpotMarketRequestsCall(UUID id, final ApiCallback _callb // create path and map variables String localVarPath = "/projects/{id}/spot-market-requests" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1042,7 +1019,6 @@ public okhttp3.Call listSpotMarketRequestsCall(UUID id, final ApiCallback _callb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1055,15 +1031,12 @@ public okhttp3.Call listSpotMarketRequestsCall(UUID id, final ApiCallback _callb @SuppressWarnings("rawtypes") private okhttp3.Call listSpotMarketRequestsValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listSpotMarketRequests(Async)"); } - - okhttp3.Call localVarCall = listSpotMarketRequestsCall(id, _callback); - return localVarCall; + return listSpotMarketRequestsCall(id, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java index ea07483f9..46f091b4e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java @@ -111,7 +111,7 @@ public okhttp3.Call createProjectSSHKeyCall(UUID id, SSHKeyCreateInput ssHKeyCre // create path and map variables String localVarPath = "/projects/{id}/ssh-keys" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -141,20 +141,17 @@ public okhttp3.Call createProjectSSHKeyCall(UUID id, SSHKeyCreateInput ssHKeyCre @SuppressWarnings("rawtypes") private okhttp3.Call createProjectSSHKeyValidateBeforeCall(UUID id, SSHKeyCreateInput ssHKeyCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createProjectSSHKey(Async)"); } - + // verify the required parameter 'ssHKeyCreateInput' is set if (ssHKeyCreateInput == null) { throw new ApiException("Missing the required parameter 'ssHKeyCreateInput' when calling createProjectSSHKey(Async)"); } - - okhttp3.Call localVarCall = createProjectSSHKeyCall(id, ssHKeyCreateInput, _callback); - return localVarCall; + return createProjectSSHKeyCall(id, ssHKeyCreateInput, _callback); } @@ -283,15 +280,12 @@ public okhttp3.Call createSSHKeyCall(SSHKeyCreateInput ssHKeyCreateInput, final @SuppressWarnings("rawtypes") private okhttp3.Call createSSHKeyValidateBeforeCall(SSHKeyCreateInput ssHKeyCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'ssHKeyCreateInput' is set if (ssHKeyCreateInput == null) { throw new ApiException("Missing the required parameter 'ssHKeyCreateInput' when calling createSSHKey(Async)"); } - - okhttp3.Call localVarCall = createSSHKeyCall(ssHKeyCreateInput, _callback); - return localVarCall; + return createSSHKeyCall(ssHKeyCreateInput, _callback); } @@ -389,7 +383,7 @@ public okhttp3.Call deleteSSHKeyCall(UUID id, final ApiCallback _callback) throw // create path and map variables String localVarPath = "/ssh-keys/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -406,7 +400,6 @@ public okhttp3.Call deleteSSHKeyCall(UUID id, final ApiCallback _callback) throw } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -419,15 +412,12 @@ public okhttp3.Call deleteSSHKeyCall(UUID id, final ApiCallback _callback) throw @SuppressWarnings("rawtypes") private okhttp3.Call deleteSSHKeyValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteSSHKey(Async)"); } - - okhttp3.Call localVarCall = deleteSSHKeyCall(id, _callback); - return localVarCall; + return deleteSSHKeyCall(id, _callback); } @@ -525,7 +515,7 @@ public okhttp3.Call findDeviceSSHKeysCall(UUID id, String searchString, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -554,7 +544,6 @@ public okhttp3.Call findDeviceSSHKeysCall(UUID id, String searchString, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findDeviceSSHKeys(Async)"); } - - okhttp3.Call localVarCall = findDeviceSSHKeysCall(id, searchString, include, exclude, _callback); - return localVarCall; + return findDeviceSSHKeysCall(id, searchString, include, exclude, _callback); } @@ -680,7 +666,7 @@ public okhttp3.Call findProjectSSHKeysCall(UUID id, String searchString, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -709,7 +695,6 @@ public okhttp3.Call findProjectSSHKeysCall(UUID id, String searchString, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectSSHKeys(Async)"); } - - okhttp3.Call localVarCall = findProjectSSHKeysCall(id, searchString, include, exclude, _callback); - return localVarCall; + return findProjectSSHKeysCall(id, searchString, include, exclude, _callback); } @@ -836,7 +818,7 @@ public okhttp3.Call findSSHKeyByIdCall(UUID id, List include, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -861,7 +843,6 @@ public okhttp3.Call findSSHKeyByIdCall(UUID id, List include, List include, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findSSHKeyById(Async)"); } - - okhttp3.Call localVarCall = findSSHKeyByIdCall(id, include, exclude, _callback); - return localVarCall; + return findSSHKeyByIdCall(id, include, exclude, _callback); } @@ -1017,7 +995,6 @@ public okhttp3.Call findSSHKeysCall(String searchString, List include, L } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1030,10 +1007,7 @@ public okhttp3.Call findSSHKeysCall(String searchString, List include, L @SuppressWarnings("rawtypes") private okhttp3.Call findSSHKeysValidateBeforeCall(String searchString, List include, List exclude, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findSSHKeysCall(searchString, include, exclude, _callback); - return localVarCall; + return findSSHKeysCall(searchString, include, exclude, _callback); } @@ -1136,7 +1110,7 @@ public okhttp3.Call updateSSHKeyCall(UUID id, SSHKeyInput ssHKeyInput, final Api // create path and map variables String localVarPath = "/ssh-keys/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1166,20 +1140,17 @@ public okhttp3.Call updateSSHKeyCall(UUID id, SSHKeyInput ssHKeyInput, final Api @SuppressWarnings("rawtypes") private okhttp3.Call updateSSHKeyValidateBeforeCall(UUID id, SSHKeyInput ssHKeyInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateSSHKey(Async)"); } - + // verify the required parameter 'ssHKeyInput' is set if (ssHKeyInput == null) { throw new ApiException("Missing the required parameter 'ssHKeyInput' when calling updateSSHKey(Async)"); } - - okhttp3.Call localVarCall = updateSSHKeyCall(id, ssHKeyInput, _callback); - return localVarCall; + return updateSSHKeyCall(id, ssHKeyInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java index b0671258d..3f936cc33 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java @@ -137,15 +137,12 @@ public okhttp3.Call requestSuppertCall(SupportRequestInput supportRequestInput, @SuppressWarnings("rawtypes") private okhttp3.Call requestSuppertValidateBeforeCall(SupportRequestInput supportRequestInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'supportRequestInput' is set if (supportRequestInput == null) { throw new ApiException("Missing the required parameter 'supportRequestInput' when calling requestSuppert(Async)"); } - - okhttp3.Call localVarCall = requestSuppertCall(supportRequestInput, _callback); - return localVarCall; + return requestSuppertCall(supportRequestInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java index 00fc836b0..322b224a8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java @@ -108,7 +108,7 @@ public okhttp3.Call acceptTransferRequestCall(UUID id, final ApiCallback _callba // create path and map variables String localVarPath = "/transfers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -125,7 +125,6 @@ public okhttp3.Call acceptTransferRequestCall(UUID id, final ApiCallback _callba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -138,15 +137,12 @@ public okhttp3.Call acceptTransferRequestCall(UUID id, final ApiCallback _callba @SuppressWarnings("rawtypes") private okhttp3.Call acceptTransferRequestValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling acceptTransferRequest(Async)"); } - - okhttp3.Call localVarCall = acceptTransferRequestCall(id, _callback); - return localVarCall; + return acceptTransferRequestCall(id, _callback); } @@ -243,7 +239,7 @@ public okhttp3.Call declineTransferRequestCall(UUID id, final ApiCallback _callb // create path and map variables String localVarPath = "/transfers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -260,7 +256,6 @@ public okhttp3.Call declineTransferRequestCall(UUID id, final ApiCallback _callb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -273,15 +268,12 @@ public okhttp3.Call declineTransferRequestCall(UUID id, final ApiCallback _callb @SuppressWarnings("rawtypes") private okhttp3.Call declineTransferRequestValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling declineTransferRequest(Async)"); } - - okhttp3.Call localVarCall = declineTransferRequestCall(id, _callback); - return localVarCall; + return declineTransferRequestCall(id, _callback); } @@ -380,7 +372,7 @@ public okhttp3.Call findTransferRequestByIdCall(UUID id, List include, L // create path and map variables String localVarPath = "/transfers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -405,7 +397,6 @@ public okhttp3.Call findTransferRequestByIdCall(UUID id, List include, L } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -418,15 +409,12 @@ public okhttp3.Call findTransferRequestByIdCall(UUID id, List include, L @SuppressWarnings("rawtypes") private okhttp3.Call findTransferRequestByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findTransferRequestById(Async)"); } - - okhttp3.Call localVarCall = findTransferRequestByIdCall(id, include, exclude, _callback); - return localVarCall; + return findTransferRequestByIdCall(id, include, exclude, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java index 40ca81e62..a293765cb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java @@ -120,7 +120,6 @@ public okhttp3.Call disableTfaAppCall(final ApiCallback _callback) throws ApiExc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -133,10 +132,7 @@ public okhttp3.Call disableTfaAppCall(final ApiCallback _callback) throws ApiExc @SuppressWarnings("rawtypes") private okhttp3.Call disableTfaAppValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = disableTfaAppCall(_callback); - return localVarCall; + return disableTfaAppCall(_callback); } @@ -241,7 +237,6 @@ public okhttp3.Call disableTfaSmsCall(final ApiCallback _callback) throws ApiExc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -254,10 +249,7 @@ public okhttp3.Call disableTfaSmsCall(final ApiCallback _callback) throws ApiExc @SuppressWarnings("rawtypes") private okhttp3.Call disableTfaSmsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = disableTfaSmsCall(_callback); - return localVarCall; + return disableTfaSmsCall(_callback); } @@ -361,7 +353,6 @@ public okhttp3.Call enableTfaAppCall(final ApiCallback _callback) throws ApiExce } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -374,10 +365,7 @@ public okhttp3.Call enableTfaAppCall(final ApiCallback _callback) throws ApiExce @SuppressWarnings("rawtypes") private okhttp3.Call enableTfaAppValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = enableTfaAppCall(_callback); - return localVarCall; + return enableTfaAppCall(_callback); } @@ -478,7 +466,6 @@ public okhttp3.Call enableTfaSmsCall(final ApiCallback _callback) throws ApiExce } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -491,10 +478,7 @@ public okhttp3.Call enableTfaSmsCall(final ApiCallback _callback) throws ApiExce @SuppressWarnings("rawtypes") private okhttp3.Call enableTfaSmsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = enableTfaSmsCall(_callback); - return localVarCall; + return enableTfaSmsCall(_callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java index c3bc96be4..6207c2253 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java @@ -110,7 +110,7 @@ public okhttp3.Call findDeviceUsagesCall(UUID id, String createdAfter, String cr // create path and map variables String localVarPath = "/devices/{id}/usages" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -135,7 +135,6 @@ public okhttp3.Call findDeviceUsagesCall(UUID id, String createdAfter, String cr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -148,15 +147,12 @@ public okhttp3.Call findDeviceUsagesCall(UUID id, String createdAfter, String cr @SuppressWarnings("rawtypes") private okhttp3.Call findDeviceUsagesValidateBeforeCall(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findDeviceUsages(Async)"); } - - okhttp3.Call localVarCall = findDeviceUsagesCall(id, createdAfter, createdBefore, _callback); - return localVarCall; + return findDeviceUsagesCall(id, createdAfter, createdBefore, _callback); } @@ -261,7 +257,7 @@ public okhttp3.Call findProjectUsageCall(UUID id, String createdAfter, String cr // create path and map variables String localVarPath = "/projects/{id}/usages" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -286,7 +282,6 @@ public okhttp3.Call findProjectUsageCall(UUID id, String createdAfter, String cr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -299,15 +294,12 @@ public okhttp3.Call findProjectUsageCall(UUID id, String createdAfter, String cr @SuppressWarnings("rawtypes") private okhttp3.Call findProjectUsageValidateBeforeCall(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findProjectUsage(Async)"); } - - okhttp3.Call localVarCall = findProjectUsageCall(id, createdAfter, createdBefore, _callback); - return localVarCall; + return findProjectUsageCall(id, createdAfter, createdBefore, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java index 0df1a7888..59b9dd4da 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java @@ -125,7 +125,6 @@ public okhttp3.Call consumeVerificationRequestCall(String token, final ApiCallba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -138,15 +137,12 @@ public okhttp3.Call consumeVerificationRequestCall(String token, final ApiCallba @SuppressWarnings("rawtypes") private okhttp3.Call consumeVerificationRequestValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling consumeVerificationRequest(Async)"); } - - okhttp3.Call localVarCall = consumeVerificationRequestCall(token, _callback); - return localVarCall; + return consumeVerificationRequestCall(token, _callback); } @@ -259,7 +255,6 @@ public okhttp3.Call createValidationRequestCall(String login, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -272,15 +267,12 @@ public okhttp3.Call createValidationRequestCall(String login, final ApiCallback @SuppressWarnings("rawtypes") private okhttp3.Call createValidationRequestValidateBeforeCall(String login, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'login' is set if (login == null) { throw new ApiException("Missing the required parameter 'login' when calling createValidationRequest(Async)"); } - - okhttp3.Call localVarCall = createValidationRequestCall(login, _callback); - return localVarCall; + return createValidationRequestCall(login, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java index abf6ff934..561046f26 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java @@ -125,7 +125,6 @@ public okhttp3.Call validateUserdataCall(String userdata, final ApiCallback _cal } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -138,10 +137,7 @@ public okhttp3.Call validateUserdataCall(String userdata, final ApiCallback _cal @SuppressWarnings("rawtypes") private okhttp3.Call validateUserdataValidateBeforeCall(String userdata, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = validateUserdataCall(userdata, _callback); - return localVarCall; + return validateUserdataCall(userdata, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java index 0fa0184c4..ff609788f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java @@ -140,15 +140,12 @@ public okhttp3.Call createUserCall(UserCreateInput userCreateInput, final ApiCal @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(UserCreateInput userCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userCreateInput' is set if (userCreateInput == null) { throw new ApiException("Missing the required parameter 'userCreateInput' when calling createUser(Async)"); } - - okhttp3.Call localVarCall = createUserCall(userCreateInput, _callback); - return localVarCall; + return createUserCall(userCreateInput, _callback); } @@ -269,7 +266,6 @@ public okhttp3.Call findCurrentUserCall(List include, List exclu } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -282,10 +278,7 @@ public okhttp3.Call findCurrentUserCall(List include, List exclu @SuppressWarnings("rawtypes") private okhttp3.Call findCurrentUserValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findCurrentUserCall(include, exclude, _callback); - return localVarCall; + return findCurrentUserCall(include, exclude, _callback); } @@ -418,7 +411,6 @@ public okhttp3.Call findInvitationsCall(List include, List exclu } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -431,10 +423,7 @@ public okhttp3.Call findInvitationsCall(List include, List exclu @SuppressWarnings("rawtypes") private okhttp3.Call findInvitationsValidateBeforeCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findInvitationsCall(include, exclude, page, perPage, _callback); - return localVarCall; + return findInvitationsCall(include, exclude, page, perPage, _callback); } @@ -546,7 +535,7 @@ public okhttp3.Call findUserByIdCall(UUID id, List include, List // create path and map variables String localVarPath = "/users/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -571,7 +560,6 @@ public okhttp3.Call findUserByIdCall(UUID id, List include, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -584,15 +572,12 @@ public okhttp3.Call findUserByIdCall(UUID id, List include, List @SuppressWarnings("rawtypes") private okhttp3.Call findUserByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findUserById(Async)"); } - - okhttp3.Call localVarCall = findUserByIdCall(id, include, exclude, _callback); - return localVarCall; + return findUserByIdCall(id, include, exclude, _callback); } @@ -699,7 +684,7 @@ public okhttp3.Call findUserCustomdataCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/users/{id}/customdata" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -716,7 +701,6 @@ public okhttp3.Call findUserCustomdataCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -729,15 +713,12 @@ public okhttp3.Call findUserCustomdataCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call findUserCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findUserCustomdata(Async)"); } - - okhttp3.Call localVarCall = findUserCustomdataCall(id, _callback); - return localVarCall; + return findUserCustomdataCall(id, _callback); } @@ -867,7 +848,6 @@ public okhttp3.Call findUsersCall(List include, List exclude, In } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -880,10 +860,7 @@ public okhttp3.Call findUsersCall(List include, List exclude, In @SuppressWarnings("rawtypes") private okhttp3.Call findUsersValidateBeforeCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = findUsersCall(include, exclude, page, perPage, _callback); - return localVarCall; + return findUsersCall(include, exclude, page, perPage, _callback); } @@ -1015,15 +992,12 @@ public okhttp3.Call updateCurrentUserCall(UserUpdateInput userUpdateInput, final @SuppressWarnings("rawtypes") private okhttp3.Call updateCurrentUserValidateBeforeCall(UserUpdateInput userUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userUpdateInput' is set if (userUpdateInput == null) { throw new ApiException("Missing the required parameter 'userUpdateInput' when calling updateCurrentUser(Async)"); } - - okhttp3.Call localVarCall = updateCurrentUserCall(userUpdateInput, _callback); - return localVarCall; + return updateCurrentUserCall(userUpdateInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java index 9d66433cd..8aece11aa 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java @@ -112,7 +112,7 @@ public okhttp3.Call createVirtualNetworkCall(UUID id, VirtualNetworkCreateInput // create path and map variables String localVarPath = "/projects/{id}/virtual-networks" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -142,20 +142,17 @@ public okhttp3.Call createVirtualNetworkCall(UUID id, VirtualNetworkCreateInput @SuppressWarnings("rawtypes") private okhttp3.Call createVirtualNetworkValidateBeforeCall(UUID id, VirtualNetworkCreateInput virtualNetworkCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createVirtualNetwork(Async)"); } - + // verify the required parameter 'virtualNetworkCreateInput' is set if (virtualNetworkCreateInput == null) { throw new ApiException("Missing the required parameter 'virtualNetworkCreateInput' when calling createVirtualNetwork(Async)"); } - - okhttp3.Call localVarCall = createVirtualNetworkCall(id, virtualNetworkCreateInput, _callback); - return localVarCall; + return createVirtualNetworkCall(id, virtualNetworkCreateInput, _callback); } @@ -263,7 +260,7 @@ public okhttp3.Call deleteVirtualNetworkCall(UUID id, final ApiCallback _callbac // create path and map variables String localVarPath = "/virtual-networks/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -280,7 +277,6 @@ public okhttp3.Call deleteVirtualNetworkCall(UUID id, final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -293,15 +289,12 @@ public okhttp3.Call deleteVirtualNetworkCall(UUID id, final ApiCallback _callbac @SuppressWarnings("rawtypes") private okhttp3.Call deleteVirtualNetworkValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteVirtualNetwork(Async)"); } - - okhttp3.Call localVarCall = deleteVirtualNetworkCall(id, _callback); - return localVarCall; + return deleteVirtualNetworkCall(id, _callback); } @@ -409,7 +402,7 @@ public okhttp3.Call findVirtualNetworksCall(UUID id, List include, List< // create path and map variables String localVarPath = "/projects/{id}/virtual-networks" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -442,7 +435,6 @@ public okhttp3.Call findVirtualNetworksCall(UUID id, List include, List< } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -455,15 +447,12 @@ public okhttp3.Call findVirtualNetworksCall(UUID id, List include, List< @SuppressWarnings("rawtypes") private okhttp3.Call findVirtualNetworksValidateBeforeCall(UUID id, List include, List exclude, String facility, String metro, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findVirtualNetworks(Async)"); } - - okhttp3.Call localVarCall = findVirtualNetworksCall(id, include, exclude, facility, metro, _callback); - return localVarCall; + return findVirtualNetworksCall(id, include, exclude, facility, metro, _callback); } @@ -577,7 +566,7 @@ public okhttp3.Call getVirtualNetworkCall(UUID id, final ApiCallback _callback) // create path and map variables String localVarPath = "/virtual-networks/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -594,7 +583,6 @@ public okhttp3.Call getVirtualNetworkCall(UUID id, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -607,15 +595,12 @@ public okhttp3.Call getVirtualNetworkCall(UUID id, final ApiCallback _callback) @SuppressWarnings("rawtypes") private okhttp3.Call getVirtualNetworkValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getVirtualNetwork(Async)"); } - - okhttp3.Call localVarCall = getVirtualNetworkCall(id, _callback); - return localVarCall; + return getVirtualNetworkCall(id, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java index 37a34a641..14723cd85 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java @@ -113,7 +113,7 @@ public okhttp3.Call createVrfCall(UUID id, VrfCreateInput vrfCreateInput, final // create path and map variables String localVarPath = "/projects/{id}/vrfs" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -143,20 +143,17 @@ public okhttp3.Call createVrfCall(UUID id, VrfCreateInput vrfCreateInput, final @SuppressWarnings("rawtypes") private okhttp3.Call createVrfValidateBeforeCall(UUID id, VrfCreateInput vrfCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createVrf(Async)"); } - + // verify the required parameter 'vrfCreateInput' is set if (vrfCreateInput == null) { throw new ApiException("Missing the required parameter 'vrfCreateInput' when calling createVrf(Async)"); } - - okhttp3.Call localVarCall = createVrfCall(id, vrfCreateInput, _callback); - return localVarCall; + return createVrfCall(id, vrfCreateInput, _callback); } @@ -260,7 +257,7 @@ public okhttp3.Call deleteVrfCall(UUID id, final ApiCallback _callback) throws A // create path and map variables String localVarPath = "/vrfs/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -277,7 +274,6 @@ public okhttp3.Call deleteVrfCall(UUID id, final ApiCallback _callback) throws A } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -290,15 +286,12 @@ public okhttp3.Call deleteVrfCall(UUID id, final ApiCallback _callback) throws A @SuppressWarnings("rawtypes") private okhttp3.Call deleteVrfValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteVrf(Async)"); } - - okhttp3.Call localVarCall = deleteVrfCall(id, _callback); - return localVarCall; + return deleteVrfCall(id, _callback); } @@ -397,7 +390,7 @@ public okhttp3.Call findVrfByIdCall(UUID id, List include, List // create path and map variables String localVarPath = "/vrfs/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -422,7 +415,6 @@ public okhttp3.Call findVrfByIdCall(UUID id, List include, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -435,15 +427,12 @@ public okhttp3.Call findVrfByIdCall(UUID id, List include, List @SuppressWarnings("rawtypes") private okhttp3.Call findVrfByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findVrfById(Async)"); } - - okhttp3.Call localVarCall = findVrfByIdCall(id, include, exclude, _callback); - return localVarCall; + return findVrfByIdCall(id, include, exclude, _callback); } @@ -551,7 +540,7 @@ public okhttp3.Call findVrfIPReservationsCall(UUID id, List include, Lis // create path and map variables String localVarPath = "/vrfs/{id}/ips" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -576,7 +565,6 @@ public okhttp3.Call findVrfIPReservationsCall(UUID id, List include, Lis } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -589,15 +577,12 @@ public okhttp3.Call findVrfIPReservationsCall(UUID id, List include, Lis @SuppressWarnings("rawtypes") private okhttp3.Call findVrfIPReservationsValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findVrfIPReservations(Async)"); } - - okhttp3.Call localVarCall = findVrfIPReservationsCall(id, include, exclude, _callback); - return localVarCall; + return findVrfIPReservationsCall(id, include, exclude, _callback); } @@ -703,7 +688,7 @@ public okhttp3.Call findVrfsCall(UUID id, List include, List exc // create path and map variables String localVarPath = "/projects/{id}/vrfs" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -732,7 +717,6 @@ public okhttp3.Call findVrfsCall(UUID id, List include, List exc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -745,15 +729,12 @@ public okhttp3.Call findVrfsCall(UUID id, List include, List exc @SuppressWarnings("rawtypes") private okhttp3.Call findVrfsValidateBeforeCall(UUID id, List include, List exclude, String metro, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling findVrfs(Async)"); } - - okhttp3.Call localVarCall = findVrfsCall(id, include, exclude, metro, _callback); - return localVarCall; + return findVrfsCall(id, include, exclude, metro, _callback); } @@ -862,7 +843,7 @@ public okhttp3.Call updateVrfCall(UUID id, VrfUpdateInput vrfUpdateInput, final // create path and map variables String localVarPath = "/vrfs/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -892,20 +873,17 @@ public okhttp3.Call updateVrfCall(UUID id, VrfUpdateInput vrfUpdateInput, final @SuppressWarnings("rawtypes") private okhttp3.Call updateVrfValidateBeforeCall(UUID id, VrfUpdateInput vrfUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateVrf(Async)"); } - + // verify the required parameter 'vrfUpdateInput' is set if (vrfUpdateInput == null) { throw new ApiException("Missing the required parameter 'vrfUpdateInput' when calling updateVrf(Async)"); } - - okhttp3.Call localVarCall = updateVrfCall(id, vrfUpdateInput, _callback); - return localVarCall; + return updateVrfCall(id, vrfUpdateInput, _callback); } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java index e93fdba23..f8721c3bf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -92,7 +91,6 @@ public Address address(String address) { * @return address **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getAddress() { return address; @@ -115,7 +113,6 @@ public Address address2(String address2) { * @return address2 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAddress2() { return address2; @@ -138,7 +135,6 @@ public Address city(String city) { * @return city **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCity() { return city; @@ -161,7 +157,6 @@ public Address coordinates(Coordinates coordinates) { * @return coordinates **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Coordinates getCoordinates() { return coordinates; @@ -184,7 +179,6 @@ public Address country(String country) { * @return country **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getCountry() { return country; @@ -207,7 +201,6 @@ public Address state(String state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getState() { return state; @@ -230,7 +223,6 @@ public Address zipCode(String zipCode) { * @return zipCode **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getZipCode() { return zipCode; @@ -251,6 +243,10 @@ public void setZipCode(String zipCode) { /** * 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 Address instance itself */ public Address putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -262,6 +258,8 @@ public Address putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -269,6 +267,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -410,7 +411,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Address value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -446,8 +447,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java index 51bc2357a..d6e555685 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -99,7 +98,6 @@ public AuthToken createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -122,7 +120,6 @@ public AuthToken description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Available only for API keys") public String getDescription() { return description; @@ -145,7 +142,6 @@ public AuthToken id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -168,7 +164,6 @@ public AuthToken project(AuthTokenProject project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public AuthTokenProject getProject() { return project; @@ -191,7 +186,6 @@ public AuthToken readOnly(Boolean readOnly) { * @return readOnly **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getReadOnly() { return readOnly; @@ -214,7 +208,6 @@ public AuthToken token(String token) { * @return token **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getToken() { return token; @@ -237,7 +230,6 @@ public AuthToken updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -260,7 +252,6 @@ public AuthToken user(AuthTokenUser user) { * @return user **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public AuthTokenUser getUser() { return user; @@ -281,6 +272,10 @@ public void setUser(AuthTokenUser user) { /** * 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 AuthToken instance itself */ public AuthToken putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -292,6 +287,8 @@ public AuthToken putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -299,6 +296,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -428,7 +428,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AuthToken value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -464,8 +464,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java index 67b61eeb3..a04aec687 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public AuthTokenInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -94,7 +92,6 @@ public AuthTokenInput readOnly(Boolean readOnly) { * @return readOnly **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getReadOnly() { return readOnly; @@ -115,6 +112,10 @@ public void setReadOnly(Boolean readOnly) { /** * 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 AuthTokenInput instance itself */ public AuthTokenInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public AuthTokenInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -230,7 +236,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AuthTokenInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -266,8 +272,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java index cef69b3e2..125e7b8dc 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public AuthTokenList addApiKeysItem(AuthToken apiKeysItem) { * @return apiKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getApiKeys() { return apiKeys; @@ -99,6 +97,10 @@ public void setApiKeys(List apiKeys) { /** * 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 AuthTokenList instance itself */ public AuthTokenList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public AuthTokenList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AuthTokenList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java index 415c7286c..239a9ff97 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -128,7 +127,6 @@ public AuthTokenProject bgpConfig(Href bgpConfig) { * @return bgpConfig **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getBgpConfig() { return bgpConfig; @@ -151,7 +149,6 @@ public AuthTokenProject createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -174,7 +171,6 @@ public AuthTokenProject customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -205,7 +201,6 @@ public AuthTokenProject addDevicesItem(Href devicesItem) { * @return devices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getDevices() { return devices; @@ -228,7 +223,6 @@ public AuthTokenProject id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -259,7 +253,6 @@ public AuthTokenProject addInvitationsItem(Href invitationsItem) { * @return invitations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getInvitations() { return invitations; @@ -282,7 +275,6 @@ public AuthTokenProject maxDevices(Object maxDevices) { * @return maxDevices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getMaxDevices() { return maxDevices; @@ -313,7 +305,6 @@ public AuthTokenProject addMembersItem(Href membersItem) { * @return members **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMembers() { return members; @@ -344,7 +335,6 @@ public AuthTokenProject addMembershipsItem(Href membershipsItem) { * @return memberships **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMemberships() { return memberships; @@ -367,7 +357,6 @@ public AuthTokenProject name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -390,7 +379,6 @@ public AuthTokenProject networkStatus(Object networkStatus) { * @return networkStatus **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getNetworkStatus() { return networkStatus; @@ -413,7 +401,6 @@ public AuthTokenProject paymentMethod(Href paymentMethod) { * @return paymentMethod **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getPaymentMethod() { return paymentMethod; @@ -444,7 +431,6 @@ public AuthTokenProject addSshKeysItem(Href sshKeysItem) { * @return sshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getSshKeys() { return sshKeys; @@ -467,7 +453,6 @@ public AuthTokenProject updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -498,7 +483,6 @@ public AuthTokenProject addVolumesItem(Href volumesItem) { * @return volumes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVolumes() { return volumes; @@ -519,6 +503,10 @@ public void setVolumes(List volumes) { /** * 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 AuthTokenProject instance itself */ public AuthTokenProject putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -530,6 +518,8 @@ public AuthTokenProject putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -537,6 +527,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -768,7 +761,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AuthTokenProject value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -804,8 +797,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java index 206940cbf..d4e26dcd9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -152,7 +151,6 @@ public AuthTokenUser avatarThumbUrl(String avatarThumbUrl) { * @return avatarThumbUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAvatarThumbUrl() { return avatarThumbUrl; @@ -175,7 +173,6 @@ public AuthTokenUser avatarUrl(String avatarUrl) { * @return avatarUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAvatarUrl() { return avatarUrl; @@ -198,7 +195,6 @@ public AuthTokenUser createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -221,7 +217,6 @@ public AuthTokenUser customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -244,7 +239,6 @@ public AuthTokenUser email(String email) { * @return email **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getEmail() { return email; @@ -275,7 +269,6 @@ public AuthTokenUser addEmailsItem(Href emailsItem) { * @return emails **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getEmails() { return emails; @@ -298,7 +291,6 @@ public AuthTokenUser firstName(String firstName) { * @return firstName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFirstName() { return firstName; @@ -321,7 +313,6 @@ public AuthTokenUser fraudScore(String fraudScore) { * @return fraudScore **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFraudScore() { return fraudScore; @@ -344,7 +335,6 @@ public AuthTokenUser fullName(String fullName) { * @return fullName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFullName() { return fullName; @@ -367,7 +357,6 @@ public AuthTokenUser href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -390,7 +379,6 @@ public AuthTokenUser id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -413,7 +401,6 @@ public AuthTokenUser lastLoginAt(OffsetDateTime lastLoginAt) { * @return lastLoginAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getLastLoginAt() { return lastLoginAt; @@ -436,7 +423,6 @@ public AuthTokenUser lastName(String lastName) { * @return lastName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLastName() { return lastName; @@ -459,7 +445,6 @@ public AuthTokenUser maxOrganizations(Integer maxOrganizations) { * @return maxOrganizations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getMaxOrganizations() { return maxOrganizations; @@ -482,7 +467,6 @@ public AuthTokenUser maxProjects(Integer maxProjects) { * @return maxProjects **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getMaxProjects() { return maxProjects; @@ -505,7 +489,6 @@ public AuthTokenUser phoneNumber(String phoneNumber) { * @return phoneNumber **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPhoneNumber() { return phoneNumber; @@ -528,7 +511,6 @@ public AuthTokenUser shortId(String shortId) { * @return shortId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getShortId() { return shortId; @@ -551,7 +533,6 @@ public AuthTokenUser timezone(String timezone) { * @return timezone **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTimezone() { return timezone; @@ -574,7 +555,6 @@ public AuthTokenUser twoFactorAuth(String twoFactorAuth) { * @return twoFactorAuth **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTwoFactorAuth() { return twoFactorAuth; @@ -597,7 +577,6 @@ public AuthTokenUser updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -628,7 +607,6 @@ public AuthTokenUser addFeaturesItem(String featuresItem) { * @return features **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getFeatures() { return features; @@ -649,6 +627,10 @@ public void setFeatures(List features) { /** * 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 AuthTokenUser instance itself */ public AuthTokenUser putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -660,6 +642,8 @@ public AuthTokenUser putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -667,6 +651,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -853,8 +840,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("two_factor_auth") != null && !jsonObj.get("two_factor_auth").isJsonNull()) && !jsonObj.get("two_factor_auth").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); } - // ensure the json data is an array - if (!jsonObj.get("features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } } @@ -875,7 +862,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AuthTokenUser value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -911,8 +898,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java index e0a9ba5db..d23e4d654 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -118,7 +117,6 @@ public BGPSessionInput addressFamily(AddressFamilyEnum addressFamily) { * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(example = "ipv4", value = "Address family for BGP session.") public AddressFamilyEnum getAddressFamily() { return addressFamily; @@ -141,7 +139,6 @@ public BGPSessionInput defaultRoute(Boolean defaultRoute) { * @return defaultRoute **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the default route policy.") public Boolean getDefaultRoute() { return defaultRoute; @@ -162,6 +159,10 @@ public void setDefaultRoute(Boolean defaultRoute) { /** * 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 BGPSessionInput instance itself */ public BGPSessionInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -173,6 +174,8 @@ public BGPSessionInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -180,6 +183,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -277,7 +283,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BGPSessionInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -313,8 +319,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java index 8711f1b28..f3dad69aa 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -100,7 +99,6 @@ public Batch createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -131,7 +129,6 @@ public Batch addDevicesItem(Href devicesItem) { * @return devices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getDevices() { return devices; @@ -162,7 +159,6 @@ public Batch addErrorMessagesItem(String errorMessagesItem) { * @return errorMessages **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getErrorMessages() { return errorMessages; @@ -185,7 +181,6 @@ public Batch id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -208,7 +203,6 @@ public Batch project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -231,7 +225,6 @@ public Batch quantity(Integer quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getQuantity() { return quantity; @@ -254,7 +247,6 @@ public Batch state(String state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getState() { return state; @@ -277,7 +269,6 @@ public Batch updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -298,6 +289,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 Batch instance itself */ public Batch putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -309,6 +304,8 @@ public Batch putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -316,6 +313,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -424,8 +424,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // ensure the json data is an array - if (!jsonObj.get("error_messages").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("error_messages") != null && !jsonObj.get("error_messages").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `error_messages` to be an array in the JSON string but got `%s`", jsonObj.get("error_messages").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -456,7 +456,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Batch value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -492,8 +492,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java index 168c8820c..aba0fb454 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public BatchesList addBatchesItem(Batch batchesItem) { * @return batches **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getBatches() { return batches; @@ -99,6 +97,10 @@ public void setBatches(List batches) { /** * 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 BatchesList instance itself */ public BatchesList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public BatchesList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BatchesList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java index d81b55607..b0d195e1e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java @@ -23,8 +23,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -46,6 +44,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -219,7 +218,6 @@ public BgpConfig asn(Integer asn) { * @return asn **/ @javax.annotation.Nullable - @ApiModelProperty(example = "65000", value = "Autonomous System Number. ASN is required with Global BGP. With Local BGP the private ASN, 65000, is assigned.") public Integer getAsn() { return asn; @@ -242,7 +240,6 @@ public BgpConfig createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -265,7 +262,6 @@ public BgpConfig deploymentType(DeploymentTypeEnum deploymentType) { * @return deploymentType **/ @javax.annotation.Nullable - @ApiModelProperty(example = "local", value = "In a Local BGP deployment, a customer uses an internal ASN to control routes within a single Equinix Metal datacenter. This means that the routes are never advertised to the global Internet. Global BGP, on the other hand, requires a customer to have a registered ASN and IP space. ") public DeploymentTypeEnum getDeploymentType() { return deploymentType; @@ -288,7 +284,6 @@ public BgpConfig href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -311,7 +306,6 @@ public BgpConfig id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -334,7 +328,6 @@ public BgpConfig maxPrefix(Integer maxPrefix) { * @return maxPrefix **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The maximum number of route filters allowed per server") public Integer getMaxPrefix() { return maxPrefix; @@ -357,7 +350,6 @@ public BgpConfig md5(String md5) { * @return md5 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "(Optional) Password for BGP session in plaintext (not a checksum)") public String getMd5() { return md5; @@ -380,7 +372,6 @@ public BgpConfig project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -411,7 +402,6 @@ public BgpConfig addRangesItem(GlobalBgpRange rangesItem) { * @return ranges **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The IP block ranges associated to the ASN (Populated in Global BGP only)") public List getRanges() { return ranges; @@ -434,7 +424,6 @@ public BgpConfig requestedAt(OffsetDateTime requestedAt) { * @return requestedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getRequestedAt() { return requestedAt; @@ -457,7 +446,6 @@ public BgpConfig routeObject(String routeObject) { * @return routeObject **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Specifies AS-MACRO (aka AS-SET) to use when building client route filters") public String getRouteObject() { return routeObject; @@ -488,7 +476,6 @@ public BgpConfig addSessionsItem(BgpSession sessionsItem) { * @return sessions **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The direct connections between neighboring routers that want to exchange routing information.") public List getSessions() { return sessions; @@ -511,7 +498,6 @@ public BgpConfig status(StatusEnum status) { * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Status of the BGP Config. Status \"requested\" is valid only with the \"global\" deployment_type.") public StatusEnum getStatus() { return status; @@ -532,6 +518,10 @@ public void setStatus(StatusEnum status) { /** * 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 BgpConfig instance itself */ public BgpConfig putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -543,6 +533,8 @@ public BgpConfig putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -550,6 +542,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -738,7 +733,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -774,8 +769,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java index 3a42cf5db..e4edb84a7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -79,7 +78,6 @@ public BgpConfigRequestInput asn(Integer asn) { * @return asn **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Integer getAsn() { return asn; @@ -102,7 +100,6 @@ public BgpConfigRequestInput deploymentType(String deploymentType) { * @return deploymentType **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getDeploymentType() { return deploymentType; @@ -125,7 +122,6 @@ public BgpConfigRequestInput md5(String md5) { * @return md5 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getMd5() { return md5; @@ -148,7 +144,6 @@ public BgpConfigRequestInput useCase(String useCase) { * @return useCase **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUseCase() { return useCase; @@ -169,6 +164,10 @@ public void setUseCase(String useCase) { /** * 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 BgpConfigRequestInput instance itself */ public BgpConfigRequestInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -180,6 +179,8 @@ public BgpConfigRequestInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -187,6 +188,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -305,7 +309,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpConfigRequestInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -341,8 +345,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java index 2b92de81c..9d2f4b09b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -108,7 +107,6 @@ public BgpNeighborData addressFamily(BigDecimal addressFamily) { * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(example = "4", value = "Address Family for IP Address. Accepted values are 4 or 6") public BigDecimal getAddressFamily() { return addressFamily; @@ -131,7 +129,6 @@ public BgpNeighborData customerAs(BigDecimal customerAs) { * @return customerAs **/ @javax.annotation.Nullable - @ApiModelProperty(example = "65000", value = "The customer's ASN. In a local BGP deployment, this will be an internal ASN used to route within the data center. For a global BGP deployment, this will be the your own ASN, configured when you set up BGP for your project.") public BigDecimal getCustomerAs() { return customerAs; @@ -154,7 +151,6 @@ public BgpNeighborData customerIp(String customerIp) { * @return customerIp **/ @javax.annotation.Nullable - @ApiModelProperty(example = "10.32.16.1 (IPv4) or 2604:1380:4111:2700::1 (IPv6)", value = "The device's IP address. For an IPv4 BGP session, this is typically the private bond0 address for the device.") public String getCustomerIp() { return customerIp; @@ -177,7 +173,6 @@ public BgpNeighborData md5Enabled(Boolean md5Enabled) { * @return md5Enabled **/ @javax.annotation.Nullable - @ApiModelProperty(value = "True if an MD5 password is configured for the project.") public Boolean getMd5Enabled() { return md5Enabled; @@ -200,7 +195,6 @@ public BgpNeighborData md5Password(String md5Password) { * @return md5Password **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The MD5 password configured for the project, if set.") public String getMd5Password() { return md5Password; @@ -223,7 +217,6 @@ public BgpNeighborData multihop(Boolean multihop) { * @return multihop **/ @javax.annotation.Nullable - @ApiModelProperty(value = "True when the BGP session should be configured as multihop.") public Boolean getMultihop() { return multihop; @@ -246,7 +239,6 @@ public BgpNeighborData peerAs(BigDecimal peerAs) { * @return peerAs **/ @javax.annotation.Nullable - @ApiModelProperty(example = "65530", value = "The Peer ASN to use when configuring BGP on your device.") public BigDecimal getPeerAs() { return peerAs; @@ -277,7 +269,6 @@ public BgpNeighborData addPeerIpsItem(String peerIpsItem) { * @return peerIps **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[\"169.254.255.1\",\"169.254.255.2\"]", value = "A list of one or more IP addresses to use for the Peer IP section of your BGP configuration. For non-multihop sessions, this will typically be a single gateway address for the device. For multihop sessions, it will be a list of IPs.") public List getPeerIps() { return peerIps; @@ -308,7 +299,6 @@ public BgpNeighborData addRoutesInItem(BgpNeighborDataRoutesInInner routesInItem * @return routesIn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of project subnets") public List getRoutesIn() { return routesIn; @@ -339,7 +329,6 @@ public BgpNeighborData addRoutesOutItem(BgpNeighborDataRoutesOutInner routesOutI * @return routesOut **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of outgoing routes. Only populated if the BGP session has default route enabled.") public List getRoutesOut() { return routesOut; @@ -360,6 +349,10 @@ public void setRoutesOut(List routesOut) { /** * 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 BgpNeighborData instance itself */ public BgpNeighborData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -371,6 +364,8 @@ public BgpNeighborData putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -378,6 +373,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -484,8 +482,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("md5_password") != null && !jsonObj.get("md5_password").isJsonNull()) && !jsonObj.get("md5_password").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `md5_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5_password").toString())); } - // ensure the json data is an array - if (!jsonObj.get("peer_ips").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("peer_ips") != null && !jsonObj.get("peer_ips").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `peer_ips` to be an array in the JSON string but got `%s`", jsonObj.get("peer_ips").toString())); } if (jsonObj.get("routes_in") != null && !jsonObj.get("routes_in").isJsonNull()) { @@ -534,7 +532,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpNeighborData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -570,8 +568,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java index 797a3bd11..ebaf96100 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public BgpNeighborDataRoutesInInner exact(Boolean exact) { * @return exact **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getExact() { return exact; @@ -94,7 +92,6 @@ public BgpNeighborDataRoutesInInner route(String route) { * @return route **/ @javax.annotation.Nullable - @ApiModelProperty(example = "10.32.16.0/31", value = "A project network") public String getRoute() { return route; @@ -115,6 +112,10 @@ public void setRoute(String route) { /** * 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 BgpNeighborDataRoutesInInner instance itself */ public BgpNeighborDataRoutesInInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public BgpNeighborDataRoutesInInner putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -230,7 +236,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpNeighborDataRoutesInInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -266,8 +272,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java index f5101f34e..a4fd5f4a2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public BgpNeighborDataRoutesOutInner exact(Boolean exact) { * @return exact **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getExact() { return exact; @@ -94,7 +92,6 @@ public BgpNeighborDataRoutesOutInner route(String route) { * @return route **/ @javax.annotation.Nullable - @ApiModelProperty(example = "0.0.0.0/0", value = "") public String getRoute() { return route; @@ -115,6 +112,10 @@ public void setRoute(String route) { /** * 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 BgpNeighborDataRoutesOutInner instance itself */ public BgpNeighborDataRoutesOutInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public BgpNeighborDataRoutesOutInner putAdditionalProperty(String key, Object va /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -230,7 +236,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpNeighborDataRoutesOutInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -266,8 +272,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java index 3dca6aaca..6897e85c7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -200,7 +199,6 @@ public BgpSession addressFamily(AddressFamilyEnum addressFamily) { * @return addressFamily **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public AddressFamilyEnum getAddressFamily() { return addressFamily; @@ -223,7 +221,6 @@ public BgpSession createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -246,7 +243,6 @@ public BgpSession defaultRoute(Boolean defaultRoute) { * @return defaultRoute **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefaultRoute() { return defaultRoute; @@ -269,7 +265,6 @@ public BgpSession device(Href device) { * @return device **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getDevice() { return device; @@ -292,7 +287,6 @@ public BgpSession href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -315,7 +309,6 @@ public BgpSession id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -346,7 +339,6 @@ public BgpSession addLearnedRoutesItem(String learnedRoutesItem) { * @return learnedRoutes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getLearnedRoutes() { return learnedRoutes; @@ -369,7 +361,6 @@ public BgpSession status(StatusEnum status) { * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(value = " The status of the BGP Session. Multiple status values may be reported when the device is connected to multiple switches, one value per switch. Each status will start with \"unknown\" and progress to \"up\" or \"down\" depending on the connected device. Subsequent \"unknown\" values indicate a problem acquiring status from the switch. ") public StatusEnum getStatus() { return status; @@ -392,7 +383,6 @@ public BgpSession updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -413,6 +403,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 BgpSession instance itself */ public BgpSession putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -424,6 +418,8 @@ public BgpSession putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -431,6 +427,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -549,8 +548,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("learned_routes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("learned_routes") != null && !jsonObj.get("learned_routes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `learned_routes` to be an array in the JSON string but got `%s`", jsonObj.get("learned_routes").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { @@ -574,7 +573,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpSession value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -610,8 +609,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java index 9c7b0a16c..8a8fcd924 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public BgpSessionList addBgpSessionsItem(BgpSession bgpSessionsItem) { * @return bgpSessions **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getBgpSessions() { return bgpSessions; @@ -99,6 +97,10 @@ public void setBgpSessions(List bgpSessions) { /** * 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 BgpSessionList instance itself */ public BgpSessionList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public BgpSessionList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpSessionList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java index 3035e71c2..b5292a450 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public BgpSessionNeighbors addBgpNeighborsItem(BgpNeighborData bgpNeighborsItem) * @return bgpNeighbors **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of BGP session neighbor data") public List getBgpNeighbors() { return bgpNeighbors; @@ -99,6 +97,10 @@ public void setBgpNeighbors(List bgpNeighbors) { /** * 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 BgpSessionNeighbors instance itself */ public BgpSessionNeighbors putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public BgpSessionNeighbors putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, BgpSessionNeighbors value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java index 68211269b..17810a230 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -79,7 +78,6 @@ public CapacityCheckPerFacilityInfo available(Boolean available) { * @return available **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAvailable() { return available; @@ -102,7 +100,6 @@ public CapacityCheckPerFacilityInfo facility(String facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFacility() { return facility; @@ -125,7 +122,6 @@ public CapacityCheckPerFacilityInfo plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlan() { return plan; @@ -148,7 +144,6 @@ public CapacityCheckPerFacilityInfo quantity(String quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getQuantity() { return quantity; @@ -169,6 +164,10 @@ public void setQuantity(String quantity) { /** * 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 CapacityCheckPerFacilityInfo instance itself */ public CapacityCheckPerFacilityInfo putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -180,6 +179,8 @@ public CapacityCheckPerFacilityInfo putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -187,6 +188,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -296,7 +300,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityCheckPerFacilityInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -332,8 +336,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java index ee2dcf5e9..a5658c03c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public CapacityCheckPerFacilityList addServersItem(CapacityCheckPerFacilityInfo * @return servers **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getServers() { return servers; @@ -99,6 +97,10 @@ public void setServers(List servers) { /** * 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 CapacityCheckPerFacilityList instance itself */ public CapacityCheckPerFacilityList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public CapacityCheckPerFacilityList putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityCheckPerFacilityList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java index 1afc44d44..0db5dcd14 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -79,7 +78,6 @@ public CapacityCheckPerMetroInfo available(Boolean available) { * @return available **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Returns true if there is enough capacity in the metro to fulfill the quantity set. Returns false if there is not enough.") public Boolean getAvailable() { return available; @@ -102,7 +100,6 @@ public CapacityCheckPerMetroInfo metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The metro ID or code sent to check capacity.") public String getMetro() { return metro; @@ -125,7 +122,6 @@ public CapacityCheckPerMetroInfo plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The plan ID or slug sent to check capacity.") public String getPlan() { return plan; @@ -148,7 +144,6 @@ public CapacityCheckPerMetroInfo quantity(String quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The number of servers sent to check capacity.") public String getQuantity() { return quantity; @@ -169,6 +164,10 @@ public void setQuantity(String quantity) { /** * 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 CapacityCheckPerMetroInfo instance itself */ public CapacityCheckPerMetroInfo putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -180,6 +179,8 @@ public CapacityCheckPerMetroInfo putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -187,6 +188,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -296,7 +300,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityCheckPerMetroInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -332,8 +336,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java index 5a492a0e4..54385d196 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public CapacityCheckPerMetroList addServersItem(CapacityCheckPerMetroInfo server * @return servers **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getServers() { return servers; @@ -99,6 +97,10 @@ public void setServers(List servers) { /** * 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 CapacityCheckPerMetroList instance itself */ public CapacityCheckPerMetroList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public CapacityCheckPerMetroList putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityCheckPerMetroList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java index a35f90251..e2f6a2977 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public CapacityInput addServersItem(ServerInfo serversItem) { * @return servers **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getServers() { return servers; @@ -99,6 +97,10 @@ public void setServers(List servers) { /** * 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 CapacityInput instance itself */ public CapacityInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public CapacityInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java index 65c927015..89c04e89d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public CapacityLevelPerBaremetal level(String level) { * @return level **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLevel() { return level; @@ -88,6 +86,10 @@ public void setLevel(String level) { /** * 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 CapacityLevelPerBaremetal instance itself */ public CapacityLevelPerBaremetal putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public CapacityLevelPerBaremetal putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -200,7 +207,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityLevelPerBaremetal value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -236,8 +243,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java index 5ca3457b1..ccaf473e5 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public CapacityList capacity(CapacityReport capacity) { * @return capacity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityReport getCapacity() { return capacity; @@ -89,6 +87,10 @@ public void setCapacity(CapacityReport capacity) { /** * 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 CapacityList instance itself */ public CapacityList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public CapacityList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java index ee2ffb0f4..838c87bd2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerFacility.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -100,7 +99,6 @@ public CapacityPerFacility baremetal0(CapacityLevelPerBaremetal baremetal0) { * @return baremetal0 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal0() { return baremetal0; @@ -123,7 +121,6 @@ public CapacityPerFacility baremetal1(CapacityLevelPerBaremetal baremetal1) { * @return baremetal1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal1() { return baremetal1; @@ -146,7 +143,6 @@ public CapacityPerFacility baremetal2(CapacityLevelPerBaremetal baremetal2) { * @return baremetal2 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal2() { return baremetal2; @@ -169,7 +165,6 @@ public CapacityPerFacility baremetal2a(CapacityLevelPerBaremetal baremetal2a) { * @return baremetal2a **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal2a() { return baremetal2a; @@ -192,7 +187,6 @@ public CapacityPerFacility baremetal2a2(CapacityLevelPerBaremetal baremetal2a2) * @return baremetal2a2 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal2a2() { return baremetal2a2; @@ -215,7 +209,6 @@ public CapacityPerFacility baremetal3(CapacityLevelPerBaremetal baremetal3) { * @return baremetal3 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal3() { return baremetal3; @@ -238,7 +231,6 @@ public CapacityPerFacility baremetalS(CapacityLevelPerBaremetal baremetalS) { * @return baremetalS **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetalS() { return baremetalS; @@ -261,7 +253,6 @@ public CapacityPerFacility c2MediumX86(CapacityLevelPerBaremetal c2MediumX86) { * @return c2MediumX86 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getC2MediumX86() { return c2MediumX86; @@ -284,7 +275,6 @@ public CapacityPerFacility m2XlargeX86(CapacityLevelPerBaremetal m2XlargeX86) { * @return m2XlargeX86 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getM2XlargeX86() { return m2XlargeX86; @@ -305,6 +295,10 @@ public void setM2XlargeX86(CapacityLevelPerBaremetal m2XlargeX86) { /** * 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 CapacityPerFacility instance itself */ public CapacityPerFacility putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -316,6 +310,8 @@ public CapacityPerFacility putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -323,6 +319,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -474,7 +473,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityPerFacility value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -510,8 +509,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java index b4a293bd2..77f21dddb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public CapacityPerMetroInput addServersItem(MetroServerInfo serversItem) { * @return servers **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getServers() { return servers; @@ -99,6 +97,10 @@ public void setServers(List servers) { /** * 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 CapacityPerMetroInput instance itself */ public CapacityPerMetroInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public CapacityPerMetroInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityPerMetroInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java index 5a28def40..8e92aebe0 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacility.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public CapacityPerNewFacility baremetal1e(CapacityLevelPerBaremetal baremetal1e) * @return baremetal1e **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityLevelPerBaremetal getBaremetal1e() { return baremetal1e; @@ -89,6 +87,10 @@ public void setBaremetal1e(CapacityLevelPerBaremetal baremetal1e) { /** * 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 CapacityPerNewFacility instance itself */ public CapacityPerNewFacility putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public CapacityPerNewFacility putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityPerNewFacility value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java index 360f612ce..7e39cecf6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityReport.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -121,7 +120,6 @@ public CapacityReport ams1(CapacityPerFacility ams1) { * @return ams1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getAms1() { return ams1; @@ -144,7 +142,6 @@ public CapacityReport atl1(CapacityPerNewFacility atl1) { * @return atl1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getAtl1() { return atl1; @@ -167,7 +164,6 @@ public CapacityReport dfw1(CapacityPerNewFacility dfw1) { * @return dfw1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getDfw1() { return dfw1; @@ -190,7 +186,6 @@ public CapacityReport ewr1(CapacityPerFacility ewr1) { * @return ewr1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getEwr1() { return ewr1; @@ -213,7 +208,6 @@ public CapacityReport fra1(CapacityPerNewFacility fra1) { * @return fra1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getFra1() { return fra1; @@ -236,7 +230,6 @@ public CapacityReport iad1(CapacityPerNewFacility iad1) { * @return iad1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getIad1() { return iad1; @@ -259,7 +252,6 @@ public CapacityReport lax1(CapacityPerNewFacility lax1) { * @return lax1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getLax1() { return lax1; @@ -282,7 +274,6 @@ public CapacityReport nrt1(CapacityPerFacility nrt1) { * @return nrt1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getNrt1() { return nrt1; @@ -305,7 +296,6 @@ public CapacityReport ord1(CapacityPerNewFacility ord1) { * @return ord1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getOrd1() { return ord1; @@ -328,7 +318,6 @@ public CapacityReport sea1(CapacityPerNewFacility sea1) { * @return sea1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getSea1() { return sea1; @@ -351,7 +340,6 @@ public CapacityReport sin1(CapacityPerNewFacility sin1) { * @return sin1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getSin1() { return sin1; @@ -374,7 +362,6 @@ public CapacityReport sjc1(CapacityPerFacility sjc1) { * @return sjc1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSjc1() { return sjc1; @@ -397,7 +384,6 @@ public CapacityReport syd1(CapacityPerNewFacility syd1) { * @return syd1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getSyd1() { return syd1; @@ -420,7 +406,6 @@ public CapacityReport yyz1(CapacityPerNewFacility yyz1) { * @return yyz1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerNewFacility getYyz1() { return yyz1; @@ -441,6 +426,10 @@ public void setYyz1(CapacityPerNewFacility yyz1) { /** * 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 CapacityReport instance itself */ public CapacityReport putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -452,6 +441,8 @@ public CapacityReport putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -459,6 +450,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -645,7 +639,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CapacityReport value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -681,8 +675,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java index 2aefcf96c..0a7720bd2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public Coordinates latitude(String latitude) { * @return latitude **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLatitude() { return latitude; @@ -94,7 +92,6 @@ public Coordinates longitude(String longitude) { * @return longitude **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLongitude() { return longitude; @@ -115,6 +112,10 @@ public void setLongitude(String longitude) { /** * 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 Coordinates instance itself */ public Coordinates putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public Coordinates putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -233,7 +239,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Coordinates value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -269,8 +275,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201Response.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201Response.java index 45ead3a9a..d67ef5301 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201Response.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201Response.java @@ -24,8 +24,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequest.java index c3e16e53f..b0a4e16f8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java index 3afcca523..e281a8c02 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public CreateEmailInput address(String address) { * @return address **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getAddress() { return address; @@ -88,6 +86,10 @@ public void setAddress(String address) { /** * 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 CreateEmailInput instance itself */ public CreateEmailInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public CreateEmailInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -208,7 +215,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CreateEmailInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -244,8 +251,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java index d42cd80e5..736e58f7c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java index 97720b36e..31f5fd7c7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -92,7 +91,6 @@ public CreateSelfServiceReservationRequest addItemItem(SelfServiceReservationIte * @return item **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getItem() { return item; @@ -115,7 +113,6 @@ public CreateSelfServiceReservationRequest notes(String notes) { * @return notes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNotes() { return notes; @@ -138,7 +135,6 @@ public CreateSelfServiceReservationRequest period(CreateSelfServiceReservationRe * @return period **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CreateSelfServiceReservationRequestPeriod getPeriod() { return period; @@ -161,7 +157,6 @@ public CreateSelfServiceReservationRequest startDate(OffsetDateTime startDate) { * @return startDate **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getStartDate() { return startDate; @@ -182,6 +177,10 @@ public void setStartDate(OffsetDateTime startDate) { /** * 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 CreateSelfServiceReservationRequest instance itself */ public CreateSelfServiceReservationRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -193,6 +192,8 @@ public CreateSelfServiceReservationRequest putAdditionalProperty(String key, Obj /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -200,6 +201,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -321,7 +325,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CreateSelfServiceReservationRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -357,8 +361,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java index 050553764..4e85e9cc2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -164,7 +163,6 @@ public CreateSelfServiceReservationRequestPeriod count(CountEnum count) { * @return count **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CountEnum getCount() { return count; @@ -187,7 +185,6 @@ public CreateSelfServiceReservationRequestPeriod unit(UnitEnum unit) { * @return unit **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UnitEnum getUnit() { return unit; @@ -208,6 +205,10 @@ public void setUnit(UnitEnum unit) { /** * 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 CreateSelfServiceReservationRequestPeriod instance itself */ public CreateSelfServiceReservationRequestPeriod putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -219,6 +220,8 @@ public CreateSelfServiceReservationRequestPeriod putAdditionalProperty(String ke /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -226,6 +229,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -323,7 +329,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CreateSelfServiceReservationRequestPeriod value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -359,8 +365,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java index 830f32fca..301347f08 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservation.java @@ -28,8 +28,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -50,6 +48,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -103,7 +102,6 @@ public DefaultIPReservation addon(Boolean addon) { * @return addon **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAddon() { return addon; @@ -134,7 +132,6 @@ public DefaultIPReservation addAssignmentsItem(IPAssignment assignmentsItem) { * @return assignments **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getAssignments() { return assignments; @@ -157,7 +154,6 @@ public DefaultIPReservation enabled(Boolean enabled) { * @return enabled **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getEnabled() { return enabled; @@ -180,7 +176,6 @@ public DefaultIPReservation facility(Facility facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Facility getFacility() { return facility; @@ -203,7 +198,6 @@ public DefaultIPReservation globalIp(Boolean globalIp) { * @return globalIp **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getGlobalIp() { return globalIp; @@ -226,7 +220,6 @@ public DefaultIPReservation requestedBy(User requestedBy) { * @return requestedBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public User getRequestedBy() { return requestedBy; @@ -249,7 +242,6 @@ public DefaultIPReservation available(String available) { * @return available **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAvailable() { return available; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java index e07af5c40..1df01cf91 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOf.java @@ -23,8 +23,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -96,7 +95,6 @@ public DefaultIPReservationAllOf addon(Boolean addon) { * @return addon **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAddon() { return addon; @@ -127,7 +125,6 @@ public DefaultIPReservationAllOf addAssignmentsItem(IPAssignment assignmentsItem * @return assignments **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getAssignments() { return assignments; @@ -150,7 +147,6 @@ public DefaultIPReservationAllOf enabled(Boolean enabled) { * @return enabled **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getEnabled() { return enabled; @@ -173,7 +169,6 @@ public DefaultIPReservationAllOf facility(Facility facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Facility getFacility() { return facility; @@ -196,7 +191,6 @@ public DefaultIPReservationAllOf globalIp(Boolean globalIp) { * @return globalIp **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getGlobalIp() { return globalIp; @@ -219,7 +213,6 @@ public DefaultIPReservationAllOf requestedBy(User requestedBy) { * @return requestedBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public User getRequestedBy() { return requestedBy; @@ -242,7 +235,6 @@ public DefaultIPReservationAllOf available(String available) { * @return available **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAvailable() { return available; @@ -263,6 +255,10 @@ public void setAvailable(String available) { /** * 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 DefaultIPReservationAllOf instance itself */ public DefaultIPReservationAllOf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -274,6 +270,8 @@ public DefaultIPReservationAllOf putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -281,6 +279,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -415,7 +416,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DefaultIPReservationAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -451,8 +452,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java index cd73ad43d..9bd45d737 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -101,7 +100,6 @@ public DefaultIPReservationCreateInput comments(String comments) { * @return comments **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getComments() { return comments; @@ -124,7 +122,6 @@ public DefaultIPReservationCreateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -147,7 +144,6 @@ public DefaultIPReservationCreateInput details(String details) { * @return details **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDetails() { return details; @@ -170,7 +166,6 @@ public DefaultIPReservationCreateInput facility(String facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFacility() { return facility; @@ -193,7 +188,6 @@ public DefaultIPReservationCreateInput failOnApprovalRequired(Boolean failOnAppr * @return failOnApprovalRequired **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getFailOnApprovalRequired() { return failOnApprovalRequired; @@ -216,7 +210,6 @@ public DefaultIPReservationCreateInput metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(example = "SV", value = "The code of the metro you are requesting the IP reservation in.") public String getMetro() { return metro; @@ -239,7 +232,6 @@ public DefaultIPReservationCreateInput quantity(Integer quantity) { * @return quantity **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Integer getQuantity() { return quantity; @@ -270,7 +262,6 @@ public DefaultIPReservationCreateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -293,7 +284,6 @@ public DefaultIPReservationCreateInput type(String type) { * @return type **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getType() { return type; @@ -314,6 +304,10 @@ public void setType(String type) { /** * 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 DefaultIPReservationCreateInput instance itself */ public DefaultIPReservationCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -325,6 +319,8 @@ public DefaultIPReservationCreateInput putAdditionalProperty(String key, Object /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -332,6 +328,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -450,8 +449,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { @@ -475,7 +474,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DefaultIPReservationCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -511,8 +510,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java index 571f7bf46..ae8dd653b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java @@ -32,8 +32,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -54,6 +52,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -288,7 +287,6 @@ public Device alwaysPxe(Boolean alwaysPxe) { * @return alwaysPxe **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAlwaysPxe() { return alwaysPxe; @@ -311,7 +309,6 @@ public Device billingCycle(String billingCycle) { * @return billingCycle **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getBillingCycle() { return billingCycle; @@ -334,7 +331,6 @@ public Device bondingMode(Integer bondingMode) { * @return bondingMode **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getBondingMode() { return bondingMode; @@ -357,7 +353,6 @@ public Device createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -380,7 +375,6 @@ public Device createdBy(DeviceCreatedBy createdBy) { * @return createdBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public DeviceCreatedBy getCreatedBy() { return createdBy; @@ -403,7 +397,6 @@ public Device customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -426,7 +419,6 @@ public Device description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -449,7 +441,6 @@ public Device facility(Facility facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Facility getFacility() { return facility; @@ -472,7 +463,6 @@ public Device hardwareReservation(Href hardwareReservation) { * @return hardwareReservation **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getHardwareReservation() { return hardwareReservation; @@ -495,7 +485,6 @@ public Device hostname(String hostname) { * @return hostname **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHostname() { return hostname; @@ -518,7 +507,6 @@ public Device href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -541,7 +529,6 @@ public Device id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -564,7 +551,6 @@ public Device imageUrl(String imageUrl) { * @return imageUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getImageUrl() { return imageUrl; @@ -595,7 +581,6 @@ public Device addIpAddressesItem(IPAssignment ipAddressesItem) { * @return ipAddresses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getIpAddresses() { return ipAddresses; @@ -618,7 +603,6 @@ public Device ipxeScriptUrl(String ipxeScriptUrl) { * @return ipxeScriptUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getIpxeScriptUrl() { return ipxeScriptUrl; @@ -641,7 +625,6 @@ public Device iqn(String iqn) { * @return iqn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getIqn() { return iqn; @@ -664,7 +647,6 @@ public Device locked(Boolean locked) { * @return locked **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getLocked() { return locked; @@ -687,7 +669,6 @@ public Device metro(DeviceMetro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public DeviceMetro getMetro() { return metro; @@ -718,7 +699,6 @@ public Device addNetworkPortsItem(Port networkPortsItem) { * @return networkPorts **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getNetworkPorts() { return networkPorts; @@ -741,7 +721,6 @@ public Device operatingSystem(OperatingSystem operatingSystem) { * @return operatingSystem **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OperatingSystem getOperatingSystem() { return operatingSystem; @@ -772,7 +751,6 @@ public Device addActionsItem(DeviceActionsInner actionsItem) { * @return actions **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getActions() { return actions; @@ -795,7 +773,6 @@ public Device plan(Plan plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Plan getPlan() { return plan; @@ -818,7 +795,6 @@ public Device project(DeviceProject project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public DeviceProject getProject() { return project; @@ -841,7 +817,6 @@ public Device projectLite(DeviceProjectLite projectLite) { * @return projectLite **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public DeviceProjectLite getProjectLite() { return projectLite; @@ -872,7 +847,6 @@ public Device addProvisioningEventsItem(Event provisioningEventsItem) { * @return provisioningEvents **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProvisioningEvents() { return provisioningEvents; @@ -895,7 +869,6 @@ public Device provisioningPercentage(Float provisioningPercentage) { * @return provisioningPercentage **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Only visible while device provisioning") public Float getProvisioningPercentage() { return provisioningPercentage; @@ -918,7 +891,6 @@ public Device rootPassword(String rootPassword) { * @return rootPassword **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Root password is automatically generated when server is provisioned and it is removed after 24 hours") public String getRootPassword() { return rootPassword; @@ -941,7 +913,6 @@ public Device shortId(String shortId) { * @return shortId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getShortId() { return shortId; @@ -964,7 +935,6 @@ public Device spotInstance(Boolean spotInstance) { * @return spotInstance **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether or not the device is a spot instance.") public Boolean getSpotInstance() { return spotInstance; @@ -987,7 +957,6 @@ public Device spotPriceMax(Float spotPriceMax) { * @return spotPriceMax **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The maximum price per hour you are willing to pay to keep this spot instance. If you are outbid, the termination will be set allowing two minutes before shutdown.") public Float getSpotPriceMax() { return spotPriceMax; @@ -1018,7 +987,6 @@ public Device addSshKeysItem(Href sshKeysItem) { * @return sshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getSshKeys() { return sshKeys; @@ -1041,7 +1009,6 @@ public Device state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public StateEnum getState() { return state; @@ -1064,7 +1031,6 @@ public Device switchUuid(String switchUuid) { * @return switchUuid **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Switch short id. This can be used to determine if two devices are connected to the same switch, for example.") public String getSwitchUuid() { return switchUuid; @@ -1095,7 +1061,6 @@ public Device addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -1118,7 +1083,6 @@ public Device terminationTime(OffsetDateTime terminationTime) { * @return terminationTime **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When the device will be terminated. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid.") public OffsetDateTime getTerminationTime() { return terminationTime; @@ -1141,7 +1105,6 @@ public Device updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -1164,7 +1127,6 @@ public Device user(String user) { * @return user **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUser() { return user; @@ -1187,7 +1149,6 @@ public Device userdata(String userdata) { * @return userdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUserdata() { return userdata; @@ -1218,7 +1179,6 @@ public Device addVolumesItem(Href volumesItem) { * @return volumes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVolumes() { return volumes; @@ -1239,6 +1199,10 @@ public void setVolumes(List volumes) { /** * 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 Device instance itself */ public Device putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -1250,6 +1214,8 @@ public Device putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -1257,6 +1223,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -1582,8 +1551,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("switch_uuid") != null && !jsonObj.get("switch_uuid").isJsonNull()) && !jsonObj.get("switch_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `switch_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("switch_uuid").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { @@ -1624,7 +1593,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Device value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -1660,8 +1629,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java index ad65f7d1e..e876f50b8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public DeviceActionsInner type(String type) { * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getType() { return type; @@ -94,7 +92,6 @@ public DeviceActionsInner name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -115,6 +112,10 @@ public void setName(String name) { /** * 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 DeviceActionsInner instance itself */ public DeviceActionsInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public DeviceActionsInner putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -233,7 +239,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceActionsInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -269,8 +275,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java index 9beb1b155..5fa50d3c6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; @@ -46,6 +44,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -222,7 +221,6 @@ public DeviceCreateInput alwaysPxe(Boolean alwaysPxe) { * @return alwaysPxe **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot.") public Boolean getAlwaysPxe() { return alwaysPxe; @@ -245,7 +243,6 @@ public DeviceCreateInput billingCycle(BillingCycleEnum billingCycle) { * @return billingCycle **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The billing cycle of the device.") public BillingCycleEnum getBillingCycle() { return billingCycle; @@ -268,7 +265,6 @@ public DeviceCreateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Customdata is an arbitrary JSON value that can be accessed via the metadata service.") public Object getCustomdata() { return customdata; @@ -291,7 +287,6 @@ public DeviceCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Any description of the device or how it will be used. This may be used to inform other API consumers with project access.") public String getDescription() { return description; @@ -322,7 +317,6 @@ public DeviceCreateInput addFacilityItem(String facilityItem) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[\"sv15\"]", value = "The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail.") public List getFacility() { return facility; @@ -353,7 +347,6 @@ public DeviceCreateInput addFeaturesItem(String featuresItem) { * @return features **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria.") public List getFeatures() { return features; @@ -376,7 +369,6 @@ public DeviceCreateInput hardwareReservationId(String hardwareReservationId) { * @return hardwareReservationId **/ @javax.annotation.Nullable - @ApiModelProperty(example = "next-available", value = "The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details.") public String getHardwareReservationId() { return hardwareReservationId; @@ -399,7 +391,6 @@ public DeviceCreateInput hostname(String hostname) { * @return hostname **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The hostname to use within the operating system. The same hostname may be used on multiple devices within a project.") public String getHostname() { return hostname; @@ -430,7 +421,6 @@ public DeviceCreateInput addIpAddressesItem(DeviceCreateInputIpAddressesInner ip * @return ipAddresses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled.") public List getIpAddresses() { return ipAddresses; @@ -453,7 +443,6 @@ public DeviceCreateInput ipxeScriptUrl(String ipxeScriptUrl) { * @return ipxeScriptUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details.") public String getIpxeScriptUrl() { return ipxeScriptUrl; @@ -476,7 +465,6 @@ public DeviceCreateInput locked(Boolean locked) { * @return locked **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether the device should be locked, preventing accidental deletion.") public Boolean getLocked() { return locked; @@ -499,7 +487,6 @@ public DeviceCreateInput metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(example = "sv", value = "Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided.") public String getMetro() { return metro; @@ -522,7 +509,6 @@ public DeviceCreateInput noSshKeys(Boolean noSshKeys) { * @return noSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified") public Boolean getNoSshKeys() { return noSshKeys; @@ -545,7 +531,6 @@ public DeviceCreateInput operatingSystem(String operatingSystem) { * @return operatingSystem **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans.") public String getOperatingSystem() { return operatingSystem; @@ -568,7 +553,6 @@ public DeviceCreateInput plan(String plan) { * @return plan **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "c3.large.x86", required = true, value = "The slug of the device plan to provision.") public String getPlan() { return plan; @@ -591,7 +575,6 @@ public DeviceCreateInput privateIpv4SubnetSize(BigDecimal privateIpv4SubnetSize) * @return privateIpv4SubnetSize **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device.") public BigDecimal getPrivateIpv4SubnetSize() { return privateIpv4SubnetSize; @@ -622,7 +605,6 @@ public DeviceCreateInput addProjectSshKeysItem(UUID projectSshKeysItem) { * @return projectSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. ") public List getProjectSshKeys() { return projectSshKeys; @@ -645,7 +627,6 @@ public DeviceCreateInput publicIpv4SubnetSize(BigDecimal publicIpv4SubnetSize) { * @return publicIpv4SubnetSize **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request.") public BigDecimal getPublicIpv4SubnetSize() { return publicIpv4SubnetSize; @@ -668,7 +649,6 @@ public DeviceCreateInput spotInstance(Boolean spotInstance) { * @return spotInstance **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getSpotInstance() { return spotInstance; @@ -691,7 +671,6 @@ public DeviceCreateInput spotPriceMax(Float spotPriceMax) { * @return spotPriceMax **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getSpotPriceMax() { return spotPriceMax; @@ -722,7 +701,6 @@ public DeviceCreateInput addSshKeysItem(SSHKeyInput sshKeysItem) { * @return sshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. ") public List getSshKeys() { return sshKeys; @@ -753,7 +731,6 @@ public DeviceCreateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -776,7 +753,6 @@ public DeviceCreateInput terminationTime(OffsetDateTime terminationTime) { * @return terminationTime **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getTerminationTime() { return terminationTime; @@ -807,7 +783,6 @@ public DeviceCreateInput addUserSshKeysItem(UUID userSshKeysItem) { * @return userSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. ") public List getUserSshKeys() { return userSshKeys; @@ -830,7 +805,6 @@ public DeviceCreateInput userdata(String userdata) { * @return userdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details.") public String getUserdata() { return userdata; @@ -851,6 +825,10 @@ public void setUserdata(String userdata) { /** * 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 DeviceCreateInput instance itself */ public DeviceCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -862,6 +840,8 @@ public DeviceCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -869,6 +849,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -1040,12 +1023,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the json data is an array - if (!jsonObj.get("facility").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); } - // ensure the json data is an array - if (!jsonObj.get("features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("hardware_reservation_id") != null && !jsonObj.get("hardware_reservation_id").isJsonNull()) && !jsonObj.get("hardware_reservation_id").isJsonPrimitive()) { @@ -1080,8 +1063,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("plan").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); } - // ensure the json data is an array - if (!jsonObj.get("project_ssh_keys").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); } if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { @@ -1098,12 +1081,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // ensure the json data is an array - if (!jsonObj.get("user_ssh_keys").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { @@ -1127,7 +1110,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -1163,8 +1146,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java index 10f2143bb..6f5a27227 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -129,7 +128,6 @@ public DeviceCreateInputIpAddressesInner addressFamily(AddressFamilyEnum address * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(example = "4", value = "Address Family for IP Address") public AddressFamilyEnum getAddressFamily() { return addressFamily; @@ -152,7 +150,6 @@ public DeviceCreateInputIpAddressesInner cidr(BigDecimal cidr) { * @return cidr **/ @javax.annotation.Nullable - @ApiModelProperty(example = "28", value = "Cidr Size for the IP Block created. Valid values depends on the operating system being provisioned. (28..32 for IPv4 addresses, 124..127 for IPv6 addresses)") public BigDecimal getCidr() { return cidr; @@ -183,7 +180,6 @@ public DeviceCreateInputIpAddressesInner addIpReservationsItem(String ipReservat * @return ipReservations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "UUIDs of any IP reservations to use when assigning IPs") public List getIpReservations() { return ipReservations; @@ -206,7 +202,6 @@ public DeviceCreateInputIpAddressesInner _public(Boolean _public) { * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Address Type for IP Address") public Boolean getPublic() { return _public; @@ -227,6 +222,10 @@ public void setPublic(Boolean _public) { /** * 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 DeviceCreateInputIpAddressesInner instance itself */ public DeviceCreateInputIpAddressesInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -238,6 +237,8 @@ public DeviceCreateInputIpAddressesInner putAdditionalProperty(String key, Objec /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -245,6 +246,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -327,8 +331,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreateInputIpAddressesInner is not found in the empty JSON string", DeviceCreateInputIpAddressesInner.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("ip_reservations").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ip_reservations") != null && !jsonObj.get("ip_reservations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_reservations` to be an array in the JSON string but got `%s`", jsonObj.get("ip_reservations").toString())); } } @@ -349,7 +353,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceCreateInputIpAddressesInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -385,8 +389,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java index 04c421977..cf04eaace 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -105,7 +104,6 @@ public DeviceCreatedBy avatarThumbUrl(String avatarThumbUrl) { * @return avatarThumbUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Avatar thumbnail URL of the User") public String getAvatarThumbUrl() { return avatarThumbUrl; @@ -128,7 +126,6 @@ public DeviceCreatedBy createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When the user was created") public OffsetDateTime getCreatedAt() { return createdAt; @@ -151,7 +148,6 @@ public DeviceCreatedBy email(String email) { * @return email **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Primary email address of the User") public String getEmail() { return email; @@ -174,7 +170,6 @@ public DeviceCreatedBy firstName(String firstName) { * @return firstName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "First name of the User") public String getFirstName() { return firstName; @@ -197,7 +192,6 @@ public DeviceCreatedBy fullName(String fullName) { * @return fullName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Full name of the User") public String getFullName() { return fullName; @@ -220,7 +214,6 @@ public DeviceCreatedBy href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "API URL uniquely representing the User") public String getHref() { return href; @@ -243,7 +236,6 @@ public DeviceCreatedBy id(UUID id) { * @return id **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "ID of the User") public UUID getId() { return id; @@ -266,7 +258,6 @@ public DeviceCreatedBy lastName(String lastName) { * @return lastName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Last name of the User") public String getLastName() { return lastName; @@ -289,7 +280,6 @@ public DeviceCreatedBy shortId(String shortId) { * @return shortId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Short ID of the User") public String getShortId() { return shortId; @@ -312,7 +302,6 @@ public DeviceCreatedBy updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When the user details were last updated") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -333,6 +322,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 DeviceCreatedBy instance itself */ public DeviceCreatedBy putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -344,6 +337,8 @@ public DeviceCreatedBy putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -351,6 +346,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -502,7 +500,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceCreatedBy value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -538,8 +536,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java index bbe1a3881..87abcf83b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -83,7 +82,6 @@ public DeviceList addDevicesItem(Device devicesItem) { * @return devices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getDevices() { return devices; @@ -106,7 +104,6 @@ public DeviceList meta(Meta meta) { * @return meta **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Meta getMeta() { return meta; @@ -127,6 +124,10 @@ public void setMeta(Meta meta) { /** * 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 DeviceList instance itself */ public DeviceList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +139,8 @@ public DeviceList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +148,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -257,7 +263,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -293,8 +299,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java index 0aa0f6672..14ed4d3c6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public DeviceMetro code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -103,7 +101,6 @@ public DeviceMetro country(String country) { * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountry() { return country; @@ -126,7 +123,6 @@ public DeviceMetro id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -149,7 +145,6 @@ public DeviceMetro name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -170,6 +165,10 @@ public void setName(String name) { /** * 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 DeviceMetro instance itself */ public DeviceMetro putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public DeviceMetro putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -300,7 +304,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceMetro value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -336,8 +340,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java index 7737a57cc..de563ad06 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public DeviceProject href(String href) { * @return href **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getHref() { return href; @@ -88,6 +86,10 @@ public void setHref(String href) { /** * 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 DeviceProject instance itself */ public DeviceProject putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public DeviceProject putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -208,7 +215,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceProject value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -244,8 +251,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java index e90b2099d..0b24f9caf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public DeviceProjectLite href(String href) { * @return href **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getHref() { return href; @@ -88,6 +86,10 @@ public void setHref(String href) { /** * 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 DeviceProjectLite instance itself */ public DeviceProjectLite putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public DeviceProjectLite putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -208,7 +215,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceProjectLite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -244,8 +251,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java index 381dda31c..2f8d3c2c9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -109,7 +108,6 @@ public DeviceUpdateInput alwaysPxe(Boolean alwaysPxe) { * @return alwaysPxe **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAlwaysPxe() { return alwaysPxe; @@ -132,7 +130,6 @@ public DeviceUpdateInput billingCycle(String billingCycle) { * @return billingCycle **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getBillingCycle() { return billingCycle; @@ -155,7 +152,6 @@ public DeviceUpdateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -178,7 +174,6 @@ public DeviceUpdateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -201,7 +196,6 @@ public DeviceUpdateInput hostname(String hostname) { * @return hostname **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHostname() { return hostname; @@ -224,7 +218,6 @@ public DeviceUpdateInput ipxeScriptUrl(String ipxeScriptUrl) { * @return ipxeScriptUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getIpxeScriptUrl() { return ipxeScriptUrl; @@ -247,7 +240,6 @@ public DeviceUpdateInput locked(Boolean locked) { * @return locked **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getLocked() { return locked; @@ -270,7 +262,6 @@ public DeviceUpdateInput networkFrozen(Boolean networkFrozen) { * @return networkFrozen **/ @javax.annotation.Nullable - @ApiModelProperty(value = "If true, this instance can not be converted to a different network type.") public Boolean getNetworkFrozen() { return networkFrozen; @@ -293,7 +284,6 @@ public DeviceUpdateInput spotInstance(Boolean spotInstance) { * @return spotInstance **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getSpotInstance() { return spotInstance; @@ -324,7 +314,6 @@ public DeviceUpdateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -347,7 +336,6 @@ public DeviceUpdateInput userdata(String userdata) { * @return userdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUserdata() { return userdata; @@ -368,6 +356,10 @@ public void setUserdata(String userdata) { /** * 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 DeviceUpdateInput instance itself */ public DeviceUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -379,6 +371,8 @@ public DeviceUpdateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -386,6 +380,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -501,8 +498,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { @@ -526,7 +523,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -562,8 +559,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java index 03cdcb715..645792242 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public DeviceUsage quantity(String quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getQuantity() { return quantity; @@ -98,7 +96,6 @@ public DeviceUsage total(String total) { * @return total **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTotal() { return total; @@ -121,7 +118,6 @@ public DeviceUsage unit(String unit) { * @return unit **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUnit() { return unit; @@ -142,6 +138,10 @@ public void setUnit(String unit) { /** * 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 DeviceUsage instance itself */ public DeviceUsage putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -153,6 +153,8 @@ public DeviceUsage putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -160,6 +162,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -266,7 +271,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceUsage value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -302,8 +307,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java index 3e634d3f8..75ba5e1b2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public DeviceUsageList addUsagesItem(DeviceUsage usagesItem) { * @return usages **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getUsages() { return usages; @@ -99,6 +97,10 @@ public void setUsages(List usages) { /** * 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 DeviceUsageList instance itself */ public DeviceUsageList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public DeviceUsageList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, DeviceUsageList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java index 6b4eb3df6..7526e2783 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -84,7 +83,6 @@ public Email address(String address) { * @return address **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAddress() { return address; @@ -107,7 +105,6 @@ public Email _default(Boolean _default) { * @return _default **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefault() { return _default; @@ -130,7 +127,6 @@ public Email href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -153,7 +149,6 @@ public Email id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -176,7 +171,6 @@ public Email verified(Boolean verified) { * @return verified **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getVerified() { return verified; @@ -197,6 +191,10 @@ public void setVerified(Boolean verified) { /** * 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 Email instance itself */ public Email putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -208,6 +206,8 @@ public Email putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -215,6 +215,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -327,7 +330,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Email value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -363,8 +366,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java index c768faac3..8ad8ebaac 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public EmailInput address(String address) { * @return address **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getAddress() { return address; @@ -94,7 +92,6 @@ public EmailInput _default(Boolean _default) { * @return _default **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefault() { return _default; @@ -115,6 +112,10 @@ public void setDefault(Boolean _default) { /** * 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 EmailInput instance itself */ public EmailInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public EmailInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -238,7 +244,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, EmailInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -274,8 +280,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java index 2c02c5614..6314c0baf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -112,7 +111,6 @@ public Entitlement description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -135,7 +133,6 @@ public Entitlement featureAccess(Object featureAccess) { * @return featureAccess **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getFeatureAccess() { return featureAccess; @@ -158,7 +155,6 @@ public Entitlement href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -181,7 +177,6 @@ public Entitlement id(UUID id) { * @return id **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public UUID getId() { return id; @@ -204,7 +199,6 @@ public Entitlement instanceQuota(Object instanceQuota) { * @return instanceQuota **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getInstanceQuota() { return instanceQuota; @@ -227,7 +221,6 @@ public Entitlement ipQuota(Object ipQuota) { * @return ipQuota **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getIpQuota() { return ipQuota; @@ -250,7 +243,6 @@ public Entitlement name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -273,7 +265,6 @@ public Entitlement projectQuota(Integer projectQuota) { * @return projectQuota **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getProjectQuota() { return projectQuota; @@ -296,7 +287,6 @@ public Entitlement slug(String slug) { * @return slug **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getSlug() { return slug; @@ -319,7 +309,6 @@ public Entitlement volumeLimits(Object volumeLimits) { * @return volumeLimits **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getVolumeLimits() { return volumeLimits; @@ -342,7 +331,6 @@ public Entitlement volumeQuota(Object volumeQuota) { * @return volumeQuota **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getVolumeQuota() { return volumeQuota; @@ -365,7 +353,6 @@ public Entitlement weight(Integer weight) { * @return weight **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Integer getWeight() { return weight; @@ -386,6 +373,10 @@ public void setWeight(Integer weight) { /** * 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 Entitlement instance itself */ public Entitlement putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -397,6 +388,8 @@ public Entitlement putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -404,6 +397,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -553,7 +549,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Entitlement value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -589,8 +585,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java index 1c724f07a..79db2306f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -49,7 +48,6 @@ /** * Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. */ -@ApiModel(description = "Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set.") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Error { public static final String SERIALIZED_NAME_ERROR = "error"; @@ -74,7 +72,6 @@ public Error error(String error) { * @return error **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A description of the error that caused the request to fail.") public String getError() { return error; @@ -105,7 +102,6 @@ public Error addErrorsItem(String errorsItem) { * @return errors **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of errors that contributed to the request failing.") public List getErrors() { return errors; @@ -126,6 +122,10 @@ public void setErrors(List errors) { /** * 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 Error instance itself */ public Error putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -137,6 +137,8 @@ public Error putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -144,6 +146,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -223,8 +228,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } } @@ -245,7 +250,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Error value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -281,8 +286,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java index 6fdcc16fe..e8996e99b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -100,7 +99,6 @@ public Event body(String body) { * @return body **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getBody() { return body; @@ -123,7 +121,6 @@ public Event createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -146,7 +143,6 @@ public Event href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -169,7 +165,6 @@ public Event id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -192,7 +187,6 @@ public Event interpolated(String interpolated) { * @return interpolated **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getInterpolated() { return interpolated; @@ -223,7 +217,6 @@ public Event addRelationshipsItem(Href relationshipsItem) { * @return relationships **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRelationships() { return relationships; @@ -246,7 +239,6 @@ public Event state(String state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getState() { return state; @@ -269,7 +261,6 @@ public Event type(String type) { * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getType() { return type; @@ -290,6 +281,10 @@ public void setType(String type) { /** * 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 Event instance itself */ public Event putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -301,6 +296,8 @@ public Event putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -308,6 +305,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -452,7 +452,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Event value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -488,8 +488,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java index 968f27ba1..d9cbc3807 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -83,7 +82,6 @@ public EventList addEventsItem(Event eventsItem) { * @return events **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getEvents() { return events; @@ -106,7 +104,6 @@ public EventList meta(Meta meta) { * @return meta **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Meta getMeta() { return meta; @@ -127,6 +124,10 @@ public void setMeta(Meta meta) { /** * 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 EventList instance itself */ public EventList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +139,8 @@ public EventList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +148,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -257,7 +263,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, EventList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -293,8 +299,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java index 1413fd2db..7a02e5e00 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -230,7 +229,6 @@ public FabricServiceToken expiresAt(OffsetDateTime expiresAt) { * @return expiresAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The expiration date and time of the Fabric service token. Once a service token is expired, it is no longer redeemable.") public OffsetDateTime getExpiresAt() { return expiresAt; @@ -253,7 +251,6 @@ public FabricServiceToken id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The service token UUID that can be used on the Fabric Portal to create an connection from Metal to another Fabric service provider.") public UUID getId() { return id; @@ -276,7 +273,6 @@ public FabricServiceToken maxAllowedSpeed(String maxAllowedSpeed) { * @return maxAllowedSpeed **/ @javax.annotation.Nullable - @ApiModelProperty(example = "'200000000' or '200mbps'", value = "The maximum speed that can be selected on the Fabric Portal when configuring a connection with the service token. The speed is recorded in bps, but can be set by using any of the following units: 'bps', 'mbps', or 'gbps'. This speed is automatically capped depending on the tier of the organization. If you would like to upgrade to another tier, please contact our Support team.") public String getMaxAllowedSpeed() { return maxAllowedSpeed; @@ -299,7 +295,6 @@ public FabricServiceToken role(RoleEnum role) { * @return role **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Either primary or redundant, depending on the role of the connection port the token is associated with.") public RoleEnum getRole() { return role; @@ -322,7 +317,6 @@ public FabricServiceToken serviceTokenType(ServiceTokenTypeEnum serviceTokenType * @return serviceTokenType **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The type of service token that has been created. Currently, only A-side service tokens are available.") public ServiceTokenTypeEnum getServiceTokenType() { return serviceTokenType; @@ -345,7 +339,6 @@ public FabricServiceToken state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The state of the service token that corresponds with the service token state on Fabric. An inactive state refers to a token that has not been redeemed yet on the Fabric side, an active state refers to a token that has already been redeemed, and an expired state refers to a token that has reached its expiry time.") public StateEnum getState() { return state; @@ -366,6 +359,10 @@ public void setState(StateEnum state) { /** * 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 FabricServiceToken instance itself */ public FabricServiceToken putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -377,6 +374,8 @@ public FabricServiceToken putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -384,6 +383,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -505,7 +507,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, FabricServiceToken value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -541,8 +543,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java index d3e078545..b13284ede 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -149,7 +148,6 @@ public Facility address(Address address) { * @return address **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Address getAddress() { return address; @@ -172,7 +170,6 @@ public Facility code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -203,7 +200,6 @@ public Facility addFeaturesItem(FeaturesEnum featuresItem) { * @return features **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[\"baremetal\",\"backend_transfer\",\"global_ipv4\"]", value = "") public List getFeatures() { return features; @@ -226,7 +222,6 @@ public Facility id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -257,7 +252,6 @@ public Facility addIpRangesItem(String ipRangesItem) { * @return ipRanges **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[\"2604:1380::/36\",\"147.75.192.0/21\"]", value = "IP ranges registered in facility. Can be used for GeoIP location") public List getIpRanges() { return ipRanges; @@ -280,7 +274,6 @@ public Facility metro(DeviceMetro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public DeviceMetro getMetro() { return metro; @@ -303,7 +296,6 @@ public Facility name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -324,6 +316,10 @@ public void setName(String name) { /** * 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 Facility instance itself */ public Facility putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -335,6 +331,8 @@ public Facility putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -342,6 +340,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -440,15 +441,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } - // ensure the json data is an array - if (!jsonObj.get("features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("ip_ranges").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } // validate the optional field `metro` @@ -476,7 +477,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Facility value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -512,8 +513,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java index f691d4f37..d0e9a8989 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public FacilityList addFacilitiesItem(Facility facilitiesItem) { * @return facilities **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getFacilities() { return facilities; @@ -99,6 +97,10 @@ public void setFacilities(List facilities) { /** * 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 FacilityList instance itself */ public FacilityList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public FacilityList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, FacilityList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java index 42a1645b6..c4c9677ef 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java @@ -27,8 +27,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java index 646f61b30..0d463d7a8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -85,7 +84,6 @@ public GlobalBgpRange addressFamily(Integer addressFamily) { * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getAddressFamily() { return addressFamily; @@ -108,7 +106,6 @@ public GlobalBgpRange href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -131,7 +128,6 @@ public GlobalBgpRange id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -154,7 +150,6 @@ public GlobalBgpRange project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -177,7 +172,6 @@ public GlobalBgpRange range(String range) { * @return range **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getRange() { return range; @@ -198,6 +192,10 @@ public void setRange(String range) { /** * 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 GlobalBgpRange instance itself */ public GlobalBgpRange putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -209,6 +207,8 @@ public GlobalBgpRange putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -216,6 +216,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -332,7 +335,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, GlobalBgpRange value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -368,8 +371,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java index 3b92ced6d..1d0b10bd4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public GlobalBgpRangeList addGlobalBgpRangesItem(GlobalBgpRange globalBgpRangesI * @return globalBgpRanges **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getGlobalBgpRanges() { return globalBgpRanges; @@ -99,6 +97,10 @@ public void setGlobalBgpRanges(List globalBgpRanges) { /** * 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 GlobalBgpRangeList instance itself */ public GlobalBgpRangeList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public GlobalBgpRangeList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, GlobalBgpRangeList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java index 9cc461755..8af61f0fd 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java @@ -24,8 +24,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -44,6 +42,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -121,7 +120,6 @@ public HardwareReservation createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -144,7 +142,6 @@ public HardwareReservation customRate(Float customRate) { * @return customRate **/ @javax.annotation.Nullable - @ApiModelProperty(example = "1050.5", value = "Amount that will be charged for every billing_cycle.") public Float getCustomRate() { return customRate; @@ -167,7 +164,6 @@ public HardwareReservation device(Device device) { * @return device **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Device getDevice() { return device; @@ -190,7 +186,6 @@ public HardwareReservation facility(Facility facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Facility getFacility() { return facility; @@ -213,7 +208,6 @@ public HardwareReservation href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -236,7 +230,6 @@ public HardwareReservation id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -259,7 +252,6 @@ public HardwareReservation needOfService(Boolean needOfService) { * @return needOfService **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether this Device requires assistance from Metal Equinix.") public Boolean getNeedOfService() { return needOfService; @@ -282,7 +274,6 @@ public HardwareReservation plan(Plan plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Plan getPlan() { return plan; @@ -305,7 +296,6 @@ public HardwareReservation project(Project project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Project getProject() { return project; @@ -328,7 +318,6 @@ public HardwareReservation provisionable(Boolean provisionable) { * @return provisionable **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.") public Boolean getProvisionable() { return provisionable; @@ -351,7 +340,6 @@ public HardwareReservation shortId(String shortId) { * @return shortId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Short version of the ID.") public String getShortId() { return shortId; @@ -374,7 +362,6 @@ public HardwareReservation spare(Boolean spare) { * @return spare **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix") public Boolean getSpare() { return spare; @@ -397,7 +384,6 @@ public HardwareReservation switchUuid(String switchUuid) { * @return switchUuid **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Switch short id. This can be used to determine if two devices are connected to the same switch, for example.") public String getSwitchUuid() { return switchUuid; @@ -418,6 +404,10 @@ public void setSwitchUuid(String switchUuid) { /** * 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 HardwareReservation instance itself */ public HardwareReservation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -429,6 +419,8 @@ public HardwareReservation putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -436,6 +428,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -591,7 +586,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, HardwareReservation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -627,8 +622,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java index edd19ec14..9d1280a48 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -83,7 +82,6 @@ public HardwareReservationList addHardwareReservationsItem(HardwareReservation h * @return hardwareReservations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getHardwareReservations() { return hardwareReservations; @@ -106,7 +104,6 @@ public HardwareReservationList meta(Meta meta) { * @return meta **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Meta getMeta() { return meta; @@ -127,6 +124,10 @@ public void setMeta(Meta meta) { /** * 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 HardwareReservationList instance itself */ public HardwareReservationList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +139,8 @@ public HardwareReservationList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +148,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -257,7 +263,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, HardwareReservationList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -293,8 +299,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java index d8d491530..ba39661be 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public Href href(String href) { * @return href **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getHref() { return href; @@ -88,6 +86,10 @@ public void setHref(String href) { /** * 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 Href instance itself */ public Href putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public Href putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -208,7 +215,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Href value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -244,8 +251,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java index bbbd0d72c..218eb4213 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HrefOnly.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public HrefOnly href(String href) { * @return href **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getHref() { return href; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java index a5637e32d..85a1db4cc 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java @@ -23,8 +23,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -136,7 +135,6 @@ public IPAssignment address(String address) { * @return address **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAddress() { return address; @@ -159,7 +157,6 @@ public IPAssignment addressFamily(Integer addressFamily) { * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getAddressFamily() { return addressFamily; @@ -182,7 +179,6 @@ public IPAssignment assignedTo(Href assignedTo) { * @return assignedTo **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getAssignedTo() { return assignedTo; @@ -205,7 +201,6 @@ public IPAssignment cidr(Integer cidr) { * @return cidr **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getCidr() { return cidr; @@ -228,7 +223,6 @@ public IPAssignment createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -251,7 +245,6 @@ public IPAssignment enabled(Boolean enabled) { * @return enabled **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getEnabled() { return enabled; @@ -274,7 +267,6 @@ public IPAssignment gateway(String gateway) { * @return gateway **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getGateway() { return gateway; @@ -297,7 +289,6 @@ public IPAssignment globalIp(Boolean globalIp) { * @return globalIp **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getGlobalIp() { return globalIp; @@ -320,7 +311,6 @@ public IPAssignment href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -343,7 +333,6 @@ public IPAssignment id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -366,7 +355,6 @@ public IPAssignment manageable(Boolean manageable) { * @return manageable **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getManageable() { return manageable; @@ -389,7 +377,6 @@ public IPAssignment management(Boolean management) { * @return management **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getManagement() { return management; @@ -412,7 +399,6 @@ public IPAssignment metro(IPAssignmentMetro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public IPAssignmentMetro getMetro() { return metro; @@ -435,7 +421,6 @@ public IPAssignment netmask(String netmask) { * @return netmask **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNetmask() { return netmask; @@ -458,7 +443,6 @@ public IPAssignment network(String network) { * @return network **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNetwork() { return network; @@ -481,7 +465,6 @@ public IPAssignment parentBlock(ParentBlock parentBlock) { * @return parentBlock **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public ParentBlock getParentBlock() { return parentBlock; @@ -504,7 +487,6 @@ public IPAssignment _public(Boolean _public) { * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getPublic() { return _public; @@ -525,6 +507,10 @@ public void setPublic(Boolean _public) { /** * 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 IPAssignment instance itself */ public IPAssignment putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -536,6 +522,8 @@ public IPAssignment putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -543,6 +531,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -712,7 +703,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPAssignment value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -748,8 +739,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java index 52bcf0061..659363159 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public IPAssignmentInput address(String address) { * @return address **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getAddress() { return address; @@ -98,7 +96,6 @@ public IPAssignmentInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -121,7 +118,6 @@ public IPAssignmentInput manageable(Boolean manageable) { * @return manageable **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getManageable() { return manageable; @@ -142,6 +138,10 @@ public void setManageable(Boolean manageable) { /** * 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 IPAssignmentInput instance itself */ public IPAssignmentInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -153,6 +153,8 @@ public IPAssignmentInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -160,6 +162,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -268,7 +273,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPAssignmentInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -304,8 +309,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java index f833a2429..6d007b0ff 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public IPAssignmentList addIpAddressesItem(IPAssignment ipAddressesItem) { * @return ipAddresses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getIpAddresses() { return ipAddresses; @@ -99,6 +97,10 @@ public void setIpAddresses(List ipAddresses) { /** * 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 IPAssignmentList instance itself */ public IPAssignmentList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public IPAssignmentList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPAssignmentList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java index b98e9939f..a99d96c49 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public IPAssignmentMetro code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -103,7 +101,6 @@ public IPAssignmentMetro country(String country) { * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountry() { return country; @@ -126,7 +123,6 @@ public IPAssignmentMetro id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -149,7 +145,6 @@ public IPAssignmentMetro name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -170,6 +165,10 @@ public void setName(String name) { /** * 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 IPAssignmentMetro instance itself */ public IPAssignmentMetro putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public IPAssignmentMetro putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -300,7 +304,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPAssignmentMetro value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -336,8 +340,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java index 2c67b6e94..dc52566b3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -77,7 +76,6 @@ public IPAvailabilitiesList addAvailableItem(String availableItem) { * @return available **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getAvailable() { return available; @@ -98,6 +96,10 @@ public void setAvailable(List available) { /** * 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 IPAvailabilitiesList instance itself */ public IPAvailabilitiesList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -109,6 +111,8 @@ public IPAvailabilitiesList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -116,6 +120,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -189,8 +196,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in IPAvailabilitiesList is not found in the empty JSON string", IPAvailabilitiesList.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("available").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("available") != null && !jsonObj.get("available").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `available` to be an array in the JSON string but got `%s`", jsonObj.get("available").toString())); } } @@ -211,7 +218,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPAvailabilitiesList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -247,8 +254,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java index 0f4e75fe4..c7623745c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java @@ -24,8 +24,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -46,6 +44,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -55,7 +54,6 @@ /** * Base class for all IP Reservations */ -@ApiModel(description = "Base class for all IP Reservations") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class IPReservation { public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; @@ -161,7 +159,6 @@ public IPReservation addressFamily(Integer addressFamily) { * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getAddressFamily() { return addressFamily; @@ -184,7 +181,6 @@ public IPReservation bill(Boolean bill) { * @return bill **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getBill() { return bill; @@ -207,7 +203,6 @@ public IPReservation cidr(Integer cidr) { * @return cidr **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getCidr() { return cidr; @@ -230,7 +225,6 @@ public IPReservation createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -253,7 +247,6 @@ public IPReservation href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -276,7 +269,6 @@ public IPReservation id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -299,7 +291,6 @@ public IPReservation manageable(Boolean manageable) { * @return manageable **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getManageable() { return manageable; @@ -322,7 +313,6 @@ public IPReservation management(Boolean management) { * @return management **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getManagement() { return management; @@ -345,7 +335,6 @@ public IPReservation metalGateway(MetalGatewayLite metalGateway) { * @return metalGateway **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public MetalGatewayLite getMetalGateway() { return metalGateway; @@ -368,7 +357,6 @@ public IPReservation metro(IPReservationMetro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public IPReservationMetro getMetro() { return metro; @@ -391,7 +379,6 @@ public IPReservation netmask(String netmask) { * @return netmask **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNetmask() { return netmask; @@ -414,7 +401,6 @@ public IPReservation network(String network) { * @return network **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNetwork() { return network; @@ -437,7 +423,6 @@ public IPReservation _public(Boolean _public) { * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getPublic() { return _public; @@ -460,7 +445,6 @@ public IPReservation state(String state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getState() { return state; @@ -491,7 +475,6 @@ public IPReservation addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -514,7 +497,6 @@ public IPReservation details(String details) { * @return details **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDetails() { return details; @@ -537,7 +519,6 @@ public IPReservation customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -560,7 +541,6 @@ public IPReservation project(Project project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Project getProject() { return project; @@ -583,7 +563,6 @@ public IPReservation projectLite(Href projectLite) { * @return projectLite **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProjectLite() { return projectLite; @@ -606,7 +585,6 @@ public IPReservation address(String address) { * @return address **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAddress() { return address; @@ -629,7 +607,6 @@ public IPReservation gateway(String gateway) { * @return gateway **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getGateway() { return gateway; @@ -652,7 +629,6 @@ public IPReservation type(String type) { * @return type **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getType() { return type; @@ -673,6 +649,10 @@ public void setType(String type) { /** * 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 IPReservation instance itself */ public IPReservation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -684,6 +664,8 @@ public IPReservation putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -691,6 +673,9 @@ public Map getAdditionalProperties() { /** * 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) { diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java index 5c3012780..45f8f549f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public IPReservationList addIpAddressesItem(IPReservation ipAddressesItem) { * @return ipAddresses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getIpAddresses() { return ipAddresses; @@ -99,6 +97,10 @@ public void setIpAddresses(List ipAddresses) { /** * 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 IPReservationList instance itself */ public IPReservationList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public IPReservationList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPReservationList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java index c294782ee..6773d9bb9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public IPReservationMetro code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -103,7 +101,6 @@ public IPReservationMetro country(String country) { * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountry() { return country; @@ -126,7 +123,6 @@ public IPReservationMetro id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -149,7 +145,6 @@ public IPReservationMetro name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -170,6 +165,10 @@ public void setName(String name) { /** * 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 IPReservationMetro instance itself */ public IPReservationMetro putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public IPReservationMetro putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -300,7 +304,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IPReservationMetro value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -336,8 +340,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java index 7c89fd676..edc84d3de 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public InstancesBatchCreateInput addBatchesItem(InstancesBatchCreateInputBatches * @return batches **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getBatches() { return batches; @@ -99,6 +97,10 @@ public void setBatches(List batches) { /** * 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 InstancesBatchCreateInput instance itself */ public InstancesBatchCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public InstancesBatchCreateInput putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InstancesBatchCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java index d0bfd5b92..8a5279e5f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -144,7 +143,6 @@ public InstancesBatchCreateInputBatchesInner alwaysPxe(Boolean alwaysPxe) { * @return alwaysPxe **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAlwaysPxe() { return alwaysPxe; @@ -167,7 +165,6 @@ public InstancesBatchCreateInputBatchesInner billingCycle(String billingCycle) { * @return billingCycle **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getBillingCycle() { return billingCycle; @@ -190,7 +187,6 @@ public InstancesBatchCreateInputBatchesInner customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -213,7 +209,6 @@ public InstancesBatchCreateInputBatchesInner description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -244,7 +239,6 @@ public InstancesBatchCreateInputBatchesInner addFacilityItem(String facilityItem * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Array of facility codes the batch can use for provisioning. This param also takes a string if you want the batch to be fulfilled in only one facility. Cannot be set if the metro is already set.") public List getFacility() { return facility; @@ -275,7 +269,6 @@ public InstancesBatchCreateInputBatchesInner addFeaturesItem(String featuresItem * @return features **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getFeatures() { return features; @@ -298,7 +291,6 @@ public InstancesBatchCreateInputBatchesInner hostname(String hostname) { * @return hostname **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHostname() { return hostname; @@ -329,7 +321,6 @@ public InstancesBatchCreateInputBatchesInner addHostnamesItem(String hostnamesIt * @return hostnames **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getHostnames() { return hostnames; @@ -360,7 +351,6 @@ public InstancesBatchCreateInputBatchesInner addIpAddressesItem(InstancesBatchCr * @return ipAddresses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getIpAddresses() { return ipAddresses; @@ -383,7 +373,6 @@ public InstancesBatchCreateInputBatchesInner locked(Boolean locked) { * @return locked **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getLocked() { return locked; @@ -406,7 +395,6 @@ public InstancesBatchCreateInputBatchesInner metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The metro ID or code the batch can use for provisioning. Cannot be set if the facility is already set.") public String getMetro() { return metro; @@ -429,7 +417,6 @@ public InstancesBatchCreateInputBatchesInner noSshKeys(Boolean noSshKeys) { * @return noSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getNoSshKeys() { return noSshKeys; @@ -452,7 +439,6 @@ public InstancesBatchCreateInputBatchesInner operatingSystem(String operatingSys * @return operatingSystem **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getOperatingSystem() { return operatingSystem; @@ -475,7 +461,6 @@ public InstancesBatchCreateInputBatchesInner plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlan() { return plan; @@ -506,7 +491,6 @@ public InstancesBatchCreateInputBatchesInner addProjectSshKeysItem(UUID projectS * @return projectSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjectSshKeys() { return projectSshKeys; @@ -537,7 +521,6 @@ public InstancesBatchCreateInputBatchesInner addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -560,7 +543,6 @@ public InstancesBatchCreateInputBatchesInner terminationTime(OffsetDateTime term * @return terminationTime **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getTerminationTime() { return terminationTime; @@ -591,7 +573,6 @@ public InstancesBatchCreateInputBatchesInner addUserSshKeysItem(UUID userSshKeys * @return userSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUIDs of users whose SSH keys should be included on the provisioned device.") public List getUserSshKeys() { return userSshKeys; @@ -614,7 +595,6 @@ public InstancesBatchCreateInputBatchesInner userdata(String userdata) { * @return userdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUserdata() { return userdata; @@ -635,6 +615,10 @@ public void setUserdata(String userdata) { /** * 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 InstancesBatchCreateInputBatchesInner instance itself */ public InstancesBatchCreateInputBatchesInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -646,6 +630,8 @@ public InstancesBatchCreateInputBatchesInner putAdditionalProperty(String key, O /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -653,6 +639,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -786,19 +775,19 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the json data is an array - if (!jsonObj.get("facility").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); } - // ensure the json data is an array - if (!jsonObj.get("features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } - // ensure the json data is an array - if (!jsonObj.get("hostnames").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); } if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { @@ -824,16 +813,16 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); } - // ensure the json data is an array - if (!jsonObj.get("project_ssh_keys").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // ensure the json data is an array - if (!jsonObj.get("user_ssh_keys").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { @@ -857,7 +846,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InstancesBatchCreateInputBatchesInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -893,8 +882,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java index 0ad3aba41..86a9b9724 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -129,7 +128,6 @@ public InstancesBatchCreateInputBatchesInnerIpAddressesInner addressFamily(Addre * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(example = "4", value = "Address Family for IP Address") public AddressFamilyEnum getAddressFamily() { return addressFamily; @@ -152,7 +150,6 @@ public InstancesBatchCreateInputBatchesInnerIpAddressesInner cidr(BigDecimal cid * @return cidr **/ @javax.annotation.Nullable - @ApiModelProperty(example = "28", value = "Cidr Size for the IP Block created. Valid values depends on the operating system been provisioned (28..32 for IPv4 addresses, 124..127 for IPv6 addresses).") public BigDecimal getCidr() { return cidr; @@ -183,7 +180,6 @@ public InstancesBatchCreateInputBatchesInnerIpAddressesInner addIpReservationsIt * @return ipReservations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "UUIDs of any IP reservations to use when assigning IPs") public List getIpReservations() { return ipReservations; @@ -206,7 +202,6 @@ public InstancesBatchCreateInputBatchesInnerIpAddressesInner _public(Boolean _pu * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Address Type for IP Address") public Boolean getPublic() { return _public; @@ -227,6 +222,10 @@ public void setPublic(Boolean _public) { /** * 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 InstancesBatchCreateInputBatchesInnerIpAddressesInner instance itself */ public InstancesBatchCreateInputBatchesInnerIpAddressesInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -238,6 +237,8 @@ public InstancesBatchCreateInputBatchesInnerIpAddressesInner putAdditionalProper /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -245,6 +246,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -327,8 +331,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in InstancesBatchCreateInputBatchesInnerIpAddressesInner is not found in the empty JSON string", InstancesBatchCreateInputBatchesInnerIpAddressesInner.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("ip_reservations").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ip_reservations") != null && !jsonObj.get("ip_reservations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_reservations` to be an array in the JSON string but got `%s`", jsonObj.get("ip_reservations").toString())); } } @@ -349,7 +353,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InstancesBatchCreateInputBatchesInnerIpAddressesInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -385,8 +389,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java index 63b3c8276..5f1a13adb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java @@ -24,8 +24,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -45,6 +43,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -177,7 +176,6 @@ public Interconnection contactEmail(String contactEmail) { * @return contactEmail **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getContactEmail() { return contactEmail; @@ -200,7 +198,6 @@ public Interconnection description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -223,7 +220,6 @@ public Interconnection facility(Href facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getFacility() { return facility; @@ -246,7 +242,6 @@ public Interconnection id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -269,7 +264,6 @@ public Interconnection metro(InterconnectionMetro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public InterconnectionMetro getMetro() { return metro; @@ -292,7 +286,6 @@ public Interconnection mode(ModeEnum mode) { * @return mode **/ @javax.annotation.Nullable - @ApiModelProperty(example = "standard", value = "The mode of the connection (only relevant to dedicated connections). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of a dedicated connection is 'standard'. The mode can only be changed when there are no associated virtual circuits on the connection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances.") public ModeEnum getMode() { return mode; @@ -315,7 +308,6 @@ public Interconnection name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -338,7 +330,6 @@ public Interconnection organization(Href organization) { * @return organization **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getOrganization() { return organization; @@ -369,7 +360,6 @@ public Interconnection addPortsItem(InterconnectionPort portsItem) { * @return ports **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getPorts() { return ports; @@ -392,7 +382,6 @@ public Interconnection redundancy(String redundancy) { * @return redundancy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getRedundancy() { return redundancy; @@ -423,7 +412,6 @@ public Interconnection addServiceTokensItem(FabricServiceToken serviceTokensItem * @return serviceTokens **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getServiceTokens() { return serviceTokens; @@ -446,7 +434,6 @@ public Interconnection speed(Integer speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The connection's speed in bps.") public Integer getSpeed() { return speed; @@ -469,7 +456,6 @@ public Interconnection status(String status) { * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getStatus() { return status; @@ -500,7 +486,6 @@ public Interconnection addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -523,7 +508,6 @@ public Interconnection type(String type) { * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getType() { return type; @@ -544,6 +528,10 @@ public void setType(String type) { /** * 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 Interconnection instance itself */ public Interconnection putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -555,6 +543,8 @@ public Interconnection putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -562,6 +552,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -738,8 +731,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { @@ -763,7 +756,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Interconnection value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -799,8 +792,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java index fd729b2a0..a41947a38 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -205,7 +204,6 @@ public InterconnectionCreateInput contactEmail(String contactEmail) { * @return contactEmail **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getContactEmail() { return contactEmail; @@ -228,7 +226,6 @@ public InterconnectionCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -251,7 +248,6 @@ public InterconnectionCreateInput metro(String metro) { * @return metro **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "A Metro ID or code.") public String getMetro() { return metro; @@ -274,7 +270,6 @@ public InterconnectionCreateInput mode(ModeEnum mode) { * @return mode **/ @javax.annotation.Nullable - @ApiModelProperty(example = "standard", value = "The mode of the connection (only relevant to dedicated connections). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of a dedicated connection is 'standard'. The mode can only be changed when there are no associated virtual circuits on the connection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances.") public ModeEnum getMode() { return mode; @@ -297,7 +292,6 @@ public InterconnectionCreateInput name(String name) { * @return name **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -320,7 +314,6 @@ public InterconnectionCreateInput project(String project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getProject() { return project; @@ -343,7 +336,6 @@ public InterconnectionCreateInput redundancy(String redundancy) { * @return redundancy **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either 'primary' or 'redundant'.") public String getRedundancy() { return redundancy; @@ -366,7 +358,6 @@ public InterconnectionCreateInput serviceTokenType(ServiceTokenTypeEnum serviceT * @return serviceTokenType **/ @javax.annotation.Nullable - @ApiModelProperty(example = "a_side", value = "Can only be set to 'a_side' to create a shared connection with an A-side Fabric service token. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details.") public ServiceTokenTypeEnum getServiceTokenType() { return serviceTokenType; @@ -389,7 +380,6 @@ public InterconnectionCreateInput speed(String speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A connection speed, in bps, mbps, or gbps. Ex: '100000000' or '100 mbps'.") public String getSpeed() { return speed; @@ -420,7 +410,6 @@ public InterconnectionCreateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -443,7 +432,6 @@ public InterconnectionCreateInput type(String type) { * @return type **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either 'shared' or 'dedicated'.") public String getType() { return type; @@ -474,7 +462,6 @@ public InterconnectionCreateInput addVlansItem(Integer vlansItem) { * @return vlans **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[1000,1001]", value = "A list of one or two metro-based VLANs that will be set on the primary and/or secondary (if redundant) virtual circuits respectively when creating a shared connection. VLANs can also be set after the connection is created, but are required to activate the connection. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details.") public List getVlans() { return vlans; @@ -495,6 +482,10 @@ public void setVlans(List vlans) { /** * 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 InterconnectionCreateInput instance itself */ public InterconnectionCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -506,6 +497,8 @@ public InterconnectionCreateInput putAdditionalProperty(String key, Object value /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -513,6 +506,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -657,15 +653,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("speed") != null && !jsonObj.get("speed").isJsonNull()) && !jsonObj.get("speed").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // ensure the json data is an array - if (!jsonObj.get("vlans").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("vlans") != null && !jsonObj.get("vlans").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `vlans` to be an array in the JSON string but got `%s`", jsonObj.get("vlans").toString())); } } @@ -686,7 +682,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InterconnectionCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -722,8 +718,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java index b617426a1..cb92cd6ac 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public InterconnectionList addInterconnectionsItem(Interconnection interconnecti * @return interconnections **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getInterconnections() { return interconnections; @@ -99,6 +97,10 @@ public void setInterconnections(List interconnections) { /** * 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 InterconnectionList instance itself */ public InterconnectionList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public InterconnectionList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InterconnectionList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java index 6b68c68b2..9e53b66ff 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionMetro.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public InterconnectionMetro code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -103,7 +101,6 @@ public InterconnectionMetro country(String country) { * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountry() { return country; @@ -126,7 +123,6 @@ public InterconnectionMetro id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -149,7 +145,6 @@ public InterconnectionMetro name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -170,6 +165,10 @@ public void setName(String name) { /** * 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 InterconnectionMetro instance itself */ public InterconnectionMetro putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public InterconnectionMetro putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -300,7 +304,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InterconnectionMetro value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -336,8 +340,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java index 3d451cf45..5a2e8978a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -90,7 +89,6 @@ public InterconnectionPort id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -113,7 +111,6 @@ public InterconnectionPort organization(Href organization) { * @return organization **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getOrganization() { return organization; @@ -136,7 +133,6 @@ public InterconnectionPort role(String role) { * @return role **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Either 'primary' or 'secondary'.") public String getRole() { return role; @@ -159,7 +155,6 @@ public InterconnectionPort status(String status) { * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getStatus() { return status; @@ -182,7 +177,6 @@ public InterconnectionPort switchId(String switchId) { * @return switchId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A switch 'short ID'") public String getSwitchId() { return switchId; @@ -205,7 +199,6 @@ public InterconnectionPort virtualCircuits(VirtualCircuitList virtualCircuits) { * @return virtualCircuits **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public VirtualCircuitList getVirtualCircuits() { return virtualCircuits; @@ -226,6 +219,10 @@ public void setVirtualCircuits(VirtualCircuitList virtualCircuits) { /** * 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 InterconnectionPort instance itself */ public InterconnectionPort putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -237,6 +234,8 @@ public InterconnectionPort putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -244,6 +243,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -370,7 +372,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InterconnectionPort value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -406,8 +408,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java index 4ad42f515..5c92b39b2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public InterconnectionPortList addPortsItem(InterconnectionPort portsItem) { * @return ports **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getPorts() { return ports; @@ -99,6 +97,10 @@ public void setPorts(List ports) { /** * 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 InterconnectionPortList instance itself */ public InterconnectionPortList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public InterconnectionPortList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InterconnectionPortList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java index cb28aa97b..9de340c8a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -136,7 +135,6 @@ public InterconnectionUpdateInput contactEmail(String contactEmail) { * @return contactEmail **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getContactEmail() { return contactEmail; @@ -159,7 +157,6 @@ public InterconnectionUpdateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -182,7 +179,6 @@ public InterconnectionUpdateInput mode(ModeEnum mode) { * @return mode **/ @javax.annotation.Nullable - @ApiModelProperty(example = "standard", value = "The mode of the connection (only relevant to dedicated connections). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of a dedicated connection is 'standard'. The mode can only be changed when there are no associated virtual circuits on the connection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances.") public ModeEnum getMode() { return mode; @@ -205,7 +201,6 @@ public InterconnectionUpdateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -228,7 +223,6 @@ public InterconnectionUpdateInput redundancy(String redundancy) { * @return redundancy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Updating from 'redundant' to 'primary' will remove a secondary port, while updating from 'primary' to 'redundant' will add one.") public String getRedundancy() { return redundancy; @@ -259,7 +253,6 @@ public InterconnectionUpdateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -280,6 +273,10 @@ public void setTags(List tags) { /** * 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 InterconnectionUpdateInput instance itself */ public InterconnectionUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -291,6 +288,8 @@ public InterconnectionUpdateInput putAdditionalProperty(String key, Object value /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -298,6 +297,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -401,8 +403,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) && !jsonObj.get("redundancy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -423,7 +425,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InterconnectionUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -459,8 +461,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java index c7085b93e..3ea3b7251 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -108,7 +107,6 @@ public Invitation createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -131,7 +129,6 @@ public Invitation href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -154,7 +151,6 @@ public Invitation id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -177,7 +173,6 @@ public Invitation invitation(Href invitation) { * @return invitation **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getInvitation() { return invitation; @@ -200,7 +195,6 @@ public Invitation invitedBy(Href invitedBy) { * @return invitedBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getInvitedBy() { return invitedBy; @@ -223,7 +217,6 @@ public Invitation invitee(String invitee) { * @return invitee **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getInvitee() { return invitee; @@ -246,7 +239,6 @@ public Invitation organization(Href organization) { * @return organization **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getOrganization() { return organization; @@ -277,7 +269,6 @@ public Invitation addProjectsIdsItem(String projectsIdsItem) { * @return projectsIds **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjectsIds() { return projectsIds; @@ -308,7 +299,6 @@ public Invitation addRolesItem(String rolesItem) { * @return roles **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRoles() { return roles; @@ -331,7 +321,6 @@ public Invitation updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -352,6 +341,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 Invitation instance itself */ public Invitation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -363,6 +356,8 @@ public Invitation putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -370,6 +365,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -491,12 +489,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { Href.validateJsonObject(jsonObj.getAsJsonObject("organization")); } - // ensure the json data is an array - if (!jsonObj.get("projects_ids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("projects_ids") != null && !jsonObj.get("projects_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `projects_ids` to be an array in the JSON string but got `%s`", jsonObj.get("projects_ids").toString())); } - // ensure the json data is an array - if (!jsonObj.get("roles").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } } @@ -517,7 +515,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Invitation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -553,8 +551,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java index c2e01700c..25ef999d4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -81,7 +80,6 @@ public InvitationInput invitee(String invitee) { * @return invitee **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getInvitee() { return invitee; @@ -104,7 +102,6 @@ public InvitationInput message(String message) { * @return message **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getMessage() { return message; @@ -135,7 +132,6 @@ public InvitationInput addProjectsIdsItem(String projectsIdsItem) { * @return projectsIds **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjectsIds() { return projectsIds; @@ -166,7 +162,6 @@ public InvitationInput addRolesItem(String rolesItem) { * @return roles **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRoles() { return roles; @@ -187,6 +182,10 @@ public void setRoles(List roles) { /** * 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 InvitationInput instance itself */ public InvitationInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -198,6 +197,8 @@ public InvitationInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -205,6 +206,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -301,12 +305,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } - // ensure the json data is an array - if (!jsonObj.get("projects_ids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("projects_ids") != null && !jsonObj.get("projects_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `projects_ids` to be an array in the JSON string but got `%s`", jsonObj.get("projects_ids").toString())); } - // ensure the json data is an array - if (!jsonObj.get("roles").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } } @@ -327,7 +331,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InvitationInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -363,8 +367,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java index ab689426d..27762cc9d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public InvitationList addInvitationsItem(Membership invitationsItem) { * @return invitations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getInvitations() { return invitations; @@ -99,6 +97,10 @@ public void setInvitations(List invitations) { /** * 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 InvitationList instance itself */ public InvitationList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public InvitationList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, InvitationList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java index 37c26bae2..587bba143 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.UUID; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -90,7 +89,6 @@ public License description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -113,7 +111,6 @@ public License id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -136,7 +133,6 @@ public License licenseKey(String licenseKey) { * @return licenseKey **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLicenseKey() { return licenseKey; @@ -159,7 +155,6 @@ public License licenseeProduct(Href licenseeProduct) { * @return licenseeProduct **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getLicenseeProduct() { return licenseeProduct; @@ -182,7 +177,6 @@ public License project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -205,7 +199,6 @@ public License size(BigDecimal size) { * @return size **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public BigDecimal getSize() { return size; @@ -226,6 +219,10 @@ public void setSize(BigDecimal size) { /** * 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 License instance itself */ public License putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -237,6 +234,8 @@ public License putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -244,6 +243,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -367,7 +369,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, License value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -403,8 +405,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java index ba89903c1..daa124eeb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -76,7 +75,6 @@ public LicenseCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -99,7 +97,6 @@ public LicenseCreateInput licenseeProductId(String licenseeProductId) { * @return licenseeProductId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLicenseeProductId() { return licenseeProductId; @@ -122,7 +119,6 @@ public LicenseCreateInput size(BigDecimal size) { * @return size **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public BigDecimal getSize() { return size; @@ -143,6 +139,10 @@ public void setSize(BigDecimal size) { /** * 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 LicenseCreateInput instance itself */ public LicenseCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -154,6 +154,8 @@ public LicenseCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -161,6 +163,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -264,7 +269,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, LicenseCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -300,8 +305,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java index c808715cf..6042d951d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public LicenseList addLicensesItem(License licensesItem) { * @return licenses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getLicenses() { return licenses; @@ -99,6 +97,10 @@ public void setLicenses(List licenses) { /** * 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 LicenseList instance itself */ public LicenseList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public LicenseList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, LicenseList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java index ca03a9b42..273d08680 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -72,7 +71,6 @@ public LicenseUpdateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -95,7 +93,6 @@ public LicenseUpdateInput size(BigDecimal size) { * @return size **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public BigDecimal getSize() { return size; @@ -116,6 +113,10 @@ public void setSize(BigDecimal size) { /** * 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 LicenseUpdateInput instance itself */ public LicenseUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +128,8 @@ public LicenseUpdateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +137,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -231,7 +237,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, LicenseUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -267,8 +273,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java index 5cc790c94..0f2e217ea 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -96,7 +95,6 @@ public Membership createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -119,7 +117,6 @@ public Membership href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -142,7 +139,6 @@ public Membership id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -165,7 +161,6 @@ public Membership project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -196,7 +191,6 @@ public Membership addRolesItem(String rolesItem) { * @return roles **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRoles() { return roles; @@ -219,7 +213,6 @@ public Membership updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -242,7 +235,6 @@ public Membership user(Href user) { * @return user **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getUser() { return user; @@ -263,6 +255,10 @@ public void setUser(Href user) { /** * 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 Membership instance itself */ public Membership putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -274,6 +270,8 @@ public Membership putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -281,6 +279,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -382,8 +383,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { Href.validateJsonObject(jsonObj.getAsJsonObject("project")); } - // ensure the json data is an array - if (!jsonObj.get("roles").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } // validate the optional field `user` @@ -408,7 +409,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Membership value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -444,8 +445,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java index fba66e7db..34995e7b1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -77,7 +76,6 @@ public MembershipInput addRoleItem(String roleItem) { * @return role **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRole() { return role; @@ -98,6 +96,10 @@ public void setRole(List role) { /** * 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 MembershipInput instance itself */ public MembershipInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -109,6 +111,8 @@ public MembershipInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -116,6 +120,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -189,8 +196,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MembershipInput is not found in the empty JSON string", MembershipInput.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("role").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be an array in the JSON string but got `%s`", jsonObj.get("role").toString())); } } @@ -211,7 +218,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MembershipInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -247,8 +254,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java index 028cfbf1c..ccab67458 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public MembershipList addMembershipsItem(Membership membershipsItem) { * @return memberships **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMemberships() { return memberships; @@ -99,6 +97,10 @@ public void setMemberships(List memberships) { /** * 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 MembershipList instance itself */ public MembershipList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public MembershipList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MembershipList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java index b0321a9b1..f87b01801 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -88,7 +87,6 @@ public Meta first(Href first) { * @return first **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getFirst() { return first; @@ -111,7 +109,6 @@ public Meta last(Href last) { * @return last **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getLast() { return last; @@ -134,7 +131,6 @@ public Meta next(Href next) { * @return next **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getNext() { return next; @@ -157,7 +153,6 @@ public Meta previous(Href previous) { * @return previous **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getPrevious() { return previous; @@ -180,7 +175,6 @@ public Meta self(Href self) { * @return self **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getSelf() { return self; @@ -203,7 +197,6 @@ public Meta total(Integer total) { * @return total **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getTotal() { return total; @@ -224,6 +217,10 @@ public void setTotal(Integer total) { /** * 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 Meta instance itself */ public Meta putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -235,6 +232,8 @@ public Meta putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -242,6 +241,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -368,7 +370,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Meta value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -404,8 +406,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java index 4254c8d81..c4dacf8a0 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java @@ -25,8 +25,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -45,6 +43,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -159,7 +158,6 @@ public MetalGateway createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -182,7 +180,6 @@ public MetalGateway createdBy(Href createdBy) { * @return createdBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getCreatedBy() { return createdBy; @@ -205,7 +202,6 @@ public MetalGateway href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -228,7 +224,6 @@ public MetalGateway id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -251,7 +246,6 @@ public MetalGateway ipReservation(MetalGatewayIpReservation ipReservation) { * @return ipReservation **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public MetalGatewayIpReservation getIpReservation() { return ipReservation; @@ -274,7 +268,6 @@ public MetalGateway project(Project project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Project getProject() { return project; @@ -297,7 +290,6 @@ public MetalGateway state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted.") public StateEnum getState() { return state; @@ -320,7 +312,6 @@ public MetalGateway updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -343,7 +334,6 @@ public MetalGateway virtualNetwork(VirtualNetwork virtualNetwork) { * @return virtualNetwork **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public VirtualNetwork getVirtualNetwork() { return virtualNetwork; @@ -366,7 +356,6 @@ public MetalGateway vrf(Vrf vrf) { * @return vrf **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Vrf getVrf() { return vrf; @@ -387,6 +376,10 @@ public void setVrf(Vrf vrf) { /** * 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 MetalGateway instance itself */ public MetalGateway putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -398,6 +391,8 @@ public MetalGateway putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -405,6 +400,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -552,7 +550,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetalGateway value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -588,8 +586,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java index 886a0e2ca..37613ad66 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -76,7 +75,6 @@ public MetalGatewayCreateInput ipReservationId(UUID ipReservationId) { * @return ipReservationId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUID of an IP reservation that belongs to the same project as where the metal gateway will be created in. This field is required unless the private IPv4 subnet size is specified.") public UUID getIpReservationId() { return ipReservationId; @@ -99,7 +97,6 @@ public MetalGatewayCreateInput privateIpv4SubnetSize(Integer privateIpv4SubnetSi * @return privateIpv4SubnetSize **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The subnet size (8, 16, 32, 64, or 128) of the private IPv4 reservation that will be created for the metal gateway. This field is required unless a project IP reservation was specified. Please keep in mind that the number of private metal gateway ranges are limited per project. If you would like to increase the limit per project, please contact support for assistance.") public Integer getPrivateIpv4SubnetSize() { return privateIpv4SubnetSize; @@ -122,7 +119,6 @@ public MetalGatewayCreateInput virtualNetworkId(UUID virtualNetworkId) { * @return virtualNetworkId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The UUID of a metro virtual network that belongs to the same project as where the metal gateway will be created in.") public UUID getVirtualNetworkId() { return virtualNetworkId; @@ -143,6 +139,10 @@ public void setVirtualNetworkId(UUID virtualNetworkId) { /** * 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 MetalGatewayCreateInput instance itself */ public MetalGatewayCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -154,6 +154,8 @@ public MetalGatewayCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -161,6 +163,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -272,7 +277,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetalGatewayCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -308,8 +313,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservation.java index 53e34252c..d0448eabf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservation.java @@ -26,8 +26,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java index 851d30cb7..304ff242f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public MetalGatewayList addMetalGatewaysItem(MetalGateway metalGatewaysItem) { * @return metalGateways **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMetalGateways() { return metalGateways; @@ -99,6 +97,10 @@ public void setMetalGateways(List metalGateways) { /** * 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 MetalGatewayList instance itself */ public MetalGatewayList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public MetalGatewayList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetalGatewayList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java index de6a84208..5f8e906a9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -143,7 +142,6 @@ public MetalGatewayLite createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -166,7 +164,6 @@ public MetalGatewayLite gatewayAddress(String gatewayAddress) { * @return gatewayAddress **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The gateway address with subnet CIDR value for this Metal Gateway. For example, a Metal Gateway using an IP reservation with block 10.1.2.0/27 would have a gateway address of 10.1.2.1/27.") public String getGatewayAddress() { return gatewayAddress; @@ -189,7 +186,6 @@ public MetalGatewayLite href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -212,7 +208,6 @@ public MetalGatewayLite id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -235,7 +230,6 @@ public MetalGatewayLite state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted.") public StateEnum getState() { return state; @@ -258,7 +252,6 @@ public MetalGatewayLite updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -281,7 +274,6 @@ public MetalGatewayLite vlan(BigDecimal vlan) { * @return vlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The VLAN id of the Virtual Network record associated to this Metal Gateway. Example: 1001.") public BigDecimal getVlan() { return vlan; @@ -302,6 +294,10 @@ public void setVlan(BigDecimal vlan) { /** * 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 MetalGatewayLite instance itself */ public MetalGatewayLite putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -313,6 +309,8 @@ public MetalGatewayLite putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -320,6 +318,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -441,7 +442,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetalGatewayLite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -477,8 +478,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java index 3f8fbe71d..0015ffcc4 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public Metro code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -103,7 +101,6 @@ public Metro country(String country) { * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountry() { return country; @@ -126,7 +123,6 @@ public Metro id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -149,7 +145,6 @@ public Metro name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -170,6 +165,10 @@ public void setName(String name) { /** * 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 Metro instance itself */ public Metro putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public Metro putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -300,7 +304,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Metro value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -336,8 +340,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java index d865f8abd..9abc12582 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public MetroCapacityList capacity(MetroCapacityReport capacity) { * @return capacity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public MetroCapacityReport getCapacity() { return capacity; @@ -89,6 +87,10 @@ public void setCapacity(MetroCapacityReport capacity) { /** * 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 MetroCapacityList instance itself */ public MetroCapacityList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public MetroCapacityList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetroCapacityList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java index 9e8791853..29fabea4c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroCapacityReport.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -144,7 +143,6 @@ public MetroCapacityReport am(CapacityPerFacility am) { * @return am **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getAm() { return am; @@ -167,7 +165,6 @@ public MetroCapacityReport at(CapacityPerFacility at) { * @return at **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getAt() { return at; @@ -190,7 +187,6 @@ public MetroCapacityReport ch(CapacityPerFacility ch) { * @return ch **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getCh() { return ch; @@ -213,7 +209,6 @@ public MetroCapacityReport da(CapacityPerFacility da) { * @return da **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getDa() { return da; @@ -236,7 +231,6 @@ public MetroCapacityReport dc(CapacityPerFacility dc) { * @return dc **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getDc() { return dc; @@ -259,7 +253,6 @@ public MetroCapacityReport fr(CapacityPerFacility fr) { * @return fr **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getFr() { return fr; @@ -282,7 +275,6 @@ public MetroCapacityReport hk(CapacityPerFacility hk) { * @return hk **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getHk() { return hk; @@ -305,7 +297,6 @@ public MetroCapacityReport la(CapacityPerFacility la) { * @return la **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getLa() { return la; @@ -328,7 +319,6 @@ public MetroCapacityReport ld(CapacityPerFacility ld) { * @return ld **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getLd() { return ld; @@ -351,7 +341,6 @@ public MetroCapacityReport md(CapacityPerFacility md) { * @return md **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getMd() { return md; @@ -374,7 +363,6 @@ public MetroCapacityReport ny(CapacityPerFacility ny) { * @return ny **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getNy() { return ny; @@ -397,7 +385,6 @@ public MetroCapacityReport pa(CapacityPerFacility pa) { * @return pa **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getPa() { return pa; @@ -420,7 +407,6 @@ public MetroCapacityReport se(CapacityPerFacility se) { * @return se **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSe() { return se; @@ -443,7 +429,6 @@ public MetroCapacityReport sg(CapacityPerFacility sg) { * @return sg **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSg() { return sg; @@ -466,7 +451,6 @@ public MetroCapacityReport sl(CapacityPerFacility sl) { * @return sl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSl() { return sl; @@ -489,7 +473,6 @@ public MetroCapacityReport sp(CapacityPerFacility sp) { * @return sp **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSp() { return sp; @@ -512,7 +495,6 @@ public MetroCapacityReport sv(CapacityPerFacility sv) { * @return sv **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSv() { return sv; @@ -535,7 +517,6 @@ public MetroCapacityReport sy(CapacityPerFacility sy) { * @return sy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getSy() { return sy; @@ -558,7 +539,6 @@ public MetroCapacityReport tr(CapacityPerFacility tr) { * @return tr **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getTr() { return tr; @@ -581,7 +561,6 @@ public MetroCapacityReport ty(CapacityPerFacility ty) { * @return ty **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CapacityPerFacility getTy() { return ty; @@ -602,6 +581,10 @@ public void setTy(CapacityPerFacility ty) { /** * 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 MetroCapacityReport instance itself */ public MetroCapacityReport putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -613,6 +596,8 @@ public MetroCapacityReport putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -620,6 +605,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -848,7 +836,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetroCapacityReport value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -884,8 +872,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java index 8effc839a..61094a6c1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public MetroList addMetrosItem(Metro metrosItem) { * @return metros **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMetros() { return metros; @@ -99,6 +97,10 @@ public void setMetros(List metros) { /** * 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 MetroList instance itself */ public MetroList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public MetroList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetroList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java index 87ece2339..0486e47d9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroServerInfo.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public MetroServerInfo metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The metro ID or code to check the capacity in.") public String getMetro() { return metro; @@ -98,7 +96,6 @@ public MetroServerInfo plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The plan ID or slug to check the capacity of.") public String getPlan() { return plan; @@ -121,7 +118,6 @@ public MetroServerInfo quantity(String quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The number of servers to check the capacity of.") public String getQuantity() { return quantity; @@ -142,6 +138,10 @@ public void setQuantity(String quantity) { /** * 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 MetroServerInfo instance itself */ public MetroServerInfo putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -153,6 +153,8 @@ public MetroServerInfo putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -160,6 +162,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -266,7 +271,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, MetroServerInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -302,8 +307,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java index 8f5efcbc5..97a3d70e8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public NewPassword newPassword(String newPassword) { * @return newPassword **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNewPassword() { return newPassword; @@ -88,6 +86,10 @@ public void setNewPassword(String newPassword) { /** * 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 NewPassword instance itself */ public NewPassword putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public NewPassword putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -200,7 +207,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, NewPassword value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -236,8 +243,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java index 1a301418c..0a0099442 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -102,7 +101,6 @@ public OperatingSystem distro(String distro) { * @return distro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDistro() { return distro; @@ -125,7 +123,6 @@ public OperatingSystem id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -148,7 +145,6 @@ public OperatingSystem licensed(Boolean licensed) { * @return licensed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Licenced OS is priced according to pricing property") public Boolean getLicensed() { return licensed; @@ -171,7 +167,6 @@ public OperatingSystem name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -194,7 +189,6 @@ public OperatingSystem preinstallable(Boolean preinstallable) { * @return preinstallable **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Servers can be already preinstalled with OS in order to shorten provision time.") public Boolean getPreinstallable() { return preinstallable; @@ -217,7 +211,6 @@ public OperatingSystem pricing(Object pricing) { * @return pricing **/ @javax.annotation.Nullable - @ApiModelProperty(value = "This object contains price per time unit and optional multiplier value if licence price depends on hardware plan or components (e.g. number of cores)") public Object getPricing() { return pricing; @@ -248,7 +241,6 @@ public OperatingSystem addProvisionableOnItem(String provisionableOnItem) { * @return provisionableOn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProvisionableOn() { return provisionableOn; @@ -271,7 +263,6 @@ public OperatingSystem slug(String slug) { * @return slug **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getSlug() { return slug; @@ -294,7 +285,6 @@ public OperatingSystem version(String version) { * @return version **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getVersion() { return version; @@ -315,6 +305,10 @@ public void setVersion(String version) { /** * 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 OperatingSystem instance itself */ public OperatingSystem putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -326,6 +320,8 @@ public OperatingSystem putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -333,6 +329,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -439,8 +438,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the json data is an array - if (!jsonObj.get("provisionable_on").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("provisionable_on") != null && !jsonObj.get("provisionable_on").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `provisionable_on` to be an array in the JSON string but got `%s`", jsonObj.get("provisionable_on").toString())); } if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) { @@ -467,7 +466,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OperatingSystem value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -503,8 +502,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java index 7adbef667..f03d7f169 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public OperatingSystemList addOperatingSystemsItem(OperatingSystem operatingSyst * @return operatingSystems **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getOperatingSystems() { return operatingSystems; @@ -99,6 +97,10 @@ public void setOperatingSystems(List operatingSystems) { /** * 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 OperatingSystemList instance itself */ public OperatingSystemList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public OperatingSystemList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OperatingSystemList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java index 627f8dcf6..9a8231186 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; @@ -45,6 +43,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -138,7 +137,6 @@ public Organization address(Address address) { * @return address **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Address getAddress() { return address; @@ -161,7 +159,6 @@ public Organization billingAddress(Address billingAddress) { * @return billingAddress **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Address getBillingAddress() { return billingAddress; @@ -184,7 +181,6 @@ public Organization createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -207,7 +203,6 @@ public Organization creditAmount(Float creditAmount) { * @return creditAmount **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getCreditAmount() { return creditAmount; @@ -230,7 +225,6 @@ public Organization customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -253,7 +247,6 @@ public Organization description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -276,7 +269,6 @@ public Organization enforce2faAt(OffsetDateTime enforce2faAt) { * @return enforce2faAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Force to all members to have enabled the two factor authentication after that date, unless the value is null") public OffsetDateTime getEnforce2faAt() { return enforce2faAt; @@ -299,7 +291,6 @@ public Organization id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -322,7 +313,6 @@ public Organization logo(File logo) { * @return logo **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public File getLogo() { return logo; @@ -353,7 +343,6 @@ public Organization addMembersItem(Href membersItem) { * @return members **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMembers() { return members; @@ -384,7 +373,6 @@ public Organization addMembershipsItem(Href membershipsItem) { * @return memberships **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMemberships() { return memberships; @@ -407,7 +395,6 @@ public Organization name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -438,7 +425,6 @@ public Organization addProjectsItem(Href projectsItem) { * @return projects **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjects() { return projects; @@ -461,7 +447,6 @@ public Organization terms(Integer terms) { * @return terms **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getTerms() { return terms; @@ -484,7 +469,6 @@ public Organization twitter(String twitter) { * @return twitter **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTwitter() { return twitter; @@ -507,7 +491,6 @@ public Organization updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -530,7 +513,6 @@ public Organization website(String website) { * @return website **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getWebsite() { return website; @@ -551,6 +533,10 @@ public void setWebsite(String website) { /** * 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 Organization instance itself */ public Organization putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -562,6 +548,8 @@ public Organization putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -569,6 +557,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -773,7 +764,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Organization value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -809,8 +800,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java index 27be295b2..842ed4e74 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -102,7 +101,6 @@ public OrganizationInput address(Address address) { * @return address **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Address getAddress() { return address; @@ -125,7 +123,6 @@ public OrganizationInput billingAddress(Address billingAddress) { * @return billingAddress **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Address getBillingAddress() { return billingAddress; @@ -148,7 +145,6 @@ public OrganizationInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -171,7 +167,6 @@ public OrganizationInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -194,7 +189,6 @@ public OrganizationInput enforce2faAt(OffsetDateTime enforce2faAt) { * @return enforce2faAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Force to all members to have enabled the two factor authentication after that date, unless the value is null") public OffsetDateTime getEnforce2faAt() { return enforce2faAt; @@ -217,7 +211,6 @@ public OrganizationInput logo(File logo) { * @return logo **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public File getLogo() { return logo; @@ -240,7 +233,6 @@ public OrganizationInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -263,7 +255,6 @@ public OrganizationInput twitter(String twitter) { * @return twitter **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTwitter() { return twitter; @@ -286,7 +277,6 @@ public OrganizationInput website(String website) { * @return website **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getWebsite() { return website; @@ -307,6 +297,10 @@ public void setWebsite(String website) { /** * 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 OrganizationInput instance itself */ public OrganizationInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -318,6 +312,8 @@ public OrganizationInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -325,6 +321,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -460,7 +459,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OrganizationInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -496,8 +495,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java index 5f17126f7..069a11169 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public OrganizationList meta(Meta meta) { * @return meta **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Meta getMeta() { return meta; @@ -106,7 +104,6 @@ public OrganizationList addOrganizationsItem(Organization organizationsItem) { * @return organizations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getOrganizations() { return organizations; @@ -127,6 +124,10 @@ public void setOrganizations(List organizations) { /** * 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 OrganizationList instance itself */ public OrganizationList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +139,8 @@ public OrganizationList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +148,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -257,7 +263,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OrganizationList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -293,8 +299,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java index 209ae1119..4b6367445 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -79,7 +78,6 @@ public ParentBlock cidr(Integer cidr) { * @return cidr **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getCidr() { return cidr; @@ -102,7 +100,6 @@ public ParentBlock href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -125,7 +122,6 @@ public ParentBlock netmask(String netmask) { * @return netmask **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNetmask() { return netmask; @@ -148,7 +144,6 @@ public ParentBlock network(String network) { * @return network **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNetwork() { return network; @@ -169,6 +164,10 @@ public void setNetwork(String network) { /** * 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 ParentBlock instance itself */ public ParentBlock putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -180,6 +179,8 @@ public ParentBlock putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -187,6 +188,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -296,7 +300,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ParentBlock value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -332,8 +336,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java index 35047147a..e17c7420d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -44,6 +42,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -129,7 +128,6 @@ public PaymentMethod billingAddress(PaymentMethodBillingAddress billingAddress) * @return billingAddress **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public PaymentMethodBillingAddress getBillingAddress() { return billingAddress; @@ -152,7 +150,6 @@ public PaymentMethod cardType(String cardType) { * @return cardType **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCardType() { return cardType; @@ -175,7 +172,6 @@ public PaymentMethod cardholderName(String cardholderName) { * @return cardholderName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCardholderName() { return cardholderName; @@ -198,7 +194,6 @@ public PaymentMethod createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -221,7 +216,6 @@ public PaymentMethod createdByUser(Href createdByUser) { * @return createdByUser **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getCreatedByUser() { return createdByUser; @@ -244,7 +238,6 @@ public PaymentMethod _default(Boolean _default) { * @return _default **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefault() { return _default; @@ -267,7 +260,6 @@ public PaymentMethod email(String email) { * @return email **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getEmail() { return email; @@ -290,7 +282,6 @@ public PaymentMethod expirationMonth(String expirationMonth) { * @return expirationMonth **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getExpirationMonth() { return expirationMonth; @@ -313,7 +304,6 @@ public PaymentMethod expirationYear(String expirationYear) { * @return expirationYear **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getExpirationYear() { return expirationYear; @@ -336,7 +326,6 @@ public PaymentMethod id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -359,7 +348,6 @@ public PaymentMethod name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -382,7 +370,6 @@ public PaymentMethod organization(Href organization) { * @return organization **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getOrganization() { return organization; @@ -413,7 +400,6 @@ public PaymentMethod addProjectsItem(Href projectsItem) { * @return projects **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjects() { return projects; @@ -436,7 +422,6 @@ public PaymentMethod type(String type) { * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getType() { return type; @@ -459,7 +444,6 @@ public PaymentMethod updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -480,6 +464,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 PaymentMethod instance itself */ public PaymentMethod putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -491,6 +479,8 @@ public PaymentMethod putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -498,6 +488,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -681,7 +674,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PaymentMethod value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -717,8 +710,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java index dd33a9dc7..89f630aa5 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public PaymentMethodBillingAddress countryCodeAlpha2(String countryCodeAlpha2) { * @return countryCodeAlpha2 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountryCodeAlpha2() { return countryCodeAlpha2; @@ -98,7 +96,6 @@ public PaymentMethodBillingAddress postalCode(String postalCode) { * @return postalCode **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPostalCode() { return postalCode; @@ -121,7 +118,6 @@ public PaymentMethodBillingAddress streetAddress(String streetAddress) { * @return streetAddress **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getStreetAddress() { return streetAddress; @@ -142,6 +138,10 @@ public void setStreetAddress(String streetAddress) { /** * 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 PaymentMethodBillingAddress instance itself */ public PaymentMethodBillingAddress putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -153,6 +153,8 @@ public PaymentMethodBillingAddress putAdditionalProperty(String key, Object valu /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -160,6 +162,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -266,7 +271,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PaymentMethodBillingAddress value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -302,8 +307,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java index 14851f3d9..4109ac8ac 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public PaymentMethodCreateInput _default(Boolean _default) { * @return _default **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefault() { return _default; @@ -98,7 +96,6 @@ public PaymentMethodCreateInput name(String name) { * @return name **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -121,7 +118,6 @@ public PaymentMethodCreateInput nonce(String nonce) { * @return nonce **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getNonce() { return nonce; @@ -142,6 +138,10 @@ public void setNonce(String nonce) { /** * 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 PaymentMethodCreateInput instance itself */ public PaymentMethodCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -153,6 +153,8 @@ public PaymentMethodCreateInput putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -160,6 +162,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -272,7 +277,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PaymentMethodCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -308,8 +313,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java index 8ac47d26f..fe402a3c5 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public PaymentMethodList addPaymentMethodsItem(PaymentMethod paymentMethodsItem) * @return paymentMethods **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getPaymentMethods() { return paymentMethods; @@ -99,6 +97,10 @@ public void setPaymentMethods(List paymentMethods) { /** * 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 PaymentMethodList instance itself */ public PaymentMethodList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public PaymentMethodList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PaymentMethodList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java index 98ad58701..b100c1f0f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -87,7 +86,6 @@ public PaymentMethodUpdateInput billingAddress(Object billingAddress) { * @return billingAddress **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getBillingAddress() { return billingAddress; @@ -110,7 +108,6 @@ public PaymentMethodUpdateInput cardholderName(String cardholderName) { * @return cardholderName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCardholderName() { return cardholderName; @@ -133,7 +130,6 @@ public PaymentMethodUpdateInput _default(Boolean _default) { * @return _default **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefault() { return _default; @@ -156,7 +152,6 @@ public PaymentMethodUpdateInput expirationMonth(String expirationMonth) { * @return expirationMonth **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getExpirationMonth() { return expirationMonth; @@ -179,7 +174,6 @@ public PaymentMethodUpdateInput expirationYear(Integer expirationYear) { * @return expirationYear **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getExpirationYear() { return expirationYear; @@ -202,7 +196,6 @@ public PaymentMethodUpdateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -223,6 +216,10 @@ public void setName(String name) { /** * 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 PaymentMethodUpdateInput instance itself */ public PaymentMethodUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -234,6 +231,8 @@ public PaymentMethodUpdateInput putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -241,6 +240,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -356,7 +358,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PaymentMethodUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -392,8 +394,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java index e995a841a..9863076f8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -124,7 +123,6 @@ public Plan addAvailableInItem(Href availableInItem) { * @return availableIn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Shows which facilities the plan is available in, and the facility-based price if it is different from the default price.") public List getAvailableIn() { return availableIn; @@ -155,7 +153,6 @@ public Plan addDeploymentTypesItem(String deploymentTypesItem) { * @return deploymentTypes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getDeploymentTypes() { return deploymentTypes; @@ -186,7 +183,6 @@ public Plan addAvailableInMetrosItem(PlanAvailableInMetrosInner availableInMetro * @return availableInMetros **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Shows which metros the plan is available in, and the metro-based price if it is different from the default price.") public List getAvailableInMetros() { return availableInMetros; @@ -209,7 +205,6 @@ public Plan propertyClass(String propertyClass) { * @return propertyClass **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPropertyClass() { return propertyClass; @@ -232,7 +227,6 @@ public Plan description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -255,7 +249,6 @@ public Plan id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -278,7 +271,6 @@ public Plan legacy(Boolean legacy) { * @return legacy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getLegacy() { return legacy; @@ -301,7 +293,6 @@ public Plan line(String line) { * @return line **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLine() { return line; @@ -324,7 +315,6 @@ public Plan name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -347,7 +337,6 @@ public Plan pricing(Object pricing) { * @return pricing **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getPricing() { return pricing; @@ -370,7 +359,6 @@ public Plan slug(String slug) { * @return slug **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getSlug() { return slug; @@ -393,7 +381,6 @@ public Plan specs(Object specs) { * @return specs **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getSpecs() { return specs; @@ -414,6 +401,10 @@ public void setSpecs(Object specs) { /** * 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 Plan instance itself */ public Plan putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -425,6 +416,8 @@ public Plan putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -432,6 +425,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -552,8 +548,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // ensure the json data is an array - if (!jsonObj.get("deployment_types").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("deployment_types") != null && !jsonObj.get("deployment_types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `deployment_types` to be an array in the JSON string but got `%s`", jsonObj.get("deployment_types").toString())); } if (jsonObj.get("available_in_metros") != null && !jsonObj.get("available_in_metros").isJsonNull()) { @@ -606,7 +602,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Plan value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -642,8 +638,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java index 31f7487d9..1e94ad31a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -72,7 +71,6 @@ public PlanAvailableInMetrosInner href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -95,7 +93,6 @@ public PlanAvailableInMetrosInner price(PlanAvailableInMetrosInnerPrice price) { * @return price **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public PlanAvailableInMetrosInnerPrice getPrice() { return price; @@ -116,6 +113,10 @@ public void setPrice(PlanAvailableInMetrosInnerPrice price) { /** * 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 PlanAvailableInMetrosInner instance itself */ public PlanAvailableInMetrosInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +128,8 @@ public PlanAvailableInMetrosInner putAdditionalProperty(String key, Object value /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +137,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -235,7 +241,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PlanAvailableInMetrosInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -271,8 +277,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java index 5ee4c660b..e59ec8951 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPrice.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public PlanAvailableInMetrosInnerPrice hour(Float hour) { * @return hour **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getHour() { return hour; @@ -88,6 +86,10 @@ public void setHour(Float hour) { /** * 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 PlanAvailableInMetrosInnerPrice instance itself */ public PlanAvailableInMetrosInnerPrice putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public PlanAvailableInMetrosInnerPrice putAdditionalProperty(String key, Object /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -197,7 +204,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PlanAvailableInMetrosInnerPrice value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -233,8 +240,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java index ae240e662..63f91987d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public PlanList addPlansItem(Plan plansItem) { * @return plans **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getPlans() { return plans; @@ -99,6 +97,10 @@ public void setPlans(List plans) { /** * 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 PlanList instance itself */ public PlanList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public PlanList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PlanList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java index 463640d69..73cd8463a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -95,7 +94,6 @@ public Port data(Object data) { * @return data **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getData() { return data; @@ -118,7 +116,6 @@ public Port disbondOperationSupported(Boolean disbondOperationSupported) { * @return disbondOperationSupported **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Indicates whether or not the bond can be broken on the port (when applicable).") public Boolean getDisbondOperationSupported() { return disbondOperationSupported; @@ -141,7 +138,6 @@ public Port href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -164,7 +160,6 @@ public Port id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -187,7 +182,6 @@ public Port name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -210,7 +204,6 @@ public Port type(String type) { * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getType() { return type; @@ -241,7 +234,6 @@ public Port addVirtualNetworksItem(Href virtualNetworksItem) { * @return virtualNetworks **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVirtualNetworks() { return virtualNetworks; @@ -262,6 +254,10 @@ public void setVirtualNetworks(List virtualNetworks) { /** * 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 Port instance itself */ public Port putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -273,6 +269,8 @@ public Port putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -280,6 +278,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -415,7 +416,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Port value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -451,8 +452,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java index bb47b9bf4..99ee056b6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public PortAssignInput vnid(String vnid) { * @return vnid **/ @javax.annotation.Nullable - @ApiModelProperty(example = "1001", value = "Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself. ") public String getVnid() { return vnid; @@ -88,6 +86,10 @@ public void setVnid(String vnid) { /** * 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 PortAssignInput instance itself */ public PortAssignInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public PortAssignInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -200,7 +207,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortAssignInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -236,8 +243,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java index 9e66a7489..77d1ae369 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public PortConvertLayer3Input addRequestIpsItem(PortConvertLayer3InputRequestIps * @return requestIps **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRequestIps() { return requestIps; @@ -99,6 +97,10 @@ public void setRequestIps(List requestIps /** * 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 PortConvertLayer3Input instance itself */ public PortConvertLayer3Input putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public PortConvertLayer3Input putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortConvertLayer3Input value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java index fa021a6ff..83df80b32 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public PortConvertLayer3InputRequestIpsInner addressFamily(Integer addressFamily * @return addressFamily **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getAddressFamily() { return addressFamily; @@ -94,7 +92,6 @@ public PortConvertLayer3InputRequestIpsInner _public(Boolean _public) { * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getPublic() { return _public; @@ -115,6 +112,10 @@ public void setPublic(Boolean _public) { /** * 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 PortConvertLayer3InputRequestIpsInner instance itself */ public PortConvertLayer3InputRequestIpsInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public PortConvertLayer3InputRequestIpsInner putAdditionalProperty(String key, O /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -227,7 +233,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortConvertLayer3InputRequestIpsInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -263,8 +269,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java index ac917f6d3..bc81fc88a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -145,7 +144,6 @@ public PortVlanAssignment createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -168,7 +166,6 @@ public PortVlanAssignment id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -191,7 +188,6 @@ public PortVlanAssignment _native(Boolean _native) { * @return _native **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getNative() { return _native; @@ -214,7 +210,6 @@ public PortVlanAssignment port(Href port) { * @return port **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getPort() { return port; @@ -237,7 +232,6 @@ public PortVlanAssignment state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public StateEnum getState() { return state; @@ -260,7 +254,6 @@ public PortVlanAssignment updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -283,7 +276,6 @@ public PortVlanAssignment virtualNetwork(Href virtualNetwork) { * @return virtualNetwork **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getVirtualNetwork() { return virtualNetwork; @@ -306,7 +298,6 @@ public PortVlanAssignment vlan(Integer vlan) { * @return vlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getVlan() { return vlan; @@ -327,6 +318,10 @@ public void setVlan(Integer vlan) { /** * 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 PortVlanAssignment instance itself */ public PortVlanAssignment putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -338,6 +333,8 @@ public PortVlanAssignment putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -345,6 +342,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -471,7 +471,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignment value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -507,8 +507,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java index 5990d9433..4764921d8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -44,6 +42,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -152,7 +151,6 @@ public PortVlanAssignmentBatch createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -183,7 +181,6 @@ public PortVlanAssignmentBatch addErrorMessagesItem(String errorMessagesItem) { * @return errorMessages **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getErrorMessages() { return errorMessages; @@ -206,7 +203,6 @@ public PortVlanAssignmentBatch id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -229,7 +225,6 @@ public PortVlanAssignmentBatch port(Port port) { * @return port **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Port getPort() { return port; @@ -252,7 +247,6 @@ public PortVlanAssignmentBatch quantity(Integer quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getQuantity() { return quantity; @@ -275,7 +269,6 @@ public PortVlanAssignmentBatch state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public StateEnum getState() { return state; @@ -298,7 +291,6 @@ public PortVlanAssignmentBatch updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -329,7 +321,6 @@ public PortVlanAssignmentBatch addVlanAssignmentsItem(PortVlanAssignmentBatchVla * @return vlanAssignments **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVlanAssignments() { return vlanAssignments; @@ -350,6 +341,10 @@ public void setVlanAssignments(List /** * 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 PortVlanAssignmentBatch instance itself */ public PortVlanAssignmentBatch putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -361,6 +356,8 @@ public PortVlanAssignmentBatch putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -368,6 +365,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -462,8 +462,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatch is not found in the empty JSON string", PortVlanAssignmentBatch.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("error_messages").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("error_messages") != null && !jsonObj.get("error_messages").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `error_messages` to be an array in the JSON string but got `%s`", jsonObj.get("error_messages").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -508,7 +508,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignmentBatch value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -544,8 +544,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java index f0daf15ec..d0098faeb 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public PortVlanAssignmentBatchCreateInput addVlanAssignmentsItem(PortVlanAssignm * @return vlanAssignments **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVlanAssignments() { return vlanAssignments; @@ -99,6 +97,10 @@ public void setVlanAssignments(List getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignmentBatchCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java index 9bb8554bd..5c2c3025e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -122,7 +121,6 @@ public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner _native(Boolean _n * @return _native **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getNative() { return _native; @@ -145,7 +143,6 @@ public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner state(StateEnum st * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public StateEnum getState() { return state; @@ -168,7 +165,6 @@ public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner vlan(String vlan) * @return vlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getVlan() { return vlan; @@ -189,6 +185,10 @@ public void setVlan(String vlan) { /** * 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 PortVlanAssignmentBatchCreateInputVlanAssignmentsInner instance itself */ public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -200,6 +200,8 @@ public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner putAdditionalPrope /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -207,6 +209,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -310,7 +315,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignmentBatchCreateInputVlanAssignmentsInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -346,8 +351,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java index ee52326ee..2c2de1310 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public PortVlanAssignmentBatchList addBatchesItem(PortVlanAssignmentBatch batche * @return batches **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getBatches() { return batches; @@ -99,6 +97,10 @@ public void setBatches(List batches) { /** * 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 PortVlanAssignmentBatchList instance itself */ public PortVlanAssignmentBatchList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public PortVlanAssignmentBatchList putAdditionalProperty(String key, Object valu /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignmentBatchList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java index cab45da8c..7aea50317 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -127,7 +126,6 @@ public PortVlanAssignmentBatchVlanAssignmentsInner id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -150,7 +148,6 @@ public PortVlanAssignmentBatchVlanAssignmentsInner _native(Boolean _native) { * @return _native **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getNative() { return _native; @@ -173,7 +170,6 @@ public PortVlanAssignmentBatchVlanAssignmentsInner state(StateEnum state) { * @return state **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public StateEnum getState() { return state; @@ -196,7 +192,6 @@ public PortVlanAssignmentBatchVlanAssignmentsInner vlan(Integer vlan) { * @return vlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getVlan() { return vlan; @@ -217,6 +212,10 @@ public void setVlan(Integer vlan) { /** * 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 PortVlanAssignmentBatchVlanAssignmentsInner instance itself */ public PortVlanAssignmentBatchVlanAssignmentsInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -228,6 +227,8 @@ public PortVlanAssignmentBatchVlanAssignmentsInner putAdditionalProperty(String /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -235,6 +236,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -341,7 +345,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignmentBatchVlanAssignmentsInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -377,8 +381,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java index 935e878e3..cabbf1fcd 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public PortVlanAssignmentList addVlanAssignmentsItem(PortVlanAssignment vlanAssi * @return vlanAssignments **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVlanAssignments() { return vlanAssignments; @@ -99,6 +97,10 @@ public void setVlanAssignments(List vlanAssignments) { /** * 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 PortVlanAssignmentList instance itself */ public PortVlanAssignmentList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public PortVlanAssignmentList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PortVlanAssignmentList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java index a96db5551..db0305e5c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -128,7 +127,6 @@ public Project bgpConfig(Href bgpConfig) { * @return bgpConfig **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getBgpConfig() { return bgpConfig; @@ -151,7 +149,6 @@ public Project createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -174,7 +171,6 @@ public Project customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -205,7 +201,6 @@ public Project addDevicesItem(Href devicesItem) { * @return devices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getDevices() { return devices; @@ -228,7 +223,6 @@ public Project id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -259,7 +253,6 @@ public Project addInvitationsItem(Href invitationsItem) { * @return invitations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getInvitations() { return invitations; @@ -282,7 +275,6 @@ public Project maxDevices(Object maxDevices) { * @return maxDevices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getMaxDevices() { return maxDevices; @@ -313,7 +305,6 @@ public Project addMembersItem(Href membersItem) { * @return members **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMembers() { return members; @@ -344,7 +335,6 @@ public Project addMembershipsItem(Href membershipsItem) { * @return memberships **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getMemberships() { return memberships; @@ -367,7 +357,6 @@ public Project name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -390,7 +379,6 @@ public Project networkStatus(Object networkStatus) { * @return networkStatus **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getNetworkStatus() { return networkStatus; @@ -413,7 +401,6 @@ public Project paymentMethod(Href paymentMethod) { * @return paymentMethod **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getPaymentMethod() { return paymentMethod; @@ -444,7 +431,6 @@ public Project addSshKeysItem(Href sshKeysItem) { * @return sshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getSshKeys() { return sshKeys; @@ -467,7 +453,6 @@ public Project updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -498,7 +483,6 @@ public Project addVolumesItem(Href volumesItem) { * @return volumes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVolumes() { return volumes; @@ -519,6 +503,10 @@ public void setVolumes(List volumes) { /** * 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 Project instance itself */ public Project putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -530,6 +518,8 @@ public Project putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -537,6 +527,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -768,7 +761,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Project value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -804,8 +797,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java index d434c3eb9..4074e484a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public ProjectCreateFromRootInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -103,7 +101,6 @@ public ProjectCreateFromRootInput name(String name) { * @return name **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -126,7 +123,6 @@ public ProjectCreateFromRootInput organizationId(UUID organizationId) { * @return organizationId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getOrganizationId() { return organizationId; @@ -149,7 +145,6 @@ public ProjectCreateFromRootInput paymentMethodId(UUID paymentMethodId) { * @return paymentMethodId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getPaymentMethodId() { return paymentMethodId; @@ -170,6 +165,10 @@ public void setPaymentMethodId(UUID paymentMethodId) { /** * 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 ProjectCreateFromRootInput instance itself */ public ProjectCreateFromRootInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public ProjectCreateFromRootInput putAdditionalProperty(String key, Object value /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -305,7 +309,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ProjectCreateFromRootInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -341,8 +345,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java index 4cca41ecf..e224383cf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -76,7 +75,6 @@ public ProjectCreateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -99,7 +97,6 @@ public ProjectCreateInput name(String name) { * @return name **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -122,7 +119,6 @@ public ProjectCreateInput paymentMethodId(UUID paymentMethodId) { * @return paymentMethodId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getPaymentMethodId() { return paymentMethodId; @@ -143,6 +139,10 @@ public void setPaymentMethodId(UUID paymentMethodId) { /** * 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 ProjectCreateInput instance itself */ public ProjectCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -154,6 +154,8 @@ public ProjectCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -161,6 +163,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -272,7 +277,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ProjectCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -308,8 +313,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java index 7bcffa2fc..c6c628d78 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public ProjectList meta(Meta meta) { * @return meta **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Meta getMeta() { return meta; @@ -106,7 +104,6 @@ public ProjectList addProjectsItem(Project projectsItem) { * @return projects **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjects() { return projects; @@ -127,6 +124,10 @@ public void setProjects(List projects) { /** * 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 ProjectList instance itself */ public ProjectList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +139,8 @@ public ProjectList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +148,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -257,7 +263,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ProjectList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -293,8 +299,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java index 18a1e5c23..b7d482d6b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public ProjectUpdateInput backendTransferEnabled(Boolean backendTransferEnabled) * @return backendTransferEnabled **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getBackendTransferEnabled() { return backendTransferEnabled; @@ -103,7 +101,6 @@ public ProjectUpdateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -126,7 +123,6 @@ public ProjectUpdateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -149,7 +145,6 @@ public ProjectUpdateInput paymentMethodId(UUID paymentMethodId) { * @return paymentMethodId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getPaymentMethodId() { return paymentMethodId; @@ -170,6 +165,10 @@ public void setPaymentMethodId(UUID paymentMethodId) { /** * 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 ProjectUpdateInput instance itself */ public ProjectUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public ProjectUpdateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -294,7 +298,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ProjectUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -330,8 +334,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java index 610dec122..9e4f9dee6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -99,7 +98,6 @@ public ProjectUsage facility(String facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFacility() { return facility; @@ -122,7 +120,6 @@ public ProjectUsage name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -145,7 +142,6 @@ public ProjectUsage plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlan() { return plan; @@ -168,7 +164,6 @@ public ProjectUsage planVersion(String planVersion) { * @return planVersion **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlanVersion() { return planVersion; @@ -191,7 +186,6 @@ public ProjectUsage price(String price) { * @return price **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPrice() { return price; @@ -214,7 +208,6 @@ public ProjectUsage quantity(String quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getQuantity() { return quantity; @@ -237,7 +230,6 @@ public ProjectUsage total(String total) { * @return total **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTotal() { return total; @@ -260,7 +252,6 @@ public ProjectUsage type(String type) { * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getType() { return type; @@ -283,7 +274,6 @@ public ProjectUsage unit(String unit) { * @return unit **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUnit() { return unit; @@ -304,6 +294,10 @@ public void setUnit(String unit) { /** * 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 ProjectUsage instance itself */ public ProjectUsage putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -315,6 +309,8 @@ public ProjectUsage putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -322,6 +318,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -464,7 +463,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ProjectUsage value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -500,8 +499,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java index 901325f39..f01e87c05 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public ProjectUsageList addUsagesItem(ProjectUsage usagesItem) { * @return usages **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getUsages() { return usages; @@ -99,6 +97,10 @@ public void setUsages(List usages) { /** * 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 ProjectUsageList instance itself */ public ProjectUsageList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public ProjectUsageList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ProjectUsageList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java index aaa96ca0e..77e4a5ea6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -77,7 +76,6 @@ public RecoveryCodeList addRecoveryCodesItem(String recoveryCodesItem) { * @return recoveryCodes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRecoveryCodes() { return recoveryCodes; @@ -98,6 +96,10 @@ public void setRecoveryCodes(List recoveryCodes) { /** * 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 RecoveryCodeList instance itself */ public RecoveryCodeList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -109,6 +111,8 @@ public RecoveryCodeList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -116,6 +120,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -189,8 +196,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in RecoveryCodeList is not found in the empty JSON string", RecoveryCodeList.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("recovery_codes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("recovery_codes") != null && !jsonObj.get("recovery_codes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `recovery_codes` to be an array in the JSON string but got `%s`", jsonObj.get("recovery_codes").toString())); } } @@ -211,7 +218,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, RecoveryCodeList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -247,8 +254,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java index 0682b5c2d..fa6d32187 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java index 8569eae1e..de89fc174 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -98,7 +97,6 @@ public SSHKey createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -121,7 +119,6 @@ public SSHKey entity(Href entity) { * @return entity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getEntity() { return entity; @@ -144,7 +141,6 @@ public SSHKey fingerprint(String fingerprint) { * @return fingerprint **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFingerprint() { return fingerprint; @@ -167,7 +163,6 @@ public SSHKey href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -190,7 +185,6 @@ public SSHKey id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -213,7 +207,6 @@ public SSHKey key(String key) { * @return key **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getKey() { return key; @@ -236,7 +229,6 @@ public SSHKey label(String label) { * @return label **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLabel() { return label; @@ -259,7 +251,6 @@ public SSHKey updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -280,6 +271,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 SSHKey instance itself */ public SSHKey putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -291,6 +286,8 @@ public SSHKey putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -298,6 +295,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -429,7 +429,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SSHKey value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -465,8 +465,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java index 14f4dc86e..69a26bdd8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -86,7 +85,6 @@ public SSHKeyCreateInput addInstancesIdsItem(UUID instancesIdsItem) { * @return instancesIds **/ @javax.annotation.Nullable - @ApiModelProperty(value = "List of instance UUIDs to associate SSH key with, when empty array is sent all instances belonging to entity will be included") public List getInstancesIds() { return instancesIds; @@ -109,7 +107,6 @@ public SSHKeyCreateInput key(String key) { * @return key **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getKey() { return key; @@ -132,7 +129,6 @@ public SSHKeyCreateInput label(String label) { * @return label **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLabel() { return label; @@ -153,6 +149,10 @@ public void setLabel(String label) { /** * 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 SSHKeyCreateInput instance itself */ public SSHKeyCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -164,6 +164,8 @@ public SSHKeyCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -171,6 +173,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -250,8 +255,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyCreateInput is not found in the empty JSON string", SSHKeyCreateInput.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("instances_ids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("instances_ids") != null && !jsonObj.get("instances_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `instances_ids` to be an array in the JSON string but got `%s`", jsonObj.get("instances_ids").toString())); } if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { @@ -278,7 +283,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SSHKeyCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -314,8 +319,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java index 0167f0c8a..ef0e1d8cc 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -71,7 +70,6 @@ public SSHKeyInput key(String key) { * @return key **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getKey() { return key; @@ -94,7 +92,6 @@ public SSHKeyInput label(String label) { * @return label **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLabel() { return label; @@ -115,6 +112,10 @@ public void setLabel(String label) { /** * 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 SSHKeyInput instance itself */ public SSHKeyInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +127,8 @@ public SSHKeyInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +136,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -233,7 +239,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SSHKeyInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -269,8 +275,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java index ec1c80363..8155a3eb6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public SSHKeyList addSshKeysItem(SSHKey sshKeysItem) { * @return sshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getSshKeys() { return sshKeys; @@ -99,6 +97,10 @@ public void setSshKeys(List sshKeys) { /** * 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 SSHKeyList instance itself */ public SSHKeyList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public SSHKeyList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SSHKeyList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java index 8650df184..55b795ca3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -84,7 +83,6 @@ public SelfServiceReservationItemRequest amount(Float amount) { * @return amount **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getAmount() { return amount; @@ -107,7 +105,6 @@ public SelfServiceReservationItemRequest metroId(UUID metroId) { * @return metroId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getMetroId() { return metroId; @@ -130,7 +127,6 @@ public SelfServiceReservationItemRequest planId(UUID planId) { * @return planId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getPlanId() { return planId; @@ -153,7 +149,6 @@ public SelfServiceReservationItemRequest quantity(Integer quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getQuantity() { return quantity; @@ -176,7 +171,6 @@ public SelfServiceReservationItemRequest term(String term) { * @return term **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTerm() { return term; @@ -197,6 +191,10 @@ public void setTerm(String term) { /** * 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 SelfServiceReservationItemRequest instance itself */ public SelfServiceReservationItemRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -208,6 +206,8 @@ public SelfServiceReservationItemRequest putAdditionalProperty(String key, Objec /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -215,6 +215,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -327,7 +330,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SelfServiceReservationItemRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -363,8 +366,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java index 9804856f8..538fb62ae 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -104,7 +103,6 @@ public SelfServiceReservationItemResponse amount(Float amount) { * @return amount **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getAmount() { return amount; @@ -127,7 +125,6 @@ public SelfServiceReservationItemResponse id(String id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getId() { return id; @@ -150,7 +147,6 @@ public SelfServiceReservationItemResponse metroCode(String metroCode) { * @return metroCode **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getMetroCode() { return metroCode; @@ -173,7 +169,6 @@ public SelfServiceReservationItemResponse metroId(UUID metroId) { * @return metroId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getMetroId() { return metroId; @@ -196,7 +191,6 @@ public SelfServiceReservationItemResponse metroName(String metroName) { * @return metroName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getMetroName() { return metroName; @@ -219,7 +213,6 @@ public SelfServiceReservationItemResponse planId(UUID planId) { * @return planId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getPlanId() { return planId; @@ -242,7 +235,6 @@ public SelfServiceReservationItemResponse planName(String planName) { * @return planName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlanName() { return planName; @@ -265,7 +257,6 @@ public SelfServiceReservationItemResponse planSlug(String planSlug) { * @return planSlug **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlanSlug() { return planSlug; @@ -288,7 +279,6 @@ public SelfServiceReservationItemResponse quantity(Integer quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getQuantity() { return quantity; @@ -311,7 +301,6 @@ public SelfServiceReservationItemResponse term(String term) { * @return term **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTerm() { return term; @@ -332,6 +321,10 @@ public void setTerm(String term) { /** * 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 SelfServiceReservationItemResponse instance itself */ public SelfServiceReservationItemResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -343,6 +336,8 @@ public SelfServiceReservationItemResponse putAdditionalProperty(String key, Obje /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -350,6 +345,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -492,7 +490,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SelfServiceReservationItemResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -528,8 +526,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java index e385dc465..a1527f244 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public SelfServiceReservationList addReservationsItem(SelfServiceReservationResp * @return reservations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getReservations() { return reservations; @@ -99,6 +97,10 @@ public void setReservations(List reservations) { /** * 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 SelfServiceReservationList instance itself */ public SelfServiceReservationList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public SelfServiceReservationList putAdditionalProperty(String key, Object value /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SelfServiceReservationList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java index 5291e3639..e22504af2 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -44,6 +42,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -113,7 +112,6 @@ public SelfServiceReservationResponse createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -144,7 +142,6 @@ public SelfServiceReservationResponse addItemItem(SelfServiceReservationItemResp * @return item **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getItem() { return item; @@ -167,7 +164,6 @@ public SelfServiceReservationResponse notes(String notes) { * @return notes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getNotes() { return notes; @@ -190,7 +186,6 @@ public SelfServiceReservationResponse organization(String organization) { * @return organization **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getOrganization() { return organization; @@ -213,7 +208,6 @@ public SelfServiceReservationResponse organizationId(UUID organizationId) { * @return organizationId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getOrganizationId() { return organizationId; @@ -236,7 +230,6 @@ public SelfServiceReservationResponse period(CreateSelfServiceReservationRequest * @return period **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public CreateSelfServiceReservationRequestPeriod getPeriod() { return period; @@ -259,7 +252,6 @@ public SelfServiceReservationResponse project(String project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getProject() { return project; @@ -282,7 +274,6 @@ public SelfServiceReservationResponse projectId(UUID projectId) { * @return projectId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getProjectId() { return projectId; @@ -305,7 +296,6 @@ public SelfServiceReservationResponse startDate(OffsetDateTime startDate) { * @return startDate **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getStartDate() { return startDate; @@ -328,7 +318,6 @@ public SelfServiceReservationResponse status(String status) { * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getStatus() { return status; @@ -351,7 +340,6 @@ public SelfServiceReservationResponse totalCost(Integer totalCost) { * @return totalCost **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getTotalCost() { return totalCost; @@ -372,6 +360,10 @@ public void setTotalCost(Integer totalCost) { /** * 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 SelfServiceReservationResponse instance itself */ public SelfServiceReservationResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -383,6 +375,8 @@ public SelfServiceReservationResponse putAdditionalProperty(String key, Object v /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -390,6 +384,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -547,7 +544,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SelfServiceReservationResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -583,8 +580,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java index ff3b7d0ac..a4a6f01df 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public ServerInfo facility(String facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFacility() { return facility; @@ -98,7 +96,6 @@ public ServerInfo plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlan() { return plan; @@ -121,7 +118,6 @@ public ServerInfo quantity(String quantity) { * @return quantity **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getQuantity() { return quantity; @@ -142,6 +138,10 @@ public void setQuantity(String quantity) { /** * 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 ServerInfo instance itself */ public ServerInfo putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -153,6 +153,8 @@ public ServerInfo putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -160,6 +162,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -266,7 +271,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ServerInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -302,8 +307,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java index e3f060c9d..1fdea7a6d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public SpotMarketPricesList spotMarketPrices(SpotPricesReport spotMarketPrices) * @return spotMarketPrices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesReport getSpotMarketPrices() { return spotMarketPrices; @@ -89,6 +87,10 @@ public void setSpotMarketPrices(SpotPricesReport spotMarketPrices) { /** * 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 SpotMarketPricesList instance itself */ public SpotMarketPricesList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public SpotMarketPricesList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketPricesList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java index dc778cc99..bcaec9524 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public SpotMarketPricesPerMetroList spotMarketPrices(SpotMarketPricesPerMetroRep * @return spotMarketPrices **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotMarketPricesPerMetroReport getSpotMarketPrices() { return spotMarketPrices; @@ -89,6 +87,10 @@ public void setSpotMarketPrices(SpotMarketPricesPerMetroReport spotMarketPrices) /** * 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 SpotMarketPricesPerMetroList instance itself */ public SpotMarketPricesPerMetroList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public SpotMarketPricesPerMetroList putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketPricesPerMetroList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java index 0e1fcb6c8..ced5f7f42 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -92,7 +91,6 @@ public SpotMarketPricesPerMetroReport am(SpotPricesPerFacility am) { * @return am **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getAm() { return am; @@ -115,7 +113,6 @@ public SpotMarketPricesPerMetroReport ch(SpotPricesPerFacility ch) { * @return ch **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getCh() { return ch; @@ -138,7 +135,6 @@ public SpotMarketPricesPerMetroReport da(SpotPricesPerFacility da) { * @return da **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getDa() { return da; @@ -161,7 +157,6 @@ public SpotMarketPricesPerMetroReport la(SpotPricesPerFacility la) { * @return la **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getLa() { return la; @@ -184,7 +179,6 @@ public SpotMarketPricesPerMetroReport ny(SpotPricesPerFacility ny) { * @return ny **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getNy() { return ny; @@ -207,7 +201,6 @@ public SpotMarketPricesPerMetroReport sg(SpotPricesPerFacility sg) { * @return sg **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getSg() { return sg; @@ -230,7 +223,6 @@ public SpotMarketPricesPerMetroReport sv(SpotPricesPerFacility sv) { * @return sv **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getSv() { return sv; @@ -251,6 +243,10 @@ public void setSv(SpotPricesPerFacility sv) { /** * 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 SpotMarketPricesPerMetroReport instance itself */ public SpotMarketPricesPerMetroReport putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -262,6 +258,8 @@ public SpotMarketPricesPerMetroReport putAdditionalProperty(String key, Object v /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -269,6 +267,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -406,7 +407,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketPricesPerMetroReport value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -442,8 +443,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java index 28bb56588..e4bd890b7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -111,7 +110,6 @@ public SpotMarketRequest createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -134,7 +132,6 @@ public SpotMarketRequest devicesMax(Integer devicesMax) { * @return devicesMax **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getDevicesMax() { return devicesMax; @@ -157,7 +154,6 @@ public SpotMarketRequest devicesMin(Integer devicesMin) { * @return devicesMin **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getDevicesMin() { return devicesMin; @@ -180,7 +176,6 @@ public SpotMarketRequest endAt(OffsetDateTime endAt) { * @return endAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getEndAt() { return endAt; @@ -203,7 +198,6 @@ public SpotMarketRequest facilities(Href facilities) { * @return facilities **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getFacilities() { return facilities; @@ -226,7 +220,6 @@ public SpotMarketRequest href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -249,7 +242,6 @@ public SpotMarketRequest id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -272,7 +264,6 @@ public SpotMarketRequest instances(Href instances) { * @return instances **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getInstances() { return instances; @@ -295,7 +286,6 @@ public SpotMarketRequest maxBidPrice(Float maxBidPrice) { * @return maxBidPrice **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getMaxBidPrice() { return maxBidPrice; @@ -318,7 +308,6 @@ public SpotMarketRequest metro(SpotMarketRequestMetro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotMarketRequestMetro getMetro() { return metro; @@ -341,7 +330,6 @@ public SpotMarketRequest project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -362,6 +350,10 @@ public void setProject(Href project) { /** * 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 SpotMarketRequest instance itself */ public SpotMarketRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -373,6 +365,8 @@ public SpotMarketRequest putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -380,6 +374,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -523,7 +520,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -559,8 +556,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java index 8f5efb436..f38d81faf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -96,7 +95,6 @@ public SpotMarketRequestCreateInput devicesMax(Integer devicesMax) { * @return devicesMax **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getDevicesMax() { return devicesMax; @@ -119,7 +117,6 @@ public SpotMarketRequestCreateInput devicesMin(Integer devicesMin) { * @return devicesMin **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getDevicesMin() { return devicesMin; @@ -142,7 +139,6 @@ public SpotMarketRequestCreateInput endAt(OffsetDateTime endAt) { * @return endAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getEndAt() { return endAt; @@ -173,7 +169,6 @@ public SpotMarketRequestCreateInput addFacilitiesItem(UUID facilitiesItem) { * @return facilities **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getFacilities() { return facilities; @@ -196,7 +191,6 @@ public SpotMarketRequestCreateInput instanceAttributes(SpotMarketRequestCreateIn * @return instanceAttributes **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotMarketRequestCreateInputInstanceAttributes getInstanceAttributes() { return instanceAttributes; @@ -219,7 +213,6 @@ public SpotMarketRequestCreateInput maxBidPrice(Float maxBidPrice) { * @return maxBidPrice **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getMaxBidPrice() { return maxBidPrice; @@ -242,7 +235,6 @@ public SpotMarketRequestCreateInput metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The metro ID or code the spot market request will be created in.") public String getMetro() { return metro; @@ -263,6 +255,10 @@ public void setMetro(String metro) { /** * 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 SpotMarketRequestCreateInput instance itself */ public SpotMarketRequestCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -274,6 +270,8 @@ public SpotMarketRequestCreateInput putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -281,6 +279,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -372,8 +373,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestCreateInput is not found in the empty JSON string", SpotMarketRequestCreateInput.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("facilities").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("facilities") != null && !jsonObj.get("facilities").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `facilities` to be an array in the JSON string but got `%s`", jsonObj.get("facilities").toString())); } // validate the optional field `instance_attributes` @@ -401,7 +402,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketRequestCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -437,8 +438,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java index 48c696c60..14b2d8574 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributes.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -139,7 +138,6 @@ public SpotMarketRequestCreateInputInstanceAttributes alwaysPxe(Boolean alwaysPx * @return alwaysPxe **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getAlwaysPxe() { return alwaysPxe; @@ -162,7 +160,6 @@ public SpotMarketRequestCreateInputInstanceAttributes billingCycle(String billin * @return billingCycle **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getBillingCycle() { return billingCycle; @@ -185,7 +182,6 @@ public SpotMarketRequestCreateInputInstanceAttributes customdata(Object customda * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -208,7 +204,6 @@ public SpotMarketRequestCreateInputInstanceAttributes description(String descrip * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -239,7 +234,6 @@ public SpotMarketRequestCreateInputInstanceAttributes addFeaturesItem(String fea * @return features **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getFeatures() { return features; @@ -262,7 +256,6 @@ public SpotMarketRequestCreateInputInstanceAttributes hostname(String hostname) * @return hostname **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHostname() { return hostname; @@ -293,7 +286,6 @@ public SpotMarketRequestCreateInputInstanceAttributes addHostnamesItem(String ho * @return hostnames **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getHostnames() { return hostnames; @@ -316,7 +308,6 @@ public SpotMarketRequestCreateInputInstanceAttributes locked(Boolean locked) { * @return locked **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getLocked() { return locked; @@ -339,7 +330,6 @@ public SpotMarketRequestCreateInputInstanceAttributes noSshKeys(Boolean noSshKey * @return noSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getNoSshKeys() { return noSshKeys; @@ -362,7 +352,6 @@ public SpotMarketRequestCreateInputInstanceAttributes operatingSystem(String ope * @return operatingSystem **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getOperatingSystem() { return operatingSystem; @@ -385,7 +374,6 @@ public SpotMarketRequestCreateInputInstanceAttributes plan(String plan) { * @return plan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPlan() { return plan; @@ -408,7 +396,6 @@ public SpotMarketRequestCreateInputInstanceAttributes privateIpv4SubnetSize(Inte * @return privateIpv4SubnetSize **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getPrivateIpv4SubnetSize() { return privateIpv4SubnetSize; @@ -439,7 +426,6 @@ public SpotMarketRequestCreateInputInstanceAttributes addProjectSshKeysItem(UUID * @return projectSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getProjectSshKeys() { return projectSshKeys; @@ -462,7 +448,6 @@ public SpotMarketRequestCreateInputInstanceAttributes publicIpv4SubnetSize(Integ * @return publicIpv4SubnetSize **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getPublicIpv4SubnetSize() { return publicIpv4SubnetSize; @@ -493,7 +478,6 @@ public SpotMarketRequestCreateInputInstanceAttributes addTagsItem(String tagsIte * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -516,7 +500,6 @@ public SpotMarketRequestCreateInputInstanceAttributes terminationTime(OffsetDate * @return terminationTime **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getTerminationTime() { return terminationTime; @@ -547,7 +530,6 @@ public SpotMarketRequestCreateInputInstanceAttributes addUserSshKeysItem(UUID us * @return userSshKeys **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUIDs of users whose SSH keys should be included on the provisioned device.") public List getUserSshKeys() { return userSshKeys; @@ -570,7 +552,6 @@ public SpotMarketRequestCreateInputInstanceAttributes userdata(String userdata) * @return userdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getUserdata() { return userdata; @@ -591,6 +572,10 @@ public void setUserdata(String userdata) { /** * 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 SpotMarketRequestCreateInputInstanceAttributes instance itself */ public SpotMarketRequestCreateInputInstanceAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -602,6 +587,8 @@ public SpotMarketRequestCreateInputInstanceAttributes putAdditionalProperty(Stri /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -609,6 +596,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -739,15 +729,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the json data is an array - if (!jsonObj.get("features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } - // ensure the json data is an array - if (!jsonObj.get("hostnames").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); } if ((jsonObj.get("operating_system") != null && !jsonObj.get("operating_system").isJsonNull()) && !jsonObj.get("operating_system").isJsonPrimitive()) { @@ -756,16 +746,16 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); } - // ensure the json data is an array - if (!jsonObj.get("project_ssh_keys").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // ensure the json data is an array - if (!jsonObj.get("user_ssh_keys").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); } if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { @@ -789,7 +779,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketRequestCreateInputInstanceAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -825,8 +815,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java index 7b8ec2696..deaa9236d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public SpotMarketRequestList addSpotMarketRequestsItem(SpotMarketRequest spotMar * @return spotMarketRequests **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getSpotMarketRequests() { return spotMarketRequests; @@ -99,6 +97,10 @@ public void setSpotMarketRequests(List spotMarketRequests) { /** * 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 SpotMarketRequestList instance itself */ public SpotMarketRequestList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public SpotMarketRequestList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketRequestList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java index 767cd83a6..9f10ddb09 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -80,7 +79,6 @@ public SpotMarketRequestMetro code(String code) { * @return code **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCode() { return code; @@ -103,7 +101,6 @@ public SpotMarketRequestMetro country(String country) { * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCountry() { return country; @@ -126,7 +123,6 @@ public SpotMarketRequestMetro id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -149,7 +145,6 @@ public SpotMarketRequestMetro name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -170,6 +165,10 @@ public void setName(String name) { /** * 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 SpotMarketRequestMetro instance itself */ public SpotMarketRequestMetro putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +180,8 @@ public SpotMarketRequestMetro putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +189,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -300,7 +304,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotMarketRequestMetro value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -336,8 +340,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java index 079a9b9b3..eda8ea78e 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public SpotPricesDatapoints addDatapointsItem(List datapointsItem) { * @return datapoints **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List> getDatapoints() { return datapoints; @@ -99,6 +97,10 @@ public void setDatapoints(List> datapoints) { /** * 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 SpotPricesDatapoints instance itself */ public SpotPricesDatapoints putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public SpotPricesDatapoints putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -190,8 +197,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesDatapoints is not found in the empty JSON string", SpotPricesDatapoints.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("datapoints").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("datapoints") != null && !jsonObj.get("datapoints").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `datapoints` to be an array in the JSON string but got `%s`", jsonObj.get("datapoints").toString())); } } @@ -212,7 +219,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotPricesDatapoints value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -248,8 +255,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java index bd72dc392..35d522a84 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public SpotPricesHistoryReport pricesHistory(SpotPricesDatapoints pricesHistory) * @return pricesHistory **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesDatapoints getPricesHistory() { return pricesHistory; @@ -89,6 +87,10 @@ public void setPricesHistory(SpotPricesDatapoints pricesHistory) { /** * 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 SpotPricesHistoryReport instance itself */ public SpotPricesHistoryReport putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public SpotPricesHistoryReport putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotPricesHistoryReport value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java index 72954b639..c7bf71fff 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public SpotPricesPerBaremetal price(Float price) { * @return price **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Float getPrice() { return price; @@ -88,6 +86,10 @@ public void setPrice(Float price) { /** * 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 SpotPricesPerBaremetal instance itself */ public SpotPricesPerBaremetal putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public SpotPricesPerBaremetal putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -197,7 +204,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotPricesPerBaremetal value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -233,8 +240,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java index 239ce18bf..42ef81c8d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -100,7 +99,6 @@ public SpotPricesPerFacility baremetal0(SpotPricesPerBaremetal baremetal0) { * @return baremetal0 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal0() { return baremetal0; @@ -123,7 +121,6 @@ public SpotPricesPerFacility baremetal1(SpotPricesPerBaremetal baremetal1) { * @return baremetal1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal1() { return baremetal1; @@ -146,7 +143,6 @@ public SpotPricesPerFacility baremetal2(SpotPricesPerBaremetal baremetal2) { * @return baremetal2 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal2() { return baremetal2; @@ -169,7 +165,6 @@ public SpotPricesPerFacility baremetal2a(SpotPricesPerBaremetal baremetal2a) { * @return baremetal2a **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal2a() { return baremetal2a; @@ -192,7 +187,6 @@ public SpotPricesPerFacility baremetal2a2(SpotPricesPerBaremetal baremetal2a2) { * @return baremetal2a2 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal2a2() { return baremetal2a2; @@ -215,7 +209,6 @@ public SpotPricesPerFacility baremetal3(SpotPricesPerBaremetal baremetal3) { * @return baremetal3 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal3() { return baremetal3; @@ -238,7 +231,6 @@ public SpotPricesPerFacility baremetalS(SpotPricesPerBaremetal baremetalS) { * @return baremetalS **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetalS() { return baremetalS; @@ -261,7 +253,6 @@ public SpotPricesPerFacility c2MediumX86(SpotPricesPerBaremetal c2MediumX86) { * @return c2MediumX86 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getC2MediumX86() { return c2MediumX86; @@ -284,7 +275,6 @@ public SpotPricesPerFacility m2XlargeX86(SpotPricesPerBaremetal m2XlargeX86) { * @return m2XlargeX86 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getM2XlargeX86() { return m2XlargeX86; @@ -305,6 +295,10 @@ public void setM2XlargeX86(SpotPricesPerBaremetal m2XlargeX86) { /** * 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 SpotPricesPerFacility instance itself */ public SpotPricesPerFacility putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -316,6 +310,8 @@ public SpotPricesPerFacility putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -323,6 +319,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -474,7 +473,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotPricesPerFacility value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -510,8 +509,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java index 9f51db63a..98a79cd0b 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public SpotPricesPerNewFacility baremetal1e(SpotPricesPerBaremetal baremetal1e) * @return baremetal1e **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerBaremetal getBaremetal1e() { return baremetal1e; @@ -89,6 +87,10 @@ public void setBaremetal1e(SpotPricesPerBaremetal baremetal1e) { /** * 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 SpotPricesPerNewFacility instance itself */ public SpotPricesPerNewFacility putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public SpotPricesPerNewFacility putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -202,7 +209,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotPricesPerNewFacility value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -238,8 +245,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java index 8daa80c77..c7a6da20d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -121,7 +120,6 @@ public SpotPricesReport ams1(SpotPricesPerFacility ams1) { * @return ams1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getAms1() { return ams1; @@ -144,7 +142,6 @@ public SpotPricesReport atl1(SpotPricesPerNewFacility atl1) { * @return atl1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getAtl1() { return atl1; @@ -167,7 +164,6 @@ public SpotPricesReport dfw1(SpotPricesPerNewFacility dfw1) { * @return dfw1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getDfw1() { return dfw1; @@ -190,7 +186,6 @@ public SpotPricesReport ewr1(SpotPricesPerFacility ewr1) { * @return ewr1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getEwr1() { return ewr1; @@ -213,7 +208,6 @@ public SpotPricesReport fra1(SpotPricesPerNewFacility fra1) { * @return fra1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getFra1() { return fra1; @@ -236,7 +230,6 @@ public SpotPricesReport iad1(SpotPricesPerNewFacility iad1) { * @return iad1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getIad1() { return iad1; @@ -259,7 +252,6 @@ public SpotPricesReport lax1(SpotPricesPerNewFacility lax1) { * @return lax1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getLax1() { return lax1; @@ -282,7 +274,6 @@ public SpotPricesReport nrt1(SpotPricesPerFacility nrt1) { * @return nrt1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getNrt1() { return nrt1; @@ -305,7 +296,6 @@ public SpotPricesReport ord1(SpotPricesPerNewFacility ord1) { * @return ord1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getOrd1() { return ord1; @@ -328,7 +318,6 @@ public SpotPricesReport sea1(SpotPricesPerNewFacility sea1) { * @return sea1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getSea1() { return sea1; @@ -351,7 +340,6 @@ public SpotPricesReport sin1(SpotPricesPerNewFacility sin1) { * @return sin1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getSin1() { return sin1; @@ -374,7 +362,6 @@ public SpotPricesReport sjc1(SpotPricesPerFacility sjc1) { * @return sjc1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerFacility getSjc1() { return sjc1; @@ -397,7 +384,6 @@ public SpotPricesReport syd1(SpotPricesPerNewFacility syd1) { * @return syd1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getSyd1() { return syd1; @@ -420,7 +406,6 @@ public SpotPricesReport yyz1(SpotPricesPerNewFacility yyz1) { * @return yyz1 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SpotPricesPerNewFacility getYyz1() { return yyz1; @@ -441,6 +426,10 @@ public void setYyz1(SpotPricesPerNewFacility yyz1) { /** * 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 SpotPricesReport instance itself */ public SpotPricesReport putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -452,6 +441,8 @@ public SpotPricesReport putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -459,6 +450,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -645,7 +639,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SpotPricesReport value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -681,8 +675,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java index 320ff655d..5e25770ca 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -134,7 +133,6 @@ public SupportRequestInput deviceId(String deviceId) { * @return deviceId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDeviceId() { return deviceId; @@ -157,7 +155,6 @@ public SupportRequestInput message(String message) { * @return message **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getMessage() { return message; @@ -180,7 +177,6 @@ public SupportRequestInput priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public PriorityEnum getPriority() { return priority; @@ -203,7 +199,6 @@ public SupportRequestInput projectId(String projectId) { * @return projectId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getProjectId() { return projectId; @@ -226,7 +221,6 @@ public SupportRequestInput subject(String subject) { * @return subject **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getSubject() { return subject; @@ -247,6 +241,10 @@ public void setSubject(String subject) { /** * 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 SupportRequestInput instance itself */ public SupportRequestInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -258,6 +256,8 @@ public SupportRequestInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -265,6 +265,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -392,7 +395,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, SupportRequestInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -428,8 +431,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java index 40430a427..a1eeecd4c 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Timeframe.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -72,7 +71,6 @@ public Timeframe endedAt(OffsetDateTime endedAt) { * @return endedAt **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public OffsetDateTime getEndedAt() { return endedAt; @@ -95,7 +93,6 @@ public Timeframe startedAt(OffsetDateTime startedAt) { * @return startedAt **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public OffsetDateTime getStartedAt() { return startedAt; @@ -116,6 +113,10 @@ public void setStartedAt(OffsetDateTime startedAt) { /** * 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 Timeframe instance itself */ public Timeframe putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +128,8 @@ public Timeframe putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +137,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -237,7 +243,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Timeframe value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -273,8 +279,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java index f65cc39df..4a728b7bd 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -90,7 +89,6 @@ public TransferRequest createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -113,7 +111,6 @@ public TransferRequest href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -136,7 +133,6 @@ public TransferRequest id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -159,7 +155,6 @@ public TransferRequest project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -182,7 +177,6 @@ public TransferRequest targetOrganization(Href targetOrganization) { * @return targetOrganization **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getTargetOrganization() { return targetOrganization; @@ -205,7 +199,6 @@ public TransferRequest updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -226,6 +219,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 TransferRequest instance itself */ public TransferRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -237,6 +234,8 @@ public TransferRequest putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -244,6 +243,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -364,7 +366,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TransferRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -400,8 +402,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java index df0768514..5b2a9def7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -68,7 +67,6 @@ public TransferRequestInput targetOrganizationId(UUID targetOrganizationId) { * @return targetOrganizationId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getTargetOrganizationId() { return targetOrganizationId; @@ -89,6 +87,10 @@ public void setTargetOrganizationId(UUID targetOrganizationId) { /** * 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 TransferRequestInput instance itself */ public TransferRequestInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +102,8 @@ public TransferRequestInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +111,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -201,7 +208,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TransferRequestInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -237,8 +244,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java index 8d8590009..b636d8246 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public TransferRequestList addTransfersItem(TransferRequest transfersItem) { * @return transfers **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTransfers() { return transfers; @@ -99,6 +97,10 @@ public void setTransfers(List transfers) { /** * 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 TransferRequestList instance itself */ public TransferRequestList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public TransferRequestList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TransferRequestList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java index 20e310174..8a947767d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -67,7 +66,6 @@ public UpdateEmailInput _default(Boolean _default) { * @return _default **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getDefault() { return _default; @@ -88,6 +86,10 @@ public void setDefault(Boolean _default) { /** * 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 UpdateEmailInput instance itself */ public UpdateEmailInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -99,6 +101,8 @@ public UpdateEmailInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -106,6 +110,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -197,7 +204,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, UpdateEmailInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -233,8 +240,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequest.java index 7b1147414..e76ac6990 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequest.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java index afe58bc40..a7c1baa4f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -152,7 +151,6 @@ public User avatarThumbUrl(String avatarThumbUrl) { * @return avatarThumbUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAvatarThumbUrl() { return avatarThumbUrl; @@ -175,7 +173,6 @@ public User avatarUrl(String avatarUrl) { * @return avatarUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getAvatarUrl() { return avatarUrl; @@ -198,7 +195,6 @@ public User createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getCreatedAt() { return createdAt; @@ -221,7 +217,6 @@ public User customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -244,7 +239,6 @@ public User email(String email) { * @return email **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getEmail() { return email; @@ -275,7 +269,6 @@ public User addEmailsItem(Href emailsItem) { * @return emails **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getEmails() { return emails; @@ -298,7 +291,6 @@ public User firstName(String firstName) { * @return firstName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFirstName() { return firstName; @@ -321,7 +313,6 @@ public User fraudScore(String fraudScore) { * @return fraudScore **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFraudScore() { return fraudScore; @@ -344,7 +335,6 @@ public User fullName(String fullName) { * @return fullName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFullName() { return fullName; @@ -367,7 +357,6 @@ public User href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -390,7 +379,6 @@ public User id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -413,7 +401,6 @@ public User lastLoginAt(OffsetDateTime lastLoginAt) { * @return lastLoginAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getLastLoginAt() { return lastLoginAt; @@ -436,7 +423,6 @@ public User lastName(String lastName) { * @return lastName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLastName() { return lastName; @@ -459,7 +445,6 @@ public User maxOrganizations(Integer maxOrganizations) { * @return maxOrganizations **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getMaxOrganizations() { return maxOrganizations; @@ -482,7 +467,6 @@ public User maxProjects(Integer maxProjects) { * @return maxProjects **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getMaxProjects() { return maxProjects; @@ -505,7 +489,6 @@ public User phoneNumber(String phoneNumber) { * @return phoneNumber **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPhoneNumber() { return phoneNumber; @@ -528,7 +511,6 @@ public User shortId(String shortId) { * @return shortId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getShortId() { return shortId; @@ -551,7 +533,6 @@ public User timezone(String timezone) { * @return timezone **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTimezone() { return timezone; @@ -574,7 +555,6 @@ public User twoFactorAuth(String twoFactorAuth) { * @return twoFactorAuth **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTwoFactorAuth() { return twoFactorAuth; @@ -597,7 +577,6 @@ public User updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -628,7 +607,6 @@ public User addFeaturesItem(String featuresItem) { * @return features **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getFeatures() { return features; @@ -649,6 +627,10 @@ public void setFeatures(List features) { /** * 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 User instance itself */ public User putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -660,6 +642,8 @@ public User putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -667,6 +651,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -853,8 +840,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("two_factor_auth") != null && !jsonObj.get("two_factor_auth").isJsonNull()) && !jsonObj.get("two_factor_auth").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); } - // ensure the json data is an array - if (!jsonObj.get("features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); } } @@ -875,7 +862,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, User value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -911,8 +898,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java index 261539a15..9164c3e55 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -132,7 +131,6 @@ public UserCreateInput avatar(File avatar) { * @return avatar **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public File getAvatar() { return avatar; @@ -155,7 +153,6 @@ public UserCreateInput companyName(String companyName) { * @return companyName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCompanyName() { return companyName; @@ -178,7 +175,6 @@ public UserCreateInput companyUrl(String companyUrl) { * @return companyUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCompanyUrl() { return companyUrl; @@ -201,7 +197,6 @@ public UserCreateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -229,7 +224,6 @@ public UserCreateInput addEmailsItem(EmailInput emailsItem) { * @return emails **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getEmails() { return emails; @@ -252,7 +246,6 @@ public UserCreateInput firstName(String firstName) { * @return firstName **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getFirstName() { return firstName; @@ -275,7 +268,6 @@ public UserCreateInput lastName(String lastName) { * @return lastName **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getLastName() { return lastName; @@ -298,7 +290,6 @@ public UserCreateInput level(String level) { * @return level **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLevel() { return level; @@ -321,7 +312,6 @@ public UserCreateInput locked(Boolean locked) { * @return locked **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Boolean getLocked() { return locked; @@ -344,7 +334,6 @@ public UserCreateInput password(String password) { * @return password **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPassword() { return password; @@ -367,7 +356,6 @@ public UserCreateInput phoneNumber(String phoneNumber) { * @return phoneNumber **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPhoneNumber() { return phoneNumber; @@ -390,7 +378,6 @@ public UserCreateInput socialAccounts(Object socialAccounts) { * @return socialAccounts **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getSocialAccounts() { return socialAccounts; @@ -413,7 +400,6 @@ public UserCreateInput timezone(String timezone) { * @return timezone **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTimezone() { return timezone; @@ -436,7 +422,6 @@ public UserCreateInput title(String title) { * @return title **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTitle() { return title; @@ -459,7 +444,6 @@ public UserCreateInput twoFactorAuth(String twoFactorAuth) { * @return twoFactorAuth **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTwoFactorAuth() { return twoFactorAuth; @@ -482,7 +466,6 @@ public UserCreateInput verifiedAt(OffsetDateTime verifiedAt) { * @return verifiedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public OffsetDateTime getVerifiedAt() { return verifiedAt; @@ -503,6 +486,10 @@ public void setVerifiedAt(OffsetDateTime verifiedAt) { /** * 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 UserCreateInput instance itself */ public UserCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -514,6 +501,8 @@ public UserCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -521,6 +510,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -707,7 +699,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, UserCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -743,8 +735,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java index 50c8fa152..99da60fb8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -75,7 +74,6 @@ public UserList meta(Meta meta) { * @return meta **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Meta getMeta() { return meta; @@ -106,7 +104,6 @@ public UserList addUsersItem(User usersItem) { * @return users **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getUsers() { return users; @@ -127,6 +124,10 @@ public void setUsers(List users) { /** * 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 UserList instance itself */ public UserList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +139,8 @@ public UserList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +148,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -257,7 +263,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, UserList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -293,8 +299,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java index b40e9e085..b68fc84d3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -105,7 +104,6 @@ public UserLite avatarThumbUrl(String avatarThumbUrl) { * @return avatarThumbUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Avatar thumbnail URL of the User") public String getAvatarThumbUrl() { return avatarThumbUrl; @@ -128,7 +126,6 @@ public UserLite createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When the user was created") public OffsetDateTime getCreatedAt() { return createdAt; @@ -151,7 +148,6 @@ public UserLite email(String email) { * @return email **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Primary email address of the User") public String getEmail() { return email; @@ -174,7 +170,6 @@ public UserLite firstName(String firstName) { * @return firstName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "First name of the User") public String getFirstName() { return firstName; @@ -197,7 +192,6 @@ public UserLite fullName(String fullName) { * @return fullName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Full name of the User") public String getFullName() { return fullName; @@ -220,7 +214,6 @@ public UserLite href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "API URL uniquely representing the User") public String getHref() { return href; @@ -243,7 +236,6 @@ public UserLite id(UUID id) { * @return id **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "ID of the User") public UUID getId() { return id; @@ -266,7 +258,6 @@ public UserLite lastName(String lastName) { * @return lastName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Last name of the User") public String getLastName() { return lastName; @@ -289,7 +280,6 @@ public UserLite shortId(String shortId) { * @return shortId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Short ID of the User") public String getShortId() { return shortId; @@ -312,7 +302,6 @@ public UserLite updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When the user details were last updated") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -333,6 +322,10 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { /** * 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 UserLite instance itself */ public UserLite putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -344,6 +337,8 @@ public UserLite putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -351,6 +346,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -502,7 +500,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, UserLite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -538,8 +536,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java index 623ebd2ae..14f4475b6 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -87,7 +86,6 @@ public UserUpdateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -110,7 +108,6 @@ public UserUpdateInput firstName(String firstName) { * @return firstName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getFirstName() { return firstName; @@ -133,7 +130,6 @@ public UserUpdateInput lastName(String lastName) { * @return lastName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getLastName() { return lastName; @@ -156,7 +152,6 @@ public UserUpdateInput password(String password) { * @return password **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPassword() { return password; @@ -179,7 +174,6 @@ public UserUpdateInput phoneNumber(String phoneNumber) { * @return phoneNumber **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getPhoneNumber() { return phoneNumber; @@ -202,7 +196,6 @@ public UserUpdateInput timezone(String timezone) { * @return timezone **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getTimezone() { return timezone; @@ -223,6 +216,10 @@ public void setTimezone(String timezone) { /** * 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 UserUpdateInput instance itself */ public UserUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -234,6 +231,8 @@ public UserUpdateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -241,6 +240,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -362,7 +364,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, UserUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -398,8 +400,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java index f5f920981..399a1d250 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -115,7 +114,6 @@ public VirtualCircuit bill(Boolean bill) { * @return bill **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "True if the Virtual Circuit is being billed. Currently, only Virtual Circuits that are created with A-side service tokens will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted.") public Boolean getBill() { return bill; @@ -138,7 +136,6 @@ public VirtualCircuit description(String description) { * @return description **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getDescription() { return description; @@ -161,7 +158,6 @@ public VirtualCircuit id(UUID id) { * @return id **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public UUID getId() { return id; @@ -184,7 +180,6 @@ public VirtualCircuit name(String name) { * @return name **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -207,7 +202,6 @@ public VirtualCircuit nniVlan(Integer nniVlan) { * @return nniVlan **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Integer getNniVlan() { return nniVlan; @@ -230,7 +224,6 @@ public VirtualCircuit port(Href port) { * @return port **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Href getPort() { return port; @@ -253,7 +246,6 @@ public VirtualCircuit project(Href project) { * @return project **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Href getProject() { return project; @@ -276,7 +268,6 @@ public VirtualCircuit speed(Integer speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "integer representing bps speed") public Integer getSpeed() { return speed; @@ -299,7 +290,6 @@ public VirtualCircuit status(String status) { * @return status **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getStatus() { return status; @@ -327,7 +317,6 @@ public VirtualCircuit addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getTags() { return tags; @@ -350,7 +339,6 @@ public VirtualCircuit virtualNetwork(Href virtualNetwork) { * @return virtualNetwork **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Href getVirtualNetwork() { return virtualNetwork; @@ -373,7 +361,6 @@ public VirtualCircuit vnid(Integer vnid) { * @return vnid **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Integer getVnid() { return vnid; @@ -394,6 +381,10 @@ public void setVnid(Integer vnid) { /** * 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 VirtualCircuit instance itself */ public VirtualCircuit putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -405,6 +396,8 @@ public VirtualCircuit putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -412,6 +405,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -552,8 +548,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the required json array is present + if (jsonObj.get("tags") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // validate the required field `virtual_network` @@ -576,7 +574,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualCircuit value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -612,8 +610,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java index aab62bf37..00104119f 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -94,7 +93,6 @@ public VirtualCircuitCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -117,7 +115,6 @@ public VirtualCircuitCreateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -142,7 +139,6 @@ public VirtualCircuitCreateInput nniVlan(Integer nniVlan) { * @return nniVlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getNniVlan() { return nniVlan; @@ -165,7 +161,6 @@ public VirtualCircuitCreateInput project(UUID project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getProject() { return project; @@ -188,7 +183,6 @@ public VirtualCircuitCreateInput speed(Integer speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps')") public Integer getSpeed() { return speed; @@ -219,7 +213,6 @@ public VirtualCircuitCreateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -242,7 +235,6 @@ public VirtualCircuitCreateInput vnid(UUID vnid) { * @return vnid **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A Virtual Network record UUID or the VNID of a Virtual Network in your project (sent as integer).") public UUID getVnid() { return vnid; @@ -263,6 +255,10 @@ public void setVnid(UUID vnid) { /** * 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 VirtualCircuitCreateInput instance itself */ public VirtualCircuitCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -274,6 +270,8 @@ public VirtualCircuitCreateInput putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -281,6 +279,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -381,8 +382,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { @@ -406,7 +407,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualCircuitCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -442,8 +443,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java index 1cfb722c8..4cf165ae8 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public VirtualCircuitList addVirtualCircuitsItem(VirtualCircuitListVirtualCircui * @return virtualCircuits **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVirtualCircuits() { return virtualCircuits; @@ -99,6 +97,10 @@ public void setVirtualCircuits(List virt /** * 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 VirtualCircuitList instance itself */ public VirtualCircuitList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public VirtualCircuitList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualCircuitList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInner.java index 22f88a3d8..96b75f822 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInner.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInner.java @@ -24,8 +24,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java index 8dd3666a6..9e17ca33d 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -85,7 +84,6 @@ public VirtualCircuitUpdateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -108,7 +106,6 @@ public VirtualCircuitUpdateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -131,7 +128,6 @@ public VirtualCircuitUpdateInput speed(String speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Speed can be changed only if it is a dedicated connection") public String getSpeed() { return speed; @@ -162,7 +158,6 @@ public VirtualCircuitUpdateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -185,7 +180,6 @@ public VirtualCircuitUpdateInput vnid(String vnid) { * @return vnid **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A Virtual Network record UUID or the VNID of a Virtual Network in your project.") public String getVnid() { return vnid; @@ -206,6 +200,10 @@ public void setVnid(String vnid) { /** * 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 VirtualCircuitUpdateInput instance itself */ public VirtualCircuitUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -217,6 +215,8 @@ public VirtualCircuitUpdateInput putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -224,6 +224,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -318,8 +321,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("speed") != null && !jsonObj.get("speed").isJsonNull()) && !jsonObj.get("speed").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { @@ -343,7 +346,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualCircuitUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -379,8 +382,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java index ff70aa984..df425b556 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -111,7 +110,6 @@ public VirtualNetwork assignedTo(Href assignedTo) { * @return assignedTo **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getAssignedTo() { return assignedTo; @@ -134,7 +132,6 @@ public VirtualNetwork assignedToVirtualCircuit(Boolean assignedToVirtualCircuit) * @return assignedToVirtualCircuit **/ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the virtual network is attached to a virtual circuit. False if not.") public Boolean getAssignedToVirtualCircuit() { return assignedToVirtualCircuit; @@ -157,7 +154,6 @@ public VirtualNetwork description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -180,7 +176,6 @@ public VirtualNetwork facility(Href facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getFacility() { return facility; @@ -203,7 +198,6 @@ public VirtualNetwork href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -226,7 +220,6 @@ public VirtualNetwork id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -257,7 +250,6 @@ public VirtualNetwork addInstancesItem(Href instancesItem) { * @return instances **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of instances with ports currently associated to this Virtual Network.") public List getInstances() { return instances; @@ -288,7 +280,6 @@ public VirtualNetwork addMetalGatewaysItem(Href metalGatewaysItem) { * @return metalGateways **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of metal gateways currently associated to this Virtual Network.") public List getMetalGateways() { return metalGateways; @@ -311,7 +302,6 @@ public VirtualNetwork metro(Href metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getMetro() { return metro; @@ -334,7 +324,6 @@ public VirtualNetwork metroCode(String metroCode) { * @return metroCode **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The Metro code of the metro in which this Virtual Network is defined.") public String getMetroCode() { return metroCode; @@ -357,7 +346,6 @@ public VirtualNetwork vxlan(Integer vxlan) { * @return vxlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getVxlan() { return vxlan; @@ -378,6 +366,10 @@ public void setVxlan(Integer vxlan) { /** * 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 VirtualNetwork instance itself */ public VirtualNetwork putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -389,6 +381,8 @@ public VirtualNetwork putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -396,6 +390,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -569,7 +566,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualNetwork value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -605,8 +602,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java index 9f581af55..b2e3ebec7 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -38,6 +36,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -79,7 +78,6 @@ public VirtualNetworkCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -102,7 +100,6 @@ public VirtualNetworkCreateInput facility(String facility) { * @return facility **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUID (or facility code) for the Facility in which to create this Virtual network.") public String getFacility() { return facility; @@ -125,7 +122,6 @@ public VirtualNetworkCreateInput metro(String metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUID (or metro code) for the Metro in which to create this Virtual Network.") public String getMetro() { return metro; @@ -148,7 +144,6 @@ public VirtualNetworkCreateInput vxlan(Integer vxlan) { * @return vxlan **/ @javax.annotation.Nullable - @ApiModelProperty(example = "1099", value = "VLAN ID between 2-3999. Must be unique for the project within the Metro in which this Virtual Network is being created. If no value is specified, the next-available VLAN ID in the range 1000-1999 will be automatically selected.") public Integer getVxlan() { return vxlan; @@ -169,6 +164,10 @@ public void setVxlan(Integer vxlan) { /** * 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 VirtualNetworkCreateInput instance itself */ public VirtualNetworkCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -180,6 +179,8 @@ public VirtualNetworkCreateInput putAdditionalProperty(String key, Object value) /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -187,6 +188,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -296,7 +300,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualNetworkCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -332,8 +336,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java index 64701f6da..03667b8db 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public VirtualNetworkList addVirtualNetworksItem(VirtualNetwork virtualNetworksI * @return virtualNetworks **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVirtualNetworks() { return virtualNetworks; @@ -99,6 +97,10 @@ public void setVirtualNetworks(List virtualNetworks) { /** * 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 VirtualNetworkList instance itself */ public VirtualNetworkList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public VirtualNetworkList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VirtualNetworkList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java index 458e568ec..e5866d631 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java @@ -23,8 +23,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -44,6 +42,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -105,7 +104,6 @@ public Vrf id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -128,7 +126,6 @@ public Vrf name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -151,7 +148,6 @@ public Vrf description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional field that can be set to describe the VRF") public String getDescription() { return description; @@ -174,7 +170,6 @@ public Vrf localAsn(Integer localAsn) { * @return localAsn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A 4-byte ASN associated with the VRF.") public Integer getLocalAsn() { return localAsn; @@ -205,7 +200,6 @@ public Vrf addIpRangesItem(String ipRangesItem) { * @return ipRanges **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"].") public List getIpRanges() { return ipRanges; @@ -228,7 +222,6 @@ public Vrf project(Project project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Project getProject() { return project; @@ -251,7 +244,6 @@ public Vrf metro(Metro metro) { * @return metro **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Metro getMetro() { return metro; @@ -274,7 +266,6 @@ public Vrf createdBy(User createdBy) { * @return createdBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public User getCreatedBy() { return createdBy; @@ -297,7 +288,6 @@ public Vrf href(String href) { * @return href **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getHref() { return href; @@ -318,6 +308,10 @@ public void setHref(String href) { /** * 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 Vrf instance itself */ public Vrf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -329,6 +323,8 @@ public Vrf putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -336,6 +332,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -442,8 +441,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the json data is an array - if (!jsonObj.get("ip_ranges").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } // validate the optional field `project` @@ -479,7 +478,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Vrf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -515,8 +514,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java index d1f751cce..c5e52e736 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -85,7 +84,6 @@ public VrfCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -116,7 +114,6 @@ public VrfCreateInput addIpRangesItem(String ipRangesItem) { * @return ipRanges **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits.") public List getIpRanges() { return ipRanges; @@ -139,7 +136,6 @@ public VrfCreateInput localAsn(Integer localAsn) { * @return localAsn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getLocalAsn() { return localAsn; @@ -162,7 +158,6 @@ public VrfCreateInput metro(String metro) { * @return metro **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The UUID (or metro code) for the Metro in which to create this VRF.") public String getMetro() { return metro; @@ -185,7 +180,6 @@ public VrfCreateInput name(String name) { * @return name **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -206,6 +200,10 @@ public void setName(String name) { /** * 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 VrfCreateInput instance itself */ public VrfCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -217,6 +215,8 @@ public VrfCreateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -224,6 +224,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -321,8 +324,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the json data is an array - if (!jsonObj.get("ip_ranges").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } if (!jsonObj.get("metro").isJsonPrimitive()) { @@ -349,7 +352,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -385,8 +388,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java index 03c6bb3c3..10d420d17 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservation.java @@ -27,8 +27,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -49,6 +47,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -82,7 +81,6 @@ public VrfIPReservation vrf(Vrf vrf) { * @return vrf **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Vrf getVrf() { return vrf; @@ -105,7 +103,6 @@ public VrfIPReservation createdBy(User createdBy) { * @return createdBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public User getCreatedBy() { return createdBy; diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java index 2b6715416..383f03071 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOf.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import com.google.gson.Gson; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -73,7 +72,6 @@ public VrfIPReservationAllOf vrf(Vrf vrf) { * @return vrf **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Vrf getVrf() { return vrf; @@ -96,7 +94,6 @@ public VrfIPReservationAllOf createdBy(User createdBy) { * @return createdBy **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public User getCreatedBy() { return createdBy; @@ -117,6 +114,10 @@ public void setCreatedBy(User createdBy) { /** * 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 VrfIPReservationAllOf instance itself */ public VrfIPReservationAllOf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -128,6 +129,8 @@ public VrfIPReservationAllOf putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -135,6 +138,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -237,7 +243,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfIPReservationAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -273,8 +279,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java index ec6dd8e7f..555a11ce1 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -94,7 +93,6 @@ public VrfIPReservationCreateInput cidr(Integer cidr) { * @return cidr **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "16", required = true, value = "The size of the VRF IP Reservation's subnet") public Integer getCidr() { return cidr; @@ -117,7 +115,6 @@ public VrfIPReservationCreateInput customdata(Object customdata) { * @return customdata **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Object getCustomdata() { return customdata; @@ -140,7 +137,6 @@ public VrfIPReservationCreateInput details(String details) { * @return details **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDetails() { return details; @@ -163,7 +159,6 @@ public VrfIPReservationCreateInput network(String network) { * @return network **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "10.1.2.0", required = true, value = "The starting address for this VRF IP Reservation's subnet") public String getNetwork() { return network; @@ -194,7 +189,6 @@ public VrfIPReservationCreateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -217,7 +211,6 @@ public VrfIPReservationCreateInput type(String type) { * @return type **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "vrf", required = true, value = "Must be set to 'vrf'") public String getType() { return type; @@ -240,7 +233,6 @@ public VrfIPReservationCreateInput vrfId(UUID vrfId) { * @return vrfId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The ID of the VRF in which this VRF IP Reservation is created. The VRF must have an existing IP Range that contains the requested subnet. This field may be aliased as just 'vrf'.") public UUID getVrfId() { return vrfId; @@ -261,6 +253,10 @@ public void setVrfId(UUID vrfId) { /** * 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 VrfIPReservationCreateInput instance itself */ public VrfIPReservationCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -272,6 +268,8 @@ public VrfIPReservationCreateInput putAdditionalProperty(String key, Object valu /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -279,6 +277,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -387,8 +388,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("network").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { @@ -415,7 +416,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfIPReservationCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -451,8 +452,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java index 7f911dcdd..c2d9b8487 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIPReservationList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public VrfIPReservationList addIpAddressesItem(VrfIPReservation ipAddressesItem) * @return ipAddresses **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getIpAddresses() { return ipAddresses; @@ -99,6 +97,10 @@ public void setIpAddresses(List ipAddresses) { /** * 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 VrfIPReservationList instance itself */ public VrfIPReservationList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public VrfIPReservationList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfIPReservationList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java index b3e9600ea..3aea3c2ee 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -41,6 +39,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -78,7 +77,6 @@ public VrfList addVrfsItem(Vrf vrfsItem) { * @return vrfs **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getVrfs() { return vrfs; @@ -99,6 +97,10 @@ public void setVrfs(List vrfs) { /** * 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 VrfList instance itself */ public VrfList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -110,6 +112,8 @@ public VrfList putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -117,6 +121,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -222,7 +229,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -258,8 +265,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java index 8f3a7e8f8..1463f4ead 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; @@ -39,6 +37,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -72,7 +71,6 @@ public VrfMetalGatewayCreateInput ipReservationId(UUID ipReservationId) { * @return ipReservationId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The UUID an a VRF IP Reservation that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the VRF IP Reservation and the Virtual Network must reside in the same Metro.") public UUID getIpReservationId() { return ipReservationId; @@ -95,7 +93,6 @@ public VrfMetalGatewayCreateInput virtualNetworkId(UUID virtualNetworkId) { * @return virtualNetworkId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "THe UUID of a Metro Virtual Network that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the Virtual Network and the VRF IP Reservation must reside in the same metro.") public UUID getVirtualNetworkId() { return virtualNetworkId; @@ -116,6 +113,10 @@ public void setVirtualNetworkId(UUID virtualNetworkId) { /** * 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 VrfMetalGatewayCreateInput instance itself */ public VrfMetalGatewayCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +128,8 @@ public VrfMetalGatewayCreateInput putAdditionalProperty(String key, Object value /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +137,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -243,7 +249,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfMetalGatewayCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -279,8 +285,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java index 57125ce4f..f0c5fc8bf 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -81,7 +80,6 @@ public VrfUpdateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -112,7 +110,6 @@ public VrfUpdateInput addIpRangesItem(String ipRangesItem) { * @return ipRanges **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits. Adding a new CIDR address to the list will result in the creation of a new IP Range for this VRF. Removal of an existing CIDR address from the list will result in the deletion of an existing IP Range for this VRF. Deleting an IP Range will result in the deletion of any VRF IP Reservations contained within the IP Range, as well as the VRF IP Reservation\\'s associated Metal Gateways or Virtual Circuits. If you do not wish to add or remove IP Ranges, either include the full existing list of IP Ranges in the update request, or do not specify the `ip_ranges` field in the update request. Specifying a value of `[]` will remove all existing IP Ranges from the VRF.") public List getIpRanges() { return ipRanges; @@ -135,7 +132,6 @@ public VrfUpdateInput localAsn(Integer localAsn) { * @return localAsn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The new `local_asn` value for the VRF. This field cannot be updated when there are active Interconnection Virtual Circuits associated to the VRF.") public Integer getLocalAsn() { return localAsn; @@ -158,7 +154,6 @@ public VrfUpdateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -179,6 +174,10 @@ public void setName(String name) { /** * 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 VrfUpdateInput instance itself */ public VrfUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -190,6 +189,8 @@ public VrfUpdateInput putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -197,6 +198,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -282,8 +286,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the json data is an array - if (!jsonObj.get("ip_ranges").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { @@ -307,7 +311,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -343,8 +347,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java index 20bf8a47e..162f4e50a 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -43,6 +41,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -128,7 +127,6 @@ public VrfVirtualCircuit customerIp(String customerIp) { * @return customerIp **/ @javax.annotation.Nullable - @ApiModelProperty(example = "12.0.0.2", value = "An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used.") public String getCustomerIp() { return customerIp; @@ -151,7 +149,6 @@ public VrfVirtualCircuit description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -174,7 +171,6 @@ public VrfVirtualCircuit id(UUID id) { * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public UUID getId() { return id; @@ -197,7 +193,6 @@ public VrfVirtualCircuit md5(String md5) { * @return md5 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The MD5 password for the BGP peering in plaintext (not a checksum).") public String getMd5() { return md5; @@ -220,7 +215,6 @@ public VrfVirtualCircuit metalIp(String metalIp) { * @return metalIp **/ @javax.annotation.Nullable - @ApiModelProperty(example = "12.0.0.1", value = "An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used.") public String getMetalIp() { return metalIp; @@ -243,7 +237,6 @@ public VrfVirtualCircuit name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -266,7 +259,6 @@ public VrfVirtualCircuit port(Href port) { * @return port **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getPort() { return port; @@ -289,7 +281,6 @@ public VrfVirtualCircuit nniVlan(Integer nniVlan) { * @return nniVlan **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getNniVlan() { return nniVlan; @@ -312,7 +303,6 @@ public VrfVirtualCircuit peerAsn(Integer peerAsn) { * @return peerAsn **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The peer ASN that will be used with the VRF on the Virtual Circuit.") public Integer getPeerAsn() { return peerAsn; @@ -335,7 +325,6 @@ public VrfVirtualCircuit project(Href project) { * @return project **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Href getProject() { return project; @@ -358,7 +347,6 @@ public VrfVirtualCircuit speed(Integer speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "integer representing bps speed") public Integer getSpeed() { return speed; @@ -381,7 +369,6 @@ public VrfVirtualCircuit status(String status) { * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getStatus() { return status; @@ -404,7 +391,6 @@ public VrfVirtualCircuit subnet(String subnet) { * @return subnet **/ @javax.annotation.Nullable - @ApiModelProperty(example = "12.0.0.0/30", value = "The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP.") public String getSubnet() { return subnet; @@ -435,7 +421,6 @@ public VrfVirtualCircuit addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -458,7 +443,6 @@ public VrfVirtualCircuit vrf(Vrf vrf) { * @return vrf **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Vrf getVrf() { return vrf; @@ -479,6 +463,10 @@ public void setVrf(Vrf vrf) { /** * 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 VrfVirtualCircuit instance itself */ public VrfVirtualCircuit putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -490,6 +478,8 @@ public VrfVirtualCircuit putAdditionalProperty(String key, Object value) { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -497,6 +487,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -644,8 +637,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("subnet") != null && !jsonObj.get("subnet").isJsonNull()) && !jsonObj.get("subnet").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // validate the optional field `vrf` @@ -670,7 +663,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfVirtualCircuit value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -706,8 +699,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java index 8a274a875..918eb2bb9 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -42,6 +40,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -115,7 +114,6 @@ public VrfVirtualCircuitCreateInput customerIp(String customerIp) { * @return customerIp **/ @javax.annotation.Nullable - @ApiModelProperty(example = "12.0.0.2", value = "An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used.") public String getCustomerIp() { return customerIp; @@ -138,7 +136,6 @@ public VrfVirtualCircuitCreateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -161,7 +158,6 @@ public VrfVirtualCircuitCreateInput md5(String md5) { * @return md5 **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The MD5 password for the BGP peering in plaintext (not a checksum).") public String getMd5() { return md5; @@ -184,7 +180,6 @@ public VrfVirtualCircuitCreateInput metalIp(String metalIp) { * @return metalIp **/ @javax.annotation.Nullable - @ApiModelProperty(example = "12.0.0.1", value = "An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used.") public String getMetalIp() { return metalIp; @@ -207,7 +202,6 @@ public VrfVirtualCircuitCreateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -232,7 +226,6 @@ public VrfVirtualCircuitCreateInput nniVlan(Integer nniVlan) { * @return nniVlan **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Integer getNniVlan() { return nniVlan; @@ -255,7 +248,6 @@ public VrfVirtualCircuitCreateInput peerAsn(Integer peerAsn) { * @return peerAsn **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The peer ASN that will be used with the VRF on the Virtual Circuit.") public Integer getPeerAsn() { return peerAsn; @@ -278,7 +270,6 @@ public VrfVirtualCircuitCreateInput project(UUID project) { * @return project **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public UUID getProject() { return project; @@ -301,7 +292,6 @@ public VrfVirtualCircuitCreateInput speed(Integer speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps')") public Integer getSpeed() { return speed; @@ -324,7 +314,6 @@ public VrfVirtualCircuitCreateInput subnet(String subnet) { * @return subnet **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "12.0.0.0/30", required = true, value = "The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. The subnet specified must be contained within an already-defined IP Range for the VRF.") public String getSubnet() { return subnet; @@ -355,7 +344,6 @@ public VrfVirtualCircuitCreateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -378,7 +366,6 @@ public VrfVirtualCircuitCreateInput vrf(UUID vrf) { * @return vrf **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The UUID of the VRF that will be associated with the Virtual Circuit.") public UUID getVrf() { return vrf; @@ -399,6 +386,10 @@ public void setVrf(UUID vrf) { /** * 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 VrfVirtualCircuitCreateInput instance itself */ public VrfVirtualCircuitCreateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -410,6 +401,8 @@ public VrfVirtualCircuitCreateInput putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -417,6 +410,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -567,8 +563,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("subnet").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("vrf").isJsonPrimitive()) { @@ -592,7 +588,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfVirtualCircuitCreateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -628,8 +624,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java index a969857ea..131db3354 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -40,6 +38,7 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -81,7 +80,6 @@ public VrfVirtualCircuitUpdateInput description(String description) { * @return description **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getDescription() { return description; @@ -104,7 +102,6 @@ public VrfVirtualCircuitUpdateInput name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getName() { return name; @@ -127,7 +124,6 @@ public VrfVirtualCircuitUpdateInput speed(String speed) { * @return speed **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Speed can be changed only if it is a dedicated connection") public String getSpeed() { return speed; @@ -158,7 +154,6 @@ public VrfVirtualCircuitUpdateInput addTagsItem(String tagsItem) { * @return tags **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getTags() { return tags; @@ -179,6 +174,10 @@ public void setTags(List tags) { /** * 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 VrfVirtualCircuitUpdateInput instance itself */ public VrfVirtualCircuitUpdateInput putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -190,6 +189,8 @@ public VrfVirtualCircuitUpdateInput putAdditionalProperty(String key, Object val /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -197,6 +198,9 @@ public Map getAdditionalProperties() { /** * 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) { @@ -288,8 +292,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("speed") != null && !jsonObj.get("speed").isJsonNull()) && !jsonObj.get("speed").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); } - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -310,7 +314,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VrfVirtualCircuitUpdateInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -346,8 +350,10 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } 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)); } } } diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java index 17e5a7970..4cf639fa4 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java @@ -14,7 +14,6 @@ package com.equinix.openapi.metal.v1.api; import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Device; import com.equinix.openapi.metal.v1.model.Error; import com.equinix.openapi.metal.v1.model.HardwareReservation; import com.equinix.openapi.metal.v1.model.HardwareReservationList; @@ -47,7 +46,7 @@ public void findHardwareReservationByIdTest() throws ApiException { UUID id = null; List include = null; List exclude = null; - Device response = api.findHardwareReservationById(id, include, exclude); + HardwareReservation response = api.findHardwareReservationById(id, include, exclude); // TODO: test validations } diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java index fb0d27caa..8190851de 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java index 4e94eebf1..968455a41 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java index a6f7f1143..d5d307963 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java index 568552ec6..353ed3192 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java index 5786b9fc1..b382b7e15 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java index 15fed5f29..dbf48e031 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java index a2b0dc083..57bac5ff8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java index caec58767..adbc11265 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java index 145ed7e00..5605fd6e4 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java index ecbc38059..4f2a20319 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java index 67038fa4e..ca6bb5004 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInnerTest.java index 140f22867..b543a376f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesInInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInnerTest.java index d32111be3..a4efff505 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataRoutesOutInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java index f8adc75a9..11b39aec9 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java index e113244b2..2b55ce2ec 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java index 5b33ee138..e711574bc 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java index 776e7fab0..f15ad5471 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java index bbd2d15b9..051a09047 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java index 3943e1de4..c36bf8405 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java index f7d8df022..86b723154 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java index cd5840e33..3d8a05efa 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java index 28467cdc3..35e508e41 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java index 3e33775b2..9dca9fdb5 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java index d3df9e1ae..8d206095c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerFacilityTest.java index 07e86017a..7203f8fde 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerFacilityTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerFacilityTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInputTest.java index 835998901..0bcd7a2a4 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerMetroInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacilityTest.java index 61732f138..4001369cf 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacilityTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityPerNewFacilityTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityReportTest.java index 59c6b1819..fc7a7c0e4 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityReportTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityReportTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java index a6cad41a1..7e551c57f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201ResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201ResponseTest.java index 18f3fc44b..8f02ec4dd 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201ResponseTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuit201ResponseTest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequestTest.java index 55b356026..9e580c2d5 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateConnectionPortVirtualCircuitRequestTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java index 598f726c5..887b5439c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java index bb1587581..b27350734 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java index 74a95a789..898ec1724 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java index ce4e120e4..c9f55fc2b 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOfTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOfTest.java index 71318a358..ff69c1156 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOfTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationAllOfTest.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInputTest.java index a9cd8dbe6..f1944d5e9 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationTest.java index 9291ba819..dc9e5c5c9 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DefaultIPReservationTest.java @@ -26,8 +26,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java index ef727243a..860205326 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInnerTest.java index e25f7ce20..64d3bcb7c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputIpAddressesInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java index 0e0b2db58..a41fc950e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java index 38b45719e..6e1bd1553 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java index 06b3cc9ef..b1e02a60e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java index eb651eb4d..a82d40bbb 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java index 4cfde4b1b..b7438d5ed 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java index 3da508d2f..f8f662b3d 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java index 0d6e9bdee..e170ab53e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java @@ -30,8 +30,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java index b4cb5c1c7..227b3e7c3 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java index 0e1b7a46d..42c226db2 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java index d48b56be5..ebea63558 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java index 1e74002bb..5bb2e3130 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java index 73317b6ee..d743e0301 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java index 46642bfea..a21c03c51 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java index 03dd24f4e..00d2e8a18 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java index d72cfd4bc..e20d107cd 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java index cd8f73f6d..d70e514fd 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java index 8ad376273..55dd6e6d8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java index c3c133591..9a74f626b 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java index 50f49744a..089379c96 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java index fb7cc3e5e..902746661 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java @@ -25,8 +25,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java index 7dba736ba..e69557478 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java index ec5e99dee..6b7a35f98 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java index 39d0da57b..bfdc44e6c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java index a44cb46c5..4b19d1081 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefOnlyTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefOnlyTest.java index 83abe9b1a..d931fb2a8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefOnlyTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefOnlyTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java index 8bf6d48d7..663b0f4e4 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java index 12634b0e5..06bd3e4c8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java index b769d31e0..7cea2657f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java index a164f3103..96a4bd164 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java index 20ebc96a7..048a6d660 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java index 2b478b2aa..277514ea1 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java index 58cc9eb62..c108903f6 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java index 7c9ce8eaf..f3319edf7 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java index ee8e20f43..0dc94d98c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInnerTest.java index 83a5f6e53..abbf12516 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerIpAddressesInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java index 818ce9176..cd4597823 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java index 457e9bc42..c545b728d 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInputTest.java index 15590d97a..ab4f7b810 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java index edbf12083..31912d5a1 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionMetroTest.java index dd1469b48..b8621429a 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionMetroTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionMetroTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java index 71f2596b0..52981848d 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java index 425d4e054..336aad146 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java index 1f971a689..f4209e062 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java index 4a5c48c71..cd6ba0bed 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java index 6eddcd068..fa4734625 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java index 429dd0c1d..40d7a5c24 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java index 149c96f52..3d22853b0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java index 4ab6b3de0..d8b207b80 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java index b556abe2c..4e7f9057e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java index 254cdcde8..d98aac71c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java index fb58571f3..2de8a0f60 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java index 9dcc87b74..6c04a0edc 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java index c00715350..cc69592c3 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java index 66b82d6d3..8bd608dd9 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java index bf08080d2..4a38874c5 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java index 049d412e2..38cc9ed27 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservationTest.java index 81c4d337c..8997593e0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayIpReservationTest.java @@ -24,8 +24,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java index 56b218330..d7561c589 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java index e73307a50..226a3255c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java index c2b071e39..0a28fcdc8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java @@ -23,8 +23,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityListTest.java index 1ae35239d..b7017f74d 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityReportTest.java index 791ce2dfd..ce46952af 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityReportTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroCapacityReportTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java index b5a8d3a85..eee678fbf 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroServerInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroServerInfoTest.java index bc5482937..6cfd58b40 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroServerInfoTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroServerInfoTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java index 8bdb9fd9d..e98779b10 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java index e6ca6f3c2..f5ec7b69c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java index 1f3262ea6..126bb62e0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java index 3e8b86f7a..3cffa615a 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java index 9f9cf8243..739fc7795 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java index 157c9c761..4dfbc0428 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java index fd896b4ab..043f182ec 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java index 9134dc418..f6058053a 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java index f3092f785..584928f99 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java index 0648cfa72..85945aa6e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java index 567466bc6..c4a3b55ad 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java index 73890d465..8e7c696b6 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java index fb2f4e79b..219ca53ad 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPriceTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPriceTest.java index 0ef5d8e2f..b8c3a6783 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPriceTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerPriceTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java index 31d4c5c24..a9d630323 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java index 6d33cb34c..4c5cffbca 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java index e6c66a440..1e4a932b8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java index 244760b53..8be7fd945 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java index e40a018f5..fb8b4337c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java index 3c436c052..f06a86c7b 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java index acfb0fe6c..e39020507 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java index f99c2912f..5f3a1ce6c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java index f87d4f8dd..ae03a0ef8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java index 815b81018..be531803d 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java index 085b61ab5..1a560cdaa 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java index 482100544..f99b5b81e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java index 0b2974eab..4f6b0b460 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java index 587efa725..513e362ef 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java index 70da59c0d..264c4cf9d 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java index 1d27337ea..ff1dea148 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java index 07c917675..8b1ce1518 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java index ea5cea96a..9132e8d45 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java index 66b2a0782..314c2cd3e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java index 0c5f62544..2118f9c58 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java index cc32ba90b..d6f80e9a1 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java index a01daa340..1ec847559 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java index b042c67af..6bb0eaf3b 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java index 2fab328c3..d54c2644f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java index 8d70a98bd..4cdba1007 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java index c4b34630a..d02fa16d5 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java index 18c3e1aaa..ea4d481fa 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java index 942d36c26..d4a7312ac 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java index 6c8fd23de..f8c04861e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java index d52abfde5..01787cf43 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java index 52dc95ff1..defe07c4f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java index dce4a869d..2020b7f37 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java index 9906c1473..365d5c700 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java index 76c5a669d..b9fd1e09f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java index c64ffc493..adf60a7b2 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributesTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributesTest.java index 72f8c65bf..bd13e02df 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributesTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceAttributesTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java index d6ec5fcfa..119dec4c0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java index 246da5b77..cf48cdc38 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java index a16ac2214..baebb2695 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java index 9aac9f49d..363f67f2a 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java index 39deceabd..e8a806c19 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java index 9841002b0..9b97458ea 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java index 0f14aa933..0d318e2ab 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java index e42a1be03..96559d3c0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java index 8b5740fad..d2a884b26 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java index 21abee864..e6b1b44ec 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java index 4049602ed..5f77150b7 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TimeframeTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TimeframeTest.java index 2054d1230..747019c6c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TimeframeTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TimeframeTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java index 65e486002..d8cc5bc06 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java index ce26e3e8b..9ea6f7014 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java index 945459085..49d9f2f61 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java index 039a59a32..066558b08 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequestTest.java index a3179809f..549a42e99 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequestTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateVirtualCircuitRequestTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java index f9d5c478c..0a4446e33 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java index 037a229e2..9c9e2a5e4 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java index 7e37ee896..dcdc9c88c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java index 46a37cad1..a2cda4e94 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java index f9ac51fd3..f2ca41972 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java index 93a14a421..38a5339c5 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java index 595d7fccb..4ea559ba2 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInnerTest.java index 8114f7cda..b7844ba32 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInnerTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListVirtualCircuitsInnerTest.java @@ -22,8 +22,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java index 02cc3150c..70837afd0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java index 78d0b247a..a477f4e20 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java index afff615c6..ddef6858e 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java index f6b604b1a..bc8d7010f 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java index 8b2d60332..69f935c63 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java index 06e755584..01c9b0d19 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOfTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOfTest.java index 39798e964..a3345d7a9 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOfTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationAllOfTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInputTest.java index 40fb5a3a2..eea944bc8 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationListTest.java index cb771b389..1bd78dbce 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationTest.java index 269bc61ed..4049562f5 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIPReservationTest.java @@ -25,8 +25,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java index 9fb45ceec..7737493b0 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java @@ -19,8 +19,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java index eb4f350b3..d0d9334e2 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; import org.junit.jupiter.api.Disabled; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java index c6332ac0e..64a44fbce 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java @@ -21,8 +21,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java index 4566aace8..8fdf9802a 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java index ab5da9dd2..7704b0a0c 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java index 9e608776b..fa4f06a26 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java @@ -20,8 +20,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java index 2038ce831..55b9262e9 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java @@ -18,8 +18,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; From 1489e61c4c15931a7a261f030da1cac0d8ee2c76 Mon Sep 17 00:00:00 2001 From: tbandwala Date: Tue, 10 Jan 2023 10:56:42 +0530 Subject: [PATCH 5/7] Revert oas3.patched.json --- spec/oas3.patched.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/oas3.patched.json b/spec/oas3.patched.json index 8ed228dfc..aff92d54b 100644 --- a/spec/oas3.patched.json +++ b/spec/oas3.patched.json @@ -1008,7 +1008,7 @@ }, "customdata": { "description": "Customdata is an arbitrary JSON value that can be accessed via the\nmetadata service.", - "default": null + "default": {} }, "description": { "description": "Any description of the device or how it will be used. This may be used\nto inform other API consumers with project access.", @@ -7741,7 +7741,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HardwareReservation" + "$ref": "#/components/schemas/Device" } } }, From 2587209657caebfaa20150b9948dd80eb1689f8e Mon Sep 17 00:00:00 2001 From: tbandwala Date: Tue, 10 Jan 2023 11:00:17 +0530 Subject: [PATCH 6/7] Update customdata default patch --- ...e-schema-devicecreateinput-customdata-default.patch | 10 ++++++---- spec/oas3.patched.json | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch b/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch index 71f8db898..b6f18f0c3 100644 --- a/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch +++ b/patches/spec.fetched.json/16-findHWReservationById-response-schema-devicecreateinput-customdata-default.patch @@ -1,8 +1,8 @@ diff --git a/spec/oas3.patched.json b/spec/oas3.patched.json -index aff92d5..8ed228d 100644 +index aff92d5..3e998a7 100644 --- a/spec/oas3.patched.json +++ b/spec/oas3.patched.json -@@ -1001,21 +1001,21 @@ +@@ -1001,21 +1001,23 @@ "enum": [ "hourly", "daily", @@ -14,7 +14,9 @@ index aff92d5..8ed228d 100644 "customdata": { "description": "Customdata is an arbitrary JSON value that can be accessed via the\nmetadata service.", - "default": {} -+ "default": null ++ "default": {}, ++ "type": "object", ++ "additionalProperties": true }, "description": { "description": "Any description of the device or how it will be used. This may be used\nto inform other API consumers with project access.", @@ -25,7 +27,7 @@ index aff92d5..8ed228d 100644 "type": "array", "items": { "type": "string" -@@ -7734,21 +7734,21 @@ +@@ -7734,21 +7736,21 @@ }, { "$ref": "#/components/parameters/Exclude" diff --git a/spec/oas3.patched.json b/spec/oas3.patched.json index aff92d54b..3e998a711 100644 --- a/spec/oas3.patched.json +++ b/spec/oas3.patched.json @@ -1008,7 +1008,9 @@ }, "customdata": { "description": "Customdata is an arbitrary JSON value that can be accessed via the\nmetadata service.", - "default": {} + "default": {}, + "type": "object", + "additionalProperties": true }, "description": { "description": "Any description of the device or how it will be used. This may be used\nto inform other API consumers with project access.", @@ -7741,7 +7743,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/HardwareReservation" } } }, From e2fc035be668df85728d3aecf789efe0d13b6a39 Mon Sep 17 00:00:00 2001 From: "equinix-labs@auto-commit-workflow" Date: Tue, 10 Jan 2023 05:33:27 +0000 Subject: [PATCH 7/7] Auto commit generated client changes - Tue Jan 10 05:33:27 UTC 2023 --- equinix-openapi-metal/api/openapi.yaml | 7 +++-- .../docs/DeviceCreateInput.md | 2 +- .../metal/v1/model/DeviceCreateInput.java | 30 +++++++++---------- .../metal/v1/model/DeviceCreateInputTest.java | 3 +- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/equinix-openapi-metal/api/openapi.yaml b/equinix-openapi-metal/api/openapi.yaml index 666ef2405..74ec033da 100644 --- a/equinix-openapi-metal/api/openapi.yaml +++ b/equinix-openapi-metal/api/openapi.yaml @@ -12509,7 +12509,8 @@ components: public_ipv4_subnet_size: 6.027456183070403 operating_system: operating_system billing_cycle: hourly - customdata: "" + customdata: + key: "" locked: false spot_price_max: 1.4658129 plan: c3.large.x86 @@ -12550,10 +12551,12 @@ components: - yearly type: string customdata: - default: null + additionalProperties: true + default: {} description: |- Customdata is an arbitrary JSON value that can be accessed via the metadata service. + type: object description: description: |- Any description of the device or how it will be used. This may be used diff --git a/equinix-openapi-metal/docs/DeviceCreateInput.md b/equinix-openapi-metal/docs/DeviceCreateInput.md index c30a53266..9108c19df 100644 --- a/equinix-openapi-metal/docs/DeviceCreateInput.md +++ b/equinix-openapi-metal/docs/DeviceCreateInput.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**alwaysPxe** | **Boolean** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] | |**billingCycle** | [**BillingCycleEnum**](#BillingCycleEnum) | The billing cycle of the device. | [optional] | -|**customdata** | **Object** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | +|**customdata** | **Map<String, Object>** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | |**description** | **String** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] | |**facility** | **List<String>** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | [optional] | |**features** | **List<String>** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] | diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java index 5fa50d3c6..484bad594 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java @@ -26,9 +26,10 @@ import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -117,7 +118,7 @@ public BillingCycleEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata = null; + private Map customdata = null; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -254,24 +255,32 @@ public void setBillingCycle(BillingCycleEnum billingCycle) { } - public DeviceCreateInput customdata(Object customdata) { + public DeviceCreateInput customdata(Map customdata) { this.customdata = customdata; return this; } + public DeviceCreateInput putCustomdataItem(String key, Object customdataItem) { + if (this.customdata == null) { + this.customdata = new HashMap<>(); + } + this.customdata.put(key, customdataItem); + return this; + } + /** * Customdata is an arbitrary JSON value that can be accessed via the metadata service. * @return customdata **/ @javax.annotation.Nullable - public Object getCustomdata() { + public Map getCustomdata() { return customdata; } - public void setCustomdata(Object customdata) { + public void setCustomdata(Map customdata) { this.customdata = customdata; } @@ -898,22 +907,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, deviceCreateInput.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(alwaysPxe, billingCycle, customdata, description, facility, features, hardwareReservationId, hostname, ipAddresses, ipxeScriptUrl, locked, metro, noSshKeys, operatingSystem, plan, privateIpv4SubnetSize, projectSshKeys, publicIpv4SubnetSize, spotInstance, spotPriceMax, sshKeys, tags, terminationTime, userSshKeys, userdata, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java index a41fc950e..af32f4db1 100644 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java @@ -24,9 +24,10 @@ import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test;