Skip to content

Commit 8a63609

Browse files
committed
fix: updated for new spec in tgw
1 parent 503714f commit 8a63609

17 files changed

+63
-644
lines changed

modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.90.0-5aad763d-20240506-203857
15+
* IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732
1616
*/
1717

1818
package com.ibm.cloud.networking.transit_gateway_apis.v1;
1919

2020
import com.google.gson.JsonObject;
2121
import com.ibm.cloud.networking.common.SdkCommon;
22+
import com.ibm.cloud.sdk.core.http.RequestBuilder;
23+
import com.ibm.cloud.sdk.core.http.ResponseConverter;
24+
import com.ibm.cloud.sdk.core.http.ServiceCall;
25+
import com.ibm.cloud.sdk.core.security.Authenticator;
26+
import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory;
27+
import com.ibm.cloud.sdk.core.service.BaseService;
28+
import com.ibm.cloud.sdk.core.util.ResponseConverterUtils;
2229
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionActionsOptions;
2330
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionOptions;
2431
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionPrefixFilterOptions;
@@ -45,7 +52,6 @@
4552
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewaysOptions;
4653
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterCollection;
4754
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PrefixFilterCust;
48-
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ReplaceTransitGatewayConnectionPrefixFilterOptions;
4955
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReport;
5056
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RouteReportCollection;
5157
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TSCollection;
@@ -61,13 +67,6 @@
6167
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionPrefixFilterOptions;
6268
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionTunnelsOptions;
6369
import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayOptions;
64-
import com.ibm.cloud.sdk.core.http.RequestBuilder;
65-
import com.ibm.cloud.sdk.core.http.ResponseConverter;
66-
import com.ibm.cloud.sdk.core.http.ServiceCall;
67-
import com.ibm.cloud.sdk.core.security.Authenticator;
68-
import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory;
69-
import com.ibm.cloud.sdk.core.service.BaseService;
70-
import com.ibm.cloud.sdk.core.util.ResponseConverterUtils;
7170
import java.util.HashMap;
7271
import java.util.Map;
7372
import java.util.Map.Entry;
@@ -813,7 +812,9 @@ public ServiceCall<PrefixFilterCollection> listTransitGatewayConnectionPrefixFil
813812
/**
814813
* Add a prefix filter to a Transit Gateway connection.
815814
*
816-
* Add a prefix filter to a Transit Gateway connection.
815+
* Add a Prefix Filter to a Transit Gateway Connection. Prefix Filters can be added to `vpc`, `classic`, `directlink`,
816+
* and `power_virtual_server` Connection types. Prefix Filters cannot be added to `gre_tunnel`, `unbound_gre_tunnel`,
817+
* `redundant_gre` or `vpn_gateway` Connection types.
817818
*
818819
* @param createTransitGatewayConnectionPrefixFilterOptions the {@link CreateTransitGatewayConnectionPrefixFilterOptions} containing the options for the call
819820
* @return a {@link ServiceCall} with a result of type {@link PrefixFilterCust}
@@ -849,35 +850,6 @@ public ServiceCall<PrefixFilterCust> createTransitGatewayConnectionPrefixFilter(
849850
return createServiceCall(builder.build(), responseConverter);
850851
}
851852

852-
/**
853-
* Replaces the prefix filters of the Transit Gateway connection.
854-
*
855-
* Replaces the prefix filters of the Transit Gateway connection.
856-
*
857-
* @param replaceTransitGatewayConnectionPrefixFilterOptions the {@link ReplaceTransitGatewayConnectionPrefixFilterOptions} containing the options for the call
858-
* @return a {@link ServiceCall} with a result of type {@link PrefixFilterCollection}
859-
*/
860-
public ServiceCall<PrefixFilterCollection> replaceTransitGatewayConnectionPrefixFilter(ReplaceTransitGatewayConnectionPrefixFilterOptions replaceTransitGatewayConnectionPrefixFilterOptions) {
861-
com.ibm.cloud.sdk.core.util.Validator.notNull(replaceTransitGatewayConnectionPrefixFilterOptions,
862-
"replaceTransitGatewayConnectionPrefixFilterOptions cannot be null");
863-
Map<String, String> pathParamsMap = new HashMap<String, String>();
864-
pathParamsMap.put("transit_gateway_id", replaceTransitGatewayConnectionPrefixFilterOptions.transitGatewayId());
865-
pathParamsMap.put("id", replaceTransitGatewayConnectionPrefixFilterOptions.id());
866-
RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters", pathParamsMap));
867-
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "replaceTransitGatewayConnectionPrefixFilter");
868-
for (Entry<String, String> header : sdkHeaders.entrySet()) {
869-
builder.header(header.getKey(), header.getValue());
870-
}
871-
builder.header("Accept", "application/json");
872-
builder.query("version", String.valueOf(this.version));
873-
final JsonObject contentJson = new JsonObject();
874-
contentJson.add("prefix_filters", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceTransitGatewayConnectionPrefixFilterOptions.prefixFilters()));
875-
builder.bodyJson(contentJson);
876-
ResponseConverter<PrefixFilterCollection> responseConverter =
877-
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<PrefixFilterCollection>() { }.getType());
878-
return createServiceCall(builder.build(), responseConverter);
879-
}
880-
881853
/**
882854
* Remove prefix filter from Transit Gateway connection.
883855
*

modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayConnectionOptions.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
package com.ibm.cloud.networking.transit_gateway_apis.v1.model;
1515

16-
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1716
import java.util.ArrayList;
1817
import java.util.List;
1918

19+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
2020

2121
/**
2222
* The createTransitGatewayConnection options.
@@ -602,9 +602,9 @@ public String prefixFiltersDefault() {
602602
/**
603603
* Gets the remoteBgpAsn.
604604
*
605-
* Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100,
606-
* 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If `remote_bgp_asn` is omitted on gre_tunnel or
607-
* unbound_gre_tunnel connection create requests IBM will assign an ASN.
605+
* Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100,
606+
* 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 and 4201065000-4201065999. If `remote_bgp_asn` is
607+
* omitted on gre_tunnel or unbound_gre_tunnel connection create requests IBM will assign an ASN.
608608
*
609609
* This field is optional for network type `gre_tunnel` and `unbound_gre_tunnel` connections.
610610
*
@@ -650,8 +650,8 @@ public String remoteTunnelIp() {
650650
/**
651651
* Gets the tunnels.
652652
*
653-
* Array of GRE tunnels for a transit gateway `redundant_gre` and `vpn_gateway` connections. This field is required
654-
* for `redundant_gre` and `vpn_gateway` connections.
653+
* Array of GRE tunnels for a transit gateway `redundant_gre` connections. This field is required for `redundant_gre`
654+
* connections.
655655
*
656656
* @return the tunnels
657657
*/
@@ -665,7 +665,9 @@ public List<TransitGatewayTunnelTemplate> tunnels() {
665665
* Specify the connection's location. The specified availability zone must reside in the gateway's region.
666666
* Use the IBM Cloud global catalog to list zones within the desired region.
667667
*
668-
* This field is required for network type `gre_tunnel`, `unbound_gre_tunnel` and `vpn_gateway` connections.
668+
* This field is required for network type `gre_tunnel`, and `unbound_gre_tunnel` connections.
669+
*
670+
* This field is optional for network type `vpn_gateway` connections.
669671
*
670672
* This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`
671673
* and `redundant_gre` connections.

modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayGreTunnelOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ public ZoneIdentity zone() {
332332
/**
333333
* Gets the remoteBgpAsn.
334334
*
335-
* Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100,
336-
* 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If `remote_bgp_asn` is omitted on create requests, IBM
337-
* will assign an ASN.
335+
* Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100,
336+
* 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 and 4201065000-4201065999 If `remote_bgp_asn` is
337+
* omitted on create requests, IBM will assign an ASN.
338338
*
339339
* @return the remoteBgpAsn
340340
*/

modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ public Boolean global() {
190190
/**
191191
* Gets the greEnhancedRoutePropagation.
192192
*
193-
* Allow GRE Enhanced Route Propagation on this gateway.
193+
* Allow route propagation across all GREs connected to the same transit gateway. This affects connections on the
194+
* gateway of type `redundant_gre`, `unbound_gre_tunnel` and `gre_tunnel`.
194195
*
195196
* @return the greEnhancedRoutePropagation
196197
*/

modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)