From e94b85d34609ccec7bb2b2c5eb2af932623e6a22 Mon Sep 17 00:00:00 2001 From: "equinix-labs@auto-commit-workflow" Date: Tue, 10 Sep 2024 09:23:06 +0000 Subject: [PATCH] Auto commit generated client changes - Tue Sep 10 09:23:06 UTC 2024 --- .../com/equinix/openapi/fabric/ApiClient.java | 43 +- .../java/com/equinix/openapi/fabric/JSON.java | 1176 ++++++++--------- .../fabric/v4/model/ConnectionAction.java | 2 +- .../openapi/fabric/v4/model/CustomField.java | 4 + .../equinix/openapi/fabric/v4/model/Port.java | 62 +- .../fabric/v4/api/CloudRoutersApiTest.java | 10 +- .../fabric/v4/api/ConnectionsApiTest.java | 27 +- .../fabric/v4/api/dto/port/PortDto.java | 6 +- .../fabric/v4/api/dto/port/UsersItem.java | 16 +- .../v4/api/dto/port/VirtualDevicesItem.java | 10 +- .../v4/api/dto/users/VirtualDevicesItem.java | 4 +- spec/oas3.fabric.fetched.json | 1 + spec/oas3.fabric.patched.json | 2 + 13 files changed, 697 insertions(+), 666 deletions(-) diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/ApiClient.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/ApiClient.java index 2bc334dd..7559d1e3 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/ApiClient.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/ApiClient.java @@ -60,12 +60,12 @@ public class ApiClient { private String basePath = "https://api.equinix.com"; protected List servers = new ArrayList(Arrays.asList( - new ServerConfiguration( - basePath, - "Equinix Inc", - new HashMap() - ) - )); + new ServerConfiguration( + basePath, + "Equinix Inc", + new HashMap() + ) + )); protected Integer serverIndex = 0; protected Map serverVariables = null; private boolean debugging = false; @@ -129,7 +129,7 @@ private void initHttpClient(List interceptors) { builder.writeTimeout(0, TimeUnit.SECONDS); builder.callTimeout(60, TimeUnit.SECONDS); builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor : interceptors) { + for (Interceptor interceptor: interceptors) { builder.addInterceptor(interceptor); } builder.addInterceptor(new HttpLoggingInterceptor().setLevel(Level.BODY)); @@ -147,8 +147,8 @@ private void init() { authentications = new HashMap(); } - public int getStatusCode() { - return response.code(); + public int getStatusCode(){ + return response.code(); } /** @@ -390,11 +390,10 @@ public Authentication getAuthentication(String authName) { return authentications.get(authName); } - /** - * Helper method to set access token for the first Bearer authentication. - * - * @param bearerToken Bearer token - */ + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ public void setBearerToken(String bearerToken) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBearerAuth) { @@ -766,7 +765,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio delimiter = "|"; } - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new StringBuilder() ; for (Object item : value) { sb.append(delimiter); sb.append(parameterToString(item)); @@ -1248,7 +1247,7 @@ public String buildUrl(String baseUrl, String path, List queryParams, List 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() + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } baseURL = servers.get(serverIndex).URL(serverVariables); @@ -1381,7 +1380,7 @@ public RequestBody buildRequestBodyMultipart(Map formParams) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { List list = (List) param.getValue(); - for (Object item : list) { + for (Object item: list) { if (item instanceof File) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); } else { @@ -1461,8 +1460,8 @@ public Response intercept(Interceptor.Chain chain) throws IOException { if (request.tag() instanceof ApiCallback) { final ApiCallback callback = (ApiCallback) request.tag(); return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); } return originalResponse; } @@ -1527,9 +1526,9 @@ public boolean verify(String hostname, SSLSession session) { SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, new SecureRandom()); httpClient = httpClient.newBuilder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) - .hostnameVerifier(hostnameVerifier) - .build(); + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); } catch (GeneralSecurityException e) { throw new RuntimeException(e); } diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java index 6bec3d05..dac490d4 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java @@ -33,419 +33,420 @@ import java.time.format.DateTimeFormatter; import java.util.*; /* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ +* A JSON utility class +* +* NOTE: in the future, this class may be converted to static, which may break +* backward-compatibility +*/ public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); +private static Gson gson; +private static boolean isLenientOnJson = false; +private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); +private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); +private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - .registerTypeSelector(com.equinix.openapi.fabric.v4.model.LinkProtocol.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("DOT1Q", com.equinix.openapi.fabric.v4.model.LinkProtocolDot1q.class); - classByDiscriminatorValue.put("EVPN_VXLAN", com.equinix.openapi.fabric.v4.model.LinkProtocolEvpnVxlan.class); - classByDiscriminatorValue.put("QINQ", com.equinix.openapi.fabric.v4.model.LinkProtocolQinq.class); - classByDiscriminatorValue.put("UNTAGGED", com.equinix.openapi.fabric.v4.model.LinkProtocolUntagged.class); - classByDiscriminatorValue.put("VXLAN", com.equinix.openapi.fabric.v4.model.LinkProtocolVxlan.class); - classByDiscriminatorValue.put("LinkProtocol", com.equinix.openapi.fabric.v4.model.LinkProtocol.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(com.equinix.openapi.fabric.v4.model.MetroError.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("MetroError", com.equinix.openapi.fabric.v4.model.MetroError.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "errorCode")); - } - }) - .registerTypeSelector(com.equinix.openapi.fabric.v4.model.PriceError.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("PriceError", com.equinix.openapi.fabric.v4.model.PriceError.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "errorCode")); - } - }); - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); +@SuppressWarnings("unchecked") +public static GsonBuilder createGson() { +GsonFireBuilder fireBuilder = new GsonFireBuilder() + .registerTypeSelector(com.equinix.openapi.fabric.v4.model.LinkProtocol.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("DOT1Q", com.equinix.openapi.fabric.v4.model.LinkProtocolDot1q.class); + classByDiscriminatorValue.put("EVPN_VXLAN", com.equinix.openapi.fabric.v4.model.LinkProtocolEvpnVxlan.class); + classByDiscriminatorValue.put("QINQ", com.equinix.openapi.fabric.v4.model.LinkProtocolQinq.class); + classByDiscriminatorValue.put("UNTAGGED", com.equinix.openapi.fabric.v4.model.LinkProtocolUntagged.class); + classByDiscriminatorValue.put("VXLAN", com.equinix.openapi.fabric.v4.model.LinkProtocolVxlan.class); + classByDiscriminatorValue.put("LinkProtocol", com.equinix.openapi.fabric.v4.model.LinkProtocol.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "type")); + } + }) + .registerTypeSelector(com.equinix.openapi.fabric.v4.model.MetroError.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("MetroError", com.equinix.openapi.fabric.v4.model.MetroError.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "errorCode")); + } + }) + .registerTypeSelector(com.equinix.openapi.fabric.v4.model.PriceError.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("PriceError", com.equinix.openapi.fabric.v4.model.PriceError.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "errorCode")); + } + }) +; +GsonBuilder builder = fireBuilder.createGsonBuilder(); +return builder; +} + +private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { +JsonElement element = readElement.getAsJsonObject().get(discriminatorField); +if (null == element) { +throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); +} +return element.getAsString(); +} + +/** +* Returns the Java class that implements the OpenAPI schema for the specified discriminator value. +* +* @param classByDiscriminatorValue The map of discriminator values to Java classes. +* @param discriminatorValue The value of the OpenAPI discriminator in the input data. +* @return The Java class that implements the OpenAPI schema +*/ +private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { +Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); +if (null == clazz) { +throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); +} +return clazz; +} + +static { +GsonBuilder gsonBuilder = createGson(); +gsonBuilder.registerTypeHierarchyAdapter(Collection.class, new CollectionAdapter()); +gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); +gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); +gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AccessPoint.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AccessPointSelector.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Account.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AddOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AdvanceConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AllPhysicalPortsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AllPortsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ApiConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ApiServices.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AuthenticationKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionsBulkData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPConnectionIpv4.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPConnectionIpv6.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPConnectionOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BandwidthUtilization.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BulkPhysicalPort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BulkPort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Change.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Changelog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterPostRequestPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectedMetro.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Connection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionAcceptanceData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionAction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionCompanyProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionInvitation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRedundancy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRouteFilterData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRouteFiltersBase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRoutingProtocolPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionSide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionSideAdditionalInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectivitySource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CustomField.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.DirectConnectionIpv4.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.DirectConnectionIpv6.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Direction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Error.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Expression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricCloudRouterPackages.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricCloudRouterPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricConnectionUuid.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FilterBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GeoCoordinates.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllConnectionRouteFiltersResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetRouteFilterGetConnectionsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetRouteFilterRulesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.HealthResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.InternetAccess.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.IpBlockPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Ipv4.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.JsonPatchOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Link.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkAggregationGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocol.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolConnection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolDot1q.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolEvpnVxlan.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolGetResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolIpv4Ipv6Config.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolQinq.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolServiceToken.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolUntagged.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolVxlan.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MarketingInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MarketplaceSubscription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Md5.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MetalInterconnection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Metrics.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Metro.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MetroError.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MetroResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ModelInterface.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Network.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkAllOf.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkChangeResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkConnections.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSortCriteriaResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Order.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PackageChangeLog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PackageResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Pagination.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PaginationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PhysicalPort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Port.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortAdditionalInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDemarcationPoint.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDevice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDeviceRedundancy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortEncapsulation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortInterface.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortLag.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortLoa.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrder.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrderPurchaseOrder.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrderSignature.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrderSignatureDelegate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortRedundancy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortSettings.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortTether.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortV4SearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackageResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceConnectionsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceCreateResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServicePackagesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Price.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceCharge.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceError.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceErrorAdditionalInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ProcessStep.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Project.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PtpAdvanceConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RemoveOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ReplaceOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterChangeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterChangeDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterConnectionsData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesBase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChangeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChangeDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesPatchRequestItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersBase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersDataProject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersPatchRequestItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchBase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchBaseFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchFilterItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryConnection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBFD.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBGPData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBGPType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChangeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChangeDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolDirectData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolDirectType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SearchExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceMetro.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceMetros.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointCOLO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointTypeCOLO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointTypeVD.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointVD.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAndFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileLinkProtocolConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfiles.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceToken.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenConnection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenSearchExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenSide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokens.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedLinkProtocol.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedLocationWithoutIBX.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedMetadataEntity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedNetwork.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedNetworkChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedPort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedServiceProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SortCriteriaResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SortItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Statistics.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubInterface.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionAsset.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionEntitlementResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionRouterPackageType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionTrial.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServicesSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TopUtilizedStatistics.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateRequestFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateRequestFilterAnd.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateSubnetResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASideAccessPoint.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASideAccessPointPort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASideAccessPointPortSettings.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPoint.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPointBridge.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPointBridgePackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPointProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualDevice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualNetwork.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortRedundancy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VpicInterface.CustomTypeAdapterFactory()); +gsonBuilder.registerTypeAdapter(PortEncapsulation.TypeEnum.class,new UppercaseEnumAdapter()); +gsonBuilder.registerTypeAdapter(PortDeviceRedundancy.PriorityEnum.class,new UppercaseEnumAdapter()); +gson = gsonBuilder.setPrettyPrinting().create(); +} + +public static class UppercaseEnumAdapter implements JsonDeserializer { + @Override + public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeserializationContext context) + throws JsonParseException { + try { + if(type instanceof Class && ((Class) type).isEnum()) + return Enum.valueOf((Class) type, json.getAsString().toUpperCase()); + return null; + } catch (Exception e) { + e.printStackTrace(); + return null; } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); } - return clazz; - } - - static { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeHierarchyAdapter(Collection.class, new CollectionAdapter()); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AccessPoint.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AccessPointSelector.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Account.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AddOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AdvanceConfiguration.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AllPhysicalPortsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AllPortsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ApiConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ApiServices.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AuthenticationKey.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionsBulkData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPConnectionIpv4.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPConnectionIpv6.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPConnectionOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BandwidthUtilization.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BulkPhysicalPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BulkPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Change.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Changelog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterChange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterFilters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterOrFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterPackage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterPostRequestPackage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterSimpleExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterSortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectedMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Connection.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionAcceptanceData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionAction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionActionRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionCompanyProfile.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionInvitation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionLink.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRedundancy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRouteFilterData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRouteFiltersBase.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionRoutingProtocolPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionSide.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectionSideAdditionalInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ConnectivitySource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CustomField.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.DirectConnectionIpv4.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.DirectConnectionIpv6.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Direction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Error.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Expression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricCloudRouterPackages.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricCloudRouterPrice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricConnectionUuid.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FilterBody.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GeoCoordinates.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllConnectionRouteFiltersResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetRouteFilterGetConnectionsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetRouteFilterRulesResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.HealthResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.InternetAccess.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.IpBlockPrice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Ipv4.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.JsonPatchOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Link.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkAggregationGroup.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocol.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolConnection.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolDot1q.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolEvpnVxlan.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolGetResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolIpv4Ipv6Config.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolQinq.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolServiceToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolUntagged.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.LinkProtocolVxlan.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MarketingInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MarketplaceSubscription.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Md5.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MetalInterconnection.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Metrics.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Metro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MetroError.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.MetroResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ModelInterface.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Network.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkAllOf.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkChange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkChangeResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkConnections.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSortCriteriaResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Order.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PackageChangeLog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PackageResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Pagination.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PaginationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PhysicalPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Port.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortAdditionalInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDemarcationPoint.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDevice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDeviceRedundancy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortEncapsulation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortInterface.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortLag.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortLoa.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortNotification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrder.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrderPurchaseOrder.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrderSignature.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortOrderSignatureDelegate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortRedundancy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortSettings.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortSortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortTether.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortV4SearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackageRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackageResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceConnectionsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceCreateResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServicePackagesResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeServiceResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Price.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceCharge.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceError.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceErrorAdditionalInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PriceSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ProcessStep.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Project.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PtpAdvanceConfiguration.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RemoveOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ReplaceOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterChangeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterChangeDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterConnectionsData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesBase.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChangeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChangeDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesPatchRequestItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFilterRulesPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersBase.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersChange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersDataProject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersPatchRequestItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchBase.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchBaseFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchFilterItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteFiltersSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntry.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryConnection.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryFilters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntryOrFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySimpleExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteTableEntrySortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBFD.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBGPData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBGPType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolBase.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChangeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChangeDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolDirectData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolDirectType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RoutingProtocolOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SearchExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceMetros.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfile.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointCOLO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointTypeCOLO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointTypeVD.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAccessPointVD.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileAndFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileLinkProtocolConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileSimpleExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfileSortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceProfiles.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenActionRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenConnection.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenSearchExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokenSide.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ServiceTokens.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedLinkProtocol.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedLocationWithoutIBX.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedMetadataEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedNetwork.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedNetworkChange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedNotification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SimplifiedServiceProfile.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SortCriteriaResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SortItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Statistics.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubInterface.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionAsset.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionEntitlementResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionRouterPackageType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.SubscriptionTrial.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceFilters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceOrFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceSimpleExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServiceSortCriteria.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TimeServicesSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.TopUtilizedStatistics.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateRequestFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateRequestFilterAnd.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ValidateSubnetResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPrice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASide.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASideAccessPoint.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASideAccessPointPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceASideAccessPointPortSettings.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSide.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPoint.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPointBridge.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPointBridgePackage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualConnectionPriceZSideAccessPointProfile.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualDevice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualNetwork.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortConfiguration.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortPrice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VirtualPortRedundancy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.VpicInterface.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapter(PortEncapsulation.TypeEnum.class, new UppercaseEnumAdapter()); - gsonBuilder.registerTypeAdapter(PortDeviceRedundancy.PriorityEnum.class, new UppercaseEnumAdapter()); - gson = gsonBuilder.setPrettyPrinting().create(); - } - - public static class UppercaseEnumAdapter implements JsonDeserializer { - @Override - public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeserializationContext context) - throws JsonParseException { - try { - if (type instanceof Class && ((Class) type).isEnum()) - return Enum.valueOf((Class) type, json.getAsString().toUpperCase()); - return null; - } catch (Exception e) { - e.printStackTrace(); - return null; - } } - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. + +/** +* Get Gson. +* +* @return Gson +*/ +public static Gson getGson() { +return gson; +} + +/** +* Set Gson. +* +* @param gson Gson +*/ +public static void setGson(Gson gson) { +JSON.gson = gson; +} + +public static void setLenientOnJson(boolean lenientOnJson) { +isLenientOnJson = lenientOnJson; +} + +/** +* Serialize the given Java object into JSON string. +* +* @param obj Object +* @return String representation of the JSON +*/ +public static String serialize(Object obj) { +return gson.toJson(obj); +} + +/** +* Deserialize the given JSON string to Java object. * * @param Type * @param body The JSON string @@ -455,19 +456,19 @@ public static String serialize(Object obj) { @SuppressWarnings("unchecked") public static T deserialize(String body, Type returnType) { try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { return gson.fromJson(body, returnType); - } + } } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; } else { throw (e); } @@ -484,253 +485,250 @@ public void write(JsonWriter out, byte[] value) throws IOException { if (value == null) { out.nullValue(); } else { - out.value(ByteString.of(value).base64()); + out.value(ByteString.of(value).base64()); } } - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } } - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - private DateTimeFormatter formatter; + private DateTimeFormatter formatter; public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); } - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { this.formatter = formatter; - } + } - public void setFormat(DateTimeFormatter dateFormat) { + public void setFormat(DateTimeFormatter dateFormat) { this.formatter = dateFormat; - } + } - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { if (date == null) { - out.nullValue(); + out.nullValue(); } else { - out.value(formatter.format(date)); + out.value(formatter.format(date)); + } } - } - @Override - public OffsetDateTime read(JsonReader in) throws IOException { + @Override + public OffsetDateTime read(JsonReader in) throws IOException { switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length() - 5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } } - } - } - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { - private DateTimeFormatter formatter; + private DateTimeFormatter formatter; public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); + this(DateTimeFormatter.ISO_LOCAL_DATE); } - public LocalDateTypeAdapter(DateTimeFormatter formatter) { + public LocalDateTypeAdapter(DateTimeFormatter formatter) { this.formatter = formatter; - } + } - public void setFormat(DateTimeFormatter dateFormat) { + public void setFormat(DateTimeFormatter dateFormat) { this.formatter = dateFormat; - } + } - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { if (date == null) { - out.nullValue(); + out.nullValue(); } else { - out.value(formatter.format(date)); + out.value(formatter.format(date)); + } } - } - @Override - public LocalDate read(JsonReader in) throws IOException { + @Override + public LocalDate read(JsonReader in) throws IOException { switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } } - } - } - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { - private DateFormat dateFormat; + private DateFormat dateFormat; - public SqlDateTypeAdapter() { - } + public SqlDateTypeAdapter() {} - public SqlDateTypeAdapter(DateFormat dateFormat) { + public SqlDateTypeAdapter(DateFormat dateFormat) { this.dateFormat = dateFormat; - } + } - public void setFormat(DateFormat dateFormat) { + public void setFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; - } + } - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { if (date == null) { out.nullValue(); } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } } - } - @Override - public java.sql.Date read(JsonReader in) throws IOException { + @Override + public java.sql.Date read(JsonReader in) throws IOException { switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } } - } - } - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { - private DateFormat dateFormat; + private DateFormat dateFormat; - public DateTypeAdapter() { - } + public DateTypeAdapter() {} - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { out.nullValue(); - } else { + } else { String value; if (dateFormat != null) { - value = dateFormat.format(date); + value = dateFormat.format(date); } else { - value = ISO8601Utils.format(date, true); + value = ISO8601Utils.format(date, true); } out.value(value); - } - } + } + } - @Override - public Date read(JsonReader in) throws IOException { - try { + @Override + public Date read(JsonReader in) throws IOException { + try { switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); } - } catch (IllegalArgumentException e) { + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } -class CollectionAdapter implements JsonSerializer> { + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } + } + class CollectionAdapter implements JsonSerializer> { - @Override - public JsonElement serialize(Collection src, Type typeOfSrc, JsonSerializationContext context) { - if (src == null || src.isEmpty()) // exclusion is made here - return null; + @Override + public JsonElement serialize(Collection src, Type typeOfSrc, JsonSerializationContext context) { + if (src == null || src.isEmpty()) // exclusion is made here + return null; - JsonArray array = new JsonArray(); + JsonArray array = new JsonArray(); - for (Object child : src) { - JsonElement element = context.serialize(child); - array.add(element); - } + for (Object child : src) { + JsonElement element = context.serialize(child); + array.add(element); + } - return array; - } -} + return array; + } + } diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ConnectionAction.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ConnectionAction.java index b3cbe72f..ef1cbb10 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ConnectionAction.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ConnectionAction.java @@ -319,7 +319,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("type"); -// openapiRequiredFields.add("href"); + openapiRequiredFields.add("href"); openapiRequiredFields.add("uuid"); openapiRequiredFields.add("data"); } diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CustomField.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CustomField.java index a888785d..ba47d5d2 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CustomField.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CustomField.java @@ -375,6 +375,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("label"); + openapiRequiredFields.add("description"); openapiRequiredFields.add("dataType"); } @@ -400,6 +401,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("label").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); } + 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("dataType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataType").toString())); } diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java index 97b2e256..6da30a08 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java @@ -11,17 +11,58 @@ package com.equinix.openapi.fabric.v4.model; -import com.equinix.openapi.fabric.JSON; -import com.google.gson.*; +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.Changelog; +import com.equinix.openapi.fabric.v4.model.PhysicalPort; +import com.equinix.openapi.fabric.v4.model.PortAdditionalInfo; +import com.equinix.openapi.fabric.v4.model.PortDemarcationPoint; +import com.equinix.openapi.fabric.v4.model.PortDevice; +import com.equinix.openapi.fabric.v4.model.PortEncapsulation; +import com.equinix.openapi.fabric.v4.model.PortInterface; +import com.equinix.openapi.fabric.v4.model.PortLag; +import com.equinix.openapi.fabric.v4.model.PortLoa; +import com.equinix.openapi.fabric.v4.model.PortNotification; +import com.equinix.openapi.fabric.v4.model.PortOperation; +import com.equinix.openapi.fabric.v4.model.PortOrder; +import com.equinix.openapi.fabric.v4.model.PortRedundancy; +import com.equinix.openapi.fabric.v4.model.PortSettings; +import com.equinix.openapi.fabric.v4.model.PortState; +import com.equinix.openapi.fabric.v4.model.PortType; +import com.equinix.openapi.fabric.v4.model.Project; +import com.equinix.openapi.fabric.v4.model.SimplifiedAccount; +import com.equinix.openapi.fabric.v4.model.SimplifiedLocation; +import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; - import java.io.IOException; import java.net.URI; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import 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; + +import com.equinix.openapi.fabric.JSON; /** * Port specification @@ -529,6 +570,7 @@ public Port physicalPortsSpeed(Integer physicalPortsSpeed) { * minimum: 0 * @return physicalPortsSpeed **/ + @javax.annotation.Nonnull public Integer getPhysicalPortsSpeed() { return physicalPortsSpeed; @@ -1514,6 +1556,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("physicalPortsSpeed"); + openapiRequiredFields.add("physicalPortsType"); + openapiRequiredFields.add("connectivitySourceType"); openapiRequiredFields.add("account"); openapiRequiredFields.add("location"); openapiRequiredFields.add("encapsulation"); @@ -1551,6 +1597,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())); } + if (!jsonObj.get("physicalPortsType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `physicalPortsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("physicalPortsType").toString())); + } + if (!jsonObj.get("connectivitySourceType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connectivitySourceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectivitySourceType").toString())); + } if ((jsonObj.get("bmmrType") != null && !jsonObj.get("bmmrType").isJsonNull()) && !jsonObj.get("bmmrType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `bmmrType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bmmrType").toString())); } diff --git a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApiTest.java b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApiTest.java index c9370a35..cd2891d1 100644 --- a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApiTest.java +++ b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApiTest.java @@ -35,12 +35,7 @@ public class CloudRoutersApiTest { public static void removeCloudRouters(UsersItem.UserName userName) { users.get(userName).getUserResources().getCloudRoutersUuid().forEach(uuid -> { if (getCloudRouterStatus(uuid) == CloudRouterAccessPointState.PROVISIONED) { - try { - deleteCloudRouter(uuid); - } catch (Exception e) { - System.out.println(e.getMessage()); - } - + deleteCloudRouter(uuid); } }); } @@ -221,9 +216,8 @@ public static void deleteCloudRouter(UUID uuid) { public static CloudRouterAccessPointState getCloudRouterStatus(UUID cloudRouterUuid) { try { - Thread.sleep(10000); return cloudRoutersApi.getCloudRouterByUuid(cloudRouterUuid).getState(); - } catch (ApiException | InterruptedException e) { + } catch (ApiException e) { throw new RuntimeException(e); } } diff --git a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/ConnectionsApiTest.java b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/ConnectionsApiTest.java index 20942de8..ec09cdf2 100644 --- a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/ConnectionsApiTest.java +++ b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/ConnectionsApiTest.java @@ -42,27 +42,10 @@ public static void removeConnections(UsersItem.UserName userName) { throw new RuntimeException(e); } users.get(userName).getUserResources().getConnectionsUuid().forEach(uuid -> { - Connection connection = null; try { - connection = connectionsApi.getConnectionByUuid(uuid, null); - if (connection.getOperation().getEquinixStatus().equals(EquinixStatus.PROVISIONED)) { - deleteConnection(uuid); - } else if (connection.getOperation().getEquinixStatus().equals(EquinixStatus.PENDING_APPROVAL)) { - ConnectionActionRequest connectionActionRequest = new ConnectionActionRequest() - .type(Actions.CONNECTION_CREATION_REJECTION).description("connection to remove"); - - try { - connectionsApi.createConnectionAction(uuid, connectionActionRequest); - } catch (Exception e) { - System.out.println(e.getMessage()); - } - - waitForConnectionIsInState(connection.getUuid(), EquinixStatus.REJECTED); - deleteConnection(uuid); - } - waitForConnectionIsInState(uuid, EquinixStatus.DEPROVISIONED, EquinixStatus.DELETED); + deleteConnection(uuid); } catch (ApiException e) { - System.out.println(e.getMessage()); + throw new RuntimeException(e); } }); } @@ -104,6 +87,7 @@ public void createConnectionVdColo() throws ApiException { new AccessPoint() .type(AccessPointType.COLO) .port(new SimplifiedPort() +// .uuid(port.getUuid())) .uuid(portUuid)) .linkProtocol(new SimplifiedLinkProtocol() .type(LinkProtocolType.DOT1Q) @@ -229,7 +213,6 @@ public static Connection createConnectionFCR2ToPort() throws ApiException { public static ConnectionPostRequest getDefaultConnectionRequest(String name) { return new ConnectionPostRequest() .name(name) - .bandwidth(1000) .notifications(singletonList(new SimplifiedNotification() .type(SimplifiedNotification.TypeEnum.ALL) .emails(singletonList("test@test.com")))); @@ -240,13 +223,13 @@ public static Connection createPort2SpConnection() throws ApiException { .getData().stream() .filter(sp -> sp.getState().equals(ServiceProfileStateEnum.ACTIVE)) .filter(sp -> sp.getVisibility().equals(ServiceProfileVisibilityEnum.PUBLIC)) - .filter(sp -> !sp.getAccessPointTypeConfigs().get(0).getServiceProfileAccessPointTypeCOLO().getSupportedBandwidths().isEmpty()) .findAny().get(); UsersItem usersItem = Utils.getUserData(getCurrentUser()); PortDto portDto = usersItem.getPorts().get(0); ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-port-2-sp") + .bandwidth(serviceProfile.getAccessPointTypeConfigs().get(0).getServiceProfileAccessPointTypeCOLO().getSupportedBandwidths().get(0)) .type(ConnectionType.EVPL_VC) .redundancy(new ConnectionRedundancy().priority(ConnectionPriority.PRIMARY)) .order(new Order().purchaseOrderNumber("pol123")) @@ -298,8 +281,6 @@ public void updateConnectionByUuid() throws ApiException { .path("/name") .value(updatedName); - waitForConnectionIsInState(connection.getUuid(), EquinixStatus.PROVISIONED); - Connection updatedConnection = connectionsApi.updateConnectionByUuid(connection.getUuid(), singletonList(connectionChangeOperation)); assertEquals(202, connectionsApi.getApiClient().getStatusCode()); diff --git a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/PortDto.java b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/PortDto.java index e07495db..3c82647f 100644 --- a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/PortDto.java +++ b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/PortDto.java @@ -19,7 +19,7 @@ public class PortDto { @SerializedName("uuid") private String uuid; - public String getEncapsulation() { + public String getEncapsulation(){ return encapsulation; } @@ -31,11 +31,11 @@ public Location getLocation(){ return location; } - public String getType() { + public String getType(){ return type; } - public String getUuid() { + public String getUuid(){ return uuid; } } diff --git a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/UsersItem.java b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/UsersItem.java index 0de94293..6df62bc0 100644 --- a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/UsersItem.java +++ b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/UsersItem.java @@ -3,7 +3,7 @@ import java.util.List; import com.google.gson.annotations.SerializedName; -public class UsersItem { +public class UsersItem{ @SerializedName("virtualDevices") private List virtualDevices; @@ -26,31 +26,31 @@ public class UsersItem { @SerializedName("client_id") private String clientId; - public List getVirtualDevices() { + public List getVirtualDevices(){ return virtualDevices; } - public String getName() { + public String getName(){ return name; } - public String getClientSecret() { + public String getClientSecret(){ return clientSecret; } - public String getAccountNumber() { + public String getAccountNumber(){ return accountNumber; } - public List getPorts() { + public List getPorts(){ return ports; } - public String getProjectId() { + public String getProjectId(){ return projectId; } - public String getClientId() { + public String getClientId(){ return clientId; } } diff --git a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/VirtualDevicesItem.java b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/VirtualDevicesItem.java index 6f58cb11..0d99c686 100644 --- a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/VirtualDevicesItem.java +++ b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/port/VirtualDevicesItem.java @@ -2,7 +2,7 @@ import com.google.gson.annotations.SerializedName; -public class VirtualDevicesItem { +public class VirtualDevicesItem{ @SerializedName("orderNumber") private String orderNumber; @@ -13,15 +13,15 @@ public class VirtualDevicesItem { @SerializedName("uuid") private String uuid; - public String getOrderNumber() { + public String getOrderNumber(){ return orderNumber; } - public String getName() { + public String getName(){ return name; } - public String getUuid() { + public String getUuid(){ return uuid; } -} +} \ No newline at end of file diff --git a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/users/VirtualDevicesItem.java b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/users/VirtualDevicesItem.java index 1560df86..67887207 100644 --- a/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/users/VirtualDevicesItem.java +++ b/equinix-openapi-fabric/src/test/java/com/equinix/openapi/fabric/v4/api/dto/users/VirtualDevicesItem.java @@ -31,11 +31,11 @@ public String getName(){ return name; } - public void setUuid(UUID uuid) { + public void setUuid(UUID uuid){ this.uuid = uuid; } - public UUID getUuid() { + public UUID getUuid(){ return uuid; } } diff --git a/spec/oas3.fabric.fetched.json b/spec/oas3.fabric.fetched.json index 7d95fd9f..36eeef94 100644 --- a/spec/oas3.fabric.fetched.json +++ b/spec/oas3.fabric.fetched.json @@ -14540,6 +14540,7 @@ "connectivitySourceType", "encapsulation", "location", + "physicalPortsSpeed", "physicalPortsType", "settings", "type" diff --git a/spec/oas3.fabric.patched.json b/spec/oas3.fabric.patched.json index 3dacb04c..36eeef94 100644 --- a/spec/oas3.fabric.patched.json +++ b/spec/oas3.fabric.patched.json @@ -14541,6 +14541,7 @@ "encapsulation", "location", "physicalPortsSpeed", + "physicalPortsType", "settings", "type" ], @@ -20046,6 +20047,7 @@ "description": "Equinix assigned response attribute for Port description" }, "physicalPortsSpeed": { + "minimum": 0, "type": "integer", "description": "Physical Ports Speed in Mbps" },