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 881b5b4c4..7d9c773d4 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -34,19 +34,17 @@ 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; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListGatewayLocationsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayConnectionPrefixFiltersOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayConnectionsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayGreTunnelOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayRouteReportsOptions; 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; @@ -57,6 +55,8 @@ 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.TransitGatewayTunnel; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnelCollection; 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; @@ -218,6 +218,9 @@ public ServiceCall createTransitGateway(CreateTransitGatewayOpti final JsonObject contentJson = new JsonObject(); contentJson.addProperty("location", createTransitGatewayOptions.location()); contentJson.addProperty("name", createTransitGatewayOptions.name()); + if (createTransitGatewayOptions.allowGreTrafficAcrossZones() != null) { + contentJson.addProperty("allow_gre_traffic_across_zones", createTransitGatewayOptions.allowGreTrafficAcrossZones()); + } if (createTransitGatewayOptions.global() != null) { contentJson.addProperty("global", createTransitGatewayOptions.global()); } @@ -300,6 +303,9 @@ public ServiceCall updateTransitGateway(UpdateTransitGatewayOpti builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); final JsonObject contentJson = new JsonObject(); + if (updateTransitGatewayOptions.allowGreTrafficAcrossZones() != null) { + contentJson.addProperty("allow_gre_traffic_across_zones", updateTransitGatewayOptions.allowGreTrafficAcrossZones()); + } if (updateTransitGatewayOptions.global() != null) { contentJson.addProperty("global", updateTransitGatewayOptions.global()); } @@ -391,7 +397,7 @@ public ServiceCall listTransitGatewayConnect } /** - * Add connection to a Transit Gateway. + * Adds a connection to a Transit Gateway. * * Add a connection to Transit Gateway. * @@ -418,6 +424,9 @@ public ServiceCall createTransitGatewayConnection( if (createTransitGatewayConnectionOptions.baseNetworkType() != null) { contentJson.addProperty("base_network_type", createTransitGatewayConnectionOptions.baseNetworkType()); } + if (createTransitGatewayConnectionOptions.cidr() != null) { + contentJson.addProperty("cidr", createTransitGatewayConnectionOptions.cidr()); + } if (createTransitGatewayConnectionOptions.localGatewayIp() != null) { contentJson.addProperty("local_gateway_ip", createTransitGatewayConnectionOptions.localGatewayIp()); } @@ -461,7 +470,7 @@ public ServiceCall createTransitGatewayConnection( } /** - * Remove connection from Transit Gateway. + * Removes a connection from Transit Gateway. * * After the specified connection is detached, entities still within the Transit Gateway will no longer be able to * communicate directly to it through the IBM Cloud private backbone. @@ -546,7 +555,7 @@ public ServiceCall updateTransitGatewayConnection( } /** - * Perform actions on a connection for a Transit Gateway. + * Performs actions on a connection for a Transit Gateway. * * Allow a network owner to approve or reject a cross-account connection request. * @@ -575,38 +584,38 @@ public ServiceCall createTransitGatewayConnectionActions(CreateTransitGate /** * Retrieves specified Transit Gateway redundant gre connection tunnels. * - * This request retrieves a list of all the tunnels for the redundant gre conneciton. + * This request retrieves a list of all the tunnels for the redundant gre connection. * - * @param getTransitGatewayGreTunnelOptions the {@link GetTransitGatewayGreTunnelOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RedundantGRETunnelCollection} + * @param listTransitGatewayGreTunnelOptions the {@link ListTransitGatewayGreTunnelOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link TransitGatewayTunnelCollection} */ - public ServiceCall getTransitGatewayGreTunnel(GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getTransitGatewayGreTunnelOptions, - "getTransitGatewayGreTunnelOptions cannot be null"); + public ServiceCall listTransitGatewayGreTunnel(ListTransitGatewayGreTunnelOptions listTransitGatewayGreTunnelOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listTransitGatewayGreTunnelOptions, + "listTransitGatewayGreTunnelOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("transit_gateway_id", getTransitGatewayGreTunnelOptions.transitGatewayId()); - pathParamsMap.put("id", getTransitGatewayGreTunnelOptions.id()); + pathParamsMap.put("transit_gateway_id", listTransitGatewayGreTunnelOptions.transitGatewayId()); + pathParamsMap.put("id", listTransitGatewayGreTunnelOptions.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"); + Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "listTransitGatewayGreTunnel"); 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()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create Transit Gateway redundant GRE tunnel. + * Creates a 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} + * @return a {@link ServiceCall} with a result of type {@link TransitGatewayTunnel} */ - public ServiceCall createTransitGatewayGreTunnel(CreateTransitGatewayGreTunnelOptions createTransitGatewayGreTunnelOptions) { + public ServiceCall createTransitGatewayGreTunnel(CreateTransitGatewayGreTunnelOptions createTransitGatewayGreTunnelOptions) { com.ibm.cloud.sdk.core.util.Validator.notNull(createTransitGatewayGreTunnelOptions, "createTransitGatewayGreTunnelOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -630,13 +639,13 @@ public ServiceCall createTransitGatewayGreTunnel(Cr contentJson.addProperty("remote_bgp_asn", createTransitGatewayGreTunnelOptions.remoteBgpAsn()); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete specified Transit Gateway redundant GRE tunnel. + * Deletes a specified Transit Gateway redundant GRE tunnel. * * Remove a tunnel from a redundant GRE connection. * @@ -663,12 +672,12 @@ public ServiceCall deleteTransitGatewayConnectionTunnels(DeleteTransitGate /** * Retrieves specified Transit Gateway connection tunnel. * - * This request retrieves a connection tunnel from the Transit Gateway Connection. + * 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} + * @return a {@link ServiceCall} with a result of type {@link TransitGatewayTunnel} */ - public ServiceCall getTransitGatewayConnectionTunnels(GetTransitGatewayConnectionTunnelsOptions getTransitGatewayConnectionTunnelsOptions) { + public ServiceCall getTransitGatewayConnectionTunnels(GetTransitGatewayConnectionTunnelsOptions getTransitGatewayConnectionTunnelsOptions) { com.ibm.cloud.sdk.core.util.Validator.notNull(getTransitGatewayConnectionTunnelsOptions, "getTransitGatewayConnectionTunnelsOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -682,8 +691,8 @@ public ServiceCall getTransitGatewayConnectionTunne } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } @@ -693,9 +702,9 @@ public ServiceCall getTransitGatewayConnectionTunne * 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} + * @return a {@link ServiceCall} with a result of type {@link TransitGatewayTunnel} */ - public ServiceCall updateTransitGatewayConnectionTunnels(UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptions) { + public ServiceCall updateTransitGatewayConnectionTunnels(UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptions) { com.ibm.cloud.sdk.core.util.Validator.notNull(updateTransitGatewayConnectionTunnelsOptions, "updateTransitGatewayConnectionTunnelsOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -709,18 +718,14 @@ public ServiceCall updateTransitGatewayConnectionTu } 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()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateTransitGatewayConnectionTunnelsOptions.transitGatewayTunnelPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List all locations that support Transit Gateways. + * Lists all locations that support Transit Gateways. * * List all locations that support Transit Gateways. * @@ -741,7 +746,7 @@ public ServiceCall listGatewayLocations(ListGatewayLocationsOption } /** - * List all locations that support Transit Gateways. + * Lists all locations that support Transit Gateways. * * List all locations that support Transit Gateways. * @@ -752,7 +757,7 @@ public ServiceCall listGatewayLocations() { } /** - * Show the details of a given Transit Gateway location. + * Shows the details of a given Transit Gateway location. * * Get the details of a Transit Gateway Location. * @@ -803,9 +808,9 @@ public ServiceCall listTransitGatewayConnectionPrefixFil } /** - * Add a prefix filter to a Transit Gateway Connection. + * Add a prefix filter to a Transit Gateway connection. * - * Add a prefix filter to a Transit Gateway Connection. + * Add a prefix filter to a Transit Gateway connection. * * @param createTransitGatewayConnectionPrefixFilterOptions the {@link CreateTransitGatewayConnectionPrefixFilterOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link PrefixFilterCust} @@ -842,9 +847,9 @@ public ServiceCall createTransitGatewayConnectionPrefixFilter( } /** - * Replaces the prefix filters of the Transit Gateway Connection. + * Replaces the prefix filters of the Transit Gateway connection. * - * Replaces the prefix filters of the Transit Gateway Connection. + * Replaces the prefix filters of the Transit Gateway connection. * * @param replaceTransitGatewayConnectionPrefixFilterOptions the {@link ReplaceTransitGatewayConnectionPrefixFilterOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link PrefixFilterCollection} @@ -871,7 +876,7 @@ public ServiceCall replaceTransitGatewayConnectionPrefix } /** - * Remove prefix filter from Transit Gateway Connection. + * Remove prefix filter from Transit Gateway connection. * * Delete a prefix filter. * @@ -898,7 +903,7 @@ public ServiceCall deleteTransitGatewayConnectionPrefixFilter(DeleteTransi /** * Retrieves specified Transit Gateway connection prefix filter. * - * This request retrieves a prefix filter from the Transit Gateway Connection. + * This request retrieves a prefix filter from the Transit Gateway connection. * * @param getTransitGatewayConnectionPrefixFilterOptions the {@link GetTransitGatewayConnectionPrefixFilterOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link PrefixFilterCust} @@ -967,7 +972,7 @@ public ServiceCall updateTransitGatewayConnectionPrefixFilter( } /** - * List route reports. + * Lists route reports. * * Retrieve all route reports for the specified Transit Gateway. There will normally be at most one completed report * and one pending report. Additionally, completed route reports are written to IBM Cloud Activity Tracker. @@ -993,7 +998,7 @@ public ServiceCall listTransitGatewayRouteReports(ListTra } /** - * Request a route report. + * Requests a route report. * * Request route report generation. While report generation is in progress, additional requests to generate a report * are ignored and return the current pending report. @@ -1019,7 +1024,7 @@ public ServiceCall createTransitGatewayRouteReport(CreateTransitGat } /** - * Delete route report. + * Deletes a route report. * * Delete a route report. * @@ -1043,7 +1048,7 @@ public ServiceCall deleteTransitGatewayRouteReport(DeleteTransitGatewayRou } /** - * Retrieve route report. + * Retrieves a route report. * * Retrieve a route report. * 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 160aca7c4..7886eb7a2 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 3d888b5d0..4ff7cc18b 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 1b8fb74e9..dab866c8c 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -40,13 +40,17 @@ public interface NetworkType { String POWER_VIRTUAL_SERVER = "power_virtual_server"; /** redundant_gre. */ String REDUNDANT_GRE = "redundant_gre"; + /** vmware. */ + String VMWARE = "vmware"; + /** vpn_gateway. */ + String VPN_GATEWAY = "vpn_gateway"; } /** * The type of network the Unbound GRE tunnel is targeting. This field is required for network type - * '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. + * `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`, `vmware`, + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ public interface BaseNetworkType { /** classic. */ @@ -57,8 +61,9 @@ public interface BaseNetworkType { /** * 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', 'unbound_gre_tunnel' and 'redundant_gre' connections. + * optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is + * required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` + * connections. */ public interface PrefixFiltersDefault { /** permit. */ @@ -71,6 +76,7 @@ public interface PrefixFiltersDefault { protected String networkType; protected String baseConnectionId; protected String baseNetworkType; + protected String cidr; protected String localGatewayIp; protected String localTunnelIp; protected String name; @@ -81,7 +87,7 @@ public interface PrefixFiltersDefault { protected Long remoteBgpAsn; protected String remoteGatewayIp; protected String remoteTunnelIp; - protected List tunnels; + protected List tunnels; protected ZoneIdentity zone; /** @@ -92,6 +98,7 @@ public static class Builder { private String networkType; private String baseConnectionId; private String baseNetworkType; + private String cidr; private String localGatewayIp; private String localTunnelIp; private String name; @@ -102,7 +109,7 @@ public static class Builder { private Long remoteBgpAsn; private String remoteGatewayIp; private String remoteTunnelIp; - private List tunnels; + private List tunnels; private ZoneIdentity zone; /** @@ -115,6 +122,7 @@ private Builder(CreateTransitGatewayConnectionOptions createTransitGatewayConnec this.networkType = createTransitGatewayConnectionOptions.networkType; this.baseConnectionId = createTransitGatewayConnectionOptions.baseConnectionId; this.baseNetworkType = createTransitGatewayConnectionOptions.baseNetworkType; + this.cidr = createTransitGatewayConnectionOptions.cidr; this.localGatewayIp = createTransitGatewayConnectionOptions.localGatewayIp; this.localTunnelIp = createTransitGatewayConnectionOptions.localTunnelIp; this.name = createTransitGatewayConnectionOptions.name; @@ -177,11 +185,11 @@ public Builder addPrefixFilters(TransitGatewayConnectionPrefixFilter prefixFilte * @param tunnels the new tunnels * @return the CreateTransitGatewayConnectionOptions builder */ - public Builder addTunnels(TransitGatewayRedundantGRETunnelTemplate tunnels) { + public Builder addTunnels(TransitGatewayTunnelTemplate tunnels) { com.ibm.cloud.sdk.core.util.Validator.notNull(tunnels, "tunnels cannot be null"); if (this.tunnels == null) { - this.tunnels = new ArrayList(); + this.tunnels = new ArrayList(); } this.tunnels.add(tunnels); return this; @@ -233,6 +241,17 @@ public Builder baseNetworkType(String baseNetworkType) { return this; } + /** + * Set the cidr. + * + * @param cidr the cidr + * @return the CreateTransitGatewayConnectionOptions builder + */ + public Builder cidr(String cidr) { + this.cidr = cidr; + return this; + } + /** * Set the localGatewayIp. * @@ -351,7 +370,7 @@ public Builder remoteTunnelIp(String remoteTunnelIp) { * @param tunnels the tunnels * @return the CreateTransitGatewayConnectionOptions builder */ - public Builder tunnels(List tunnels) { + public Builder tunnels(List tunnels) { this.tunnels = tunnels; return this; } @@ -379,6 +398,7 @@ protected CreateTransitGatewayConnectionOptions(Builder builder) { networkType = builder.networkType; baseConnectionId = builder.baseConnectionId; baseNetworkType = builder.baseNetworkType; + cidr = builder.cidr; localGatewayIp = builder.localGatewayIp; localTunnelIp = builder.localTunnelIp; name = builder.name; @@ -427,14 +447,14 @@ public String networkType() { /** * Gets the baseConnectionId. * - * network_type 'gre_tunnel' connections must be created over an existing network_type 'classic' connection. This - * field must specify the ID of an active transit gateway network_type 'classic' connection in the same transit + * network_type `gre_tunnel` connections must be created over an existing network_type `classic` connection. This + * field must specify the ID of an active transit gateway network_type `classic` connection in the same transit * gateway. * - * This field is required for network type 'gre_tunnel' connections. + * 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', 'unbound_gre_tunnel' and 'redundant_gre' connections. + * This field is required to be unspecified for network type `classic`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * * @return the baseConnectionId * @deprecated this method is deprecated and may be removed in a future release @@ -448,9 +468,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' 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. + * `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`, `vmware`, + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. * * @return the baseNetworkType */ @@ -458,12 +478,28 @@ public String baseNetworkType() { return baseNetworkType; } + /** + * Gets the cidr. + * + * network_type 'vpn_gateway' connections use 'cdr' to specify the CIDR to use for the VPN GRE tunnels. + * + * This field is required for network type `vpn_gateway` connections. + * + * This field is required to be unspecified for network type `classic`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `gre_tunnel`, `unbound_gre_tunnel`, and `redundant_gre` connections. + * + * @return the cidr + */ + public String cidr() { + return cidr; + } + /** * 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', - * 'power_virtual_server' and 'redundant_gre' connections. + * 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`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. * * @return the localGatewayIp */ @@ -477,10 +513,10 @@ public String localGatewayIp() { * 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. * - * This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * 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', 'power_virtual_server' - * and 'redundant_gre' connections. + * This field is required to be unspecified for network type `classic`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. * * @return the localTunnelIp */ @@ -491,12 +527,13 @@ public String localTunnelIp() { /** * Gets the name. * - * 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'. + * 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', 'unbound_gre_tunnel' and 'redundant_gre' connections. + * This field is required for network type `power_virtual_server`, `directlink`, `vmware`, `gre_tunnel`, + * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * - * This field is optional for network type 'classic', 'directlink', 'vpc' and 'power_virtual_server' connections. + * This field is optional for network type `classic`, `vpc` connections. * * @return the name */ @@ -508,8 +545,8 @@ public String name() { * Gets the networkAccountId. * * 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' or network_type is 'redundant_gre' and the GRE tunnel is in a different + * different account than the gateway. This field is required for type `unbound_gre_tunnel` when the + * 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 @@ -521,11 +558,12 @@ public String networkAccountId() { /** * Gets the networkId. * - * 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. 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. + * The ID of the network being connected via this connection. For network types `vpc`,`power_virtual_server`, + * `vmware`, `directlink` and `vpn_gateway` this is the CRN of the VPC / PowerVS / VDC / Direct Link / VPN gateway + * respectively. This field is required for network type `vpc`, `power_virtual_server`, `vmware`, `vpn_gateway`, 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 */ @@ -537,11 +575,11 @@ public String networkId() { * Gets the prefixFilters. * * Array of prefix route filters for a transit gateway connection. Prefix filters can be specified for netowrk type - * 'vpc', 'classic', 'power_virtual_server' and 'directlink' connections. They are not allowed for type 'gre_tunnel' + * `vpc`, `classic`, `power_virtual_server` and `directlink` connections. They are not allowed for type `gre_tunnel` * 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', 'unbound_gre_tunnel' and 'redundant_gre' connections. + * 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`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * * @return the prefixFilters */ @@ -553,8 +591,9 @@ public List prefixFilters() { * Gets the prefixFiltersDefault. * * 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', 'unbound_gre_tunnel' and 'redundant_gre' connections. + * optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is + * required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` + * connections. * * @return the prefixFiltersDefault */ @@ -566,13 +605,13 @@ public String prefixFiltersDefault() { * 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 gre_tunnel or + * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If `remote_bgp_asn` is omitted on gre_tunnel or * unbound_gre_tunnel connection create requests IBM will assign an ASN. * - * This field is optional for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * 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', 'power_virtual_server' - * and 'gre_tunnel' connections. + * This field is required to be unspecified for network type `classic`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. * * @return the remoteBgpAsn */ @@ -583,9 +622,9 @@ 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', - * 'power_virtual_server' and 'redundant_gre' connections. + * 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`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. * * @return the remoteGatewayIp */ @@ -599,10 +638,10 @@ public String remoteGatewayIp() { * 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. * - * This field is required for network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * 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', 'power_virtual_server' - * and 'redundant_gre' connections. + * This field is required to be unspecified for network type `classic`, `vmware`, `directlink`, `vpc`, + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. * * @return the remoteTunnelIp */ @@ -614,11 +653,11 @@ public String remoteTunnelIp() { * Gets the tunnels. * * Array of GRE tunnels for a transit gateway redundant GRE tunnel connection. This field is required for - * 'redundant_gre' connections. + * `redundant_gre` connections. * * @return the tunnels */ - public List tunnels() { + public List tunnels() { return tunnels; } @@ -628,10 +667,10 @@ public List tunnels() { * 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. * - * 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 `vpn_gateway` connections. * - * This field is required to be unspecified for network type 'classic', 'directlink', 'vpc', 'power_virtual_server' - * and 'redundant_gre' connections. + * This field is required to be unspecified for network type `classic`, `vmware`, `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 485a69f8b..e4acb4cdc 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -237,10 +237,10 @@ public String action() { /** * Gets the prefix. * - * The IPv4 Prefix to be matched by this filter. If both the 'le' and 'ge' are zero, then this filter will only apply - * to routes that exactly match this prefix, while a non-zero value for either 'le' or 'ge', this filter can apply to + * The IPv4 Prefix to be matched by this filter. If both the `le` and `ge` are zero, then this filter will only apply + * to routes that exactly match this prefix, while a non-zero value for either `le` or `ge`, this filter can apply to * multiple routes with different prefix lengths, but will still only apply to prefixes contained in the address space - * defined by 'prefix'. + * defined by `prefix`. * * @return the prefix */ @@ -268,12 +268,12 @@ public String before() { * Gets the ge. * * Defines the minimum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length greater than or equal to this value. + * within the `prefix` that have a prefix length greater than or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'ge' route matching - * behavior. If the 'le' value is non-zero the the 'ge' value must between the prefix length and the - * 'le' value, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `ge` route matching + * behavior. If the `le` value is non-zero the the `ge` value must between the prefix length and the + * `le` value, inclusive. * * @return the ge */ @@ -285,11 +285,11 @@ public Long ge() { * Gets the le. * * Defines the maximum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length less than or equal to this value. + * within the `prefix` that have a prefix length less than or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'le' route matching - * behavior. If the 'ge' value is non-zero the the 'le' value must between the 'ge' value and 32, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `le` route matching + * behavior. If the `ge` value is non-zero the the `le` value must between the `ge` value and 32, inclusive. * * @return the le */ 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 index dbc0371c4..851da83fb 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -332,7 +332,7 @@ public ZoneIdentity 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 + * 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 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 36f4b09bc..41b9659d5 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -21,6 +21,7 @@ public class CreateTransitGatewayOptions extends GenericModel { protected String location; protected String name; + protected Boolean allowGreTrafficAcrossZones; protected Boolean global; protected ResourceGroupIdentity resourceGroup; @@ -30,6 +31,7 @@ public class CreateTransitGatewayOptions extends GenericModel { public static class Builder { private String location; private String name; + private Boolean allowGreTrafficAcrossZones; private Boolean global; private ResourceGroupIdentity resourceGroup; @@ -41,6 +43,7 @@ public static class Builder { private Builder(CreateTransitGatewayOptions createTransitGatewayOptions) { this.location = createTransitGatewayOptions.location; this.name = createTransitGatewayOptions.name; + this.allowGreTrafficAcrossZones = createTransitGatewayOptions.allowGreTrafficAcrossZones; this.global = createTransitGatewayOptions.global; this.resourceGroup = createTransitGatewayOptions.resourceGroup; } @@ -93,6 +96,17 @@ public Builder name(String name) { return this; } + /** + * Set the allowGreTrafficAcrossZones. + * + * @param allowGreTrafficAcrossZones the allowGreTrafficAcrossZones + * @return the CreateTransitGatewayOptions builder + */ + public Builder allowGreTrafficAcrossZones(Boolean allowGreTrafficAcrossZones) { + this.allowGreTrafficAcrossZones = allowGreTrafficAcrossZones; + return this; + } + /** * Set the global. * @@ -125,6 +139,7 @@ protected CreateTransitGatewayOptions(Builder builder) { "name cannot be null"); location = builder.location; name = builder.name; + allowGreTrafficAcrossZones = builder.allowGreTrafficAcrossZones; global = builder.global; resourceGroup = builder.resourceGroup; } @@ -152,7 +167,7 @@ public String location() { /** * Gets the name. * - * Name Transit Gateway Services. + * A human readable name for the transit gateway. * * @return the name */ @@ -160,6 +175,17 @@ public String name() { return name; } + /** + * Gets the allowGreTrafficAcrossZones. + * + * Allow GRE traffic in this gateway to flow across zones. + * + * @return the allowGreTrafficAcrossZones + */ + public Boolean allowGreTrafficAcrossZones() { + return allowGreTrafficAcrossZones; + } + /** * Gets the global. * 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 4c42a9e27..d98c407b5 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 65430fc66..000ec2027 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 5573949fc..f381108c2 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 index 0fad5ebc8..b37714b2a 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/DeleteTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptions.java index d3b757c29..78975e315 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 82857fa17..c37efb775 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 e29364122..105ab590c 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 1114c2262..5bda17ab8 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 49cc2c0f9..7734e41be 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 index c2f6c202d..b24ac1122 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/GetTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptions.java index 0d38b043a..e95095d6f 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 30f9be424..474814668 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/ListConnectionsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptions.java index 90481896a..5b3bbbce0 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 7877c70b7..4e3d5e5e6 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 43a0a6b39..8d30ae79f 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 4a65bb6fb..3d49b3a89 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/ListTransitGatewayGreTunnelOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayGreTunnelOptions.java new file mode 100644 index 000000000..6d36c6505 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayGreTunnelOptions.java @@ -0,0 +1,133 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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 listTransitGatewayGreTunnel options. + */ +public class ListTransitGatewayGreTunnelOptions 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 ListTransitGatewayGreTunnelOptions instance. + * + * @param listTransitGatewayGreTunnelOptions the instance to initialize the Builder with + */ + private Builder(ListTransitGatewayGreTunnelOptions listTransitGatewayGreTunnelOptions) { + this.transitGatewayId = listTransitGatewayGreTunnelOptions.transitGatewayId; + this.id = listTransitGatewayGreTunnelOptions.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 ListTransitGatewayGreTunnelOptions. + * + * @return the new ListTransitGatewayGreTunnelOptions instance + */ + public ListTransitGatewayGreTunnelOptions build() { + return new ListTransitGatewayGreTunnelOptions(this); + } + + /** + * Set the transitGatewayId. + * + * @param transitGatewayId the transitGatewayId + * @return the ListTransitGatewayGreTunnelOptions builder + */ + public Builder transitGatewayId(String transitGatewayId) { + this.transitGatewayId = transitGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the ListTransitGatewayGreTunnelOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + } + + protected ListTransitGatewayGreTunnelOptions() { } + + protected ListTransitGatewayGreTunnelOptions(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 ListTransitGatewayGreTunnelOptions 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/ListTransitGatewayRouteReportsOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptions.java index 8dc4f1268..998247416 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 bd33fc00e..697e0d076 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 002aacad5..fe2cf73ea 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 2934f74d2..b226a4d19 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 aca2c98ce..eef283086 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 25fc79b1d..99e9fb80e 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 ca0ff6572..ec40180cc 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 00859a7df..e66a52d50 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 0b41bf475..6bdc237b3 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 d3884243c..138f287e0 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -87,12 +87,12 @@ public Date getCreatedAt() { * Gets the ge. * * Defines the minimum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length greater or equal to this value. + * within the `prefix` that have a prefix length greater or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'ge' route matching - * behavior. If the 'le' value is non-zero the the 'ge' value must between the prefix length and the - * 'le' value, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `ge` route matching + * behavior. If the `le` value is non-zero the the `ge` value must between the prefix length and the + * `le` value, inclusive. * * @return the ge */ @@ -115,11 +115,11 @@ public String getId() { * Gets the le. * * Defines the maximum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length less than or equal to this value. + * within the `prefix` that have a prefix length less than or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'le' route matching - * behavior. If the 'ge' value is non-zero the the 'le' value must between the 'ge' value and 32, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `le` route matching + * behavior. If the `ge` value is non-zero the the `le` value must between the `ge` value and 32, inclusive. * * @return the le */ @@ -130,10 +130,10 @@ public Long getLe() { /** * Gets the prefix. * - * The IPv4 Prefix to be matched by this filter. If both the 'le' and 'ge' are zero, then this filter will only apply - * to routes that exactly match this prefix, while a non-zero value for either 'le' or 'ge', this filter can apply to + * The IPv4 Prefix to be matched by this filter. If both the `le` and `ge` are zero, then this filter will only apply + * to routes that exactly match this prefix, while a non-zero value for either `le` or `ge`, this filter can apply to * multiple routes with different prefix lengths, but will still only apply to prefixes contained in the address space - * defined by 'prefix'. + * defined by `prefix`. * * @return the prefix */ 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 da634227a..02eb79fb6 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -163,12 +163,12 @@ public String action() { * Gets the ge. * * Defines the minimum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length greater or equal to this value. + * within the `prefix` that have a prefix length greater or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'ge' route matching - * behavior. If the 'le' value is non-zero the the 'ge' value must between the prefix length and the - * 'le' value, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `ge` route matching + * behavior. If the `le` value is non-zero the the `ge` value must between the prefix length and the + * `le` value, inclusive. * * @return the ge */ @@ -180,11 +180,11 @@ public Long ge() { * Gets the le. * * Defines the maximum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length less than or equal to this value. + * within the `prefix` that have a prefix length less than or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'le' route matching - * behavior. If the 'ge' value is non-zero the the 'le' value must between the 'ge' value and 32, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `le` route matching + * behavior. If the `ge` value is non-zero the the `le` value must between the `ge` value and 32, inclusive. * * @return the le */ @@ -195,10 +195,10 @@ public Long le() { /** * Gets the prefix. * - * The IPv4 Prefix to be matched by this filter. If both the 'le' and 'ge' are zero, then this filter will only apply - * to routes that exactly match this prefix, while a non-zero value for either 'le' or 'ge', this filter can apply to + * The IPv4 Prefix to be matched by this filter. If both the `le` and `ge` are zero, then this filter will only apply + * to routes that exactly match this prefix, while a non-zero value for either `le` or `ge`, this filter can apply to * multiple routes with different prefix lengths, but will still only apply to prefixes contained in the address space - * defined by 'prefix'. + * defined by `prefix`. * * @return the prefix */ 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 114c8319a..ca778bf55 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 68d8476af..faf681866 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 221823c80..73da245fd 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/RouteReport.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReport.java index 9932c5abf..141f495e2 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 d9d7c3bab..25073da7c 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 e844d6dab..643dab3cd 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 5ddd90230..3bc62fcd4 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 a1c899c9c..0b7ab8e0a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 574fa71b4..7774083a6 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 c60da5cca..80e08041a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 4b091587c..2c53cd10d 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 201cb3c7c..7d9085bf4 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 f990fbd04..5431906d9 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,7 +28,7 @@ public class TSLocation extends GenericModel { protected String type; @SerializedName("local_connection_locations") protected List localConnectionLocations; - protected List zones; + protected List zones; protected TSLocation() { } @@ -83,7 +83,7 @@ public List getLocalConnectionLocations() { * * @return the zones */ - public List getZones() { + 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 2a4bc2de4..f84c92b97 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 7281166b2..07787abe9 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -52,12 +52,16 @@ public interface NetworkType { String POWER_VIRTUAL_SERVER = "power_virtual_server"; /** redundant_gre. */ String REDUNDANT_GRE = "redundant_gre"; + /** vmware. */ + String VMWARE = "vmware"; + /** vpn_gateway. */ + String VPN_GATEWAY = "vpn_gateway"; } /** * 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. + * This field does not apply to the `redundant_gre` or `vmware` network types. */ public interface PrefixFiltersDefault { /** permit. */ @@ -145,10 +149,10 @@ public interface Status { protected String status; @SerializedName("transit_gateway") protected TransitGatewayReference transitGateway; - protected List tunnels; + protected List tunnels; @SerializedName("updated_at") protected Date updatedAt; - protected GreTunnelZoneReference zone; + protected ZoneReference zone; protected TransitConnection() { } @@ -177,9 +181,10 @@ 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', '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. + * The ID of the network being connected via this connection. This field is required for some types, such as `vpc`, + * `vmware`, `power_virtual_server`, `directlink`, `vpn_gateway` and `redundant_gre`. For network types `vpc`, + * `redundant_gre`, `power_virtual_server`, `vmware` and `directlink` this is the CRN of the VPC / PowerVS / VDC / + * Direct Link gateway respectively. * * @return the networkId */ @@ -202,7 +207,7 @@ public String getNetworkType() { /** * Gets the id. * - * The unique identifier for this Transit Gateway Connection. + * The unique identifier for this Transit Gateway connection. * * @return the id */ @@ -213,10 +218,10 @@ public String getId() { /** * 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. + * 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 @@ -240,7 +245,7 @@ public Date getCreatedAt() { /** * Gets the localBgpAsn. * - * Local network BGP ASN. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * Local network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * @return the localBgpAsn */ @@ -251,7 +256,7 @@ public Long getLocalBgpAsn() { /** * Gets the localGatewayIp. * - * Local gateway IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Local gateway IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the localGatewayIp @@ -263,7 +268,7 @@ public String getLocalGatewayIp() { /** * Gets the localTunnelIp. * - * Local tunnel IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Local tunnel IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the localTunnelIp @@ -275,7 +280,7 @@ public String getLocalTunnelIp() { /** * Gets the mtu. * - * GRE tunnel MTU. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * GRE tunnel MTU. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * @return the mtu */ @@ -301,7 +306,7 @@ public String getNetworkAccountId() { * 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. + * This field does not apply to the `redundant_gre` or `vmware` network types. * * @return the prefixFilters */ @@ -314,7 +319,7 @@ 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. + * This field does not apply to the `redundant_gre` or `vmware` network types. * * @return the prefixFiltersDefault */ @@ -325,7 +330,7 @@ public String getPrefixFiltersDefault() { /** * Gets the remoteBgpAsn. * - * Remote network BGP ASN. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * Remote network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * @return the remoteBgpAsn */ @@ -336,7 +341,7 @@ public Long getRemoteBgpAsn() { /** * Gets the remoteGatewayIp. * - * Remote gateway IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Remote gateway IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the remoteGatewayIp @@ -348,7 +353,7 @@ public String getRemoteGatewayIp() { /** * Gets the remoteTunnelIp. * - * Remote tunnel IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Remote tunnel IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the remoteTunnelIp @@ -396,11 +401,11 @@ public TransitGatewayReference getTransitGateway() { /** * Gets the tunnels. * - * Collection of all tunnels for 'redundant_gre' connection. + * Collection of all tunnels for `redundant_gre` connection. * * @return the tunnels */ - public List getTunnels() { + public List getTunnels() { return tunnels; } @@ -418,11 +423,11 @@ public Date getUpdatedAt() { /** * Gets the zone. * - * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' connections. + * Availability zone reference. * * @return the zone */ - public GreTunnelZoneReference getZone() { + public ZoneReference 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 ebbb6217a..4c9132584 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 c94e44bd1..73ae5ac3f 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -41,13 +41,19 @@ public interface Status { String SUSPENDED = "suspended"; } - protected String id; - protected String crn; - protected String name; - protected String location; + @SerializedName("allow_gre_traffic_across_zones") + protected Boolean allowGreTrafficAcrossZones; + @SerializedName("connection_count") + protected Long connectionCount; + @SerializedName("connection_needs_attention") + protected Boolean connectionNeedsAttention; @SerializedName("created_at") protected Date createdAt; + protected String crn; protected Boolean global; + protected String id; + protected String location; + protected String name; @SerializedName("resource_group") protected ResourceGroupReference resourceGroup; protected String status; @@ -57,58 +63,58 @@ public interface Status { protected TransitGateway() { } /** - * Gets the id. + * Gets the allowGreTrafficAcrossZones. * - * The unique identifier for this Transit Gateway. + * Allow GRE traffic in this gateway to flow across zones. * - * @return the id + * @return the allowGreTrafficAcrossZones */ - public String getId() { - return id; + public Boolean isAllowGreTrafficAcrossZones() { + return allowGreTrafficAcrossZones; } /** - * Gets the crn. + * Gets the connectionCount. * - * The CRN for this Transit Gateway. + * The number of connections associated with this Transit Gateway. * - * @return the crn + * @return the connectionCount */ - public String getCrn() { - return crn; + public Long getConnectionCount() { + return connectionCount; } /** - * Gets the name. + * Gets the connectionNeedsAttention. * - * A human readable name for the transit gateway. + * Indicates if this Transit Gateway has a connection that needs attention (Such as cross account approval). * - * @return the name + * @return the connectionNeedsAttention */ - public String getName() { - return name; + public Boolean isConnectionNeedsAttention() { + return connectionNeedsAttention; } /** - * Gets the location. + * Gets the createdAt. * - * Location of Transit Gateway Services. + * The date and time that this gateway was created. * - * @return the location + * @return the createdAt */ - public String getLocation() { - return location; + public Date getCreatedAt() { + return createdAt; } /** - * Gets the createdAt. + * Gets the crn. * - * The date and time that this gateway was created. + * Cloud Resource Name of a transit gateway. * - * @return the createdAt + * @return the crn */ - public Date getCreatedAt() { - return createdAt; + public String getCrn() { + return crn; } /** @@ -122,6 +128,39 @@ public Boolean isGlobal() { return global; } + /** + * Gets the id. + * + * A unique identifier for this transit gateway. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the location. + * + * Location of Transit Gateway Services. + * + * @return the location + */ + public String getLocation() { + return location; + } + + /** + * Gets the name. + * + * A human readable name for the transit gateway. + * + * @return the name + */ + public String getName() { + return name; + } + /** * Gets the resourceGroup. * 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 a4845fb1f..83a064324 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 c6b63e608..0c5864a17 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 9fce81dfa..b16d77cc2 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -24,7 +24,10 @@ public class TransitGatewayConnectionCust extends GenericModel { /** - * The type of network the GRE tunnel is targeting. + * The type of network the Unbound GRE tunnel is targeting. This field is required for network type + * `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`, `vmware`, + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ public interface BaseNetworkType { /** classic. */ @@ -34,8 +37,7 @@ public interface BaseNetworkType { } /** - * 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. + * Defines what type of network is connected via this connection. */ public interface NetworkType { /** classic. */ @@ -52,11 +54,15 @@ public interface NetworkType { String POWER_VIRTUAL_SERVER = "power_virtual_server"; /** redundant_gre. */ String REDUNDANT_GRE = "redundant_gre"; + /** vmware. */ + String VMWARE = "vmware"; + /** vpn_gateway. */ + String VPN_GATEWAY = "vpn_gateway"; } /** * 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. + * not apply to the `redundant_gre` network type. */ public interface PrefixFiltersDefault { /** permit. */ @@ -108,18 +114,14 @@ 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("base_network_type") + protected String baseNetworkType; + protected String cidr; @SerializedName("created_at") protected Date createdAt; + protected String id; @SerializedName("local_bgp_asn") protected Long localBgpAsn; @SerializedName("local_gateway_ip") @@ -127,8 +129,13 @@ 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") @@ -142,64 +149,69 @@ public interface Status { @SerializedName("request_status") protected String requestStatus; protected String status; - protected List tunnels; + protected List tunnels; @SerializedName("updated_at") protected Date updatedAt; - protected GreTunnelZoneReference zone; + protected ZoneReference zone; protected TransitGatewayConnectionCust() { } /** - * Gets the baseNetworkType. + * Gets the baseConnectionId. * - * The type of network the GRE tunnel is targeting. + * 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 baseNetworkType + * @return the baseConnectionId + * @deprecated this method is deprecated and may be removed in a future release */ - public String getBaseNetworkType() { - return baseNetworkType; + @Deprecated + public String getBaseConnectionId() { + return baseConnectionId; } /** - * Gets the name. + * Gets the baseNetworkType. * - * The user-defined name for this transit gateway connection. + * The type of network the Unbound GRE tunnel is targeting. This field is required for network type + * `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`, `vmware`, + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. * - * @return the name + * @return the baseNetworkType */ - public String getName() { - return name; + public String getBaseNetworkType() { + return baseNetworkType; } /** - * Gets the networkId. + * Gets the cidr. * - * 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. + * network_type 'vpn_gateway' connections use 'cidr' to specify the CIDR to use for the VPN GRE tunnels. * - * @return the networkId + * @return the cidr */ - public String getNetworkId() { - return networkId; + public String getCidr() { + return cidr; } /** - * Gets the networkType. + * Gets the createdAt. * - * 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. + * The date and time that this connection was created. * - * @return the networkType + * @return the createdAt */ - public String getNetworkType() { - return networkType; + public Date getCreatedAt() { + return createdAt; } /** * Gets the id. * - * The unique identifier for this Transit Gateway Connection. + * The unique identifier for this Transit Gateway connection. * * @return the id */ @@ -207,37 +219,10 @@ 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' - * 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; - } - - /** - * Gets the createdAt. - * - * The date and time that this connection was created. - * - * @return the createdAt - */ - public Date getCreatedAt() { - return createdAt; - } - /** * Gets the localBgpAsn. * - * Local network BGP ASN. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * Local network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * @return the localBgpAsn */ @@ -248,7 +233,7 @@ public Long getLocalBgpAsn() { /** * Gets the localGatewayIp. * - * Local gateway IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Local gateway IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the localGatewayIp @@ -260,7 +245,7 @@ public String getLocalGatewayIp() { /** * Gets the localTunnelIp. * - * Local tunnel IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Local tunnel IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the localTunnelIp @@ -272,7 +257,7 @@ public String getLocalTunnelIp() { /** * Gets the mtu. * - * GRE tunnel MTU. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * GRE tunnel MTU. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * @return the mtu */ @@ -280,6 +265,23 @@ public Long getMtu() { return mtu; } + /** + * Gets the name. + * + * 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 `power_virtual_server`, `directlink`, `vmware`, `gre_tunnel`, + * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. + * + * This field is optional for network type `classic`, `vpc` connections. + * + * @return the name + */ + public String getName() { + return name; + } + /** * Gets the networkAccountId. * @@ -292,12 +294,39 @@ public String getNetworkAccountId() { return networkAccountId; } + /** + * Gets the networkId. + * + * The ID of the network being connected via this connection. For network types `vpc`,`power_virtual_server`, + * `vmware`, `directlink` and `vpn_gateway` this is the CRN of the VPC / PowerVS / VDC / Direct Link / VPN gateway + * respectively. This field is required for network type `vpc`, `power_virtual_server`, `vmware`, `vpn_gateway`, 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 + */ + public String getNetworkId() { + return networkId; + } + + /** + * Gets the networkType. + * + * Defines what type of network is connected via this connection. + * + * @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. + * field does not apply to the `redundant_gre` network type. * * @return the prefixFilters */ @@ -309,7 +338,7 @@ public List getPrefixFilters() { * Gets the prefixFiltersDefault. * * 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. + * not apply to the `redundant_gre` network type. * * @return the prefixFiltersDefault */ @@ -320,7 +349,7 @@ public String getPrefixFiltersDefault() { /** * Gets the remoteBgpAsn. * - * Remote network BGP ASN. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. + * Remote network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * @return the remoteBgpAsn */ @@ -331,7 +360,7 @@ public Long getRemoteBgpAsn() { /** * Gets the remoteGatewayIp. * - * Remote gateway IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Remote gateway IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the remoteGatewayIp @@ -343,7 +372,7 @@ public String getRemoteGatewayIp() { /** * Gets the remoteTunnelIp. * - * Remote tunnel IP address. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' + * Remote tunnel IP address. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. * * @return the remoteTunnelIp @@ -380,11 +409,11 @@ public String getStatus() { /** * Gets the tunnels. * - * Collection of all tunnels for 'redundant_gre' connection. + * Collection of all tunnels for `redundant_gre` connection. * * @return the tunnels */ - public List getTunnels() { + public List getTunnels() { return tunnels; } @@ -402,11 +431,11 @@ public Date getUpdatedAt() { /** * Gets the zone. * - * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' connections. + * Location of GRE tunnel. This field only applies to network type `gre_tunnel` connections. * * @return the zone */ - public GreTunnelZoneReference getZone() { + public ZoneReference 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 a246985f3..b982a5cfb 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 6cc2f1675..40ad3144a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 74ffcb77c..b0c931b52 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/TransitGatewayReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReference.java index 212847024..dc2db214b 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/TransitGatewayTunnel.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnel.java new file mode 100644 index 000000000..dd4ddc8b7 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnel.java @@ -0,0 +1,270 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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 TransitGatewayTunnel 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 ZoneReference zone; + + protected TransitGatewayTunnel() { } + + /** + * 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. + * + * Availability zone reference. + * + * @return the zone + */ + public ZoneReference getZone() { + return zone; + } +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelCollection.java new file mode 100644 index 000000000..5aa5b6ba1 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelCollection.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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 TransitGatewayTunnelCollection extends GenericModel { + + protected List tunnels; + + protected TransitGatewayTunnelCollection() { } + + /** + * 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/TransitGatewayTunnelPatch.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelPatch.java new file mode 100644 index 000000000..9cf288098 --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelPatch.java @@ -0,0 +1,108 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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.Map; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import com.ibm.cloud.sdk.core.util.GsonSingleton; + +/** + * An update template for a Transit Gateway connection tunnel. + */ +public class TransitGatewayTunnelPatch extends GenericModel { + + protected String name; + + /** + * Builder. + */ + public static class Builder { + private String name; + + /** + * Instantiates a new Builder from an existing TransitGatewayTunnelPatch instance. + * + * @param transitGatewayTunnelPatch the instance to initialize the Builder with + */ + private Builder(TransitGatewayTunnelPatch transitGatewayTunnelPatch) { + this.name = transitGatewayTunnelPatch.name; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a TransitGatewayTunnelPatch. + * + * @return the new TransitGatewayTunnelPatch instance + */ + public TransitGatewayTunnelPatch build() { + return new TransitGatewayTunnelPatch(this); + } + + /** + * Set the name. + * + * @param name the name + * @return the TransitGatewayTunnelPatch builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + } + + protected TransitGatewayTunnelPatch() { } + + protected TransitGatewayTunnelPatch(Builder builder) { + name = builder.name; + } + + /** + * New builder. + * + * @return a TransitGatewayTunnelPatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the name. + * + * The user-defined name for this connection tunnel. + * + * @return the name + */ + public String name() { + return name; + } + + /** + * Construct a JSON merge-patch from the TransitGatewayTunnelPatch. + * + * Note that properties of the TransitGatewayTunnelPatch with null values are not represented in the constructed + * JSON merge-patch object, but can be explicitly set afterward to signify a property delete. + * + * @return a JSON merge-patch for the TransitGatewayTunnelPatch + */ + public Map asPatch() { + return GsonSingleton.getGson().fromJson(this.toString(), Map.class); + } + +} + diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTemplate.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTemplate.java new file mode 100644 index 000000000..a9fed119f --- /dev/null +++ b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTemplate.java @@ -0,0 +1,290 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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 TransitGatewayTunnelTemplate 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 TransitGatewayTunnelTemplate instance. + * + * @param transitGatewayTunnelTemplate the instance to initialize the Builder with + */ + private Builder(TransitGatewayTunnelTemplate transitGatewayTunnelTemplate) { + this.localGatewayIp = transitGatewayTunnelTemplate.localGatewayIp; + this.localTunnelIp = transitGatewayTunnelTemplate.localTunnelIp; + this.name = transitGatewayTunnelTemplate.name; + this.remoteBgpAsn = transitGatewayTunnelTemplate.remoteBgpAsn; + this.remoteGatewayIp = transitGatewayTunnelTemplate.remoteGatewayIp; + this.remoteTunnelIp = transitGatewayTunnelTemplate.remoteTunnelIp; + this.zone = transitGatewayTunnelTemplate.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 TransitGatewayTunnelTemplate. + * + * @return the new TransitGatewayTunnelTemplate instance + */ + public TransitGatewayTunnelTemplate build() { + return new TransitGatewayTunnelTemplate(this); + } + + /** + * Set the localGatewayIp. + * + * @param localGatewayIp the localGatewayIp + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder localGatewayIp(String localGatewayIp) { + this.localGatewayIp = localGatewayIp; + return this; + } + + /** + * Set the localTunnelIp. + * + * @param localTunnelIp the localTunnelIp + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder localTunnelIp(String localTunnelIp) { + this.localTunnelIp = localTunnelIp; + return this; + } + + /** + * Set the name. + * + * @param name the name + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Set the remoteBgpAsn. + * + * @param remoteBgpAsn the remoteBgpAsn + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder remoteBgpAsn(long remoteBgpAsn) { + this.remoteBgpAsn = remoteBgpAsn; + return this; + } + + /** + * Set the remoteGatewayIp. + * + * @param remoteGatewayIp the remoteGatewayIp + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder remoteGatewayIp(String remoteGatewayIp) { + this.remoteGatewayIp = remoteGatewayIp; + return this; + } + + /** + * Set the remoteTunnelIp. + * + * @param remoteTunnelIp the remoteTunnelIp + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder remoteTunnelIp(String remoteTunnelIp) { + this.remoteTunnelIp = remoteTunnelIp; + return this; + } + + /** + * Set the zone. + * + * @param zone the zone + * @return the TransitGatewayTunnelTemplate builder + */ + public Builder zone(ZoneIdentity zone) { + this.zone = zone; + return this; + } + } + + protected TransitGatewayTunnelTemplate() { } + + protected TransitGatewayTunnelTemplate(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 TransitGatewayTunnelTemplate 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/TransitGatewaysPager.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewaysPager.java index 7ffd58342..76fcfee2c 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 6f0fff984..4ab29275f 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -174,8 +174,8 @@ public String id() { * Gets the name. * * The user-defined name for this transit gateway. If specified as empty string or nil, the name will be the network - * name (the name of the VPC in the case of network type 'vpc', and the word Classic, in the case of network type - * 'classic'). + * name (the name of the VPC in the case of network type `vpc`, and the word Classic, in the case of network type + * `classic`). * * @return the name */ 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 e6e6f77da..2ae419953 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -276,12 +276,12 @@ public String before() { * Gets the ge. * * Defines the minimum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length greater or equal to this value. + * within the `prefix` that have a prefix length greater or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'ge' route matching - * behavior. If the 'le' value is non-zero the the 'ge' value must between the prefix length and the - * 'le' value, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `ge` route matching + * behavior. If the `le` value is non-zero the the `ge` value must between the prefix length and the + * `le` value, inclusive. * * @return the ge */ @@ -293,11 +293,11 @@ public Long ge() { * Gets the le. * * Defines the maximum matched prefix precision. If this field is non-zero then the filter will match all routes - * within the 'prefix' that have a prefix length less than or equal to this value. + * within the `prefix` that have a prefix length less than or equal to this value. * * This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - * or less then or equal to 32. If this value is set to zero, the filter will not use the 'le' route matching - * behavior. If the 'ge' value is non-zero the the 'le' value must between the 'ge' value and 32, inclusive. + * or less then or equal to 32. If this value is set to zero, the filter will not use the `le` route matching + * behavior. If the `ge` value is non-zero the the `le` value must between the `ge` value and 32, inclusive. * * @return the le */ 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 index 893a5b471..13491e730 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -12,6 +12,8 @@ */ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; +import java.util.Map; + import com.ibm.cloud.sdk.core.service.model.GenericModel; /** @@ -22,7 +24,7 @@ public class UpdateTransitGatewayConnectionTunnelsOptions extends GenericModel { protected String transitGatewayId; protected String id; protected String greTunnelId; - protected String name; + protected Map transitGatewayTunnelPatch; /** * Builder. @@ -31,7 +33,7 @@ public static class Builder { private String transitGatewayId; private String id; private String greTunnelId; - private String name; + private Map transitGatewayTunnelPatch; /** * Instantiates a new Builder from an existing UpdateTransitGatewayConnectionTunnelsOptions instance. @@ -42,7 +44,7 @@ private Builder(UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewa this.transitGatewayId = updateTransitGatewayConnectionTunnelsOptions.transitGatewayId; this.id = updateTransitGatewayConnectionTunnelsOptions.id; this.greTunnelId = updateTransitGatewayConnectionTunnelsOptions.greTunnelId; - this.name = updateTransitGatewayConnectionTunnelsOptions.name; + this.transitGatewayTunnelPatch = updateTransitGatewayConnectionTunnelsOptions.transitGatewayTunnelPatch; } /** @@ -57,11 +59,13 @@ public Builder() { * @param transitGatewayId the transitGatewayId * @param id the id * @param greTunnelId the greTunnelId + * @param transitGatewayTunnelPatch the transitGatewayTunnelPatch */ - public Builder(String transitGatewayId, String id, String greTunnelId) { + public Builder(String transitGatewayId, String id, String greTunnelId, Map transitGatewayTunnelPatch) { this.transitGatewayId = transitGatewayId; this.id = id; this.greTunnelId = greTunnelId; + this.transitGatewayTunnelPatch = transitGatewayTunnelPatch; } /** @@ -107,13 +111,13 @@ public Builder greTunnelId(String greTunnelId) { } /** - * Set the name. + * Set the transitGatewayTunnelPatch. * - * @param name the name + * @param transitGatewayTunnelPatch the transitGatewayTunnelPatch * @return the UpdateTransitGatewayConnectionTunnelsOptions builder */ - public Builder name(String name) { - this.name = name; + public Builder transitGatewayTunnelPatch(Map transitGatewayTunnelPatch) { + this.transitGatewayTunnelPatch = transitGatewayTunnelPatch; return this; } } @@ -127,10 +131,12 @@ protected UpdateTransitGatewayConnectionTunnelsOptions(Builder builder) { "id cannot be empty"); com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.greTunnelId, "greTunnelId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.transitGatewayTunnelPatch, + "transitGatewayTunnelPatch cannot be null"); transitGatewayId = builder.transitGatewayId; id = builder.id; greTunnelId = builder.greTunnelId; - name = builder.name; + transitGatewayTunnelPatch = builder.transitGatewayTunnelPatch; } /** @@ -176,14 +182,14 @@ public String greTunnelId() { } /** - * Gets the name. + * Gets the transitGatewayTunnelPatch. * - * The user-defined name for this connection tunnel. + * The update connection tunnel template. * - * @return the name + * @return the transitGatewayTunnelPatch */ - public String name() { - return name; + public Map transitGatewayTunnelPatch() { + return transitGatewayTunnelPatch; } } 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 95883cf07..ee5d8b825 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,6 +20,7 @@ public class UpdateTransitGatewayOptions extends GenericModel { protected String id; + protected Boolean allowGreTrafficAcrossZones; protected Boolean global; protected String name; @@ -28,6 +29,7 @@ public class UpdateTransitGatewayOptions extends GenericModel { */ public static class Builder { private String id; + private Boolean allowGreTrafficAcrossZones; private Boolean global; private String name; @@ -38,6 +40,7 @@ public static class Builder { */ private Builder(UpdateTransitGatewayOptions updateTransitGatewayOptions) { this.id = updateTransitGatewayOptions.id; + this.allowGreTrafficAcrossZones = updateTransitGatewayOptions.allowGreTrafficAcrossZones; this.global = updateTransitGatewayOptions.global; this.name = updateTransitGatewayOptions.name; } @@ -77,6 +80,17 @@ public Builder id(String id) { return this; } + /** + * Set the allowGreTrafficAcrossZones. + * + * @param allowGreTrafficAcrossZones the allowGreTrafficAcrossZones + * @return the UpdateTransitGatewayOptions builder + */ + public Builder allowGreTrafficAcrossZones(Boolean allowGreTrafficAcrossZones) { + this.allowGreTrafficAcrossZones = allowGreTrafficAcrossZones; + return this; + } + /** * Set the global. * @@ -106,6 +120,7 @@ protected UpdateTransitGatewayOptions(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, "id cannot be empty"); id = builder.id; + allowGreTrafficAcrossZones = builder.allowGreTrafficAcrossZones; global = builder.global; name = builder.name; } @@ -130,6 +145,17 @@ public String id() { return id; } + /** + * Gets the allowGreTrafficAcrossZones. + * + * Allow GRE traffic in this gateway to flow across zones. + * + * @return the allowGreTrafficAcrossZones + */ + public Boolean allowGreTrafficAcrossZones() { + return allowGreTrafficAcrossZones; + } + /** * Gets the global. * @@ -144,7 +170,7 @@ public Boolean global() { /** * Gets the name. * - * The user-defined name for this transit gateway. + * A human readable name for a resource. * * @return the name */ 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 f87c62b0c..692abdbbc 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 32c4bdad1..7f80ec135 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 5ee46d099..e055c392c 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/package-info.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/package-info.java index 018b49aa3..d04f42cf0 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 11ed962d4..298047603 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,14 +29,13 @@ 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; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayConnectionsOptions; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayGreTunnelOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewayRouteReportsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ListTransitGatewaysOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PaginationFirstConnection; @@ -48,12 +47,9 @@ 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; @@ -74,9 +70,11 @@ 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.TransitGatewayTunnel; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnelCollection; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnelPatch; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnelTemplate; 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; @@ -85,7 +83,6 @@ 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; @@ -137,7 +134,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\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"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\": [{\"allow_gre_traffic_across_zones\": true, \"connection_count\": 5, \"connection_needs_attention\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"global\": true, \"id\": \"0a06fb9b-820f-4c44-8a31-77f1f0806d28\", \"location\": \"us-south\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"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") @@ -185,8 +182,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\":{\"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}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"transit_gateways\":[{\"allow_gre_traffic_across_zones\":true,\"connection_count\":5,\"connection_needs_attention\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"global\":true,\"id\":\"0a06fb9b-820f-4c44-8a31-77f1f0806d28\",\"location\":\"us-south\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"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\":[{\"allow_gre_traffic_across_zones\":true,\"connection_count\":5,\"connection_needs_attention\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"global\":true,\"id\":\"0a06fb9b-820f-4c44-8a31-77f1f0806d28\",\"location\":\"us-south\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"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) @@ -218,8 +215,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\":{\"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}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"transit_gateways\":[{\"allow_gre_traffic_across_zones\":true,\"connection_count\":5,\"connection_needs_attention\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"global\":true,\"id\":\"0a06fb9b-820f-4c44-8a31-77f1f0806d28\",\"location\":\"us-south\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"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\":[{\"allow_gre_traffic_across_zones\":true,\"connection_count\":5,\"connection_needs_attention\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"global\":true,\"id\":\"0a06fb9b-820f-4c44-8a31-77f1f0806d28\",\"location\":\"us-south\",\"name\":\"my-transit-gateway-in-TransitGateway\",\"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) @@ -247,7 +244,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\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String mockResponseBody = "{\"allow_gre_traffic_across_zones\": true, \"connection_count\": 5, \"connection_needs_attention\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"global\": true, \"id\": \"0a06fb9b-820f-4c44-8a31-77f1f0806d28\", \"location\": \"us-south\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"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") @@ -262,7 +259,8 @@ public void testCreateTransitGatewayWOptions() throws Throwable { // Construct an instance of the CreateTransitGatewayOptions model CreateTransitGatewayOptions createTransitGatewayOptionsModel = new CreateTransitGatewayOptions.Builder() .location("us-south") - .name("Transit_Service_BWTN_SJ_DL") + .name("my-transit-gateway-in-TransitGateway") + .allowGreTrafficAcrossZones(true) .global(true) .resourceGroup(resourceGroupIdentityModel) .build(); @@ -358,7 +356,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\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String mockResponseBody = "{\"allow_gre_traffic_across_zones\": true, \"connection_count\": 5, \"connection_needs_attention\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"global\": true, \"id\": \"0a06fb9b-820f-4c44-8a31-77f1f0806d28\", \"location\": \"us-south\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"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") @@ -410,7 +408,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\": {\"href\": \"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8\", \"id\": \"56969d6043e9465c883cb9f7363e78e8\"}, \"status\": \"available\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String mockResponseBody = "{\"allow_gre_traffic_across_zones\": true, \"connection_count\": 5, \"connection_needs_attention\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"global\": true, \"id\": \"0a06fb9b-820f-4c44-8a31-77f1f0806d28\", \"location\": \"us-south\", \"name\": \"my-transit-gateway-in-TransitGateway\", \"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") @@ -420,8 +418,9 @@ public void testUpdateTransitGatewayWOptions() throws Throwable { // Construct an instance of the UpdateTransitGatewayOptions model UpdateTransitGatewayOptions updateTransitGatewayOptionsModel = new UpdateTransitGatewayOptions.Builder() .id("testString") + .allowGreTrafficAcrossZones(true) .global(true) - .name("my-transit-gateway") + .name("my-resource") .build(); // Invoke updateTransitGateway() with a valid options model and verify the result @@ -464,7 +463,7 @@ public void testUpdateTransitGatewayNoOptions() throws Throwable { @Test public void testListConnectionsWOptions() 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\": \"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 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\": [{\"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\"}}], \"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") @@ -514,8 +513,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_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\"}}]}"; + 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\":[{\"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\"}}],\"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\":[{\"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\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -548,8 +547,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_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\"}}]}"; + 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\":[{\"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\"}}],\"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\":[{\"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\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -578,7 +577,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\": \"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 mockResponseBody = "{\"connections\": [{\"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"base_network_type\": \"classic\", \"cidr\": \"192.168.0.0/24\", \"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_BWTN_SJ_DL\", \"network_account_id\": \"networkAccountId\", \"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\", \"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\"}}], \"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") @@ -636,8 +635,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\":\"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\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"base_network_type\":\"classic\",\"cidr\":\"192.168.0.0/24\",\"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_BWTN_SJ_DL\",\"network_account_id\":\"networkAccountId\",\"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\",\"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\"}}],\"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\",\"base_network_type\":\"classic\",\"cidr\":\"192.168.0.0/24\",\"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_BWTN_SJ_DL\",\"network_account_id\":\"networkAccountId\",\"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\",\"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\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -671,8 +670,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\":\"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\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"start\":\"1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"base_connection_id\":\"975f58c1-afe7-469a-9727-7f3d720f2d32\",\"base_network_type\":\"classic\",\"cidr\":\"192.168.0.0/24\",\"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_BWTN_SJ_DL\",\"network_account_id\":\"networkAccountId\",\"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\",\"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\"}}],\"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\",\"base_network_type\":\"classic\",\"cidr\":\"192.168.0.0/24\",\"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_BWTN_SJ_DL\",\"network_account_id\":\"networkAccountId\",\"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\",\"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\"}}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -702,7 +701,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\": \"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 mockResponseBody = "{\"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"base_network_type\": \"classic\", \"cidr\": \"192.168.0.0/24\", \"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_BWTN_SJ_DL\", \"network_account_id\": \"networkAccountId\", \"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\", \"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\"}}], \"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") @@ -722,8 +721,8 @@ public void testCreateTransitGatewayConnectionWOptions() throws Throwable { .name("us-south-1") .build(); - // Construct an instance of the TransitGatewayRedundantGRETunnelTemplate model - TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModel = new TransitGatewayRedundantGRETunnelTemplate.Builder() + // Construct an instance of the TransitGatewayTunnelTemplate model + TransitGatewayTunnelTemplate transitGatewayTunnelTemplateModel = new TransitGatewayTunnelTemplate.Builder() .localGatewayIp("10.242.63.12") .localTunnelIp("192.168.100.20") .name("gre1") @@ -739,6 +738,7 @@ public void testCreateTransitGatewayConnectionWOptions() throws Throwable { .networkType("vpc") .baseConnectionId("975f58c1-afe7-469a-9727-7f3d720f2d32") .baseNetworkType("classic") + .cidr("192.168.0.0/24") .localGatewayIp("192.168.100.1") .localTunnelIp("192.168.129.2") .name("Transit_Service_BWTN_SJ_DL") @@ -749,7 +749,7 @@ public void testCreateTransitGatewayConnectionWOptions() throws Throwable { .remoteBgpAsn(Long.valueOf("65010")) .remoteGatewayIp("10.242.63.12") .remoteTunnelIp("192.168.129.1") - .tunnels(java.util.Arrays.asList(transitGatewayRedundantGreTunnelTemplateModel)) + .tunnels(java.util.Arrays.asList(transitGatewayTunnelTemplateModel)) .zone(zoneIdentityModel) .build(); @@ -845,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\": \"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 mockResponseBody = "{\"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"base_network_type\": \"classic\", \"cidr\": \"192.168.0.0/24\", \"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_BWTN_SJ_DL\", \"network_account_id\": \"networkAccountId\", \"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\", \"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\"}}], \"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") @@ -898,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\": \"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 mockResponseBody = "{\"base_connection_id\": \"975f58c1-afe7-469a-9727-7f3d720f2d32\", \"base_network_type\": \"classic\", \"cidr\": \"192.168.0.0/24\", \"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_BWTN_SJ_DL\", \"network_account_id\": \"networkAccountId\", \"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\", \"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\"}}], \"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") @@ -1002,27 +1002,27 @@ public void testCreateTransitGatewayConnectionActionsNoOptions() throws Throwabl transitGatewayApisService.createTransitGatewayConnectionActions(null).execute(); } - // Test the getTransitGatewayGreTunnel operation with a valid options model parameter + // Test the listTransitGatewayGreTunnel operation with a valid options model parameter @Test - public void testGetTransitGatewayGreTunnelWOptions() throws Throwable { + public void testListTransitGatewayGreTunnelWOptions() 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"; + String listTransitGatewayGreTunnelPath = "/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() + // Construct an instance of the ListTransitGatewayGreTunnelOptions model + ListTransitGatewayGreTunnelOptions listTransitGatewayGreTunnelOptionsModel = new ListTransitGatewayGreTunnelOptions.Builder() .transitGatewayId("testString") .id("testString") .build(); - // Invoke getTransitGatewayGreTunnel() with a valid options model and verify the result - Response response = transitGatewayApisService.getTransitGatewayGreTunnel(getTransitGatewayGreTunnelOptionsModel).execute(); + // Invoke listTransitGatewayGreTunnel() with a valid options model and verify the result + Response response = transitGatewayApisService.listTransitGatewayGreTunnel(listTransitGatewayGreTunnelOptionsModel).execute(); assertNotNull(response); - RedundantGRETunnelCollection responseObj = response.getResult(); + TransitGatewayTunnelCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -1031,28 +1031,28 @@ public void testGetTransitGatewayGreTunnelWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getTransitGatewayGreTunnelPath); + assertEquals(parsedPath, listTransitGatewayGreTunnelPath); // 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 the listTransitGatewayGreTunnel operation with and without retries enabled @Test - public void testGetTransitGatewayGreTunnelWRetries() throws Throwable { + public void testListTransitGatewayGreTunnelWRetries() throws Throwable { transitGatewayApisService.enableRetries(4, 30); - testGetTransitGatewayGreTunnelWOptions(); + testListTransitGatewayGreTunnelWOptions(); transitGatewayApisService.disableRetries(); - testGetTransitGatewayGreTunnelWOptions(); + testListTransitGatewayGreTunnelWOptions(); } - // Test the getTransitGatewayGreTunnel operation with a null options model (negative test) + // Test the listTransitGatewayGreTunnel operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTransitGatewayGreTunnelNoOptions() throws Throwable { + public void testListTransitGatewayGreTunnelNoOptions() throws Throwable { server.enqueue(new MockResponse()); - transitGatewayApisService.getTransitGatewayGreTunnel(null).execute(); + transitGatewayApisService.listTransitGatewayGreTunnel(null).execute(); } // Test the createTransitGatewayGreTunnel operation with a valid options model parameter @@ -1085,9 +1085,9 @@ public void testCreateTransitGatewayGreTunnelWOptions() throws Throwable { .build(); // Invoke createTransitGatewayGreTunnel() with a valid options model and verify the result - Response response = transitGatewayApisService.createTransitGatewayGreTunnel(createTransitGatewayGreTunnelOptionsModel).execute(); + Response response = transitGatewayApisService.createTransitGatewayGreTunnel(createTransitGatewayGreTunnelOptionsModel).execute(); assertNotNull(response); - RedundantGRETunnelReference responseObj = response.getResult(); + TransitGatewayTunnel responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -1192,9 +1192,9 @@ public void testGetTransitGatewayConnectionTunnelsWOptions() throws Throwable { .build(); // Invoke getTransitGatewayConnectionTunnels() with a valid options model and verify the result - Response response = transitGatewayApisService.getTransitGatewayConnectionTunnels(getTransitGatewayConnectionTunnelsOptionsModel).execute(); + Response response = transitGatewayApisService.getTransitGatewayConnectionTunnels(getTransitGatewayConnectionTunnelsOptionsModel).execute(); assertNotNull(response); - RedundantGRETunnelReference responseObj = response.getResult(); + TransitGatewayTunnel responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -1238,18 +1238,24 @@ public void testUpdateTransitGatewayConnectionTunnelsWOptions() throws Throwable .setResponseCode(200) .setBody(mockResponseBody)); + // Construct an instance of the TransitGatewayTunnelPatch model + TransitGatewayTunnelPatch transitGatewayTunnelPatchModel = new TransitGatewayTunnelPatch.Builder() + .name("gre2") + .build(); + Map transitGatewayTunnelPatchModelAsPatch = transitGatewayTunnelPatchModel.asPatch(); + // Construct an instance of the UpdateTransitGatewayConnectionTunnelsOptions model UpdateTransitGatewayConnectionTunnelsOptions updateTransitGatewayConnectionTunnelsOptionsModel = new UpdateTransitGatewayConnectionTunnelsOptions.Builder() .transitGatewayId("testString") .id("testString") .greTunnelId("testString") - .name("gre2") + .transitGatewayTunnelPatch(transitGatewayTunnelPatchModelAsPatch) .build(); // Invoke updateTransitGatewayConnectionTunnels() with a valid options model and verify the result - Response response = transitGatewayApisService.updateTransitGatewayConnectionTunnels(updateTransitGatewayConnectionTunnelsOptionsModel).execute(); + Response response = transitGatewayApisService.updateTransitGatewayConnectionTunnels(updateTransitGatewayConnectionTunnelsOptionsModel).execute(); assertNotNull(response); - RedundantGRETunnelReference responseObj = response.getResult(); + TransitGatewayTunnel responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -1329,7 +1335,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\"}], \"zones\": [{\"zones\": [{\"name\": \"us-south-1\"}]}]}"; + 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\": [{\"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 81df35b50..bc05af4ef 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 d2c3d00a2..d0aab4171 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,7 +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.TransitGatewayTunnelTemplate; 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; @@ -50,7 +50,7 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { .build(); assertEquals(zoneIdentityModel.name(), "us-south-1"); - TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModel = new TransitGatewayRedundantGRETunnelTemplate.Builder() + TransitGatewayTunnelTemplate transitGatewayTunnelTemplateModel = new TransitGatewayTunnelTemplate.Builder() .localGatewayIp("10.242.63.12") .localTunnelIp("192.168.100.20") .name("gre1") @@ -59,19 +59,20 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { .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); + assertEquals(transitGatewayTunnelTemplateModel.localGatewayIp(), "10.242.63.12"); + assertEquals(transitGatewayTunnelTemplateModel.localTunnelIp(), "192.168.100.20"); + assertEquals(transitGatewayTunnelTemplateModel.name(), "gre1"); + assertEquals(transitGatewayTunnelTemplateModel.remoteBgpAsn(), Long.valueOf("65010")); + assertEquals(transitGatewayTunnelTemplateModel.remoteGatewayIp(), "10.242.33.22"); + assertEquals(transitGatewayTunnelTemplateModel.remoteTunnelIp(), "192.168.129.1"); + assertEquals(transitGatewayTunnelTemplateModel.zone(), zoneIdentityModel); CreateTransitGatewayConnectionOptions createTransitGatewayConnectionOptionsModel = new CreateTransitGatewayConnectionOptions.Builder() .transitGatewayId("testString") .networkType("vpc") .baseConnectionId("975f58c1-afe7-469a-9727-7f3d720f2d32") .baseNetworkType("classic") + .cidr("192.168.0.0/24") .localGatewayIp("192.168.100.1") .localTunnelIp("192.168.129.2") .name("Transit_Service_BWTN_SJ_DL") @@ -82,13 +83,14 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { .remoteBgpAsn(Long.valueOf("65010")) .remoteGatewayIp("10.242.63.12") .remoteTunnelIp("192.168.129.1") - .tunnels(java.util.Arrays.asList(transitGatewayRedundantGreTunnelTemplateModel)) + .tunnels(java.util.Arrays.asList(transitGatewayTunnelTemplateModel)) .zone(zoneIdentityModel) .build(); assertEquals(createTransitGatewayConnectionOptionsModel.transitGatewayId(), "testString"); assertEquals(createTransitGatewayConnectionOptionsModel.networkType(), "vpc"); assertEquals(createTransitGatewayConnectionOptionsModel.baseConnectionId(), "975f58c1-afe7-469a-9727-7f3d720f2d32"); assertEquals(createTransitGatewayConnectionOptionsModel.baseNetworkType(), "classic"); + assertEquals(createTransitGatewayConnectionOptionsModel.cidr(), "192.168.0.0/24"); assertEquals(createTransitGatewayConnectionOptionsModel.localGatewayIp(), "192.168.100.1"); assertEquals(createTransitGatewayConnectionOptionsModel.localTunnelIp(), "192.168.129.2"); assertEquals(createTransitGatewayConnectionOptionsModel.name(), "Transit_Service_BWTN_SJ_DL"); @@ -99,7 +101,7 @@ public void testCreateTransitGatewayConnectionOptions() throws Throwable { 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.tunnels(), java.util.Arrays.asList(transitGatewayTunnelTemplateModel)); 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 53b73647f..b0524eb53 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 index 02ae58db0..810e482a0 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/CreateTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/CreateTransitGatewayOptionsTest.java index 744e579d2..f2bece386 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -39,12 +39,14 @@ public void testCreateTransitGatewayOptions() throws Throwable { CreateTransitGatewayOptions createTransitGatewayOptionsModel = new CreateTransitGatewayOptions.Builder() .location("us-south") - .name("Transit_Service_BWTN_SJ_DL") + .name("my-transit-gateway-in-TransitGateway") + .allowGreTrafficAcrossZones(true) .global(true) .resourceGroup(resourceGroupIdentityModel) .build(); assertEquals(createTransitGatewayOptionsModel.location(), "us-south"); - assertEquals(createTransitGatewayOptionsModel.name(), "Transit_Service_BWTN_SJ_DL"); + assertEquals(createTransitGatewayOptionsModel.name(), "my-transit-gateway-in-TransitGateway"); + assertEquals(createTransitGatewayOptionsModel.allowGreTrafficAcrossZones(), Boolean.valueOf(true)); assertEquals(createTransitGatewayOptionsModel.global(), Boolean.valueOf(true)); assertEquals(createTransitGatewayOptionsModel.resourceGroup(), resourceGroupIdentityModel); } 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 8b674bdca..26d85d760 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 eca599401..26b6468d4 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 b7852b3a4..e20eac14f 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 index cae3a2a96..7ecbc5b15 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/DeleteTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/DeleteTransitGatewayOptionsTest.java index c862f4525..aa409d1ff 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 52cfb39fc..5a32e009a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 b9b6dc981..ab7aa54e9 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 06d6ca289..1b7a0a1d6 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 d24b6d613..1c3b1baba 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 index eab4e6d05..c9a8835c0 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/GetTransitGatewayOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayOptionsTest.java index 49428bf0e..a0de79064 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 9ac819af7..4481c2965 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/ListConnectionsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListConnectionsOptionsTest.java index bc05293f4..474d1a71c 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 5f523788e..8f38ed7e3 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 d8376f006..ec4909a13 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 9d0cf1ffd..a50036e50 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/ListTransitGatewayGreTunnelOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayGreTunnelOptionsTest.java new file mode 100644 index 000000000..5ed1701aa --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayGreTunnelOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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.ListTransitGatewayGreTunnelOptions; +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 ListTransitGatewayGreTunnelOptions model. + */ +public class ListTransitGatewayGreTunnelOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListTransitGatewayGreTunnelOptions() throws Throwable { + ListTransitGatewayGreTunnelOptions listTransitGatewayGreTunnelOptionsModel = new ListTransitGatewayGreTunnelOptions.Builder() + .transitGatewayId("testString") + .id("testString") + .build(); + assertEquals(listTransitGatewayGreTunnelOptionsModel.transitGatewayId(), "testString"); + assertEquals(listTransitGatewayGreTunnelOptionsModel.id(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListTransitGatewayGreTunnelOptionsError() throws Throwable { + new ListTransitGatewayGreTunnelOptions.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/ListTransitGatewayRouteReportsOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ListTransitGatewayRouteReportsOptionsTest.java index 3e13f7c38..5dd0ea101 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 b41e0d6a8..828016fc6 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 c06f04fd5..4be012f1d 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 6f56f123d..0eafa64af 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 71dd9c51b..a8e02b867 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 f13ce96d9..1010df877 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 fd1afc187..d5d398395 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 573962f1a..660879c8a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 30d06ebdd..e5893cef7 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 ba607e99a..987eb5029 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 835515aa7..c468e9fc8 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java index cb7a15e78..243391c89 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 859c1cc1c..81ce1ee38 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 1e785b727..1b2cda397 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/RouteReportCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RouteReportCollectionTest.java index 94cbd6922..3edf972cf 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 44e2e4007..850ffc252 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 86af314a7..0ac41fca4 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 f666cf6eb..a5269d9ed 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 cbceb081d..d9af8892a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 334786c51..c5bc03f0a 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 70864a1a5..f94547dd7 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 8f1695613..042c3e589 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 61436cf16..43f087197 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 5dcd2b938..38477850d 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 9152ba257..184cb21a5 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -16,7 +16,6 @@ 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; 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 0a7a93466..e3e2c9505 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,15 +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.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.TransitGatewayTunnel; +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 d9521caee..80808d2f0 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,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.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.TransitGatewayTunnel; +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/TransitGatewayCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionTest.java index 23cf99296..31effdea5 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 a5c97e5d0..35d5183e5 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,14 +13,13 @@ 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.TransitGatewayConnectionPrefixFilterReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnel; +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/TransitGatewayConnectionCustTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustTest.java index 21cb223a0..bc7410d11 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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,11 +13,10 @@ 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.TransitGatewayConnectionPrefixFilterReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnel; +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; @@ -37,18 +36,19 @@ public class TransitGatewayConnectionCustTest { @Test public void testTransitGatewayConnectionCust() throws Throwable { TransitGatewayConnectionCust transitGatewayConnectionCustModel = new TransitGatewayConnectionCust(); - assertNull(transitGatewayConnectionCustModel.getBaseNetworkType()); - assertNull(transitGatewayConnectionCustModel.getName()); - assertNull(transitGatewayConnectionCustModel.getNetworkId()); - assertNull(transitGatewayConnectionCustModel.getNetworkType()); - assertNull(transitGatewayConnectionCustModel.getId()); assertNull(transitGatewayConnectionCustModel.getBaseConnectionId()); + assertNull(transitGatewayConnectionCustModel.getBaseNetworkType()); + assertNull(transitGatewayConnectionCustModel.getCidr()); assertNull(transitGatewayConnectionCustModel.getCreatedAt()); + assertNull(transitGatewayConnectionCustModel.getId()); assertNull(transitGatewayConnectionCustModel.getLocalBgpAsn()); assertNull(transitGatewayConnectionCustModel.getLocalGatewayIp()); assertNull(transitGatewayConnectionCustModel.getLocalTunnelIp()); assertNull(transitGatewayConnectionCustModel.getMtu()); + assertNull(transitGatewayConnectionCustModel.getName()); assertNull(transitGatewayConnectionCustModel.getNetworkAccountId()); + assertNull(transitGatewayConnectionCustModel.getNetworkId()); + assertNull(transitGatewayConnectionCustModel.getNetworkType()); assertNull(transitGatewayConnectionCustModel.getPrefixFilters()); assertNull(transitGatewayConnectionCustModel.getPrefixFiltersDefault()); assertNull(transitGatewayConnectionCustModel.getRemoteBgpAsn()); 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 0c0b6d8f5..c0e4b4e50 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 62f99d498..853330f20 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/TransitGatewayReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayReferenceTest.java index f30831734..21c0eb79d 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 405e9e532..378d3a6fb 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -33,12 +33,15 @@ public class TransitGatewayTest { @Test public void testTransitGateway() throws Throwable { TransitGateway transitGatewayModel = new TransitGateway(); - assertNull(transitGatewayModel.getId()); - assertNull(transitGatewayModel.getCrn()); - assertNull(transitGatewayModel.getName()); - assertNull(transitGatewayModel.getLocation()); + assertNull(transitGatewayModel.isAllowGreTrafficAcrossZones()); + assertNull(transitGatewayModel.getConnectionCount()); + assertNull(transitGatewayModel.isConnectionNeedsAttention()); assertNull(transitGatewayModel.getCreatedAt()); + assertNull(transitGatewayModel.getCrn()); assertNull(transitGatewayModel.isGlobal()); + assertNull(transitGatewayModel.getId()); + assertNull(transitGatewayModel.getLocation()); + assertNull(transitGatewayModel.getName()); assertNull(transitGatewayModel.getResourceGroup()); assertNull(transitGatewayModel.getStatus()); assertNull(transitGatewayModel.getUpdatedAt()); diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelCollectionTest.java new file mode 100644 index 000000000..57224cd35 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelCollectionTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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.TransitGatewayTunnel; +import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayTunnelCollection; +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; +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 TransitGatewayTunnelCollection model. + */ +public class TransitGatewayTunnelCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTransitGatewayTunnelCollection() throws Throwable { + TransitGatewayTunnelCollection transitGatewayTunnelCollectionModel = new TransitGatewayTunnelCollection(); + assertNull(transitGatewayTunnelCollectionModel.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/TransitGatewayTunnelPatchTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelPatchTest.java new file mode 100644 index 000000000..54b388f8a --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelPatchTest.java @@ -0,0 +1,57 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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.TransitGatewayTunnelPatch; +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 java.util.Map; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Unit test class for the TransitGatewayTunnelPatch model. + */ +public class TransitGatewayTunnelPatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTransitGatewayTunnelPatch() throws Throwable { + TransitGatewayTunnelPatch transitGatewayTunnelPatchModel = new TransitGatewayTunnelPatch.Builder() + .name("gre2") + .build(); + assertEquals(transitGatewayTunnelPatchModel.name(), "gre2"); + + String json = TestUtilities.serialize(transitGatewayTunnelPatchModel); + + TransitGatewayTunnelPatch transitGatewayTunnelPatchModelNew = TestUtilities.deserialize(json, TransitGatewayTunnelPatch.class); + assertTrue(transitGatewayTunnelPatchModelNew instanceof TransitGatewayTunnelPatch); + assertEquals(transitGatewayTunnelPatchModelNew.name(), "gre2"); + } + @Test + public void testTransitGatewayTunnelPatchAsPatch() throws Throwable { + TransitGatewayTunnelPatch transitGatewayTunnelPatchModel = new TransitGatewayTunnelPatch.Builder() + .name("gre2") + .build(); + + Map mergePatch = transitGatewayTunnelPatchModel.asPatch(); + + assertEquals(mergePatch.get("name"), "gre2"); + } + +} \ 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/TransitGatewayTunnelTemplateTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTemplateTest.java new file mode 100644 index 000000000..29a21a0df --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTemplateTest.java @@ -0,0 +1,75 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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.TransitGatewayTunnelTemplate; +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 TransitGatewayTunnelTemplate model. + */ +public class TransitGatewayTunnelTemplateTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTransitGatewayTunnelTemplate() throws Throwable { + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + assertEquals(zoneIdentityModel.name(), "us-south-1"); + + TransitGatewayTunnelTemplate transitGatewayTunnelTemplateModel = new TransitGatewayTunnelTemplate.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(transitGatewayTunnelTemplateModel.localGatewayIp(), "10.242.63.12"); + assertEquals(transitGatewayTunnelTemplateModel.localTunnelIp(), "192.168.100.20"); + assertEquals(transitGatewayTunnelTemplateModel.name(), "gre1"); + assertEquals(transitGatewayTunnelTemplateModel.remoteBgpAsn(), Long.valueOf("65010")); + assertEquals(transitGatewayTunnelTemplateModel.remoteGatewayIp(), "10.242.33.22"); + assertEquals(transitGatewayTunnelTemplateModel.remoteTunnelIp(), "192.168.129.1"); + assertEquals(transitGatewayTunnelTemplateModel.zone(), zoneIdentityModel); + + String json = TestUtilities.serialize(transitGatewayTunnelTemplateModel); + + TransitGatewayTunnelTemplate transitGatewayTunnelTemplateModelNew = TestUtilities.deserialize(json, TransitGatewayTunnelTemplate.class); + assertTrue(transitGatewayTunnelTemplateModelNew instanceof TransitGatewayTunnelTemplate); + assertEquals(transitGatewayTunnelTemplateModelNew.localGatewayIp(), "10.242.63.12"); + assertEquals(transitGatewayTunnelTemplateModelNew.localTunnelIp(), "192.168.100.20"); + assertEquals(transitGatewayTunnelTemplateModelNew.name(), "gre1"); + assertEquals(transitGatewayTunnelTemplateModelNew.remoteBgpAsn(), Long.valueOf("65010")); + assertEquals(transitGatewayTunnelTemplateModelNew.remoteGatewayIp(), "10.242.33.22"); + assertEquals(transitGatewayTunnelTemplateModelNew.remoteTunnelIp(), "192.168.129.1"); + assertEquals(transitGatewayTunnelTemplateModelNew.zone().toString(), zoneIdentityModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testTransitGatewayTunnelTemplateError() throws Throwable { + new TransitGatewayTunnelTemplate.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/TransitGatewayTunnelTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTest.java new file mode 100644 index 000000000..0f5e7e188 --- /dev/null +++ b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTest.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * 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.TransitGatewayTunnel; +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 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 TransitGatewayTunnel model. + */ +public class TransitGatewayTunnelTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTransitGatewayTunnel() throws Throwable { + TransitGatewayTunnel transitGatewayTunnelModel = new TransitGatewayTunnel(); + assertNull(transitGatewayTunnelModel.getBaseNetworkType()); + assertNull(transitGatewayTunnelModel.getCreatedAt()); + assertNull(transitGatewayTunnelModel.getId()); + assertNull(transitGatewayTunnelModel.getLocalBgpAsn()); + assertNull(transitGatewayTunnelModel.getLocalGatewayIp()); + assertNull(transitGatewayTunnelModel.getLocalTunnelIp()); + assertNull(transitGatewayTunnelModel.getMtu()); + assertNull(transitGatewayTunnelModel.getName()); + assertNull(transitGatewayTunnelModel.getNetworkAccountId()); + assertNull(transitGatewayTunnelModel.getNetworkId()); + assertNull(transitGatewayTunnelModel.getRemoteBgpAsn()); + assertNull(transitGatewayTunnelModel.getRemoteGatewayIp()); + assertNull(transitGatewayTunnelModel.getRemoteTunnelIp()); + assertNull(transitGatewayTunnelModel.getStatus()); + assertNull(transitGatewayTunnelModel.getUpdatedAt()); + assertNull(transitGatewayTunnelModel.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/UpdateTransitGatewayConnectionOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayConnectionOptionsTest.java index 206d5a7da..15172870b 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 65708acc8..63bae5ad0 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 index 08c8c41e7..09ebf8b41 100644 --- 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 @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -35,12 +35,12 @@ public void testUpdateTransitGatewayConnectionTunnelsOptions() throws Throwable .transitGatewayId("testString") .id("testString") .greTunnelId("testString") - .name("gre2") + .transitGatewayTunnelPatch(java.util.Collections.singletonMap("anyKey", "anyValue")) .build(); assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.transitGatewayId(), "testString"); assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.id(), "testString"); assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.greTunnelId(), "testString"); - assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.name(), "gre2"); + assertEquals(updateTransitGatewayConnectionTunnelsOptionsModel.transitGatewayTunnelPatch(), java.util.Collections.singletonMap("anyKey", "anyValue")); } @Test(expectedExceptions = IllegalArgumentException.class) 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 a5a9b1b63..e840940f4 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 @@ -33,12 +33,14 @@ public class UpdateTransitGatewayOptionsTest { public void testUpdateTransitGatewayOptions() throws Throwable { UpdateTransitGatewayOptions updateTransitGatewayOptionsModel = new UpdateTransitGatewayOptions.Builder() .id("testString") + .allowGreTrafficAcrossZones(true) .global(true) - .name("my-transit-gateway") + .name("my-resource") .build(); assertEquals(updateTransitGatewayOptionsModel.id(), "testString"); + assertEquals(updateTransitGatewayOptionsModel.allowGreTrafficAcrossZones(), Boolean.valueOf(true)); assertEquals(updateTransitGatewayOptionsModel.global(), Boolean.valueOf(true)); - assertEquals(updateTransitGatewayOptionsModel.name(), "my-transit-gateway"); + assertEquals(updateTransitGatewayOptionsModel.name(), "my-resource"); } @Test(expectedExceptions = IllegalArgumentException.class) 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 de6a332bf..211b6d3f1 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 92b4757c8..3c67bb6d8 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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/ZoneReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceTest.java index 703a74fea..6cadb2ea8 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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 e2291b615..4fb11b49d 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. 2024. + * (C) Copyright IBM Corp. 2025. * * 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