From 69f376e84a0e444c4616f45c357a8757413099f6 Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Tue, 7 May 2024 17:35:19 -0500 Subject: [PATCH] feat: including RGRE changes dependency: none Signed-off-by: Joseph Kalandarishvili --- .../v1/TransitGatewayApis.java | 159 +++++++- .../v1/model/ConnectionsPager.java | 2 +- ...ransitGatewayConnectionActionsOptions.java | 2 +- ...CreateTransitGatewayConnectionOptions.java | 110 ++++-- ...tGatewayConnectionPrefixFilterOptions.java | 2 +- .../CreateTransitGatewayGreTunnelOptions.java | 344 +++++++++++++++++ .../v1/model/CreateTransitGatewayOptions.java | 2 +- ...reateTransitGatewayRouteReportOptions.java | 2 +- ...DeleteTransitGatewayConnectionOptions.java | 2 +- ...tGatewayConnectionPrefixFilterOptions.java | 2 +- ...ransitGatewayConnectionTunnelsOptions.java | 163 ++++++++ .../v1/model/DeleteTransitGatewayOptions.java | 2 +- ...eleteTransitGatewayRouteReportOptions.java | 2 +- .../v1/model/GetGatewayLocationOptions.java | 2 +- .../GetTransitGatewayConnectionOptions.java | 2 +- ...tGatewayConnectionPrefixFilterOptions.java | 2 +- ...ransitGatewayConnectionTunnelsOptions.java | 163 ++++++++ .../GetTransitGatewayGreTunnelOptions.java | 133 +++++++ .../v1/model/GetTransitGatewayOptions.java | 2 +- .../GetTransitGatewayRouteReportOptions.java | 2 +- .../v1/model/GreTunnelZoneReference.java | 37 ++ .../v1/model/ListConnectionsOptions.java | 2 +- .../v1/model/ListGatewayLocationsOptions.java | 2 +- ...GatewayConnectionPrefixFiltersOptions.java | 2 +- .../ListTransitGatewayConnectionsOptions.java | 2 +- ...ListTransitGatewayRouteReportsOptions.java | 2 +- .../v1/model/ListTransitGatewaysOptions.java | 2 +- .../v1/model/PaginationFirstConnection.java | 2 +- .../v1/model/PaginationFirstTG.java | 2 +- .../model/PaginationFirstTGWConnection.java | 2 +- .../v1/model/PaginationNextConnection.java | 2 +- .../v1/model/PaginationNextTG.java | 2 +- .../v1/model/PaginationNextTGWConnection.java | 2 +- .../v1/model/PrefixFilterCollection.java | 2 +- .../v1/model/PrefixFilterCust.java | 2 +- .../v1/model/PrefixFilterPut.java | 2 +- .../model/RedundantGRETunnelCollection.java | 39 ++ .../v1/model/RedundantGRETunnelReference.java | 271 ++++++++++++++ ...tGatewayConnectionPrefixFilterOptions.java | 2 +- .../v1/model/ResourceGroupIdentity.java | 2 +- .../v1/model/ResourceGroupReference.java | 24 +- .../v1/model/RgreTunnelZoneReference.java | 38 ++ .../v1/model/RouteReport.java | 2 +- .../v1/model/RouteReportCollection.java | 2 +- .../v1/model/RouteReportConnection.java | 2 +- .../v1/model/RouteReportConnectionBgp.java | 2 +- .../v1/model/RouteReportConnectionRoute.java | 2 +- .../v1/model/RouteReportOverlappingRoute.java | 2 +- .../RouteReportOverlappingRouteGroup.java | 2 +- .../v1/model/TSCollection.java | 2 +- .../v1/model/TSLocalLocation.java | 2 +- .../v1/model/TSLocation.java | 14 +- .../v1/model/TSLocationBasic.java | 2 +- .../v1/model/TransitConnection.java | 189 ++++++---- .../v1/model/TransitConnectionCollection.java | 2 +- .../v1/model/TransitGateway.java | 2 +- .../v1/model/TransitGatewayCollection.java | 2 +- .../TransitGatewayConnectionCollection.java | 2 +- .../model/TransitGatewayConnectionCust.java | 37 +- .../TransitGatewayConnectionPrefixFilter.java | 2 +- ...atewayConnectionPrefixFilterReference.java | 2 +- .../model/TransitGatewayConnectionsPager.java | 2 +- ...sitGatewayRedundantGRETunnelReference.java | 221 +++++++++++ ...nsitGatewayRedundantGRETunnelTemplate.java | 290 ++++++++++++++ .../v1/model/TransitGatewayReference.java | 2 +- .../v1/model/TransitGatewaysPager.java | 2 +- ...UpdateTransitGatewayConnectionOptions.java | 2 +- ...tGatewayConnectionPrefixFilterOptions.java | 2 +- ...ransitGatewayConnectionTunnelsOptions.java | 189 ++++++++++ .../v1/model/UpdateTransitGatewayOptions.java | 2 +- .../v1/model/ZoneIdentity.java | 2 +- .../v1/model/ZoneIdentityByName.java | 2 +- .../v1/model/ZoneReference.java | 2 +- .../v1/model/ZoneReferenceCollection.java | 39 ++ .../transit_gateway_apis/v1/package-info.java | 2 +- .../v1/TransitGatewayApisTest.java | 353 ++++++++++++++++-- ...itGatewayConnectionActionsOptionsTest.java | 2 +- ...teTransitGatewayConnectionOptionsTest.java | 26 +- ...ewayConnectionPrefixFilterOptionsTest.java | 2 +- ...ateTransitGatewayGreTunnelOptionsTest.java | 67 ++++ .../CreateTransitGatewayOptionsTest.java | 2 +- ...eTransitGatewayRouteReportOptionsTest.java | 2 +- ...teTransitGatewayConnectionOptionsTest.java | 2 +- ...ewayConnectionPrefixFilterOptionsTest.java | 2 +- ...itGatewayConnectionTunnelsOptionsTest.java | 49 +++ .../DeleteTransitGatewayOptionsTest.java | 2 +- ...eTransitGatewayRouteReportOptionsTest.java | 2 +- .../model/GetGatewayLocationOptionsTest.java | 2 +- ...etTransitGatewayConnectionOptionsTest.java | 2 +- ...ewayConnectionPrefixFilterOptionsTest.java | 2 +- ...itGatewayConnectionTunnelsOptionsTest.java | 49 +++ ...GetTransitGatewayGreTunnelOptionsTest.java | 47 +++ .../model/GetTransitGatewayOptionsTest.java | 2 +- ...tTransitGatewayRouteReportOptionsTest.java | 2 +- .../v1/model/GreTunnelZoneReferenceTest.java | 37 ++ .../v1/model/ListConnectionsOptionsTest.java | 2 +- .../ListGatewayLocationsOptionsTest.java | 2 +- ...wayConnectionPrefixFiltersOptionsTest.java | 2 +- ...tTransitGatewayConnectionsOptionsTest.java | 2 +- ...TransitGatewayRouteReportsOptionsTest.java | 2 +- .../model/ListTransitGatewaysOptionsTest.java | 2 +- .../model/PaginationFirstConnectionTest.java | 2 +- .../v1/model/PaginationFirstTGTest.java | 2 +- .../PaginationFirstTGWConnectionTest.java | 2 +- .../model/PaginationNextConnectionTest.java | 2 +- .../v1/model/PaginationNextTGTest.java | 2 +- .../PaginationNextTGWConnectionTest.java | 2 +- .../v1/model/PrefixFilterCollectionTest.java | 2 +- .../v1/model/PrefixFilterCustTest.java | 2 +- .../v1/model/PrefixFilterPutTest.java | 2 +- .../RedundantGRETunnelCollectionTest.java | 40 ++ .../RedundantGRETunnelReferenceTest.java | 53 +++ ...ewayConnectionPrefixFilterOptionsTest.java | 2 +- .../v1/model/ResourceGroupIdentityTest.java | 2 +- .../v1/model/ResourceGroupReferenceTest.java | 4 +- .../v1/model/RgreTunnelZoneReferenceTest.java | 37 ++ .../v1/model/RouteReportCollectionTest.java | 2 +- .../model/RouteReportConnectionBgpTest.java | 2 +- .../model/RouteReportConnectionRouteTest.java | 2 +- .../v1/model/RouteReportConnectionTest.java | 2 +- .../RouteReportOverlappingRouteGroupTest.java | 2 +- .../RouteReportOverlappingRouteTest.java | 2 +- .../v1/model/RouteReportTest.java | 2 +- .../v1/model/TSCollectionTest.java | 2 +- .../v1/model/TSLocalLocationTest.java | 2 +- .../v1/model/TSLocationBasicTest.java | 2 +- .../v1/model/TSLocationTest.java | 5 +- .../TransitConnectionCollectionTest.java | 6 +- .../v1/model/TransitConnectionTest.java | 16 +- .../model/TransitGatewayCollectionTest.java | 2 +- ...ransitGatewayConnectionCollectionTest.java | 6 +- .../TransitGatewayConnectionCustTest.java | 7 +- ...ayConnectionPrefixFilterReferenceTest.java | 2 +- ...nsitGatewayConnectionPrefixFilterTest.java | 2 +- ...atewayRedundantGRETunnelReferenceTest.java | 50 +++ ...GatewayRedundantGRETunnelTemplateTest.java | 75 ++++ .../v1/model/TransitGatewayReferenceTest.java | 2 +- .../v1/model/TransitGatewayTest.java | 2 +- ...teTransitGatewayConnectionOptionsTest.java | 2 +- ...ewayConnectionPrefixFilterOptionsTest.java | 2 +- ...itGatewayConnectionTunnelsOptionsTest.java | 51 +++ .../UpdateTransitGatewayOptionsTest.java | 2 +- .../v1/model/ZoneIdentityByNameTest.java | 2 +- .../v1/model/ZoneIdentityTest.java | 2 +- .../v1/model/ZoneReferenceCollectionTest.java | 38 ++ .../v1/model/ZoneReferenceTest.java | 2 +- .../v1/utils/TestUtilities.java | 2 +- 147 files changed, 3419 insertions(+), 275 deletions(-) create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptions.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptions.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptions.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptions.java create mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptionsTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptionsTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptionsTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptionsTest.java create mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java index 388c36532..881b5b4c4 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -22,15 +22,19 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionActionsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayGreTunnelOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayRouteReportOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionTunnelsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayRouteReportOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetGatewayLocationOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionTunnelsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayGreTunnelOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayRouteReportOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListConnectionsOptions; @@ -41,6 +45,8 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewaysOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterCust; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelCollection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ReplaceTransitGatewayConnectionPrefixFilterOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReport; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReportCollection; @@ -53,6 +59,7 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCust; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionTunnelsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayOptions; import com.ibm.cloud.sdk.core.http.RequestBuilder; import com.ibm.cloud.sdk.core.http.ResponseConverter; @@ -441,6 +448,9 @@ public ServiceCall createTransitGatewayConnection( if (createTransitGatewayConnectionOptions.remoteTunnelIp() != null) { contentJson.addProperty("remote_tunnel_ip", createTransitGatewayConnectionOptions.remoteTunnelIp()); } + if (createTransitGatewayConnectionOptions.tunnels() != null) { + contentJson.add("tunnels", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createTransitGatewayConnectionOptions.tunnels())); + } if (createTransitGatewayConnectionOptions.zone() != null) { contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createTransitGatewayConnectionOptions.zone())); } @@ -562,6 +572,153 @@ public ServiceCall createTransitGatewayConnectionActions(CreateTransitGate return createServiceCall(builder.build(), responseConverter); } + /** + * Retrieves specified Transit Gateway redundant gre connection tunnels. + * + * This request retrieves a list of all the tunnels for the redundant gre conneciton. + * + * @param getTransitGatewayGreTunnelOptions the {@link GetTransitGatewayGreTunnelOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RedundantGRETunnelCollection} + */ + public ServiceCall getTransitGatewayGreTunnel(GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getTransitGatewayGreTunnelOptions, + "getTransitGatewayGreTunnelOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("transit_gateway_id", getTransitGatewayGreTunnelOptions.transitGatewayId()); + pathParamsMap.put("id", getTransitGatewayGreTunnelOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "getTransitGatewayGreTunnel"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Create Transit Gateway redundant GRE tunnel. + * + * Add a tunnel to an existing Redundant GRE connection. + * + * @param createTransitGatewayGreTunnelOptions the {@link CreateTransitGatewayGreTunnelOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RedundantGRETunnelReference} + */ + public ServiceCall createTransitGatewayGreTunnel(CreateTransitGatewayGreTunnelOptions createTransitGatewayGreTunnelOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createTransitGatewayGreTunnelOptions, + "createTransitGatewayGreTunnelOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("transit_gateway_id", createTransitGatewayGreTunnelOptions.transitGatewayId()); + pathParamsMap.put("id", createTransitGatewayGreTunnelOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "createTransitGatewayGreTunnel"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("local_gateway_ip", createTransitGatewayGreTunnelOptions.localGatewayIp()); + contentJson.addProperty("local_tunnel_ip", createTransitGatewayGreTunnelOptions.localTunnelIp()); + contentJson.addProperty("name", createTransitGatewayGreTunnelOptions.name()); + contentJson.addProperty("remote_gateway_ip", createTransitGatewayGreTunnelOptions.remoteGatewayIp()); + contentJson.addProperty("remote_tunnel_ip", createTransitGatewayGreTunnelOptions.remoteTunnelIp()); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createTransitGatewayGreTunnelOptions.zone())); + if (createTransitGatewayGreTunnelOptions.remoteBgpAsn() != null) { + contentJson.addProperty("remote_bgp_asn", createTransitGatewayGreTunnelOptions.remoteBgpAsn()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Delete specified Transit Gateway redundant GRE tunnel. + * + * Remove a tunnel from a redundant GRE connection. + * + * @param deleteTransitGatewayConnectionTunnelsOptions the {@link DeleteTransitGatewayConnectionTunnelsOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result + */ + public ServiceCall deleteTransitGatewayConnectionTunnels(DeleteTransitGatewayConnectionTunnelsOptions deleteTransitGatewayConnectionTunnelsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteTransitGatewayConnectionTunnelsOptions, + "deleteTransitGatewayConnectionTunnelsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("transit_gateway_id", deleteTransitGatewayConnectionTunnelsOptions.transitGatewayId()); + pathParamsMap.put("id", deleteTransitGatewayConnectionTunnelsOptions.id()); + pathParamsMap.put("gre_tunnel_id", deleteTransitGatewayConnectionTunnelsOptions.greTunnelId()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels/{gre_tunnel_id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "deleteTransitGatewayConnectionTunnels"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.query("version", String.valueOf(this.version)); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Retrieves specified Transit Gateway connection tunnel. + * + * This request retrieves a connection tunnel from the Transit Gateway Connection. + * + * @param getTransitGatewayConnectionTunnelsOptions the {@link GetTransitGatewayConnectionTunnelsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RedundantGRETunnelReference} + */ + public ServiceCall getTransitGatewayConnectionTunnels(GetTransitGatewayConnectionTunnelsOptions getTransitGatewayConnectionTunnelsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getTransitGatewayConnectionTunnelsOptions, + "getTransitGatewayConnectionTunnelsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("transit_gateway_id", getTransitGatewayConnectionTunnelsOptions.transitGatewayId()); + pathParamsMap.put("id", getTransitGatewayConnectionTunnelsOptions.id()); + pathParamsMap.put("gre_tunnel_id", getTransitGatewayConnectionTunnelsOptions.greTunnelId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels/{gre_tunnel_id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "getTransitGatewayConnectionTunnels"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Updates specified Transit Gateway redundant GRE tunnel. + * + * Update the name of a connection tunnel. + * + * @param updateTransitGatewayConnectionTunnelsOptions the {@link UpdateTransitGatewayConnectionTunnelsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RedundantGRETunnelReference} + */ + public ServiceCall updateTransitGatewayConnectionTunnels(UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateTransitGatewayConnectionTunnelsOptions, + "updateTransitGatewayConnectionTunnelsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("transit_gateway_id", updateTransitGatewayConnectionTunnelsOptions.transitGatewayId()); + pathParamsMap.put("id", updateTransitGatewayConnectionTunnelsOptions.id()); + pathParamsMap.put("gre_tunnel_id", updateTransitGatewayConnectionTunnelsOptions.greTunnelId()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels/{gre_tunnel_id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "updateTransitGatewayConnectionTunnels"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + final JsonObject contentJson = new JsonObject(); + if (updateTransitGatewayConnectionTunnelsOptions.name() != null) { + contentJson.addProperty("name", updateTransitGatewayConnectionTunnelsOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + /** * List all locations that support Transit Gateways. * diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ConnectionsPager.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ConnectionsPager.java index b44ff4866..160aca7c4 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ConnectionsPager.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ConnectionsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptions.java index 1bb5f1f7e..3d888b5d0 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptions.java index ab90a62df..1b8fb74e9 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,8 +23,7 @@ public class CreateTransitGatewayConnectionOptions extends GenericModel { /** - * Defines what type of network is connected via this connection. For access to gre_tunnel or unbound_gre_tunnel - * connections contact IBM support. + * Defines what type of network is connected via this connection. */ public interface NetworkType { /** classic. */ @@ -39,22 +38,27 @@ public interface NetworkType { String VPC = "vpc"; /** power_virtual_server. */ String POWER_VIRTUAL_SERVER = "power_virtual_server"; + /** redundant_gre. */ + String REDUNDANT_GRE = "redundant_gre"; } /** * The type of network the Unbound GRE tunnel is targeting. This field is required for network type - * 'unbound_gre_tunnel' connections. This field is required to be unspecified for network type 'classic', - * 'directlink', 'vpc', 'power_virtual_server' and 'gre_tunnel' connections. + * 'unbound_gre_tunnel' and must be set to 'classic'. For a 'redundant_gre' network type, the value is required and + * can be either VPC or Classic. This field is required to be unspecified for network type 'classic', 'directlink', + * 'vpc', 'power_virtual_server' and 'gre_tunnel' connections. */ public interface BaseNetworkType { /** classic. */ String CLASSIC = "classic"; + /** vpc. */ + String VPC = "vpc"; } /** * Default setting of permit or deny which applies to any routes that don't match a specified filter. This field is * optional for network type 'classic', 'vpc', 'directlink', and 'power_virtual_server' connections. This field is - * required to be unspecified for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * required to be unspecified for network type 'gre_tunnel', 'unbound_gre_tunnel' and 'redundant_gre' connections. */ public interface PrefixFiltersDefault { /** permit. */ @@ -77,6 +81,7 @@ public interface PrefixFiltersDefault { protected Long remoteBgpAsn; protected String remoteGatewayIp; protected String remoteTunnelIp; + protected List tunnels; protected ZoneIdentity zone; /** @@ -97,6 +102,7 @@ public static class Builder { private Long remoteBgpAsn; private String remoteGatewayIp; private String remoteTunnelIp; + private List tunnels; private ZoneIdentity zone; /** @@ -119,6 +125,7 @@ private Builder(CreateTransitGatewayConnectionOptions createTransitGatewayConnec this.remoteBgpAsn = createTransitGatewayConnectionOptions.remoteBgpAsn; this.remoteGatewayIp = createTransitGatewayConnectionOptions.remoteGatewayIp; this.remoteTunnelIp = createTransitGatewayConnectionOptions.remoteTunnelIp; + this.tunnels = createTransitGatewayConnectionOptions.tunnels; this.zone = createTransitGatewayConnectionOptions.zone; } @@ -164,6 +171,22 @@ public Builder addPrefixFilters(TransitGatewayConnectionPrefixFilter prefixFilte return this; } + /** + * Adds an tunnels to tunnels. + * + * @param tunnels the new tunnels + * @return the CreateTransitGatewayConnectionOptions builder + */ + public Builder addTunnels(TransitGatewayRedundantGRETunnelTemplate tunnels) { + com.ibm.cloud.sdk.core.util.Validator.notNull(tunnels, + "tunnels cannot be null"); + if (this.tunnels == null) { + this.tunnels = new ArrayList(); + } + this.tunnels.add(tunnels); + return this; + } + /** * Set the transitGatewayId. * @@ -321,6 +344,18 @@ public Builder remoteTunnelIp(String remoteTunnelIp) { return this; } + /** + * Set the tunnels. + * Existing tunnels will be replaced. + * + * @param tunnels the tunnels + * @return the CreateTransitGatewayConnectionOptions builder + */ + public Builder tunnels(List tunnels) { + this.tunnels = tunnels; + return this; + } + /** * Set the zone. * @@ -354,6 +389,7 @@ protected CreateTransitGatewayConnectionOptions(Builder builder) { remoteBgpAsn = builder.remoteBgpAsn; remoteGatewayIp = builder.remoteGatewayIp; remoteTunnelIp = builder.remoteTunnelIp; + tunnels = builder.tunnels; zone = builder.zone; } @@ -380,8 +416,7 @@ public String transitGatewayId() { /** * Gets the networkType. * - * Defines what type of network is connected via this connection. For access to gre_tunnel or unbound_gre_tunnel - * connections contact IBM support. + * Defines what type of network is connected via this connection. * * @return the networkType */ @@ -398,8 +433,8 @@ public String networkType() { * * This field is required for network type 'gre_tunnel' connections. * - * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', 'power_virtual_server' - * and 'unbound_gre_tunnel' connections. + * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', + * 'power_virtual_server', 'unbound_gre_tunnel' and 'redundant_gre' connections. * * @return the baseConnectionId * @deprecated this method is deprecated and may be removed in a future release @@ -413,8 +448,9 @@ public String baseConnectionId() { * Gets the baseNetworkType. * * The type of network the Unbound GRE tunnel is targeting. This field is required for network type - * 'unbound_gre_tunnel' connections. This field is required to be unspecified for network type 'classic', - * 'directlink', 'vpc', 'power_virtual_server' and 'gre_tunnel' connections. + * 'unbound_gre_tunnel' and must be set to 'classic'. For a 'redundant_gre' network type, the value is required and + * can be either VPC or Classic. This field is required to be unspecified for network type 'classic', 'directlink', + * 'vpc', 'power_virtual_server' and 'gre_tunnel' connections. * * @return the baseNetworkType */ @@ -426,8 +462,8 @@ public String baseNetworkType() { * Gets the localGatewayIp. * * Local gateway IP address. This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' - * connections. This field is required to be unspecified for network type 'classic', 'directlink', 'vpc' and - * 'power_virtual_server' connections. + * connections. This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', + * 'power_virtual_server' and 'redundant_gre' connections. * * @return the localGatewayIp */ @@ -443,8 +479,8 @@ public String localGatewayIp() { * * This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * - * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc' and 'power_virtual_server' - * connections. + * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', 'power_virtual_server' + * and 'redundant_gre' connections. * * @return the localTunnelIp */ @@ -458,7 +494,7 @@ public String localTunnelIp() { * The user-defined name for this transit gateway connection. Network type 'vpc' connections are defaulted to the * name of the VPC. Network type 'classic' connections are named 'Classic'. * - * This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * This field is required for network type 'gre_tunnel', 'unbound_gre_tunnel' and 'redundant_gre' connections. * * This field is optional for network type 'classic', 'directlink', 'vpc' and 'power_virtual_server' connections. * @@ -473,7 +509,8 @@ public String name() { * * The ID of the account which owns the network that is being connected. Generally only used if the network is in a * different account than the gateway. This field is required for type 'unbound_gre_tunnel' when the - * associated_network_type is 'classic' and the GRE tunnel is in a different account than the gateway. + * associated_network_type is 'classic' or network_type is 'redundant_gre' and the GRE tunnel is in a different + * account than the gateway. * * @return the networkAccountId */ @@ -486,8 +523,9 @@ public String networkAccountId() { * * The ID of the network being connected via this connection. For network types 'vpc','power_virtual_server' and * 'directlink' this is the CRN of the VPC / PowerVS / Direct Link gateway respectively. This field is required for - * network type 'vpc', 'power_virtual_server' and 'directlink' connections. This field is required to be unspecified - * for network type 'classic', 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * network type 'vpc', 'power_virtual_server' and 'directlink' connections. It is also required for 'redundant_gre' + * connections when the base_network_type is set to VPC. This field is required to be unspecified for network type + * 'classic', 'gre_tunnel' and 'unbound_gre_tunnel' connections. * * @return the networkId */ @@ -503,7 +541,7 @@ public String networkId() { * connections. This is order dependent with those first in the array being applied first, and those at the end of the * array being applied last, or just before applying the default. This field is optional for network type 'classic', * 'vpc', 'directlink', and 'power_virtual_server' connections. This field is required to be unspecified for network - * type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * type 'gre_tunnel', 'unbound_gre_tunnel' and 'redundant_gre' connections. * * @return the prefixFilters */ @@ -516,7 +554,7 @@ public List prefixFilters() { * * Default setting of permit or deny which applies to any routes that don't match a specified filter. This field is * optional for network type 'classic', 'vpc', 'directlink', and 'power_virtual_server' connections. This field is - * required to be unspecified for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * required to be unspecified for network type 'gre_tunnel', 'unbound_gre_tunnel' and 'redundant_gre' connections. * * @return the prefixFiltersDefault */ @@ -533,8 +571,8 @@ public String prefixFiltersDefault() { * * This field is optional for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * - * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc' and 'power_virtual_server' - * connections. + * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', 'power_virtual_server' + * and 'gre_tunnel' connections. * * @return the remoteBgpAsn */ @@ -546,8 +584,8 @@ public Long remoteBgpAsn() { * Gets the remoteGatewayIp. * * Remote gateway IP address. This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' - * connections. This field is required to be unspecified for network type 'classic', 'directlink', 'vpc' and - * 'power_virtual_server' connections. + * connections. This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', + * 'power_virtual_server' and 'redundant_gre' connections. * * @return the remoteGatewayIp */ @@ -563,8 +601,8 @@ public String remoteGatewayIp() { * * This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * - * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc' and 'power_virtual_server' - * connections. + * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', 'power_virtual_server' + * and 'redundant_gre' connections. * * @return the remoteTunnelIp */ @@ -572,6 +610,18 @@ public String remoteTunnelIp() { return remoteTunnelIp; } + /** + * Gets the tunnels. + * + * Array of GRE tunnels for a transit gateway redundant GRE tunnel connection. This field is required for + * 'redundant_gre' connections. + * + * @return the tunnels + */ + public List tunnels() { + return tunnels; + } + /** * Gets the zone. * @@ -580,8 +630,8 @@ public String remoteTunnelIp() { * * This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * - * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc' and 'power_virtual_server' - * connections. + * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', 'power_virtual_server' + * and 'redundant_gre' connections. * * @return the zone */ diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptions.java index b9daf6dba..485a69f8b 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptions.java new file mode 100644 index 000000000..dbc0371c4 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptions.java @@ -0,0 +1,344 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The createTransitGatewayGreTunnel options. + */ +public class CreateTransitGatewayGreTunnelOptions extends GenericModel { + + protected String transitGatewayId; + protected String id; + protected String localGatewayIp; + protected String localTunnelIp; + protected String name; + protected String remoteGatewayIp; + protected String remoteTunnelIp; + protected ZoneIdentity zone; + protected Long remoteBgpAsn; + + /** + * Builder. + */ + public static class Builder { + private String transitGatewayId; + private String id; + private String localGatewayIp; + private String localTunnelIp; + private String name; + private String remoteGatewayIp; + private String remoteTunnelIp; + private ZoneIdentity zone; + private Long remoteBgpAsn; + + /** + * Instantiates a new Builder from an existing CreateTransitGatewayGreTunnelOptions instance. + * + * @param createTransitGatewayGreTunnelOptions the instance to initialize the Builder with + */ + private Builder(CreateTransitGatewayGreTunnelOptions createTransitGatewayGreTunnelOptions) { + this.transitGatewayId = createTransitGatewayGreTunnelOptions.transitGatewayId; + this.id = createTransitGatewayGreTunnelOptions.id; + this.localGatewayIp = createTransitGatewayGreTunnelOptions.localGatewayIp; + this.localTunnelIp = createTransitGatewayGreTunnelOptions.localTunnelIp; + this.name = createTransitGatewayGreTunnelOptions.name; + this.remoteGatewayIp = createTransitGatewayGreTunnelOptions.remoteGatewayIp; + this.remoteTunnelIp = createTransitGatewayGreTunnelOptions.remoteTunnelIp; + this.zone = createTransitGatewayGreTunnelOptions.zone; + this.remoteBgpAsn = createTransitGatewayGreTunnelOptions.remoteBgpAsn; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param transitGatewayId the transitGatewayId + * @param id the id + * @param localGatewayIp the localGatewayIp + * @param localTunnelIp the localTunnelIp + * @param name the name + * @param remoteGatewayIp the remoteGatewayIp + * @param remoteTunnelIp the remoteTunnelIp + * @param zone the zone + */ + public Builder(String transitGatewayId, String id, String localGatewayIp, String localTunnelIp, String name, String remoteGatewayIp, String remoteTunnelIp, ZoneIdentity zone) { + this.transitGatewayId = transitGatewayId; + this.id = id; + this.localGatewayIp = localGatewayIp; + this.localTunnelIp = localTunnelIp; + this.name = name; + this.remoteGatewayIp = remoteGatewayIp; + this.remoteTunnelIp = remoteTunnelIp; + this.zone = zone; + } + + /** + * Builds a CreateTransitGatewayGreTunnelOptions. + * + * @return the new CreateTransitGatewayGreTunnelOptions instance + */ + public CreateTransitGatewayGreTunnelOptions build() { + return new CreateTransitGatewayGreTunnelOptions(this); + } + + /** + * Set the transitGatewayId. + * + * @param transitGatewayId the transitGatewayId + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder transitGatewayId(String transitGatewayId) { + this.transitGatewayId = transitGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the localGatewayIp. + * + * @param localGatewayIp the localGatewayIp + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder localGatewayIp(String localGatewayIp) { + this.localGatewayIp = localGatewayIp; + return this; + } + + /** + * Set the localTunnelIp. + * + * @param localTunnelIp the localTunnelIp + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder localTunnelIp(String localTunnelIp) { + this.localTunnelIp = localTunnelIp; + return this; + } + + /** + * Set the name. + * + * @param name the name + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Set the remoteGatewayIp. + * + * @param remoteGatewayIp the remoteGatewayIp + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder remoteGatewayIp(String remoteGatewayIp) { + this.remoteGatewayIp = remoteGatewayIp; + return this; + } + + /** + * Set the remoteTunnelIp. + * + * @param remoteTunnelIp the remoteTunnelIp + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder remoteTunnelIp(String remoteTunnelIp) { + this.remoteTunnelIp = remoteTunnelIp; + return this; + } + + /** + * Set the zone. + * + * @param zone the zone + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder zone(ZoneIdentity zone) { + this.zone = zone; + return this; + } + + /** + * Set the remoteBgpAsn. + * + * @param remoteBgpAsn the remoteBgpAsn + * @return the CreateTransitGatewayGreTunnelOptions builder + */ + public Builder remoteBgpAsn(long remoteBgpAsn) { + this.remoteBgpAsn = remoteBgpAsn; + return this; + } + } + + protected CreateTransitGatewayGreTunnelOptions() { } + + protected CreateTransitGatewayGreTunnelOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, + "transitGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.localGatewayIp, + "localGatewayIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.localTunnelIp, + "localTunnelIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, + "name cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.remoteGatewayIp, + "remoteGatewayIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.remoteTunnelIp, + "remoteTunnelIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.zone, + "zone cannot be null"); + transitGatewayId = builder.transitGatewayId; + id = builder.id; + localGatewayIp = builder.localGatewayIp; + localTunnelIp = builder.localTunnelIp; + name = builder.name; + remoteGatewayIp = builder.remoteGatewayIp; + remoteTunnelIp = builder.remoteTunnelIp; + zone = builder.zone; + remoteBgpAsn = builder.remoteBgpAsn; + } + + /** + * New builder. + * + * @return a CreateTransitGatewayGreTunnelOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the transitGatewayId. + * + * The Transit Gateway identifier. + * + * @return the transitGatewayId + */ + public String transitGatewayId() { + return transitGatewayId; + } + + /** + * Gets the id. + * + * The connection identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the localGatewayIp. + * + * Local gateway IP address. + * + * @return the localGatewayIp + */ + public String localGatewayIp() { + return localGatewayIp; + } + + /** + * Gets the localTunnelIp. + * + * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the localTunnelIp + */ + public String localTunnelIp() { + return localTunnelIp; + } + + /** + * Gets the name. + * + * The user-defined name for this tunnel connection. + * + * @return the name + */ + public String name() { + return name; + } + + /** + * Gets the remoteGatewayIp. + * + * Remote gateway IP address. + * + * @return the remoteGatewayIp + */ + public String remoteGatewayIp() { + return remoteGatewayIp; + } + + /** + * Gets the remoteTunnelIp. + * + * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the remoteTunnelIp + */ + public String remoteTunnelIp() { + return remoteTunnelIp; + } + + /** + * Gets the zone. + * + * Specify the connection's location. The specified availability zone must reside in the gateway's region. + * Use the IBM Cloud global catalog to list zones within the desired region. + * + * @return the zone + */ + public ZoneIdentity zone() { + return zone; + } + + /** + * Gets the remoteBgpAsn. + * + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, + * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM + * will assign an ASN. + * + * @return the remoteBgpAsn + */ + public Long remoteBgpAsn() { + return remoteBgpAsn; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptions.java index a5c65c6c7..36f4b09bc 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptions.java index 2fbbb01de..4c42a9e27 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptions.java index 9b74f6d15..65430fc66 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptions.java index b1cd2c472..5573949fc 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptions.java new file mode 100644 index 000000000..0fad5ebc8 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptions.java @@ -0,0 +1,163 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The deleteTransitGatewayConnectionTunnels options. + */ +public class DeleteTransitGatewayConnectionTunnelsOptions extends GenericModel { + + protected String transitGatewayId; + protected String id; + protected String greTunnelId; + + /** + * Builder. + */ + public static class Builder { + private String transitGatewayId; + private String id; + private String greTunnelId; + + /** + * Instantiates a new Builder from an existing DeleteTransitGatewayConnectionTunnelsOptions instance. + * + * @param deleteTransitGatewayConnectionTunnelsOptions the instance to initialize the Builder with + */ + private Builder(DeleteTransitGatewayConnectionTunnelsOptions deleteTransitGatewayConnectionTunnelsOptions) { + this.transitGatewayId = deleteTransitGatewayConnectionTunnelsOptions.transitGatewayId; + this.id = deleteTransitGatewayConnectionTunnelsOptions.id; + this.greTunnelId = deleteTransitGatewayConnectionTunnelsOptions.greTunnelId; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param transitGatewayId the transitGatewayId + * @param id the id + * @param greTunnelId the greTunnelId + */ + public Builder(String transitGatewayId, String id, String greTunnelId) { + this.transitGatewayId = transitGatewayId; + this.id = id; + this.greTunnelId = greTunnelId; + } + + /** + * Builds a DeleteTransitGatewayConnectionTunnelsOptions. + * + * @return the new DeleteTransitGatewayConnectionTunnelsOptions instance + */ + public DeleteTransitGatewayConnectionTunnelsOptions build() { + return new DeleteTransitGatewayConnectionTunnelsOptions(this); + } + + /** + * Set the transitGatewayId. + * + * @param transitGatewayId the transitGatewayId + * @return the DeleteTransitGatewayConnectionTunnelsOptions builder + */ + public Builder transitGatewayId(String transitGatewayId) { + this.transitGatewayId = transitGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the DeleteTransitGatewayConnectionTunnelsOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the greTunnelId. + * + * @param greTunnelId the greTunnelId + * @return the DeleteTransitGatewayConnectionTunnelsOptions builder + */ + public Builder greTunnelId(String greTunnelId) { + this.greTunnelId = greTunnelId; + return this; + } + } + + protected DeleteTransitGatewayConnectionTunnelsOptions() { } + + protected DeleteTransitGatewayConnectionTunnelsOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, + "transitGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.greTunnelId, + "greTunnelId cannot be empty"); + transitGatewayId = builder.transitGatewayId; + id = builder.id; + greTunnelId = builder.greTunnelId; + } + + /** + * New builder. + * + * @return a DeleteTransitGatewayConnectionTunnelsOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the transitGatewayId. + * + * The Transit Gateway identifier. + * + * @return the transitGatewayId + */ + public String transitGatewayId() { + return transitGatewayId; + } + + /** + * Gets the id. + * + * The connection identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the greTunnelId. + * + * The tunnel identifier. + * + * @return the greTunnelId + */ + public String greTunnelId() { + return greTunnelId; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptions.java index b998fa8ec..d3b757c29 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptions.java index 63edc17eb..82857fa17 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptions.java index ed46aed31..e29364122 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptions.java index e4ff06cec..1114c2262 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptions.java index 675fed812..49cc2c0f9 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptions.java new file mode 100644 index 000000000..c2f6c202d --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptions.java @@ -0,0 +1,163 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The getTransitGatewayConnectionTunnels options. + */ +public class GetTransitGatewayConnectionTunnelsOptions extends GenericModel { + + protected String transitGatewayId; + protected String id; + protected String greTunnelId; + + /** + * Builder. + */ + public static class Builder { + private String transitGatewayId; + private String id; + private String greTunnelId; + + /** + * Instantiates a new Builder from an existing GetTransitGatewayConnectionTunnelsOptions instance. + * + * @param getTransitGatewayConnectionTunnelsOptions the instance to initialize the Builder with + */ + private Builder(GetTransitGatewayConnectionTunnelsOptions getTransitGatewayConnectionTunnelsOptions) { + this.transitGatewayId = getTransitGatewayConnectionTunnelsOptions.transitGatewayId; + this.id = getTransitGatewayConnectionTunnelsOptions.id; + this.greTunnelId = getTransitGatewayConnectionTunnelsOptions.greTunnelId; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param transitGatewayId the transitGatewayId + * @param id the id + * @param greTunnelId the greTunnelId + */ + public Builder(String transitGatewayId, String id, String greTunnelId) { + this.transitGatewayId = transitGatewayId; + this.id = id; + this.greTunnelId = greTunnelId; + } + + /** + * Builds a GetTransitGatewayConnectionTunnelsOptions. + * + * @return the new GetTransitGatewayConnectionTunnelsOptions instance + */ + public GetTransitGatewayConnectionTunnelsOptions build() { + return new GetTransitGatewayConnectionTunnelsOptions(this); + } + + /** + * Set the transitGatewayId. + * + * @param transitGatewayId the transitGatewayId + * @return the GetTransitGatewayConnectionTunnelsOptions builder + */ + public Builder transitGatewayId(String transitGatewayId) { + this.transitGatewayId = transitGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the GetTransitGatewayConnectionTunnelsOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the greTunnelId. + * + * @param greTunnelId the greTunnelId + * @return the GetTransitGatewayConnectionTunnelsOptions builder + */ + public Builder greTunnelId(String greTunnelId) { + this.greTunnelId = greTunnelId; + return this; + } + } + + protected GetTransitGatewayConnectionTunnelsOptions() { } + + protected GetTransitGatewayConnectionTunnelsOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, + "transitGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.greTunnelId, + "greTunnelId cannot be empty"); + transitGatewayId = builder.transitGatewayId; + id = builder.id; + greTunnelId = builder.greTunnelId; + } + + /** + * New builder. + * + * @return a GetTransitGatewayConnectionTunnelsOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the transitGatewayId. + * + * The Transit Gateway identifier. + * + * @return the transitGatewayId + */ + public String transitGatewayId() { + return transitGatewayId; + } + + /** + * Gets the id. + * + * The connection identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the greTunnelId. + * + * The tunnel identifier. + * + * @return the greTunnelId + */ + public String greTunnelId() { + return greTunnelId; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java new file mode 100644 index 000000000..8aadbfea6 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java @@ -0,0 +1,133 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The getTransitGatewayGreTunnel options. + */ +public class GetTransitGatewayGreTunnelOptions extends GenericModel { + + protected String transitGatewayId; + protected String id; + + /** + * Builder. + */ + public static class Builder { + private String transitGatewayId; + private String id; + + /** + * Instantiates a new Builder from an existing GetTransitGatewayGreTunnelOptions instance. + * + * @param getTransitGatewayGreTunnelOptions the instance to initialize the Builder with + */ + private Builder(GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptions) { + this.transitGatewayId = getTransitGatewayGreTunnelOptions.transitGatewayId; + this.id = getTransitGatewayGreTunnelOptions.id; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param transitGatewayId the transitGatewayId + * @param id the id + */ + public Builder(String transitGatewayId, String id) { + this.transitGatewayId = transitGatewayId; + this.id = id; + } + + /** + * Builds a GetTransitGatewayGreTunnelOptions. + * + * @return the new GetTransitGatewayGreTunnelOptions instance + */ + public GetTransitGatewayGreTunnelOptions build() { + return new GetTransitGatewayGreTunnelOptions(this); + } + + /** + * Set the transitGatewayId. + * + * @param transitGatewayId the transitGatewayId + * @return the GetTransitGatewayGreTunnelOptions builder + */ + public Builder transitGatewayId(String transitGatewayId) { + this.transitGatewayId = transitGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the GetTransitGatewayGreTunnelOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + } + + protected GetTransitGatewayGreTunnelOptions() { } + + protected GetTransitGatewayGreTunnelOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, + "transitGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + transitGatewayId = builder.transitGatewayId; + id = builder.id; + } + + /** + * New builder. + * + * @return a GetTransitGatewayGreTunnelOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the transitGatewayId. + * + * The Transit Gateway identifier. + * + * @return the transitGatewayId + */ + public String transitGatewayId() { + return transitGatewayId; + } + + /** + * Gets the id. + * + * The connection identifier. + * + * @return the id + */ + public String id() { + return id; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptions.java index 98797486e..0d38b043a 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptions.java index 836c6583b..30f9be424 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java new file mode 100644 index 000000000..5f3e61198 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' connections. + */ +public class GreTunnelZoneReference extends GenericModel { + + protected String name; + + protected GreTunnelZoneReference() { } + + /** + * Gets the name. + * + * Availability zone name. + * + * @return the name + */ + public String getName() { + return name; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptions.java index ef8eb0bd8..90481896a 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptions.java index 3524c51b3..7877c70b7 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptions.java index f905adcbe..43a0a6b39 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptions.java index b7744cacc..4a65bb6fb 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptions.java index 57ef84cfd..8dc4f1268 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptions.java index ecb16a92d..bd33fc00e 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnection.java index 5409d38f0..002aacad5 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTG.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTG.java index 8e123bb0b..2934f74d2 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTG.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTG.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnection.java index f1ce63ebf..aca2c98ce 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnection.java index 3fe89db50..25fc79b1d 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTG.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTG.java index d73c5b36c..ca0ff6572 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTG.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTG.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnection.java index b91416230..00859a7df 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollection.java index 4dc84de27..0b41bf475 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCust.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCust.java index 3452457a0..d3884243c 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCust.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCust.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java index 16d4027d1..da634227a 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java new file mode 100644 index 000000000..2b3a60748 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import java.util.List; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Collection of all tunnels for redundant gre connection. + */ +public class RedundantGRETunnelCollection extends GenericModel { + + protected List tunnels; + + protected RedundantGRETunnelCollection() { } + + /** + * Gets the tunnels. + * + * Collection of all tunnels for redundant gre connection. + * + * @return the tunnels + */ + public List getTunnels() { + return tunnels; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java new file mode 100644 index 000000000..892bd09e2 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java @@ -0,0 +1,271 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import java.util.Date; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Details for a redundant GRE tunnel. + */ +public class RedundantGRETunnelReference extends GenericModel { + + /** + * The type of network the redundant GRE tunnel is targeting. + */ + public interface BaseNetworkType { + /** classic. */ + String CLASSIC = "classic"; + /** vpc. */ + String VPC = "vpc"; + } + + /** + * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. + * Code and processes using this field must tolerate unexpected values. + */ + public interface Status { + /** attached. */ + String ATTACHED = "attached"; + /** failed. */ + String FAILED = "failed"; + /** pending. */ + String PENDING = "pending"; + /** deleting. */ + String DELETING = "deleting"; + /** detaching. */ + String DETACHING = "detaching"; + /** detached. */ + String DETACHED = "detached"; + /** suspending. */ + String SUSPENDING = "suspending"; + /** suspended. */ + String SUSPENDED = "suspended"; + } + + @SerializedName("base_network_type") + protected String baseNetworkType; + @SerializedName("created_at") + protected Date createdAt; + protected String id; + @SerializedName("local_bgp_asn") + protected Long localBgpAsn; + @SerializedName("local_gateway_ip") + protected String localGatewayIp; + @SerializedName("local_tunnel_ip") + protected String localTunnelIp; + protected Long mtu; + protected String name; + @SerializedName("network_account_id") + protected String networkAccountId; + @SerializedName("network_id") + protected String networkId; + @SerializedName("remote_bgp_asn") + protected Long remoteBgpAsn; + @SerializedName("remote_gateway_ip") + protected String remoteGatewayIp; + @SerializedName("remote_tunnel_ip") + protected String remoteTunnelIp; + protected String status; + @SerializedName("updated_at") + protected Date updatedAt; + protected RgreTunnelZoneReference zone; + + protected RedundantGRETunnelReference() { } + + /** + * Gets the baseNetworkType. + * + * The type of network the redundant GRE tunnel is targeting. + * + * @return the baseNetworkType + */ + public String getBaseNetworkType() { + return baseNetworkType; + } + + /** + * Gets the createdAt. + * + * The date and time that this GRE tunnel was created. + * + * @return the createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the id. + * + * The unique identifier for this redundant GRE tunnel. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the localBgpAsn. + * + * Local network BGP ASN. It is assigned by IBM when the tunnel is created. + * + * @return the localBgpAsn + */ + public Long getLocalBgpAsn() { + return localBgpAsn; + } + + /** + * Gets the localGatewayIp. + * + * Local gateway IP address. + * + * @return the localGatewayIp + */ + public String getLocalGatewayIp() { + return localGatewayIp; + } + + /** + * Gets the localTunnelIp. + * + * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the localTunnelIp + */ + public String getLocalTunnelIp() { + return localTunnelIp; + } + + /** + * Gets the mtu. + * + * GRE tunnel MTU. + * + * @return the mtu + */ + public Long getMtu() { + return mtu; + } + + /** + * Gets the name. + * + * The user-defined name for this tunnel. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the networkAccountId. + * + * The ID of the account for cross account Classic connections. This field is required when the GRE tunnel is in a + * different account than the gateway and the base network is Classic. + * + * @return the networkAccountId + */ + public String getNetworkAccountId() { + return networkAccountId; + } + + /** + * Gets the networkId. + * + * The ID of the network VPC being connected via this connection. + * + * @return the networkId + */ + public String getNetworkId() { + return networkId; + } + + /** + * Gets the remoteBgpAsn. + * + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, + * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM + * will assign an ASN. + * + * @return the remoteBgpAsn + */ + public Long getRemoteBgpAsn() { + return remoteBgpAsn; + } + + /** + * Gets the remoteGatewayIp. + * + * Remote gateway IP address. + * + * @return the remoteGatewayIp + */ + public String getRemoteGatewayIp() { + return remoteGatewayIp; + } + + /** + * Gets the remoteTunnelIp. + * + * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the remoteTunnelIp + */ + public String getRemoteTunnelIp() { + return remoteTunnelIp; + } + + /** + * Gets the status. + * + * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. + * Code and processes using this field must tolerate unexpected values. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the updatedAt. + * + * The date and time that this tunnel was last updated. + * + * @return the updatedAt + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Gets the zone. + * + * The tunnel's location. The specified availability zone must reside in the gateway's region. Use the IBM Cloud + * global catalog to list zones within the desired region. + * + * @return the zone + */ + public RgreTunnelZoneReference getZone() { + return zone; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java index ee558d649..114c8319a 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentity.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentity.java index 3d4dd7d16..68d8476af 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentity.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReference.java index c2982a7bc..221823c80 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReference.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,31 +20,31 @@ */ public class ResourceGroupReference extends GenericModel { - protected String id; protected String href; + protected String id; protected ResourceGroupReference() { } /** - * Gets the id. + * Gets the href. * - * The unique identifier for this resource group. + * The URL for this resource group. * - * @return the id + * @return the href */ - public String getId() { - return id; + public String getHref() { + return href; } /** - * Gets the href. + * Gets the id. * - * The URL for this resource group. + * The unique identifier for this resource group. * - * @return the href + * @return the id */ - public String getHref() { - return href; + public String getId() { + return id; } } diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java new file mode 100644 index 000000000..2ec8c0ef8 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The tunnel's location. The specified availability zone must reside in the gateway's region. Use the IBM Cloud global + * catalog to list zones within the desired region. + */ +public class RgreTunnelZoneReference extends GenericModel { + + protected String name; + + protected RgreTunnelZoneReference() { } + + /** + * Gets the name. + * + * Availability zone name. + * + * @return the name + */ + public String getName() { + return name; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReport.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReport.java index b9223333d..9932c5abf 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReport.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReport.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollection.java index 867d57f66..d9d7c3bab 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnection.java index 6e358dbe1..e844d6dab 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgp.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgp.java index 44465253f..5ddd90230 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgp.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgp.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRoute.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRoute.java index 43e5157e4..a1c899c9c 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRoute.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRoute.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRoute.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRoute.java index 7c5b0c262..574fa71b4 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRoute.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRoute.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroup.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroup.java index 18b59ce44..c60da5cca 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroup.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollection.java index fe2a41a40..4b091587c 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocation.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocation.java index e446dc38c..201cb3c7c 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocation.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocation.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocation.java index 52b7e0109..f990fbd04 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocation.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -28,6 +28,7 @@ public class TSLocation extends GenericModel { protected String type; @SerializedName("local_connection_locations") protected List localConnectionLocations; + protected List zones; protected TSLocation() { } @@ -74,5 +75,16 @@ public String getType() { public List getLocalConnectionLocations() { return localConnectionLocations; } + + /** + * Gets the zones. + * + * List of valid zones for GRE tunnels. + * + * @return the zones + */ + public List getZones() { + return zones; + } } diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasic.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasic.java index 657d77621..2a4bc2de4 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasic.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasic.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnection.java index 769df20d4..7281166b2 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -19,10 +19,20 @@ import com.ibm.cloud.sdk.core.service.model.GenericModel; /** - * Transit gateway connection. + * Connection included in transit gateway. */ public class TransitConnection extends GenericModel { + /** + * The type of network the GRE tunnel is targeting. + */ + public interface BaseNetworkType { + /** classic. */ + String CLASSIC = "classic"; + /** vpc. */ + String VPC = "vpc"; + } + /** * Defines what type of network is connected via this connection. The list of enumerated values for this property may * expand in the future. Code and processes using this field must tolerate unexpected values. @@ -40,10 +50,14 @@ public interface NetworkType { String VPC = "vpc"; /** power_virtual_server. */ String POWER_VIRTUAL_SERVER = "power_virtual_server"; + /** redundant_gre. */ + String REDUNDANT_GRE = "redundant_gre"; } /** * Default setting of permit or deny which applies to any routes that don't match a specified filter. + * + * This field does not apply to the 'redundant_gre' network type. */ public interface PrefixFiltersDefault { /** permit. */ @@ -71,8 +85,8 @@ public interface RequestStatus { } /** - * Connection state. The list of enumerated values for this property may expand in the future. Code and processes - * using this field must tolerate unexpected values. + * Connection's current configuration state. The list of enumerated values for this property may expand in the future. + * Code and processes using this field must tolerate unexpected values. */ public interface Status { /** attached. */ @@ -95,11 +109,18 @@ public interface Status { String SUSPENDED = "suspended"; } + @SerializedName("base_network_type") + protected String baseNetworkType; + protected String name; + @SerializedName("network_id") + protected String networkId; + @SerializedName("network_type") + protected String networkType; + protected String id; @SerializedName("base_connection_id") protected String baseConnectionId; @SerializedName("created_at") protected Date createdAt; - protected String id; @SerializedName("local_bgp_asn") protected Long localBgpAsn; @SerializedName("local_gateway_ip") @@ -107,13 +128,8 @@ public interface Status { @SerializedName("local_tunnel_ip") protected String localTunnelIp; protected Long mtu; - protected String name; @SerializedName("network_account_id") protected String networkAccountId; - @SerializedName("network_id") - protected String networkId; - @SerializedName("network_type") - protected String networkType; @SerializedName("prefix_filters") protected List prefixFilters; @SerializedName("prefix_filters_default") @@ -129,22 +145,83 @@ public interface Status { protected String status; @SerializedName("transit_gateway") protected TransitGatewayReference transitGateway; + protected List tunnels; @SerializedName("updated_at") protected Date updatedAt; - protected ZoneReference zone; + protected GreTunnelZoneReference zone; protected TransitConnection() { } + /** + * Gets the baseNetworkType. + * + * The type of network the GRE tunnel is targeting. + * + * @return the baseNetworkType + */ + public String getBaseNetworkType() { + return baseNetworkType; + } + + /** + * Gets the name. + * + * The user-defined name for this transit gateway connection. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the networkId. + * + * The ID of the network being connected via this connection. This field is required for some types, such as 'vpc', + * 'power_virtual_server', 'directlink' and 'redundant_gre'. For network types 'vpc', 'redundant_gre', + * 'power_virtual_server' and 'directlink' this is the CRN of the VPC / PowerVS / Direct Link gateway respectively. + * + * @return the networkId + */ + public String getNetworkId() { + return networkId; + } + + /** + * Gets the networkType. + * + * Defines what type of network is connected via this connection. The list of enumerated values for this property may + * expand in the future. Code and processes using this field must tolerate unexpected values. + * + * @return the networkType + */ + public String getNetworkType() { + return networkType; + } + + /** + * Gets the id. + * + * The unique identifier for this Transit Gateway Connection. + * + * @return the id + */ + public String getId() { + return id; + } + /** * Gets the baseConnectionId. * - * network_type 'gre_tunnel' connections use 'base_connection_id' to specify the id of a network_type 'classic' + * network_type 'gre_tunnel' connections use 'base_connection_id' to specify the ID of a network_type 'classic' * connection the tunnel is configured over. The specified connection must reside in the same transit gateway and be * in an active state. The 'classic' connection cannot be deleted until any 'gre_tunnel' connections using it are * deleted. This field only applies to and is required for network type 'gre_tunnel' connections. * * @return the baseConnectionId + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public String getBaseConnectionId() { return baseConnectionId; } @@ -160,21 +237,10 @@ public Date getCreatedAt() { return createdAt; } - /** - * Gets the id. - * - * The unique identifier for this connection. - * - * @return the id - */ - public String getId() { - return id; - } - /** * Gets the localBgpAsn. * - * Local network BGP ASN. This field only applies to network type 'gre_tunnel' connections. + * Local network BGP ASN. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * * @return the localBgpAsn */ @@ -185,7 +251,8 @@ public Long getLocalBgpAsn() { /** * Gets the localGatewayIp. * - * Local gateway IP address. This field only applies to network type 'gre_tunnel' connections. + * Local gateway IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * connections. * * @return the localGatewayIp */ @@ -196,7 +263,8 @@ public String getLocalGatewayIp() { /** * Gets the localTunnelIp. * - * Local tunnel IP address. This field only applies to network type 'gre_tunnel' connections. + * Local tunnel IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * connections. * * @return the localTunnelIp */ @@ -207,7 +275,7 @@ public String getLocalTunnelIp() { /** * Gets the mtu. * - * GRE tunnel MTU. This field only applies to network type 'gre_tunnel' connections. + * GRE tunnel MTU. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * * @return the mtu */ @@ -215,17 +283,6 @@ public Long getMtu() { return mtu; } - /** - * Gets the name. - * - * The user-defined name for this transit gateway connection. - * - * @return the name - */ - public String getName() { - return name; - } - /** * Gets the networkAccountId. * @@ -238,37 +295,14 @@ public String getNetworkAccountId() { return networkAccountId; } - /** - * Gets the networkId. - * - * The ID of the network being connected via this connection. This field is required for some types, such as 'vpc', - * 'power_virtual_server' and 'directlink'. For network types 'vpc','power_virtual_server' and 'directlink' this is - * the CRN of the VPC / PowerVS / Direct Link gateway respectively. - * - * @return the networkId - */ - public String getNetworkId() { - return networkId; - } - - /** - * Gets the networkType. - * - * Defines what type of network is connected via this connection. The list of enumerated values for this property may - * expand in the future. Code and processes using this field must tolerate unexpected values. - * - * @return the networkType - */ - public String getNetworkType() { - return networkType; - } - /** * Gets the prefixFilters. * * Array of prefix route filters for a transit gateway connection. This is order dependent with those first in the * array being applied first, and those at the end of the array is applied last, or just before the default. * + * This field does not apply to the 'redundant_gre' network type. + * * @return the prefixFilters */ public List getPrefixFilters() { @@ -280,6 +314,8 @@ public List getPrefixFilters() { * * Default setting of permit or deny which applies to any routes that don't match a specified filter. * + * This field does not apply to the 'redundant_gre' network type. + * * @return the prefixFiltersDefault */ public String getPrefixFiltersDefault() { @@ -289,7 +325,7 @@ public String getPrefixFiltersDefault() { /** * Gets the remoteBgpAsn. * - * Remote network BGP ASN. This field only applies to network type 'gre_tunnel' connections. + * Remote network BGP ASN. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. * * @return the remoteBgpAsn */ @@ -300,7 +336,8 @@ public Long getRemoteBgpAsn() { /** * Gets the remoteGatewayIp. * - * Remote gateway IP address. This field only applies to network type 'gre_tunnel' connections. + * Remote gateway IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * connections. * * @return the remoteGatewayIp */ @@ -311,7 +348,8 @@ public String getRemoteGatewayIp() { /** * Gets the remoteTunnelIp. * - * Remote tunnel IP address. This field only applies to network type 'gre_tunnel' connections. + * Remote tunnel IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * connections. * * @return the remoteTunnelIp */ @@ -335,8 +373,8 @@ public String getRequestStatus() { /** * Gets the status. * - * Connection state. The list of enumerated values for this property may expand in the future. Code and processes - * using this field must tolerate unexpected values. + * Connection's current configuration state. The list of enumerated values for this property may expand in the future. + * Code and processes using this field must tolerate unexpected values. * * @return the status */ @@ -347,7 +385,7 @@ public String getStatus() { /** * Gets the transitGateway. * - * Reference to the transit gateway that contains this connection. + * Transit gateway reference. * * @return the transitGateway */ @@ -355,6 +393,17 @@ public TransitGatewayReference getTransitGateway() { return transitGateway; } + /** + * Gets the tunnels. + * + * Collection of all tunnels for 'redundant_gre' connection. + * + * @return the tunnels + */ + public List getTunnels() { + return tunnels; + } + /** * Gets the updatedAt. * @@ -373,7 +422,7 @@ public Date getUpdatedAt() { * * @return the zone */ - public ZoneReference getZone() { + public GreTunnelZoneReference getZone() { return zone; } } diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollection.java index 8a85d304f..ebbb6217a 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGateway.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGateway.java index 52c29092b..c94e44bd1 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGateway.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGateway.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollection.java index b7b17c5e5..a4845fb1f 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollection.java index 9ef5e6afa..c6b63e608 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollection.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCust.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCust.java index d09783e8c..9fce81dfa 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCust.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCust.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,8 @@ public class TransitGatewayConnectionCust extends GenericModel { public interface BaseNetworkType { /** classic. */ String CLASSIC = "classic"; + /** vpc. */ + String VPC = "vpc"; } /** @@ -48,10 +50,13 @@ public interface NetworkType { String VPC = "vpc"; /** power_virtual_server. */ String POWER_VIRTUAL_SERVER = "power_virtual_server"; + /** redundant_gre. */ + String REDUNDANT_GRE = "redundant_gre"; } /** - * Default setting of permit or deny which applies to any routes that don't match a specified filter. + * Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does + * not apply to the 'redundant_gre' network type. */ public interface PrefixFiltersDefault { /** permit. */ @@ -137,9 +142,10 @@ public interface Status { @SerializedName("request_status") protected String requestStatus; protected String status; + protected List tunnels; @SerializedName("updated_at") protected Date updatedAt; - protected TransitGatewayConnectionCustZone zone; + protected GreTunnelZoneReference zone; protected TransitGatewayConnectionCust() { } @@ -169,8 +175,8 @@ public String getName() { * Gets the networkId. * * The ID of the network being connected via this connection. This field is required for some types, such as 'vpc', - * 'power_virtual_server' and 'directlink'. For network types 'vpc','power_virtual_server' and 'directlink' this is - * the CRN of the VPC / PowerVS / Direct Link gateway respectively. + * 'power_virtual_server', 'directlink' and 'redundant_gre'. For network types 'vpc', 'redundant_gre', + * 'power_virtual_server' and 'directlink' this is the CRN of the VPC / PowerVS / Direct Link gateway respectively. * * @return the networkId */ @@ -290,7 +296,8 @@ public String getNetworkAccountId() { * Gets the prefixFilters. * * Array of prefix route filters for a transit gateway connection. This is order dependent with those first in the - * array being applied first, and those at the end of the array is applied last, or just before the default. + * array being applied first, and those at the end of the array is applied last, or just before the default. This + * field does not apply to the 'redundant_gre' network type. * * @return the prefixFilters */ @@ -301,7 +308,8 @@ public List getPrefixFilters() { /** * Gets the prefixFiltersDefault. * - * Default setting of permit or deny which applies to any routes that don't match a specified filter. + * Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does + * not apply to the 'redundant_gre' network type. * * @return the prefixFiltersDefault */ @@ -369,6 +377,17 @@ public String getStatus() { return status; } + /** + * Gets the tunnels. + * + * Collection of all tunnels for 'redundant_gre' connection. + * + * @return the tunnels + */ + public List getTunnels() { + return tunnels; + } + /** * Gets the updatedAt. * @@ -383,11 +402,11 @@ public Date getUpdatedAt() { /** * Gets the zone. * - * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' connections. * * @return the zone */ - public TransitGatewayConnectionCustZone getZone() { + public GreTunnelZoneReference getZone() { return zone; } } diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilter.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilter.java index 5baf47f9e..a246985f3 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilter.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilter.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReference.java index 9e2f6c4c3..6cc2f1675 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReference.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionsPager.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionsPager.java index aa1e6ad71..74ffcb77c 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionsPager.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java new file mode 100644 index 000000000..eaa954c2f --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java @@ -0,0 +1,221 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import java.util.Date; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Details for a redundant GRE tunnel. + */ +public class TransitGatewayRedundantGRETunnelReference extends GenericModel { + + /** + * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. + * Code and processes using this field must tolerate unexpected values. + */ + public interface Status { + /** attached. */ + String ATTACHED = "attached"; + /** failed. */ + String FAILED = "failed"; + /** pending. */ + String PENDING = "pending"; + /** deleting. */ + String DELETING = "deleting"; + /** detaching. */ + String DETACHING = "detaching"; + /** detached. */ + String DETACHED = "detached"; + /** suspending. */ + String SUSPENDING = "suspending"; + /** suspended. */ + String SUSPENDED = "suspended"; + } + + @SerializedName("created_at") + protected Date createdAt; + protected String id; + @SerializedName("local_bgp_asn") + protected Long localBgpAsn; + @SerializedName("local_gateway_ip") + protected String localGatewayIp; + @SerializedName("local_tunnel_ip") + protected String localTunnelIp; + protected Long mtu; + protected String name; + @SerializedName("remote_bgp_asn") + protected Long remoteBgpAsn; + @SerializedName("remote_gateway_ip") + protected String remoteGatewayIp; + @SerializedName("remote_tunnel_ip") + protected String remoteTunnelIp; + protected String status; + @SerializedName("updated_at") + protected Date updatedAt; + protected RgreTunnelZoneReference zone; + + protected TransitGatewayRedundantGRETunnelReference() { } + + /** + * Gets the createdAt. + * + * The date and time that this GRE tunnel was created. + * + * @return the createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the id. + * + * The unique identifier for this redundant GRE tunnel. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the localBgpAsn. + * + * Local network BGP ASN. It is assigned by IBM when the tunnel is created. + * + * @return the localBgpAsn + */ + public Long getLocalBgpAsn() { + return localBgpAsn; + } + + /** + * Gets the localGatewayIp. + * + * Local gateway IP address. + * + * @return the localGatewayIp + */ + public String getLocalGatewayIp() { + return localGatewayIp; + } + + /** + * Gets the localTunnelIp. + * + * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the localTunnelIp + */ + public String getLocalTunnelIp() { + return localTunnelIp; + } + + /** + * Gets the mtu. + * + * GRE tunnel MTU. + * + * @return the mtu + */ + public Long getMtu() { + return mtu; + } + + /** + * Gets the name. + * + * The user-defined name for this tunnel. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the remoteBgpAsn. + * + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, + * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM + * will assign an ASN. + * + * @return the remoteBgpAsn + */ + public Long getRemoteBgpAsn() { + return remoteBgpAsn; + } + + /** + * Gets the remoteGatewayIp. + * + * Remote gateway IP address. + * + * @return the remoteGatewayIp + */ + public String getRemoteGatewayIp() { + return remoteGatewayIp; + } + + /** + * Gets the remoteTunnelIp. + * + * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the remoteTunnelIp + */ + public String getRemoteTunnelIp() { + return remoteTunnelIp; + } + + /** + * Gets the status. + * + * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. + * Code and processes using this field must tolerate unexpected values. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the updatedAt. + * + * The date and time that this tunnel was last updated. + * + * @return the updatedAt + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Gets the zone. + * + * The tunnel's location. The specified availability zone must reside in the gateway's region. Use the IBM Cloud + * global catalog to list zones within the desired region. + * + * @return the zone + */ + public RgreTunnelZoneReference getZone() { + return zone; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java new file mode 100644 index 000000000..b9586c2a0 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java @@ -0,0 +1,290 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * A create template with information for redundant GRE tunnel. + */ +public class TransitGatewayRedundantGRETunnelTemplate extends GenericModel { + + @SerializedName("local_gateway_ip") + protected String localGatewayIp; + @SerializedName("local_tunnel_ip") + protected String localTunnelIp; + protected String name; + @SerializedName("remote_bgp_asn") + protected Long remoteBgpAsn; + @SerializedName("remote_gateway_ip") + protected String remoteGatewayIp; + @SerializedName("remote_tunnel_ip") + protected String remoteTunnelIp; + protected ZoneIdentity zone; + + /** + * Builder. + */ + public static class Builder { + private String localGatewayIp; + private String localTunnelIp; + private String name; + private Long remoteBgpAsn; + private String remoteGatewayIp; + private String remoteTunnelIp; + private ZoneIdentity zone; + + /** + * Instantiates a new Builder from an existing TransitGatewayRedundantGRETunnelTemplate instance. + * + * @param transitGatewayRedundantGreTunnelTemplate the instance to initialize the Builder with + */ + private Builder(TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplate) { + this.localGatewayIp = transitGatewayRedundantGreTunnelTemplate.localGatewayIp; + this.localTunnelIp = transitGatewayRedundantGreTunnelTemplate.localTunnelIp; + this.name = transitGatewayRedundantGreTunnelTemplate.name; + this.remoteBgpAsn = transitGatewayRedundantGreTunnelTemplate.remoteBgpAsn; + this.remoteGatewayIp = transitGatewayRedundantGreTunnelTemplate.remoteGatewayIp; + this.remoteTunnelIp = transitGatewayRedundantGreTunnelTemplate.remoteTunnelIp; + this.zone = transitGatewayRedundantGreTunnelTemplate.zone; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param localGatewayIp the localGatewayIp + * @param localTunnelIp the localTunnelIp + * @param name the name + * @param remoteGatewayIp the remoteGatewayIp + * @param remoteTunnelIp the remoteTunnelIp + * @param zone the zone + */ + public Builder(String localGatewayIp, String localTunnelIp, String name, String remoteGatewayIp, String remoteTunnelIp, ZoneIdentity zone) { + this.localGatewayIp = localGatewayIp; + this.localTunnelIp = localTunnelIp; + this.name = name; + this.remoteGatewayIp = remoteGatewayIp; + this.remoteTunnelIp = remoteTunnelIp; + this.zone = zone; + } + + /** + * Builds a TransitGatewayRedundantGRETunnelTemplate. + * + * @return the new TransitGatewayRedundantGRETunnelTemplate instance + */ + public TransitGatewayRedundantGRETunnelTemplate build() { + return new TransitGatewayRedundantGRETunnelTemplate(this); + } + + /** + * Set the localGatewayIp. + * + * @param localGatewayIp the localGatewayIp + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder localGatewayIp(String localGatewayIp) { + this.localGatewayIp = localGatewayIp; + return this; + } + + /** + * Set the localTunnelIp. + * + * @param localTunnelIp the localTunnelIp + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder localTunnelIp(String localTunnelIp) { + this.localTunnelIp = localTunnelIp; + return this; + } + + /** + * Set the name. + * + * @param name the name + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Set the remoteBgpAsn. + * + * @param remoteBgpAsn the remoteBgpAsn + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder remoteBgpAsn(long remoteBgpAsn) { + this.remoteBgpAsn = remoteBgpAsn; + return this; + } + + /** + * Set the remoteGatewayIp. + * + * @param remoteGatewayIp the remoteGatewayIp + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder remoteGatewayIp(String remoteGatewayIp) { + this.remoteGatewayIp = remoteGatewayIp; + return this; + } + + /** + * Set the remoteTunnelIp. + * + * @param remoteTunnelIp the remoteTunnelIp + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder remoteTunnelIp(String remoteTunnelIp) { + this.remoteTunnelIp = remoteTunnelIp; + return this; + } + + /** + * Set the zone. + * + * @param zone the zone + * @return the TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder zone(ZoneIdentity zone) { + this.zone = zone; + return this; + } + } + + protected TransitGatewayRedundantGRETunnelTemplate() { } + + protected TransitGatewayRedundantGRETunnelTemplate(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.localGatewayIp, + "localGatewayIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.localTunnelIp, + "localTunnelIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, + "name cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.remoteGatewayIp, + "remoteGatewayIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.remoteTunnelIp, + "remoteTunnelIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.zone, + "zone cannot be null"); + localGatewayIp = builder.localGatewayIp; + localTunnelIp = builder.localTunnelIp; + name = builder.name; + remoteBgpAsn = builder.remoteBgpAsn; + remoteGatewayIp = builder.remoteGatewayIp; + remoteTunnelIp = builder.remoteTunnelIp; + zone = builder.zone; + } + + /** + * New builder. + * + * @return a TransitGatewayRedundantGRETunnelTemplate builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the localGatewayIp. + * + * Local gateway IP address. + * + * @return the localGatewayIp + */ + public String localGatewayIp() { + return localGatewayIp; + } + + /** + * Gets the localTunnelIp. + * + * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the localTunnelIp + */ + public String localTunnelIp() { + return localTunnelIp; + } + + /** + * Gets the name. + * + * The user-defined name for this tunnel connection. + * + * @return the name + */ + public String name() { + return name; + } + + /** + * Gets the remoteBgpAsn. + * + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, + * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM + * will assign an ASN. + * + * @return the remoteBgpAsn + */ + public Long remoteBgpAsn() { + return remoteBgpAsn; + } + + /** + * Gets the remoteGatewayIp. + * + * Remote gateway IP address. + * + * @return the remoteGatewayIp + */ + public String remoteGatewayIp() { + return remoteGatewayIp; + } + + /** + * Gets the remoteTunnelIp. + * + * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. + * Neither can be the network nor broadcast addresses. + * + * @return the remoteTunnelIp + */ + public String remoteTunnelIp() { + return remoteTunnelIp; + } + + /** + * Gets the zone. + * + * Specify the connection's location. The specified availability zone must reside in the gateway's region. + * Use the IBM Cloud global catalog to list zones within the desired region. + * + * @return the zone + */ + public ZoneIdentity zone() { + return zone; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReference.java index 8b815a4ab..212847024 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReference.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewaysPager.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewaysPager.java index 555937dbc..7ffd58342 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewaysPager.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewaysPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptions.java index b61d05ff7..6f0fff984 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptions.java index 3d42db1bf..e6e6f77da 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptions.java new file mode 100644 index 000000000..893a5b471 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptions.java @@ -0,0 +1,189 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The updateTransitGatewayConnectionTunnels options. + */ +public class UpdateTransitGatewayConnectionTunnelsOptions extends GenericModel { + + protected String transitGatewayId; + protected String id; + protected String greTunnelId; + protected String name; + + /** + * Builder. + */ + public static class Builder { + private String transitGatewayId; + private String id; + private String greTunnelId; + private String name; + + /** + * Instantiates a new Builder from an existing UpdateTransitGatewayConnectionTunnelsOptions instance. + * + * @param updateTransitGatewayConnectionTunnelsOptions the instance to initialize the Builder with + */ + private Builder(UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptions) { + this.transitGatewayId = updateTransitGatewayConnectionTunnelsOptions.transitGatewayId; + this.id = updateTransitGatewayConnectionTunnelsOptions.id; + this.greTunnelId = updateTransitGatewayConnectionTunnelsOptions.greTunnelId; + this.name = updateTransitGatewayConnectionTunnelsOptions.name; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param transitGatewayId the transitGatewayId + * @param id the id + * @param greTunnelId the greTunnelId + */ + public Builder(String transitGatewayId, String id, String greTunnelId) { + this.transitGatewayId = transitGatewayId; + this.id = id; + this.greTunnelId = greTunnelId; + } + + /** + * Builds a UpdateTransitGatewayConnectionTunnelsOptions. + * + * @return the new UpdateTransitGatewayConnectionTunnelsOptions instance + */ + public UpdateTransitGatewayConnectionTunnelsOptions build() { + return new UpdateTransitGatewayConnectionTunnelsOptions(this); + } + + /** + * Set the transitGatewayId. + * + * @param transitGatewayId the transitGatewayId + * @return the UpdateTransitGatewayConnectionTunnelsOptions builder + */ + public Builder transitGatewayId(String transitGatewayId) { + this.transitGatewayId = transitGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the UpdateTransitGatewayConnectionTunnelsOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the greTunnelId. + * + * @param greTunnelId the greTunnelId + * @return the UpdateTransitGatewayConnectionTunnelsOptions builder + */ + public Builder greTunnelId(String greTunnelId) { + this.greTunnelId = greTunnelId; + return this; + } + + /** + * Set the name. + * + * @param name the name + * @return the UpdateTransitGatewayConnectionTunnelsOptions builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + } + + protected UpdateTransitGatewayConnectionTunnelsOptions() { } + + protected UpdateTransitGatewayConnectionTunnelsOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, + "transitGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.greTunnelId, + "greTunnelId cannot be empty"); + transitGatewayId = builder.transitGatewayId; + id = builder.id; + greTunnelId = builder.greTunnelId; + name = builder.name; + } + + /** + * New builder. + * + * @return a UpdateTransitGatewayConnectionTunnelsOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the transitGatewayId. + * + * The Transit Gateway identifier. + * + * @return the transitGatewayId + */ + public String transitGatewayId() { + return transitGatewayId; + } + + /** + * Gets the id. + * + * The connection identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the greTunnelId. + * + * The tunnel identifier. + * + * @return the greTunnelId + */ + public String greTunnelId() { + return greTunnelId; + } + + /** + * Gets the name. + * + * The user-defined name for this connection tunnel. + * + * @return the name + */ + public String name() { + return name; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptions.java index 6064de918..95883cf07 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptions.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentity.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentity.java index 499d15b20..f87c62b0c 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentity.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByName.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByName.java index 8d4632781..32c4bdad1 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByName.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReference.java index d319bd247..5ee46d099 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReference.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java new file mode 100644 index 000000000..b9b5779c6 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import java.util.List; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Collection of availability zones. + */ +public class ZoneReferenceCollection extends GenericModel { + + protected List zones; + + protected ZoneReferenceCollection() { } + + /** + * Gets the zones. + * + * Array of valid zones for GRE tunnels. + * + * @return the zones + */ + public List getZones() { + return zones; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/package-info.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/package-info.java index 4c8353cd8..018b49aa3 100644 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/package-info.java +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApisTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApisTest.java index f2279b4dc..11ed962d4 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApisTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApisTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -17,17 +17,22 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionActionsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayGreTunnelOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayRouteReportOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionTunnelsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayRouteReportOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetGatewayLocationOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionTunnelsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayGreTunnelOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayRouteReportOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListConnectionsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListGatewayLocationsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayConnectionPrefixFiltersOptions; @@ -43,9 +48,12 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterCust; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterPut; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelCollection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ReplaceTransitGatewayConnectionPrefixFilterOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ResourceGroupIdentity; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ResourceGroupReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReport; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReportCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReportConnection; @@ -63,18 +71,21 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCust; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCustZone; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilter; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilterReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionsPager; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelTemplate; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewaysPager; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionPrefixFilterOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionTunnelsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneIdentity; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneIdentityByName; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReferenceCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.http.Response; import com.ibm.cloud.sdk.core.security.Authenticator; @@ -126,7 +137,7 @@ public void testGetVersion() throws Throwable { @Test public void testListTransitGatewaysWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways?limit=50\"}, \"limit\": 50, \"next\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways?start=MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa&limit=50\", \"start\": \"MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa\"}, \"transit_gateways\": [{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"id\": \"56969d6043e9465c883cb9f7363e78e8\", \"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}]}"; + String mockResponseBody = "{\"first\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways?limit=50\"}, \"limit\": 50, \"next\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways?start=MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa&limit=50\", \"start\": \"MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa\"}, \"transit_gateways\": [{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}]}"; String listTransitGatewaysPath = "/transit_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -174,8 +185,8 @@ public void testListTransitGatewaysWRetries() throws Throwable { @Test public void testListTransitGatewaysWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"id\":\"56969d6043e9465c883cb9f7363e78e8\",\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"id\":\"56969d6043e9465c883cb9f7363e78e8\",\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\",\"id\":\"56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\",\"id\":\"56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -207,8 +218,8 @@ public void testListTransitGatewaysWithPagerGetNext() throws Throwable { @Test public void testListTransitGatewaysWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"id\":\"56969d6043e9465c883cb9f7363e78e8\",\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"id\":\"56969d6043e9465c883cb9f7363e78e8\",\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\",\"id\":\"56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"transit_gateways\":[{\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"location\":\"us-south\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"global\":true,\"resource_group\":{\"href\":\"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\",\"id\":\"56969d6043e9465c883cb9f7363e78e8\"},\"status\":\"available\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -236,7 +247,7 @@ public void testListTransitGatewaysWithPagerGetAll() throws Throwable { @Test public void testCreateTransitGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"id\": \"56969d6043e9465c883cb9f7363e78e8\", \"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String mockResponseBody = "{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; String createTransitGatewayPath = "/transit_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -347,7 +358,7 @@ public void testDeleteTransitGatewayNoOptions() throws Throwable { @Test public void testGetTransitGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"id\": \"56969d6043e9465c883cb9f7363e78e8\", \"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String mockResponseBody = "{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; String getTransitGatewayPath = "/transit_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -399,7 +410,7 @@ public void testGetTransitGatewayNoOptions() throws Throwable { @Test public void testUpdateTransitGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"id\": \"56969d6043e9465c883cb9f7363e78e8\", \"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String mockResponseBody = "{\"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"location\": \"us-south\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"global\": true, \"resource_group\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; String updateTransitGatewayPath = "/transit_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -453,7 +464,7 @@ public void testUpdateTransitGatewayNoOptions() throws Throwable { @Test public void testListConnectionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"name\": \"Transit_Service_SJ_DL\", \"network_account_id\": \"28e4d90ac7504be694471ee66e70d0d5\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"transit_gateway\": {\"crn\": \"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\", \"id\": \"456f58c1-afe7-123a-0a0a-7f3d720f1a44\", \"name\": \"my-transit-gw100\"}, \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"first\": {\"href\": \"https://transit.cloud.ibm.com/v1/connections?limit=50\"}, \"limit\": 50, \"next\": {\"href\": \"https://transit.cloud.ibm.com/v1/connections?start=MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa&limit=50\", \"start\": \"MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa\"}}"; + String mockResponseBody = "{\"connections\": [{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"networkAccountId\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"transit_gateway\": {\"crn\": \"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\", \"id\": \"456f58c1-afe7-123a-0a0a-7f3d720f1a44\", \"name\": \"my-transit-gw100\"}, \"tunnels\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"first\": {\"href\": \"https://transit.cloud.ibm.com/v1/connections?limit=50\"}, \"limit\": 50, \"next\": {\"href\": \"https://transit.cloud.ibm.com/v1/connections?start=MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa&limit=50\", \"start\": \"MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa\"}}"; String listConnectionsPath = "/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -503,8 +514,8 @@ public void testListConnectionsWRetries() throws Throwable { @Test public void testListConnectionsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"name\":\"Transit_Service_SJ_DL\",\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"name\":\"Transit_Service_SJ_DL\",\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -537,8 +548,8 @@ public void testListConnectionsWithPagerGetNext() throws Throwable { @Test public void testListConnectionsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"name\":\"Transit_Service_SJ_DL\",\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"name\":\"Transit_Service_SJ_DL\",\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"transit_gateway\":{\"crn\":\"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"id\":\"456f58c1-afe7-123a-0a0a-7f3d720f1a44\",\"name\":\"my-transit-gw100\"},\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -567,7 +578,7 @@ public void testListConnectionsWithPagerGetAll() throws Throwable { @Test public void testListTransitGatewayConnectionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"28e4d90ac7504be694471ee66e70d0d5\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"first\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways/{transit_gateway_id}/connections?limit=50\"}, \"limit\": 50, \"next\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways/{transit_gateway_id}/connections?start=MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa&limit=50\", \"start\": \"MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa\"}, \"total_count\": 500}"; + String mockResponseBody = "{\"connections\": [{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"networkAccountId\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"tunnels\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"first\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways/{transit_gateway_id}/connections?limit=50\"}, \"limit\": 50, \"next\": {\"href\": \"https://transit.cloud.ibm.com/v1/transit_gateways/{transit_gateway_id}/connections?start=MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa&limit=50\", \"start\": \"MjAyMC0wNS0wOFQxNDoxNzowMy45NzQ5NzNa\"}, \"total_count\": 500}"; String listTransitGatewayConnectionsPath = "/transit_gateways/testString/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -625,8 +636,8 @@ public void testListTransitGatewayConnectionsNoOptions() throws Throwable { @Test public void testListTransitGatewayConnectionsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -660,8 +671,8 @@ public void testListTransitGatewayConnectionsWithPagerGetNext() throws Throwable @Test public void testListTransitGatewayConnectionsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"28e4d90ac7504be694471ee66e70d0d5\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"base_network_type\":\"classic\",\"name\":\"Transit_Service_BWTN_SJ_DL\",\"network_id\":\"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"network_type\":\"vpc\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"local_bgp_asn\":64490,\"local_gateway_ip\":\"192.168.100.1\",\"local_tunnel_ip\":\"192.168.129.2\",\"mtu\":9000,\"network_account_id\":\"networkAccountId\",\"prefix_filters\":[{\"action\":\"permit\",\"before\":\"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"ge\":0,\"id\":\"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\",\"le\":32,\"prefix\":\"192.168.100.0/24\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}],\"prefix_filters_default\":\"permit\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.63.12\",\"remote_tunnel_ip\":\"192.168.129.1\",\"request_status\":\"pending\",\"status\":\"attached\",\"tunnels\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"id\":\"1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"local_bgp_asn\":11,\"local_gateway_ip\":\"10.242.63.12\",\"local_tunnel_ip\":\"192.168.100.20\",\"mtu\":9000,\"name\":\"gre1\",\"remote_bgp_asn\":65010,\"remote_gateway_ip\":\"10.242.33.22\",\"remote_tunnel_ip\":\"192.168.129.1\",\"status\":\"attached\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -691,7 +702,7 @@ public void testListTransitGatewayConnectionsWithPagerGetAll() throws Throwable @Test public void testCreateTransitGatewayConnectionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"28e4d90ac7504be694471ee66e70d0d5\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; + String mockResponseBody = "{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"networkAccountId\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"tunnels\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; String createTransitGatewayConnectionPath = "/transit_gateways/testString/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -711,6 +722,17 @@ public void testCreateTransitGatewayConnectionWOptions() throws Throwable { .name("us-south-1") .build(); + // Construct an instance of the TransitGatewayRedundantGRETunnelTemplate model + TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModel = new TransitGatewayRedundantGRETunnelTemplate.Builder() + .localGatewayIp("10.242.63.12") + .localTunnelIp("192.168.100.20") + .name("gre1") + .remoteBgpAsn(Long.valueOf("65010")) + .remoteGatewayIp("10.242.33.22") + .remoteTunnelIp("192.168.129.1") + .zone(zoneIdentityModel) + .build(); + // Construct an instance of the CreateTransitGatewayConnectionOptions model CreateTransitGatewayConnectionOptions createTransitGatewayConnectionOptionsModel = new CreateTransitGatewayConnectionOptions.Builder() .transitGatewayId("testString") @@ -720,13 +742,14 @@ public void testCreateTransitGatewayConnectionWOptions() throws Throwable { .localGatewayIp("192.168.100.1") .localTunnelIp("192.168.129.2") .name("Transit_Service_BWTN_SJ_DL") - .networkAccountId("28e4d90ac7504be694471ee66e70d0d5") + .networkAccountId("testString") .networkId("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") .prefixFilters(java.util.Arrays.asList(transitGatewayConnectionPrefixFilterModel)) .prefixFiltersDefault("permit") .remoteBgpAsn(Long.valueOf("65010")) .remoteGatewayIp("10.242.63.12") .remoteTunnelIp("192.168.129.1") + .tunnels(java.util.Arrays.asList(transitGatewayRedundantGreTunnelTemplateModel)) .zone(zoneIdentityModel) .build(); @@ -822,7 +845,7 @@ public void testDeleteTransitGatewayConnectionNoOptions() throws Throwable { @Test public void testGetTransitGatewayConnectionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"28e4d90ac7504be694471ee66e70d0d5\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; + String mockResponseBody = "{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"networkAccountId\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"tunnels\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; String getTransitGatewayConnectionPath = "/transit_gateways/testString/connections/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -875,7 +898,7 @@ public void testGetTransitGatewayConnectionNoOptions() throws Throwable { @Test public void testUpdateTransitGatewayConnectionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"28e4d90ac7504be694471ee66e70d0d5\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; + String mockResponseBody = "{\"base_network_type\": \"classic\", \"name\": \"Transit_Service_BWTN_SJ_DL\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"network_type\": \"vpc\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"local_bgp_asn\": 64490, \"local_gateway_ip\": \"192.168.100.1\", \"local_tunnel_ip\": \"192.168.129.2\", \"mtu\": 9000, \"network_account_id\": \"networkAccountId\", \"prefix_filters\": [{\"action\": \"permit\", \"before\": \"1a15dcab-7e40-45e1-b7c5-bc690eaa9782\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"ge\": 0, \"id\": \"1a15dcab-7e30-45e1-b7c5-bc690eaa9865\", \"le\": 32, \"prefix\": \"192.168.100.0/24\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"prefix_filters_default\": \"permit\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.63.12\", \"remote_tunnel_ip\": \"192.168.129.1\", \"request_status\": \"pending\", \"status\": \"attached\", \"tunnels\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; String updateTransitGatewayConnectionPath = "/transit_gateways/testString/connections/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -979,6 +1002,286 @@ public void testCreateTransitGatewayConnectionActionsNoOptions() throws Throwabl transitGatewayApisService.createTransitGatewayConnectionActions(null).execute(); } + // Test the getTransitGatewayGreTunnel operation with a valid options model parameter + @Test + public void testGetTransitGatewayGreTunnelWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"tunnels\": [{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}]}"; + String getTransitGatewayGreTunnelPath = "/transit_gateways/testString/connections/testString/tunnels"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the GetTransitGatewayGreTunnelOptions model + GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptionsModel = new GetTransitGatewayGreTunnelOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .build(); + + // Invoke getTransitGatewayGreTunnel() with a valid options model and verify the result + Response response = transitGatewayApisService.getTransitGatewayGreTunnel(getTransitGatewayGreTunnelOptionsModel).execute(); + assertNotNull(response); + RedundantGRETunnelCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getTransitGatewayGreTunnelPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the getTransitGatewayGreTunnel operation with and without retries enabled + @Test + public void testGetTransitGatewayGreTunnelWRetries() throws Throwable { + transitGatewayApisService.enableRetries(4, 30); + testGetTransitGatewayGreTunnelWOptions(); + + transitGatewayApisService.disableRetries(); + testGetTransitGatewayGreTunnelWOptions(); + } + + // Test the getTransitGatewayGreTunnel operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetTransitGatewayGreTunnelNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + transitGatewayApisService.getTransitGatewayGreTunnel(null).execute(); + } + + // Test the createTransitGatewayGreTunnel operation with a valid options model parameter + @Test + public void testCreateTransitGatewayGreTunnelWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; + String createTransitGatewayGreTunnelPath = "/transit_gateways/testString/connections/testString/tunnels"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the CreateTransitGatewayGreTunnelOptions model + CreateTransitGatewayGreTunnelOptions createTransitGatewayGreTunnelOptionsModel = new CreateTransitGatewayGreTunnelOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .localGatewayIp("10.242.63.12") + .localTunnelIp("192.168.100.20") + .name("gre1") + .remoteGatewayIp("10.242.33.22") + .remoteTunnelIp("192.168.129.1") + .zone(zoneIdentityModel) + .remoteBgpAsn(Long.valueOf("65010")) + .build(); + + // Invoke createTransitGatewayGreTunnel() with a valid options model and verify the result + Response response = transitGatewayApisService.createTransitGatewayGreTunnel(createTransitGatewayGreTunnelOptionsModel).execute(); + assertNotNull(response); + RedundantGRETunnelReference responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createTransitGatewayGreTunnelPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the createTransitGatewayGreTunnel operation with and without retries enabled + @Test + public void testCreateTransitGatewayGreTunnelWRetries() throws Throwable { + transitGatewayApisService.enableRetries(4, 30); + testCreateTransitGatewayGreTunnelWOptions(); + + transitGatewayApisService.disableRetries(); + testCreateTransitGatewayGreTunnelWOptions(); + } + + // Test the createTransitGatewayGreTunnel operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateTransitGatewayGreTunnelNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + transitGatewayApisService.createTransitGatewayGreTunnel(null).execute(); + } + + // Test the deleteTransitGatewayConnectionTunnels operation with a valid options model parameter + @Test + public void testDeleteTransitGatewayConnectionTunnelsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteTransitGatewayConnectionTunnelsPath = "/transit_gateways/testString/connections/testString/tunnels/testString"; + server.enqueue(new MockResponse() + .setResponseCode(204) + .setBody(mockResponseBody)); + + // Construct an instance of the DeleteTransitGatewayConnectionTunnelsOptions model + DeleteTransitGatewayConnectionTunnelsOptions deleteTransitGatewayConnectionTunnelsOptionsModel = new DeleteTransitGatewayConnectionTunnelsOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .greTunnelId("testString") + .build(); + + // Invoke deleteTransitGatewayConnectionTunnels() with a valid options model and verify the result + Response response = transitGatewayApisService.deleteTransitGatewayConnectionTunnels(deleteTransitGatewayConnectionTunnelsOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteTransitGatewayConnectionTunnelsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the deleteTransitGatewayConnectionTunnels operation with and without retries enabled + @Test + public void testDeleteTransitGatewayConnectionTunnelsWRetries() throws Throwable { + transitGatewayApisService.enableRetries(4, 30); + testDeleteTransitGatewayConnectionTunnelsWOptions(); + + transitGatewayApisService.disableRetries(); + testDeleteTransitGatewayConnectionTunnelsWOptions(); + } + + // Test the deleteTransitGatewayConnectionTunnels operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteTransitGatewayConnectionTunnelsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + transitGatewayApisService.deleteTransitGatewayConnectionTunnels(null).execute(); + } + + // Test the getTransitGatewayConnectionTunnels operation with a valid options model parameter + @Test + public void testGetTransitGatewayConnectionTunnelsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; + String getTransitGatewayConnectionTunnelsPath = "/transit_gateways/testString/connections/testString/tunnels/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the GetTransitGatewayConnectionTunnelsOptions model + GetTransitGatewayConnectionTunnelsOptions getTransitGatewayConnectionTunnelsOptionsModel = new GetTransitGatewayConnectionTunnelsOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .greTunnelId("testString") + .build(); + + // Invoke getTransitGatewayConnectionTunnels() with a valid options model and verify the result + Response response = transitGatewayApisService.getTransitGatewayConnectionTunnels(getTransitGatewayConnectionTunnelsOptionsModel).execute(); + assertNotNull(response); + RedundantGRETunnelReference responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getTransitGatewayConnectionTunnelsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the getTransitGatewayConnectionTunnels operation with and without retries enabled + @Test + public void testGetTransitGatewayConnectionTunnelsWRetries() throws Throwable { + transitGatewayApisService.enableRetries(4, 30); + testGetTransitGatewayConnectionTunnelsWOptions(); + + transitGatewayApisService.disableRetries(); + testGetTransitGatewayConnectionTunnelsWOptions(); + } + + // Test the getTransitGatewayConnectionTunnels operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetTransitGatewayConnectionTunnelsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + transitGatewayApisService.getTransitGatewayConnectionTunnels(null).execute(); + } + + // Test the updateTransitGatewayConnectionTunnels operation with a valid options model parameter + @Test + public void testUpdateTransitGatewayConnectionTunnelsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; + String updateTransitGatewayConnectionTunnelsPath = "/transit_gateways/testString/connections/testString/tunnels/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the UpdateTransitGatewayConnectionTunnelsOptions model + UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptionsModel = new UpdateTransitGatewayConnectionTunnelsOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .greTunnelId("testString") + .name("gre2") + .build(); + + // Invoke updateTransitGatewayConnectionTunnels() with a valid options model and verify the result + Response response = transitGatewayApisService.updateTransitGatewayConnectionTunnels(updateTransitGatewayConnectionTunnelsOptionsModel).execute(); + assertNotNull(response); + RedundantGRETunnelReference responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateTransitGatewayConnectionTunnelsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the updateTransitGatewayConnectionTunnels operation with and without retries enabled + @Test + public void testUpdateTransitGatewayConnectionTunnelsWRetries() throws Throwable { + transitGatewayApisService.enableRetries(4, 30); + testUpdateTransitGatewayConnectionTunnelsWOptions(); + + transitGatewayApisService.disableRetries(); + testUpdateTransitGatewayConnectionTunnelsWOptions(); + } + + // Test the updateTransitGatewayConnectionTunnels operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateTransitGatewayConnectionTunnelsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + transitGatewayApisService.updateTransitGatewayConnectionTunnels(null).execute(); + } + // Test the listGatewayLocations operation with a valid options model parameter @Test public void testListGatewayLocationsWOptions() throws Throwable { @@ -1026,7 +1329,7 @@ public void testListGatewayLocationsWRetries() throws Throwable { @Test public void testGetGatewayLocationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"billing_location\": \"us\", \"name\": \"us-south\", \"type\": \"region\", \"local_connection_locations\": [{\"display_name\": \"Dallas\", \"name\": \"us-south\", \"supported_connection_types\": [\"supportedConnectionTypes\"], \"type\": \"region\"}]}"; + String mockResponseBody = "{\"billing_location\": \"us\", \"name\": \"us-south\", \"type\": \"region\", \"local_connection_locations\": [{\"display_name\": \"Dallas\", \"name\": \"us-south\", \"supported_connection_types\": [\"supportedConnectionTypes\"], \"type\": \"region\"}], \"zones\": [{\"zones\": [{\"name\": \"us-south-1\"}]}]}"; String getGatewayLocationPath = "/locations/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptionsTest.java index 9ad3b1811..81df35b50 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionActionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptionsTest.java index b8f67e641..d2c3d00a2 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilter; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelTemplate; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneIdentityByName; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -49,6 +50,23 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { .build(); assertEquals(zoneIdentityModel.name(), "us-south-1"); + TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModel = new TransitGatewayRedundantGRETunnelTemplate.Builder() + .localGatewayIp("10.242.63.12") + .localTunnelIp("192.168.100.20") + .name("gre1") + .remoteBgpAsn(Long.valueOf("65010")) + .remoteGatewayIp("10.242.33.22") + .remoteTunnelIp("192.168.129.1") + .zone(zoneIdentityModel) + .build(); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.localGatewayIp(), "10.242.63.12"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.localTunnelIp(), "192.168.100.20"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.name(), "gre1"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteBgpAsn(), Long.valueOf("65010")); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteGatewayIp(), "10.242.33.22"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteTunnelIp(), "192.168.129.1"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.zone(), zoneIdentityModel); + CreateTransitGatewayConnectionOptions createTransitGatewayConnectionOptionsModel = new CreateTransitGatewayConnectionOptions.Builder() .transitGatewayId("testString") .networkType("vpc") @@ -57,13 +75,14 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { .localGatewayIp("192.168.100.1") .localTunnelIp("192.168.129.2") .name("Transit_Service_BWTN_SJ_DL") - .networkAccountId("28e4d90ac7504be694471ee66e70d0d5") + .networkAccountId("testString") .networkId("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") .prefixFilters(java.util.Arrays.asList(transitGatewayConnectionPrefixFilterModel)) .prefixFiltersDefault("permit") .remoteBgpAsn(Long.valueOf("65010")) .remoteGatewayIp("10.242.63.12") .remoteTunnelIp("192.168.129.1") + .tunnels(java.util.Arrays.asList(transitGatewayRedundantGreTunnelTemplateModel)) .zone(zoneIdentityModel) .build(); assertEquals(createTransitGatewayConnectionOptionsModel.transitGatewayId(), "testString"); @@ -73,13 +92,14 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { assertEquals(createTransitGatewayConnectionOptionsModel.localGatewayIp(), "192.168.100.1"); assertEquals(createTransitGatewayConnectionOptionsModel.localTunnelIp(), "192.168.129.2"); assertEquals(createTransitGatewayConnectionOptionsModel.name(), "Transit_Service_BWTN_SJ_DL"); - assertEquals(createTransitGatewayConnectionOptionsModel.networkAccountId(), "28e4d90ac7504be694471ee66e70d0d5"); + assertEquals(createTransitGatewayConnectionOptionsModel.networkAccountId(), "testString"); assertEquals(createTransitGatewayConnectionOptionsModel.networkId(), "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"); assertEquals(createTransitGatewayConnectionOptionsModel.prefixFilters(), java.util.Arrays.asList(transitGatewayConnectionPrefixFilterModel)); assertEquals(createTransitGatewayConnectionOptionsModel.prefixFiltersDefault(), "permit"); assertEquals(createTransitGatewayConnectionOptionsModel.remoteBgpAsn(), Long.valueOf("65010")); assertEquals(createTransitGatewayConnectionOptionsModel.remoteGatewayIp(), "10.242.63.12"); assertEquals(createTransitGatewayConnectionOptionsModel.remoteTunnelIp(), "192.168.129.1"); + assertEquals(createTransitGatewayConnectionOptionsModel.tunnels(), java.util.Arrays.asList(transitGatewayRedundantGreTunnelTemplateModel)); assertEquals(createTransitGatewayConnectionOptionsModel.zone(), zoneIdentityModel); } diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptionsTest.java index 474e4e89a..53b73647f 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionPrefixFilterOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptionsTest.java new file mode 100644 index 000000000..02ae58db0 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptionsTest.java @@ -0,0 +1,67 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayGreTunnelOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneIdentityByName; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the CreateTransitGatewayGreTunnelOptions model. + */ +public class CreateTransitGatewayGreTunnelOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateTransitGatewayGreTunnelOptions() throws Throwable { + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + assertEquals(zoneIdentityModel.name(), "us-south-1"); + + CreateTransitGatewayGreTunnelOptions createTransitGatewayGreTunnelOptionsModel = new CreateTransitGatewayGreTunnelOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .localGatewayIp("10.242.63.12") + .localTunnelIp("192.168.100.20") + .name("gre1") + .remoteGatewayIp("10.242.33.22") + .remoteTunnelIp("192.168.129.1") + .zone(zoneIdentityModel) + .remoteBgpAsn(Long.valueOf("65010")) + .build(); + assertEquals(createTransitGatewayGreTunnelOptionsModel.transitGatewayId(), "testString"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.id(), "testString"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.localGatewayIp(), "10.242.63.12"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.localTunnelIp(), "192.168.100.20"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.name(), "gre1"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.remoteGatewayIp(), "10.242.33.22"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.remoteTunnelIp(), "192.168.129.1"); + assertEquals(createTransitGatewayGreTunnelOptionsModel.zone(), zoneIdentityModel); + assertEquals(createTransitGatewayGreTunnelOptionsModel.remoteBgpAsn(), Long.valueOf("65010")); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateTransitGatewayGreTunnelOptionsError() throws Throwable { + new CreateTransitGatewayGreTunnelOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptionsTest.java index 3f6c5578e..744e579d2 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptionsTest.java index b0016de96..8b674bdca 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayRouteReportOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptionsTest.java index ae0bb15b7..eca599401 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptionsTest.java index 8dcbe8bf2..b7852b3a4 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionPrefixFilterOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptionsTest.java new file mode 100644 index 000000000..cae3a2a96 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayConnectionTunnelsOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.DeleteTransitGatewayConnectionTunnelsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the DeleteTransitGatewayConnectionTunnelsOptions model. + */ +public class DeleteTransitGatewayConnectionTunnelsOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testDeleteTransitGatewayConnectionTunnelsOptions() throws Throwable { + DeleteTransitGatewayConnectionTunnelsOptions deleteTransitGatewayConnectionTunnelsOptionsModel = new DeleteTransitGatewayConnectionTunnelsOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .greTunnelId("testString") + .build(); + assertEquals(deleteTransitGatewayConnectionTunnelsOptionsModel.transitGatewayId(), "testString"); + assertEquals(deleteTransitGatewayConnectionTunnelsOptionsModel.id(), "testString"); + assertEquals(deleteTransitGatewayConnectionTunnelsOptionsModel.greTunnelId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteTransitGatewayConnectionTunnelsOptionsError() throws Throwable { + new DeleteTransitGatewayConnectionTunnelsOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptionsTest.java index 5cd7101cd..c862f4525 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptionsTest.java index 78bad9f79..52cfb39fc 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayRouteReportOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptionsTest.java index 9651c775c..b9b6dc981 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetGatewayLocationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptionsTest.java index 2cb6410da..06d6ca289 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptionsTest.java index 51d83bda7..d24b6d613 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionPrefixFilterOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptionsTest.java new file mode 100644 index 000000000..eab4e6d05 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayConnectionTunnelsOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayConnectionTunnelsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the GetTransitGatewayConnectionTunnelsOptions model. + */ +public class GetTransitGatewayConnectionTunnelsOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGetTransitGatewayConnectionTunnelsOptions() throws Throwable { + GetTransitGatewayConnectionTunnelsOptions getTransitGatewayConnectionTunnelsOptionsModel = new GetTransitGatewayConnectionTunnelsOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .greTunnelId("testString") + .build(); + assertEquals(getTransitGatewayConnectionTunnelsOptionsModel.transitGatewayId(), "testString"); + assertEquals(getTransitGatewayConnectionTunnelsOptionsModel.id(), "testString"); + assertEquals(getTransitGatewayConnectionTunnelsOptionsModel.greTunnelId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetTransitGatewayConnectionTunnelsOptionsError() throws Throwable { + new GetTransitGatewayConnectionTunnelsOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java new file mode 100644 index 000000000..10da64d25 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayGreTunnelOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the GetTransitGatewayGreTunnelOptions model. + */ +public class GetTransitGatewayGreTunnelOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGetTransitGatewayGreTunnelOptions() throws Throwable { + GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptionsModel = new GetTransitGatewayGreTunnelOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .build(); + assertEquals(getTransitGatewayGreTunnelOptionsModel.transitGatewayId(), "testString"); + assertEquals(getTransitGatewayGreTunnelOptionsModel.id(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetTransitGatewayGreTunnelOptionsError() throws Throwable { + new GetTransitGatewayGreTunnelOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptionsTest.java index 313dcc1c5..49428bf0e 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptionsTest.java index 8840c7e3d..9ac819af7 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayRouteReportOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java new file mode 100644 index 000000000..b7548d028 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the GreTunnelZoneReference model. + */ +public class GreTunnelZoneReferenceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGreTunnelZoneReference() throws Throwable { + GreTunnelZoneReference greTunnelZoneReferenceModel = new GreTunnelZoneReference(); + assertNull(greTunnelZoneReferenceModel.getName()); + } +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptionsTest.java index b3747cac2..bc05293f4 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptionsTest.java index 0d0a7e3a4..5f523788e 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListGatewayLocationsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptionsTest.java index b6ce53c55..d8376f006 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionPrefixFiltersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptionsTest.java index e58c84405..9d0cf1ffd 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayConnectionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptionsTest.java index 9875daab9..3e13f7c38 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptionsTest.java index 76f8681a9..b41e0d6a8 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewaysOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnectionTest.java index c0221e211..c06f04fd5 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGTest.java index f7bf907b1..6f56f123d 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnectionTest.java index e2ac49dfd..71dd9c51b 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationFirstTGWConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnectionTest.java index 3d1aee1e7..f13ce96d9 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGTest.java index 54bbe8103..fd1afc187 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnectionTest.java index 0c7d3a0d3..573962f1a 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PaginationNextTGWConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollectionTest.java index e52a4098e..30d06ebdd 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCustTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCustTest.java index e2ad50160..ba607e99a 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCustTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterCustTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPutTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPutTest.java index 3c900c28f..835515aa7 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPutTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPutTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java new file mode 100644 index 000000000..157a54a06 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelCollection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.cloud.sdk.core.util.DateUtils; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the RedundantGRETunnelCollection model. + */ +public class RedundantGRETunnelCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testRedundantGRETunnelCollection() throws Throwable { + RedundantGRETunnelCollection redundantGreTunnelCollectionModel = new RedundantGRETunnelCollection(); + assertNull(redundantGreTunnelCollectionModel.getTunnels()); + } +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java new file mode 100644 index 000000000..840e92cbf --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the RedundantGRETunnelReference model. + */ +public class RedundantGRETunnelReferenceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testRedundantGRETunnelReference() throws Throwable { + RedundantGRETunnelReference redundantGreTunnelReferenceModel = new RedundantGRETunnelReference(); + assertNull(redundantGreTunnelReferenceModel.getBaseNetworkType()); + assertNull(redundantGreTunnelReferenceModel.getCreatedAt()); + assertNull(redundantGreTunnelReferenceModel.getId()); + assertNull(redundantGreTunnelReferenceModel.getLocalBgpAsn()); + assertNull(redundantGreTunnelReferenceModel.getLocalGatewayIp()); + assertNull(redundantGreTunnelReferenceModel.getLocalTunnelIp()); + assertNull(redundantGreTunnelReferenceModel.getMtu()); + assertNull(redundantGreTunnelReferenceModel.getName()); + assertNull(redundantGreTunnelReferenceModel.getNetworkAccountId()); + assertNull(redundantGreTunnelReferenceModel.getNetworkId()); + assertNull(redundantGreTunnelReferenceModel.getRemoteBgpAsn()); + assertNull(redundantGreTunnelReferenceModel.getRemoteGatewayIp()); + assertNull(redundantGreTunnelReferenceModel.getRemoteTunnelIp()); + assertNull(redundantGreTunnelReferenceModel.getStatus()); + assertNull(redundantGreTunnelReferenceModel.getUpdatedAt()); + assertNull(redundantGreTunnelReferenceModel.getZone()); + } +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java index 6723a3576..cb7a15e78 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentityTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentityTest.java index 8cc63ab9e..859c1cc1c 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentityTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReferenceTest.java index 19c9247c1..1e785b727 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReferenceTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ResourceGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -32,7 +32,7 @@ public class ResourceGroupReferenceTest { @Test public void testResourceGroupReference() throws Throwable { ResourceGroupReference resourceGroupReferenceModel = new ResourceGroupReference(); - assertNull(resourceGroupReferenceModel.getId()); assertNull(resourceGroupReferenceModel.getHref()); + assertNull(resourceGroupReferenceModel.getId()); } } \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java new file mode 100644 index 000000000..df276446c --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the RgreTunnelZoneReference model. + */ +public class RgreTunnelZoneReferenceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testRgreTunnelZoneReference() throws Throwable { + RgreTunnelZoneReference rgreTunnelZoneReferenceModel = new RgreTunnelZoneReference(); + assertNull(rgreTunnelZoneReferenceModel.getName()); + } +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollectionTest.java index 3b1e0d43a..94cbd6922 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgpTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgpTest.java index 584122ef4..44e2e4007 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgpTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionBgpTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRouteTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRouteTest.java index 45457871c..86af314a7 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRouteTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionRouteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionTest.java index 9786e663a..f666cf6eb 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroupTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroupTest.java index 6109b132d..cbceb081d 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroupTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteTest.java index 62ef59585..334786c51 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportOverlappingRouteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportTest.java index 04c06d9cf..70864a1a5 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollectionTest.java index 36edb055c..8f1695613 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocationTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocationTest.java index fcb18c9d5..61436cf16 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocationTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocalLocationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasicTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasicTest.java index 36fed34c6..5dcd2b938 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasicTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationBasicTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationTest.java index ef6eb888f..9152ba257 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TSLocationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,8 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TSLocalLocation; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TSLocation; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReferenceCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -37,5 +39,6 @@ public void testTSLocation() throws Throwable { assertNull(tsLocationModel.getName()); assertNull(tsLocationModel.getType()); assertNull(tsLocationModel.getLocalConnectionLocations()); + assertNull(tsLocationModel.getZones()); } } \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java index b4149df01..0a7a93466 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,13 +13,15 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PaginationFirstConnection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PaginationNextConnection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitConnection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitConnectionCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilterReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import com.ibm.cloud.sdk.core.util.DateUtils; diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionTest.java index fe1e14c62..d9521caee 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,10 +13,12 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitConnection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilterReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import com.ibm.cloud.sdk.core.util.DateUtils; @@ -36,17 +38,18 @@ public class TransitConnectionTest { @Test public void testTransitConnection() throws Throwable { TransitConnection transitConnectionModel = new TransitConnection(); + assertNull(transitConnectionModel.getBaseNetworkType()); + assertNull(transitConnectionModel.getName()); + assertNull(transitConnectionModel.getNetworkId()); + assertNull(transitConnectionModel.getNetworkType()); + assertNull(transitConnectionModel.getId()); assertNull(transitConnectionModel.getBaseConnectionId()); assertNull(transitConnectionModel.getCreatedAt()); - assertNull(transitConnectionModel.getId()); assertNull(transitConnectionModel.getLocalBgpAsn()); assertNull(transitConnectionModel.getLocalGatewayIp()); assertNull(transitConnectionModel.getLocalTunnelIp()); assertNull(transitConnectionModel.getMtu()); - assertNull(transitConnectionModel.getName()); assertNull(transitConnectionModel.getNetworkAccountId()); - assertNull(transitConnectionModel.getNetworkId()); - assertNull(transitConnectionModel.getNetworkType()); assertNull(transitConnectionModel.getPrefixFilters()); assertNull(transitConnectionModel.getPrefixFiltersDefault()); assertNull(transitConnectionModel.getRemoteBgpAsn()); @@ -55,6 +58,7 @@ public void testTransitConnection() throws Throwable { assertNull(transitConnectionModel.getRequestStatus()); assertNull(transitConnectionModel.getStatus()); assertNull(transitConnectionModel.getTransitGateway()); + assertNull(transitConnectionModel.getTunnels()); assertNull(transitConnectionModel.getUpdatedAt()); assertNull(transitConnectionModel.getZone()); } diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionTest.java index 42605c478..23cf99296 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollectionTest.java index 2262fafb4..a5c97e5d0 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollectionTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,12 +13,14 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PaginationFirstTGWConnection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PaginationNextTGWConnection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCollection; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCust; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCustZone; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilterReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import com.ibm.cloud.sdk.core.util.DateUtils; diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustTest.java index 8c3ee0f66..21cb223a0 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,9 +13,11 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCust; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionCustZone; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilterReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import com.ibm.cloud.sdk.core.util.DateUtils; @@ -54,6 +56,7 @@ public void testTransitGatewayConnectionCust() throws Throwable { assertNull(transitGatewayConnectionCustModel.getRemoteTunnelIp()); assertNull(transitGatewayConnectionCustModel.getRequestStatus()); assertNull(transitGatewayConnectionCustModel.getStatus()); + assertNull(transitGatewayConnectionCustModel.getTunnels()); assertNull(transitGatewayConnectionCustModel.getUpdatedAt()); assertNull(transitGatewayConnectionCustModel.getZone()); } diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReferenceTest.java index 6be0a4fa9..0c0b6d8f5 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReferenceTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterTest.java index f876b2966..62f99d498 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionPrefixFilterTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java new file mode 100644 index 000000000..a91d46c8b --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java @@ -0,0 +1,50 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the TransitGatewayRedundantGRETunnelReference model. + */ +public class TransitGatewayRedundantGRETunnelReferenceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTransitGatewayRedundantGRETunnelReference() throws Throwable { + TransitGatewayRedundantGRETunnelReference transitGatewayRedundantGreTunnelReferenceModel = new TransitGatewayRedundantGRETunnelReference(); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getCreatedAt()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getId()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getLocalBgpAsn()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getLocalGatewayIp()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getLocalTunnelIp()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getMtu()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getName()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getRemoteBgpAsn()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getRemoteGatewayIp()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getRemoteTunnelIp()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getStatus()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getUpdatedAt()); + assertNull(transitGatewayRedundantGreTunnelReferenceModel.getZone()); + } +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java new file mode 100644 index 000000000..a39ed3f73 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java @@ -0,0 +1,75 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelTemplate; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneIdentityByName; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the TransitGatewayRedundantGRETunnelTemplate model. + */ +public class TransitGatewayRedundantGRETunnelTemplateTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTransitGatewayRedundantGRETunnelTemplate() throws Throwable { + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + assertEquals(zoneIdentityModel.name(), "us-south-1"); + + TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModel = new TransitGatewayRedundantGRETunnelTemplate.Builder() + .localGatewayIp("10.242.63.12") + .localTunnelIp("192.168.100.20") + .name("gre1") + .remoteBgpAsn(Long.valueOf("65010")) + .remoteGatewayIp("10.242.33.22") + .remoteTunnelIp("192.168.129.1") + .zone(zoneIdentityModel) + .build(); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.localGatewayIp(), "10.242.63.12"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.localTunnelIp(), "192.168.100.20"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.name(), "gre1"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteBgpAsn(), Long.valueOf("65010")); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteGatewayIp(), "10.242.33.22"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteTunnelIp(), "192.168.129.1"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModel.zone(), zoneIdentityModel); + + String json = TestUtilities.serialize(transitGatewayRedundantGreTunnelTemplateModel); + + TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModelNew = TestUtilities.deserialize(json, TransitGatewayRedundantGRETunnelTemplate.class); + assertTrue(transitGatewayRedundantGreTunnelTemplateModelNew instanceof TransitGatewayRedundantGRETunnelTemplate); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.localGatewayIp(), "10.242.63.12"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.localTunnelIp(), "192.168.100.20"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.name(), "gre1"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.remoteBgpAsn(), Long.valueOf("65010")); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.remoteGatewayIp(), "10.242.33.22"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.remoteTunnelIp(), "192.168.129.1"); + assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.zone().toString(), zoneIdentityModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testTransitGatewayRedundantGRETunnelTemplateError() throws Throwable { + new TransitGatewayRedundantGRETunnelTemplate.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReferenceTest.java index a5f923275..f30831734 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReferenceTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTest.java index 634006f7b..405e9e532 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptionsTest.java index 6630f9956..206d5a7da 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptionsTest.java index 0faf0f7ae..65708acc8 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionPrefixFilterOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptionsTest.java new file mode 100644 index 000000000..08c8c41e7 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionTunnelsOptionsTest.java @@ -0,0 +1,51 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionTunnelsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the UpdateTransitGatewayConnectionTunnelsOptions model. + */ +public class UpdateTransitGatewayConnectionTunnelsOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testUpdateTransitGatewayConnectionTunnelsOptions() throws Throwable { + UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptionsModel = new UpdateTransitGatewayConnectionTunnelsOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .greTunnelId("testString") + .name("gre2") + .build(); + assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.transitGatewayId(), "testString"); + assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.id(), "testString"); + assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.greTunnelId(), "testString"); + assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.name(), "gre2"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateTransitGatewayConnectionTunnelsOptionsError() throws Throwable { + new UpdateTransitGatewayConnectionTunnelsOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptionsTest.java index 45e134ad4..a5a9b1b63 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptionsTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByNameTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByNameTest.java index fd48aa554..de6a332bf 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByNameTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityTest.java index 54137bc48..92b4757c8 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java new file mode 100644 index 000000000..14b26f3f5 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.networking.transit_gateway_apis.v1.model; + +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReferenceCollection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the ZoneReferenceCollection model. + */ +public class ZoneReferenceCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testZoneReferenceCollection() throws Throwable { + ZoneReferenceCollection zoneReferenceCollectionModel = new ZoneReferenceCollection(); + assertNull(zoneReferenceCollectionModel.getZones()); + } +} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceTest.java index 24c206ee8..703a74fea 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceTest.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/utils/TestUtilities.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/utils/TestUtilities.java index 4a9293d05..e2291b615 100644 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/utils/TestUtilities.java +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at