From f778c7da74cdee0b9cae0e5028038da38b5c73ca Mon Sep 17 00:00:00 2001 From: Sridhar G K Date: Wed, 15 Oct 2025 01:09:08 +0530 Subject: [PATCH 1/2] feat: transit-gateway vpnaas changes Signed-off-by: Sridhar G K --- .../v1/TransitGatewayApis.java | 8 +- ...CreateTransitGatewayConnectionOptions.java | 15 +- .../GetTransitGatewayGreTunnelOptions.java | 133 -------- .../v1/model/GreTunnelZoneReference.java | 37 --- .../model/RedundantGRETunnelCollection.java | 39 --- .../v1/model/RedundantGRETunnelReference.java | 271 ---------------- ...tGatewayConnectionPrefixFilterOptions.java | 7 +- .../v1/model/RgreTunnelZoneReference.java | 38 --- .../v1/model/TransitConnection.java | 11 +- .../TransitConnectionCollectionFirst.java | 35 --- .../TransitConnectionCollectionNext.java | 47 --- .../model/TransitGatewayCollectionFirst.java | 35 --- .../model/TransitGatewayCollectionNext.java | 47 --- .../TransitGatewayConnectionCustZone.java | 37 --- ...sitGatewayRedundantGRETunnelReference.java | 221 ------------- ...nsitGatewayRedundantGRETunnelTemplate.java | 290 ------------------ .../v1/model/TransitGatewayTunnel.java | 43 +-- .../v1/model/ZoneReferenceCollection.java | 39 --- .../v1/TransitGatewayApisTest.java | 45 +-- ...GetTransitGatewayGreTunnelOptionsTest.java | 47 --- .../v1/model/GreTunnelZoneReferenceTest.java | 37 --- .../RedundantGRETunnelCollectionTest.java | 40 --- .../RedundantGRETunnelReferenceTest.java | 53 ---- .../v1/model/RgreTunnelZoneReferenceTest.java | 37 --- .../TransitConnectionCollectionFirstTest.java | 37 --- .../TransitConnectionCollectionNextTest.java | 38 --- .../TransitConnectionCollectionTest.java | 9 - .../v1/model/TransitConnectionTest.java | 6 - .../TransitGatewayCollectionFirstTest.java | 37 --- .../TransitGatewayCollectionNextTest.java | 38 --- .../TransitGatewayConnectionCustZoneTest.java | 37 --- ...atewayRedundantGRETunnelReferenceTest.java | 50 --- ...GatewayRedundantGRETunnelTemplateTest.java | 75 ----- .../v1/model/TransitGatewayTunnelTest.java | 5 - .../v1/model/ZoneReferenceCollectionTest.java | 38 --- .../v1/utils/TestUtilities.java | 6 +- 36 files changed, 54 insertions(+), 1934 deletions(-) delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirst.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNext.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirst.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNext.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZone.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirstTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNextTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirstTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNextTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZoneTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java index 91899c37c..31b954d6f 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 @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.73.0-eeee85a9-20230607-165104 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ package com.ibm.cloud.networking.transit_gateway_apis.v1; @@ -721,7 +721,7 @@ public ServiceCall updateTransitGatewayConnectionTunnels(U } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateTransitGatewayConnectionTunnelsOptions.transitGatewayTunnelPatch()), "application/merge-patch+json"); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateTransitGatewayConnectionTunnelsOptions.transitGatewayTunnelPatch()), "application/merge-patch+json"); ResponseConverter responseConverter = ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); @@ -813,7 +813,9 @@ public ServiceCall listTransitGatewayConnectionPrefixFil /** * Add a prefix filter to a Transit Gateway connection. * - * Add a Prefix Filter to a Transit Gateway Connection. Prefix Filters can be added to all Connection types. + * Add a Prefix Filter to a Transit Gateway Connection. Prefix Filters can be added to `vpc`, `classic`, `directlink`, + * and `power_virtual_server` Connection types. Prefix Filters cannot be added to `gre_tunnel`, `unbound_gre_tunnel`, + * `redundant_gre` or `vpn_gateway` Connection types. * * @param createTransitGatewayConnectionPrefixFilterOptions the {@link CreateTransitGatewayConnectionPrefixFilterOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link PrefixFilterCust} 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 2926c2781..8b04f62f7 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 @@ -12,10 +12,10 @@ */ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; +import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.ArrayList; import java.util.List; -import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * The createTransitGatewayConnection options. @@ -162,9 +162,9 @@ public CreateTransitGatewayConnectionOptions build() { } /** - * Adds an prefixFilters to prefixFilters. + * Adds a new element to prefixFilters. * - * @param prefixFilters the new prefixFilters + * @param prefixFilters the new element to be added * @return the CreateTransitGatewayConnectionOptions builder */ public Builder addPrefixFilters(TransitGatewayConnectionPrefixFilter prefixFilters) { @@ -178,9 +178,9 @@ public Builder addPrefixFilters(TransitGatewayConnectionPrefixFilter prefixFilte } /** - * Adds an tunnels to tunnels. + * Adds a new element to tunnels. * - * @param tunnels the new tunnels + * @param tunnels the new element to be added * @return the CreateTransitGatewayConnectionOptions builder */ public Builder addTunnels(TransitGatewayTunnelTemplate tunnels) { @@ -481,10 +481,7 @@ public String baseNetworkType() { * * network_type 'vpn_gateway' connections use 'cidr' to specify the CIDR to use for the VPN GRE tunnels. * - * This field is optional for network type `vpn_gateway` connections. - * - * If left unspecified when creating a `vpn_gateway` connection, a default cidr address of `100.64.0.0/10` will be - * used. + * This field is required for network type `vpn_gateway` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, * `gre_tunnel`, `unbound_gre_tunnel`, and `redundant_gre` connections. diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java deleted file mode 100644 index 8aadbfea6..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptions.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * The getTransitGatewayGreTunnel options. - */ -public class GetTransitGatewayGreTunnelOptions extends GenericModel { - - protected String transitGatewayId; - protected String id; - - /** - * Builder. - */ - public static class Builder { - private String transitGatewayId; - private String id; - - /** - * Instantiates a new Builder from an existing GetTransitGatewayGreTunnelOptions instance. - * - * @param getTransitGatewayGreTunnelOptions the instance to initialize the Builder with - */ - private Builder(GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptions) { - this.transitGatewayId = getTransitGatewayGreTunnelOptions.transitGatewayId; - this.id = getTransitGatewayGreTunnelOptions.id; - } - - /** - * Instantiates a new builder. - */ - public Builder() { - } - - /** - * Instantiates a new builder with required properties. - * - * @param transitGatewayId the transitGatewayId - * @param id the id - */ - public Builder(String transitGatewayId, String id) { - this.transitGatewayId = transitGatewayId; - this.id = id; - } - - /** - * Builds a GetTransitGatewayGreTunnelOptions. - * - * @return the new GetTransitGatewayGreTunnelOptions instance - */ - public GetTransitGatewayGreTunnelOptions build() { - return new GetTransitGatewayGreTunnelOptions(this); - } - - /** - * Set the transitGatewayId. - * - * @param transitGatewayId the transitGatewayId - * @return the GetTransitGatewayGreTunnelOptions builder - */ - public Builder transitGatewayId(String transitGatewayId) { - this.transitGatewayId = transitGatewayId; - return this; - } - - /** - * Set the id. - * - * @param id the id - * @return the GetTransitGatewayGreTunnelOptions builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - } - - protected GetTransitGatewayGreTunnelOptions() { } - - protected GetTransitGatewayGreTunnelOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, - "transitGatewayId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, - "id cannot be empty"); - transitGatewayId = builder.transitGatewayId; - id = builder.id; - } - - /** - * New builder. - * - * @return a GetTransitGatewayGreTunnelOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the transitGatewayId. - * - * The Transit Gateway identifier. - * - * @return the transitGatewayId - */ - public String transitGatewayId() { - return transitGatewayId; - } - - /** - * Gets the id. - * - * The connection identifier. - * - * @return the id - */ - public String id() { - return id; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java deleted file mode 100644 index 5f3e61198..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReference.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' connections. - */ -public class GreTunnelZoneReference extends GenericModel { - - protected String name; - - protected GreTunnelZoneReference() { } - - /** - * Gets the name. - * - * Availability zone name. - * - * @return the name - */ - public String getName() { - return name; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java deleted file mode 100644 index 2b3a60748..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollection.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import java.util.List; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Collection of all tunnels for redundant gre connection. - */ -public class RedundantGRETunnelCollection extends GenericModel { - - protected List tunnels; - - protected RedundantGRETunnelCollection() { } - - /** - * Gets the tunnels. - * - * Collection of all tunnels for redundant gre connection. - * - * @return the tunnels - */ - public List getTunnels() { - return tunnels; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java deleted file mode 100644 index 892bd09e2..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReference.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import java.util.Date; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Details for a redundant GRE tunnel. - */ -public class RedundantGRETunnelReference extends GenericModel { - - /** - * The type of network the redundant GRE tunnel is targeting. - */ - public interface BaseNetworkType { - /** classic. */ - String CLASSIC = "classic"; - /** vpc. */ - String VPC = "vpc"; - } - - /** - * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. - * Code and processes using this field must tolerate unexpected values. - */ - public interface Status { - /** attached. */ - String ATTACHED = "attached"; - /** failed. */ - String FAILED = "failed"; - /** pending. */ - String PENDING = "pending"; - /** deleting. */ - String DELETING = "deleting"; - /** detaching. */ - String DETACHING = "detaching"; - /** detached. */ - String DETACHED = "detached"; - /** suspending. */ - String SUSPENDING = "suspending"; - /** suspended. */ - String SUSPENDED = "suspended"; - } - - @SerializedName("base_network_type") - protected String baseNetworkType; - @SerializedName("created_at") - protected Date createdAt; - protected String id; - @SerializedName("local_bgp_asn") - protected Long localBgpAsn; - @SerializedName("local_gateway_ip") - protected String localGatewayIp; - @SerializedName("local_tunnel_ip") - protected String localTunnelIp; - protected Long mtu; - protected String name; - @SerializedName("network_account_id") - protected String networkAccountId; - @SerializedName("network_id") - protected String networkId; - @SerializedName("remote_bgp_asn") - protected Long remoteBgpAsn; - @SerializedName("remote_gateway_ip") - protected String remoteGatewayIp; - @SerializedName("remote_tunnel_ip") - protected String remoteTunnelIp; - protected String status; - @SerializedName("updated_at") - protected Date updatedAt; - protected RgreTunnelZoneReference zone; - - protected RedundantGRETunnelReference() { } - - /** - * Gets the baseNetworkType. - * - * The type of network the redundant GRE tunnel is targeting. - * - * @return the baseNetworkType - */ - public String getBaseNetworkType() { - return baseNetworkType; - } - - /** - * Gets the createdAt. - * - * The date and time that this GRE tunnel was created. - * - * @return the createdAt - */ - public Date getCreatedAt() { - return createdAt; - } - - /** - * Gets the id. - * - * The unique identifier for this redundant GRE tunnel. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Gets the localBgpAsn. - * - * Local network BGP ASN. It is assigned by IBM when the tunnel is created. - * - * @return the localBgpAsn - */ - public Long getLocalBgpAsn() { - return localBgpAsn; - } - - /** - * Gets the localGatewayIp. - * - * Local gateway IP address. - * - * @return the localGatewayIp - */ - public String getLocalGatewayIp() { - return localGatewayIp; - } - - /** - * Gets the localTunnelIp. - * - * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. - * Neither can be the network nor broadcast addresses. - * - * @return the localTunnelIp - */ - public String getLocalTunnelIp() { - return localTunnelIp; - } - - /** - * Gets the mtu. - * - * GRE tunnel MTU. - * - * @return the mtu - */ - public Long getMtu() { - return mtu; - } - - /** - * Gets the name. - * - * The user-defined name for this tunnel. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the networkAccountId. - * - * The ID of the account for cross account Classic connections. This field is required when the GRE tunnel is in a - * different account than the gateway and the base network is Classic. - * - * @return the networkAccountId - */ - public String getNetworkAccountId() { - return networkAccountId; - } - - /** - * Gets the networkId. - * - * The ID of the network VPC being connected via this connection. - * - * @return the networkId - */ - public String getNetworkId() { - return networkId; - } - - /** - * Gets the remoteBgpAsn. - * - * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, - * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM - * will assign an ASN. - * - * @return the remoteBgpAsn - */ - public Long getRemoteBgpAsn() { - return remoteBgpAsn; - } - - /** - * Gets the remoteGatewayIp. - * - * Remote gateway IP address. - * - * @return the remoteGatewayIp - */ - public String getRemoteGatewayIp() { - return remoteGatewayIp; - } - - /** - * Gets the remoteTunnelIp. - * - * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. - * Neither can be the network nor broadcast addresses. - * - * @return the remoteTunnelIp - */ - public String getRemoteTunnelIp() { - return remoteTunnelIp; - } - - /** - * Gets the status. - * - * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. - * Code and processes using this field must tolerate unexpected values. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the updatedAt. - * - * The date and time that this tunnel was last updated. - * - * @return the updatedAt - */ - public Date getUpdatedAt() { - return updatedAt; - } - - /** - * Gets the zone. - * - * The tunnel's location. The specified availability zone must reside in the gateway's region. Use the IBM Cloud - * global catalog to list zones within the desired region. - * - * @return the zone - */ - public RgreTunnelZoneReference getZone() { - return zone; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java index ca778bf55..ee27413fd 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 @@ -10,12 +10,13 @@ * 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; import java.util.ArrayList; import java.util.List; -import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * The replaceTransitGatewayConnectionPrefixFilter options. @@ -74,9 +75,9 @@ public ReplaceTransitGatewayConnectionPrefixFilterOptions build() { } /** - * Adds an prefixFilters to prefixFilters. + * Adds a new element to prefixFilters. * - * @param prefixFilters the new prefixFilters + * @param prefixFilters the new element to be added * @return the ReplaceTransitGatewayConnectionPrefixFilterOptions builder */ public Builder addPrefixFilters(PrefixFilterPut prefixFilters) { diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java deleted file mode 100644 index 2ec8c0ef8..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReference.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * The tunnel's location. The specified availability zone must reside in the gateway's region. Use the IBM Cloud global - * catalog to list zones within the desired region. - */ -public class RgreTunnelZoneReference extends GenericModel { - - protected String name; - - protected RgreTunnelZoneReference() { } - - /** - * Gets the name. - * - * Availability zone name. - * - * @return the name - */ - public String getName() { - return name; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnection.java index 330602753..4817e726e 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 @@ -10,13 +10,14 @@ * 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; import java.util.Date; import java.util.List; -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * Connection included in transit gateway. @@ -60,6 +61,8 @@ public interface NetworkType { /** * 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 types. */ public interface PrefixFiltersDefault { /** permit. */ @@ -304,6 +307,8 @@ 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 types. + * * @return the prefixFilters */ public List getPrefixFilters() { @@ -315,6 +320,8 @@ public List getPrefixFilters() { * * Default setting of permit or deny which applies to any routes that don't match a specified filter. * + * This field does not apply to the `redundant_gre` network types. + * * @return the prefixFiltersDefault */ public String getPrefixFiltersDefault() { diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirst.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirst.java deleted file mode 100644 index bb275b676..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirst.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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; - -/** - * A reference to the first page of resources. - */ -public class TransitConnectionCollectionFirst extends GenericModel { - - protected String href; - - /** - * Gets the href. - * - * url. - * - * @return the href - */ - public String getHref() { - return href; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNext.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNext.java deleted file mode 100644 index 2b9bf939c..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNext.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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; - -/** - * A reference to the next page of resources; this reference is included for all pages except the last page. - */ -public class TransitConnectionCollectionNext extends GenericModel { - - protected String href; - protected String start; - - /** - * Gets the href. - * - * url. - * - * @return the href - */ - public String getHref() { - return href; - } - - /** - * Gets the start. - * - * server generated start token for next page of resources. - * - * @return the start - */ - public String getStart() { - return start; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirst.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirst.java deleted file mode 100644 index 6040a78db..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirst.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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; - -/** - * A reference to the first page of resources. - */ -public class TransitGatewayCollectionFirst extends GenericModel { - - protected String href; - - /** - * Gets the href. - * - * url. - * - * @return the href - */ - public String getHref() { - return href; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNext.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNext.java deleted file mode 100644 index 38f6bb1b6..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNext.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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; - -/** - * A reference to the next page of resources; this reference is included for all pages except the last page. - */ -public class TransitGatewayCollectionNext extends GenericModel { - - protected String href; - protected String start; - - /** - * Gets the href. - * - * url. - * - * @return the href - */ - public String getHref() { - return href; - } - - /** - * Gets the start. - * - * server generated start token for next page of resources. - * - * @return the start - */ - public String getStart() { - return start; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZone.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZone.java deleted file mode 100644 index 9d6c7e0a9..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZone.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Location of GRE tunnel. This field only applies to network type 'gre_tunnel' and 'unbound_gre_tunnel' connections. - */ -public class TransitGatewayConnectionCustZone extends GenericModel { - - protected String name; - - protected TransitGatewayConnectionCustZone() { } - - /** - * Gets the name. - * - * Availability zone name. - * - * @return the name - */ - public String getName() { - return name; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java deleted file mode 100644 index eaa954c2f..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReference.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import java.util.Date; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Details for a redundant GRE tunnel. - */ -public class TransitGatewayRedundantGRETunnelReference extends GenericModel { - - /** - * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. - * Code and processes using this field must tolerate unexpected values. - */ - public interface Status { - /** attached. */ - String ATTACHED = "attached"; - /** failed. */ - String FAILED = "failed"; - /** pending. */ - String PENDING = "pending"; - /** deleting. */ - String DELETING = "deleting"; - /** detaching. */ - String DETACHING = "detaching"; - /** detached. */ - String DETACHED = "detached"; - /** suspending. */ - String SUSPENDING = "suspending"; - /** suspended. */ - String SUSPENDED = "suspended"; - } - - @SerializedName("created_at") - protected Date createdAt; - protected String id; - @SerializedName("local_bgp_asn") - protected Long localBgpAsn; - @SerializedName("local_gateway_ip") - protected String localGatewayIp; - @SerializedName("local_tunnel_ip") - protected String localTunnelIp; - protected Long mtu; - protected String name; - @SerializedName("remote_bgp_asn") - protected Long remoteBgpAsn; - @SerializedName("remote_gateway_ip") - protected String remoteGatewayIp; - @SerializedName("remote_tunnel_ip") - protected String remoteTunnelIp; - protected String status; - @SerializedName("updated_at") - protected Date updatedAt; - protected RgreTunnelZoneReference zone; - - protected TransitGatewayRedundantGRETunnelReference() { } - - /** - * Gets the createdAt. - * - * The date and time that this GRE tunnel was created. - * - * @return the createdAt - */ - public Date getCreatedAt() { - return createdAt; - } - - /** - * Gets the id. - * - * The unique identifier for this redundant GRE tunnel. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Gets the localBgpAsn. - * - * Local network BGP ASN. It is assigned by IBM when the tunnel is created. - * - * @return the localBgpAsn - */ - public Long getLocalBgpAsn() { - return localBgpAsn; - } - - /** - * Gets the localGatewayIp. - * - * Local gateway IP address. - * - * @return the localGatewayIp - */ - public String getLocalGatewayIp() { - return localGatewayIp; - } - - /** - * Gets the localTunnelIp. - * - * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. - * Neither can be the network nor broadcast addresses. - * - * @return the localTunnelIp - */ - public String getLocalTunnelIp() { - return localTunnelIp; - } - - /** - * Gets the mtu. - * - * GRE tunnel MTU. - * - * @return the mtu - */ - public Long getMtu() { - return mtu; - } - - /** - * Gets the name. - * - * The user-defined name for this tunnel. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the remoteBgpAsn. - * - * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, - * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM - * will assign an ASN. - * - * @return the remoteBgpAsn - */ - public Long getRemoteBgpAsn() { - return remoteBgpAsn; - } - - /** - * Gets the remoteGatewayIp. - * - * Remote gateway IP address. - * - * @return the remoteGatewayIp - */ - public String getRemoteGatewayIp() { - return remoteGatewayIp; - } - - /** - * Gets the remoteTunnelIp. - * - * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. - * Neither can be the network nor broadcast addresses. - * - * @return the remoteTunnelIp - */ - public String getRemoteTunnelIp() { - return remoteTunnelIp; - } - - /** - * Gets the status. - * - * Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. - * Code and processes using this field must tolerate unexpected values. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the updatedAt. - * - * The date and time that this tunnel was last updated. - * - * @return the updatedAt - */ - public Date getUpdatedAt() { - return updatedAt; - } - - /** - * Gets the zone. - * - * The tunnel's location. The specified availability zone must reside in the gateway's region. Use the IBM Cloud - * global catalog to list zones within the desired region. - * - * @return the zone - */ - public RgreTunnelZoneReference getZone() { - return zone; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java deleted file mode 100644 index b9586c2a0..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplate.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * A create template with information for redundant GRE tunnel. - */ -public class TransitGatewayRedundantGRETunnelTemplate extends GenericModel { - - @SerializedName("local_gateway_ip") - protected String localGatewayIp; - @SerializedName("local_tunnel_ip") - protected String localTunnelIp; - protected String name; - @SerializedName("remote_bgp_asn") - protected Long remoteBgpAsn; - @SerializedName("remote_gateway_ip") - protected String remoteGatewayIp; - @SerializedName("remote_tunnel_ip") - protected String remoteTunnelIp; - protected ZoneIdentity zone; - - /** - * Builder. - */ - public static class Builder { - private String localGatewayIp; - private String localTunnelIp; - private String name; - private Long remoteBgpAsn; - private String remoteGatewayIp; - private String remoteTunnelIp; - private ZoneIdentity zone; - - /** - * Instantiates a new Builder from an existing TransitGatewayRedundantGRETunnelTemplate instance. - * - * @param transitGatewayRedundantGreTunnelTemplate the instance to initialize the Builder with - */ - private Builder(TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplate) { - this.localGatewayIp = transitGatewayRedundantGreTunnelTemplate.localGatewayIp; - this.localTunnelIp = transitGatewayRedundantGreTunnelTemplate.localTunnelIp; - this.name = transitGatewayRedundantGreTunnelTemplate.name; - this.remoteBgpAsn = transitGatewayRedundantGreTunnelTemplate.remoteBgpAsn; - this.remoteGatewayIp = transitGatewayRedundantGreTunnelTemplate.remoteGatewayIp; - this.remoteTunnelIp = transitGatewayRedundantGreTunnelTemplate.remoteTunnelIp; - this.zone = transitGatewayRedundantGreTunnelTemplate.zone; - } - - /** - * Instantiates a new builder. - */ - public Builder() { - } - - /** - * Instantiates a new builder with required properties. - * - * @param localGatewayIp the localGatewayIp - * @param localTunnelIp the localTunnelIp - * @param name the name - * @param remoteGatewayIp the remoteGatewayIp - * @param remoteTunnelIp the remoteTunnelIp - * @param zone the zone - */ - public Builder(String localGatewayIp, String localTunnelIp, String name, String remoteGatewayIp, String remoteTunnelIp, ZoneIdentity zone) { - this.localGatewayIp = localGatewayIp; - this.localTunnelIp = localTunnelIp; - this.name = name; - this.remoteGatewayIp = remoteGatewayIp; - this.remoteTunnelIp = remoteTunnelIp; - this.zone = zone; - } - - /** - * Builds a TransitGatewayRedundantGRETunnelTemplate. - * - * @return the new TransitGatewayRedundantGRETunnelTemplate instance - */ - public TransitGatewayRedundantGRETunnelTemplate build() { - return new TransitGatewayRedundantGRETunnelTemplate(this); - } - - /** - * Set the localGatewayIp. - * - * @param localGatewayIp the localGatewayIp - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder localGatewayIp(String localGatewayIp) { - this.localGatewayIp = localGatewayIp; - return this; - } - - /** - * Set the localTunnelIp. - * - * @param localTunnelIp the localTunnelIp - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder localTunnelIp(String localTunnelIp) { - this.localTunnelIp = localTunnelIp; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the remoteBgpAsn. - * - * @param remoteBgpAsn the remoteBgpAsn - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder remoteBgpAsn(long remoteBgpAsn) { - this.remoteBgpAsn = remoteBgpAsn; - return this; - } - - /** - * Set the remoteGatewayIp. - * - * @param remoteGatewayIp the remoteGatewayIp - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder remoteGatewayIp(String remoteGatewayIp) { - this.remoteGatewayIp = remoteGatewayIp; - return this; - } - - /** - * Set the remoteTunnelIp. - * - * @param remoteTunnelIp the remoteTunnelIp - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder remoteTunnelIp(String remoteTunnelIp) { - this.remoteTunnelIp = remoteTunnelIp; - return this; - } - - /** - * Set the zone. - * - * @param zone the zone - * @return the TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder zone(ZoneIdentity zone) { - this.zone = zone; - return this; - } - } - - protected TransitGatewayRedundantGRETunnelTemplate() { } - - protected TransitGatewayRedundantGRETunnelTemplate(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.localGatewayIp, - "localGatewayIp cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.localTunnelIp, - "localTunnelIp cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, - "name cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.remoteGatewayIp, - "remoteGatewayIp cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.remoteTunnelIp, - "remoteTunnelIp cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.zone, - "zone cannot be null"); - localGatewayIp = builder.localGatewayIp; - localTunnelIp = builder.localTunnelIp; - name = builder.name; - remoteBgpAsn = builder.remoteBgpAsn; - remoteGatewayIp = builder.remoteGatewayIp; - remoteTunnelIp = builder.remoteTunnelIp; - zone = builder.zone; - } - - /** - * New builder. - * - * @return a TransitGatewayRedundantGRETunnelTemplate builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the localGatewayIp. - * - * Local gateway IP address. - * - * @return the localGatewayIp - */ - public String localGatewayIp() { - return localGatewayIp; - } - - /** - * Gets the localTunnelIp. - * - * Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. - * Neither can be the network nor broadcast addresses. - * - * @return the localTunnelIp - */ - public String localTunnelIp() { - return localTunnelIp; - } - - /** - * Gets the name. - * - * The user-defined name for this tunnel connection. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the remoteBgpAsn. - * - * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, - * 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If 'remote_bgp_asn' is omitted on create requests, IBM - * will assign an ASN. - * - * @return the remoteBgpAsn - */ - public Long remoteBgpAsn() { - return remoteBgpAsn; - } - - /** - * Gets the remoteGatewayIp. - * - * Remote gateway IP address. - * - * @return the remoteGatewayIp - */ - public String remoteGatewayIp() { - return remoteGatewayIp; - } - - /** - * Gets the remoteTunnelIp. - * - * Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. - * Neither can be the network nor broadcast addresses. - * - * @return the remoteTunnelIp - */ - public String remoteTunnelIp() { - return remoteTunnelIp; - } - - /** - * Gets the zone. - * - * Specify the connection's location. The specified availability zone must reside in the gateway's region. - * Use the IBM Cloud global catalog to list zones within the desired region. - * - * @return the zone - */ - public ZoneIdentity zone() { - return zone; - } -} - diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnel.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnel.java index 8786e6930..7cf4dcf6d 100644 --- 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 @@ -10,13 +10,13 @@ * 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 java.util.List; +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; +import java.util.Date; + /** * Details for a redundant GRE tunnel. @@ -35,16 +35,6 @@ public interface BaseNetworkType { String VPN = "vpn"; } - /** - * Default setting of permit or deny which applies to any routes that don't match a specified filter. - */ - public interface PrefixFiltersDefault { - /** permit. */ - String PERMIT = "permit"; - /** deny. */ - String DENY = "deny"; - } - /** * 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. @@ -85,10 +75,6 @@ public interface Status { protected String networkAccountId; @SerializedName("network_id") protected String networkId; - @SerializedName("prefix_filters") - protected List prefixFilters; - @SerializedName("prefix_filters_default") - protected String prefixFiltersDefault; @SerializedName("remote_bgp_asn") protected Long remoteBgpAsn; @SerializedName("remote_gateway_ip") @@ -214,29 +200,6 @@ public String getNetworkId() { return networkId; } - /** - * 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. - * - * @return the prefixFilters - */ - public List getPrefixFilters() { - return prefixFilters; - } - - /** - * Gets the prefixFiltersDefault. - * - * Default setting of permit or deny which applies to any routes that don't match a specified filter. - * - * @return the prefixFiltersDefault - */ - public String getPrefixFiltersDefault() { - return prefixFiltersDefault; - } - /** * Gets the remoteBgpAsn. * diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java deleted file mode 100644 index b9b5779c6..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollection.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import java.util.List; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Collection of availability zones. - */ -public class ZoneReferenceCollection extends GenericModel { - - protected List zones; - - protected ZoneReferenceCollection() { } - - /** - * Gets the zones. - * - * Array of valid zones for GRE tunnels. - * - * @return the zones - */ - public List getZones() { - return zones; - } -} - diff --git a/modules/transit-gateway-apis/src/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 b6dd6fa8b..3fc1b42d8 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 @@ -10,8 +10,14 @@ * 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; +import com.ibm.cloud.sdk.core.http.Response; +import com.ibm.cloud.sdk.core.security.Authenticator; +import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator; +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.cloud.sdk.core.util.DateUtils; import com.ibm.cloud.networking.transit_gateway_apis.v1.TransitGatewayApis; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ConnectionsPager; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionActionsOptions; @@ -84,11 +90,6 @@ 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.utils.TestUtilities; -import com.ibm.cloud.sdk.core.http.Response; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; @@ -463,7 +464,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\": [{\"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\", \"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.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") @@ -515,8 +516,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\":[{\"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\",\"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.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\",\"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.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) @@ -550,8 +551,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\":[{\"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\",\"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.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\",\"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.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) @@ -581,7 +582,7 @@ public void testListConnectionsWithPagerGetAll() throws Throwable { @Test public void testListTransitGatewayConnectionsWOptions() throws Throwable { // Register a mock response - 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\", \"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.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") @@ -639,8 +640,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_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\",\"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.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\",\"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.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) @@ -674,8 +675,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_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\",\"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.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\",\"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.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) @@ -705,7 +706,7 @@ public void testListTransitGatewayConnectionsWithPagerGetAll() throws Throwable @Test public void testCreateTransitGatewayConnectionWOptions() throws Throwable { // Register a mock response - 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\", \"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.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") @@ -849,7 +850,7 @@ public void testDeleteTransitGatewayConnectionNoOptions() throws Throwable { @Test public void testGetTransitGatewayConnectionWOptions() throws Throwable { // Register a mock response - 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\", \"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.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") @@ -902,7 +903,7 @@ public void testGetTransitGatewayConnectionNoOptions() throws Throwable { @Test public void testUpdateTransitGatewayConnectionWOptions() throws Throwable { // Register a mock response - 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\", \"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.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") @@ -1010,7 +1011,7 @@ public void testCreateTransitGatewayConnectionActionsNoOptions() throws Throwabl @Test 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\", \"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.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 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 listTransitGatewayGreTunnelPath = "/transit_gateways/testString/connections/testString/tunnels"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -1063,7 +1064,7 @@ public void testListTransitGatewayGreTunnelNoOptions() throws Throwable { @Test public void testCreateTransitGatewayGreTunnelWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"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.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 mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; String createTransitGatewayGreTunnelPath = "/transit_gateways/testString/connections/testString/tunnels"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -1181,7 +1182,7 @@ public void testDeleteTransitGatewayConnectionTunnelsNoOptions() throws Throwabl @Test public void testGetTransitGatewayConnectionTunnelsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"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.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 mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; String getTransitGatewayConnectionTunnelsPath = "/transit_gateways/testString/connections/testString/tunnels/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -1235,7 +1236,7 @@ public void testGetTransitGatewayConnectionTunnelsNoOptions() throws Throwable { @Test public void testUpdateTransitGatewayConnectionTunnelsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"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.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 mockResponseBody = "{\"base_network_type\": \"classic\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"id\": \"1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"local_bgp_asn\": 11, \"local_gateway_ip\": \"10.242.63.12\", \"local_tunnel_ip\": \"192.168.100.20\", \"mtu\": 9000, \"name\": \"gre1\", \"network_account_id\": \"networkAccountId\", \"network_id\": \"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"remote_bgp_asn\": 65010, \"remote_gateway_ip\": \"10.242.33.22\", \"remote_tunnel_ip\": \"192.168.129.1\", \"status\": \"attached\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"name\": \"us-south-1\"}}"; String updateTransitGatewayConnectionTunnelsPath = "/transit_gateways/testString/connections/testString/tunnels/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java deleted file mode 100644 index 10da64d25..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GetTransitGatewayGreTunnelOptionsTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GetTransitGatewayGreTunnelOptions; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the GetTransitGatewayGreTunnelOptions model. - */ -public class GetTransitGatewayGreTunnelOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetTransitGatewayGreTunnelOptions() throws Throwable { - GetTransitGatewayGreTunnelOptions getTransitGatewayGreTunnelOptionsModel = new GetTransitGatewayGreTunnelOptions.Builder() - .transitGatewayId("testString") - .id("testString") - .build(); - assertEquals(getTransitGatewayGreTunnelOptionsModel.transitGatewayId(), "testString"); - assertEquals(getTransitGatewayGreTunnelOptionsModel.id(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTransitGatewayGreTunnelOptionsError() throws Throwable { - new GetTransitGatewayGreTunnelOptions.Builder().build(); - } - -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java deleted file mode 100644 index b7548d028..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/GreTunnelZoneReferenceTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.GreTunnelZoneReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the GreTunnelZoneReference model. - */ -public class GreTunnelZoneReferenceTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGreTunnelZoneReference() throws Throwable { - GreTunnelZoneReference greTunnelZoneReferenceModel = new GreTunnelZoneReference(); - assertNull(greTunnelZoneReferenceModel.getName()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java deleted file mode 100644 index 157a54a06..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelCollectionTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelCollection; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the RedundantGRETunnelCollection model. - */ -public class RedundantGRETunnelCollectionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testRedundantGRETunnelCollection() throws Throwable { - RedundantGRETunnelCollection redundantGreTunnelCollectionModel = new RedundantGRETunnelCollection(); - assertNull(redundantGreTunnelCollectionModel.getTunnels()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java deleted file mode 100644 index 840e92cbf..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RedundantGRETunnelReferenceTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RedundantGRETunnelReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the RedundantGRETunnelReference model. - */ -public class RedundantGRETunnelReferenceTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testRedundantGRETunnelReference() throws Throwable { - RedundantGRETunnelReference redundantGreTunnelReferenceModel = new RedundantGRETunnelReference(); - assertNull(redundantGreTunnelReferenceModel.getBaseNetworkType()); - assertNull(redundantGreTunnelReferenceModel.getCreatedAt()); - assertNull(redundantGreTunnelReferenceModel.getId()); - assertNull(redundantGreTunnelReferenceModel.getLocalBgpAsn()); - assertNull(redundantGreTunnelReferenceModel.getLocalGatewayIp()); - assertNull(redundantGreTunnelReferenceModel.getLocalTunnelIp()); - assertNull(redundantGreTunnelReferenceModel.getMtu()); - assertNull(redundantGreTunnelReferenceModel.getName()); - assertNull(redundantGreTunnelReferenceModel.getNetworkAccountId()); - assertNull(redundantGreTunnelReferenceModel.getNetworkId()); - assertNull(redundantGreTunnelReferenceModel.getRemoteBgpAsn()); - assertNull(redundantGreTunnelReferenceModel.getRemoteGatewayIp()); - assertNull(redundantGreTunnelReferenceModel.getRemoteTunnelIp()); - assertNull(redundantGreTunnelReferenceModel.getStatus()); - assertNull(redundantGreTunnelReferenceModel.getUpdatedAt()); - assertNull(redundantGreTunnelReferenceModel.getZone()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java deleted file mode 100644 index df276446c..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/RgreTunnelZoneReferenceTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the RgreTunnelZoneReference model. - */ -public class RgreTunnelZoneReferenceTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testRgreTunnelZoneReference() throws Throwable { - RgreTunnelZoneReference rgreTunnelZoneReferenceModel = new RgreTunnelZoneReference(); - assertNull(rgreTunnelZoneReferenceModel.getName()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirstTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirstTest.java deleted file mode 100644 index 6a37dcab5..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionFirstTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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.TransitConnectionCollectionFirst; -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 TransitConnectionCollectionFirst model. - */ -public class TransitConnectionCollectionFirstTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitConnectionCollectionFirst() throws Throwable { - TransitConnectionCollectionFirst transitConnectionCollectionFirstModel = new TransitConnectionCollectionFirst(); - assertNull(transitConnectionCollectionFirstModel.getHref()); - } -} \ 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/TransitConnectionCollectionNextTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNextTest.java deleted file mode 100644 index 35096f982..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionNextTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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.TransitConnectionCollectionNext; -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 TransitConnectionCollectionNext model. - */ -public class TransitConnectionCollectionNextTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitConnectionCollectionNext() throws Throwable { - TransitConnectionCollectionNext transitConnectionCollectionNextModel = new TransitConnectionCollectionNext(); - assertNull(transitConnectionCollectionNextModel.getHref()); - assertNull(transitConnectionCollectionNextModel.getStart()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java index e3e2c9505..b8ae47e8a 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 @@ -13,17 +13,8 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; -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.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.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; import java.io.InputStream; import java.util.HashMap; import java.util.List; 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 80808d2f0..5322519af 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 @@ -14,13 +14,7 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; 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.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; import java.io.InputStream; import java.util.HashMap; import java.util.List; diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirstTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirstTest.java deleted file mode 100644 index 3de18e3b0..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionFirstTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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.TransitGatewayCollectionFirst; -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 TransitGatewayCollectionFirst model. - */ -public class TransitGatewayCollectionFirstTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitGatewayCollectionFirst() throws Throwable { - TransitGatewayCollectionFirst transitGatewayCollectionFirstModel = new TransitGatewayCollectionFirst(); - assertNull(transitGatewayCollectionFirstModel.getHref()); - } -} \ 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/TransitGatewayCollectionNextTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNextTest.java deleted file mode 100644 index bea1e7349..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayCollectionNextTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.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.TransitGatewayCollectionNext; -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 TransitGatewayCollectionNext model. - */ -public class TransitGatewayCollectionNextTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitGatewayCollectionNext() throws Throwable { - TransitGatewayCollectionNext transitGatewayCollectionNextModel = new TransitGatewayCollectionNext(); - assertNull(transitGatewayCollectionNextModel.getHref()); - assertNull(transitGatewayCollectionNextModel.getStart()); - } -} \ 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/TransitGatewayConnectionCustZoneTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZoneTest.java deleted file mode 100644 index 1515bba46..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayConnectionCustZoneTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2023. - * - * Licensed under the Apache License, Version 2.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.TransitGatewayConnectionCustZone; -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 TransitGatewayConnectionCustZone model. - */ -public class TransitGatewayConnectionCustZoneTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitGatewayConnectionCustZone() throws Throwable { - TransitGatewayConnectionCustZone transitGatewayConnectionCustZoneModel = new TransitGatewayConnectionCustZone(); - assertNull(transitGatewayConnectionCustZoneModel.getName()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java deleted file mode 100644 index a91d46c8b..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelReferenceTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.RgreTunnelZoneReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the TransitGatewayRedundantGRETunnelReference model. - */ -public class TransitGatewayRedundantGRETunnelReferenceTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitGatewayRedundantGRETunnelReference() throws Throwable { - TransitGatewayRedundantGRETunnelReference transitGatewayRedundantGreTunnelReferenceModel = new TransitGatewayRedundantGRETunnelReference(); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getCreatedAt()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getId()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getLocalBgpAsn()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getLocalGatewayIp()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getLocalTunnelIp()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getMtu()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getName()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getRemoteBgpAsn()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getRemoteGatewayIp()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getRemoteTunnelIp()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getStatus()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getUpdatedAt()); - assertNull(transitGatewayRedundantGreTunnelReferenceModel.getZone()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java deleted file mode 100644 index a39ed3f73..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayRedundantGRETunnelTemplateTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayRedundantGRETunnelTemplate; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneIdentityByName; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the TransitGatewayRedundantGRETunnelTemplate model. - */ -public class TransitGatewayRedundantGRETunnelTemplateTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTransitGatewayRedundantGRETunnelTemplate() throws Throwable { - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - assertEquals(zoneIdentityModel.name(), "us-south-1"); - - TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModel = new TransitGatewayRedundantGRETunnelTemplate.Builder() - .localGatewayIp("10.242.63.12") - .localTunnelIp("192.168.100.20") - .name("gre1") - .remoteBgpAsn(Long.valueOf("65010")) - .remoteGatewayIp("10.242.33.22") - .remoteTunnelIp("192.168.129.1") - .zone(zoneIdentityModel) - .build(); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.localGatewayIp(), "10.242.63.12"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.localTunnelIp(), "192.168.100.20"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.name(), "gre1"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteBgpAsn(), Long.valueOf("65010")); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteGatewayIp(), "10.242.33.22"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.remoteTunnelIp(), "192.168.129.1"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModel.zone(), zoneIdentityModel); - - String json = TestUtilities.serialize(transitGatewayRedundantGreTunnelTemplateModel); - - TransitGatewayRedundantGRETunnelTemplate transitGatewayRedundantGreTunnelTemplateModelNew = TestUtilities.deserialize(json, TransitGatewayRedundantGRETunnelTemplate.class); - assertTrue(transitGatewayRedundantGreTunnelTemplateModelNew instanceof TransitGatewayRedundantGRETunnelTemplate); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.localGatewayIp(), "10.242.63.12"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.localTunnelIp(), "192.168.100.20"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.name(), "gre1"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.remoteBgpAsn(), Long.valueOf("65010")); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.remoteGatewayIp(), "10.242.33.22"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.remoteTunnelIp(), "192.168.129.1"); - assertEquals(transitGatewayRedundantGreTunnelTemplateModelNew.zone().toString(), zoneIdentityModel.toString()); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testTransitGatewayRedundantGRETunnelTemplateError() throws Throwable { - new TransitGatewayRedundantGRETunnelTemplate.Builder().build(); - } - -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTest.java index 25e047a0a..a63ee9897 100644 --- 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 @@ -13,12 +13,9 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitGatewayConnectionPrefixFilterReference; 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; import java.io.InputStream; import java.util.HashMap; import java.util.List; @@ -45,8 +42,6 @@ public void testTransitGatewayTunnel() throws Throwable { assertNull(transitGatewayTunnelModel.getName()); assertNull(transitGatewayTunnelModel.getNetworkAccountId()); assertNull(transitGatewayTunnelModel.getNetworkId()); - assertNull(transitGatewayTunnelModel.getPrefixFilters()); - assertNull(transitGatewayTunnelModel.getPrefixFiltersDefault()); assertNull(transitGatewayTunnelModel.getRemoteBgpAsn()); assertNull(transitGatewayTunnelModel.getRemoteGatewayIp()); assertNull(transitGatewayTunnelModel.getRemoteTunnelIp()); diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java deleted file mode 100644 index 14b26f3f5..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ZoneReferenceCollectionTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.cloud.networking.transit_gateway_apis.v1.model; - -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReference; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ZoneReferenceCollection; -import com.ibm.cloud.networking.transit_gateway_apis.v1.utils.TestUtilities; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * Unit test class for the ZoneReferenceCollection model. - */ -public class ZoneReferenceCollectionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testZoneReferenceCollection() throws Throwable { - ZoneReferenceCollection zoneReferenceCollectionModel = new ZoneReferenceCollection(); - assertNull(zoneReferenceCollectionModel.getZones()); - } -} \ No newline at end of file diff --git a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/utils/TestUtilities.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/utils/TestUtilities.java index 4fb11b49d..59d0da82a 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 @@ -10,8 +10,10 @@ * 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.utils; +import java.util.Base64; import java.util.Map; import java.util.Set; import java.util.List; @@ -115,8 +117,8 @@ public static List creatMockListFileWithMetadata() { return list; } - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); + public static byte[] createMockByteArray(String encodedString) throws Exception { + return Base64.getDecoder().decode(encodedString); } public static Date createMockDate(String date) throws Exception { From 87b88333c76862de676ab533ae3e8d1ac34ee196 Mon Sep 17 00:00:00 2001 From: Sridhar G K Date: Mon, 3 Nov 2025 20:24:29 +0530 Subject: [PATCH 2/2] fix: updated for new spec in tgw Signed-off-by: Sridhar G K --- .../v1/TransitGatewayApis.java | 50 +---- ...CreateTransitGatewayConnectionOptions.java | 16 +- .../CreateTransitGatewayGreTunnelOptions.java | 6 +- .../v1/model/CreateTransitGatewayOptions.java | 3 +- .../v1/model/PrefixFilterPut.java | 210 ------------------ ...tGatewayConnectionPrefixFilterOptions.java | 184 --------------- .../v1/model/TransitConnection.java | 6 +- .../v1/model/TransitGateway.java | 3 +- .../model/TransitGatewayConnectionCust.java | 5 +- .../v1/model/TransitGatewayTunnel.java | 10 +- .../model/TransitGatewayTunnelTemplate.java | 6 +- .../v1/model/UpdateTransitGatewayOptions.java | 4 +- .../v1/TransitGatewayApisTest.java | 64 ------ .../v1/model/PrefixFilterPutTest.java | 60 ----- ...ewayConnectionPrefixFilterOptionsTest.java | 61 ----- .../TransitConnectionCollectionTest.java | 11 +- .../v1/model/TransitConnectionTest.java | 8 +- 17 files changed, 63 insertions(+), 644 deletions(-) delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java delete mode 100644 modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPutTest.java delete mode 100644 modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java diff --git a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/TransitGatewayApis.java index f4b8506d6..faf928d78 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 @@ -12,13 +12,20 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.90.0-5aad763d-20240506-203857 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ package com.ibm.cloud.networking.transit_gateway_apis.v1; import com.google.gson.JsonObject; import com.ibm.cloud.networking.common.SdkCommon; +import com.ibm.cloud.sdk.core.http.RequestBuilder; +import com.ibm.cloud.sdk.core.http.ResponseConverter; +import com.ibm.cloud.sdk.core.http.ServiceCall; +import com.ibm.cloud.sdk.core.security.Authenticator; +import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory; +import com.ibm.cloud.sdk.core.service.BaseService; +import com.ibm.cloud.sdk.core.util.ResponseConverterUtils; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionActionsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.CreateTransitGatewayConnectionPrefixFilterOptions; @@ -45,7 +52,6 @@ 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.ReplaceTransitGatewayConnectionPrefixFilterOptions; 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.TSCollection; @@ -61,13 +67,6 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionPrefixFilterOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayConnectionTunnelsOptions; import com.ibm.cloud.networking.transit_gateway_apis.v1.model.UpdateTransitGatewayOptions; -import com.ibm.cloud.sdk.core.http.RequestBuilder; -import com.ibm.cloud.sdk.core.http.ResponseConverter; -import com.ibm.cloud.sdk.core.http.ServiceCall; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory; -import com.ibm.cloud.sdk.core.service.BaseService; -import com.ibm.cloud.sdk.core.util.ResponseConverterUtils; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @@ -813,7 +812,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. Prefix Filters can be added to `vpc`, `classic`, `directlink`, + * and `power_virtual_server` Connection types. Prefix Filters cannot be added to `gre_tunnel`, `unbound_gre_tunnel`, + * `redundant_gre` or `vpn_gateway` Connection types. * * @param createTransitGatewayConnectionPrefixFilterOptions the {@link CreateTransitGatewayConnectionPrefixFilterOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link PrefixFilterCust} @@ -849,35 +850,6 @@ public ServiceCall createTransitGatewayConnectionPrefixFilter( return createServiceCall(builder.build(), responseConverter); } - /** - * 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} - */ - public ServiceCall replaceTransitGatewayConnectionPrefixFilter(ReplaceTransitGatewayConnectionPrefixFilterOptions replaceTransitGatewayConnectionPrefixFilterOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(replaceTransitGatewayConnectionPrefixFilterOptions, - "replaceTransitGatewayConnectionPrefixFilterOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("transit_gateway_id", replaceTransitGatewayConnectionPrefixFilterOptions.transitGatewayId()); - pathParamsMap.put("id", replaceTransitGatewayConnectionPrefixFilterOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("transit_gateway_apis", "v1", "replaceTransitGatewayConnectionPrefixFilter"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("prefix_filters", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceTransitGatewayConnectionPrefixFilterOptions.prefixFilters())); - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - /** * Remove prefix filter from Transit Gateway connection. * 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 4e16034d4..1abb9d5f9 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 @@ -13,10 +13,10 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; -import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.ArrayList; import java.util.List; +import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * The createTransitGatewayConnection options. @@ -602,9 +602,9 @@ 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 - * unbound_gre_tunnel connection create requests IBM will assign an ASN. + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100, + * 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 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. * @@ -650,8 +650,8 @@ public String remoteTunnelIp() { /** * Gets the tunnels. * - * Array of GRE tunnels for a transit gateway `redundant_gre` and `vpn_gateway` connections. This field is required - * for `redundant_gre` and `vpn_gateway` connections. + * Array of GRE tunnels for a transit gateway `redundant_gre` connections. This field is required for `redundant_gre` + * connections. * * @return the tunnels */ @@ -665,7 +665,9 @@ 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`, `unbound_gre_tunnel` and `vpn_gateway` connections. + * This field is required for network type `gre_tunnel`, and `unbound_gre_tunnel` connections. + * + * This field is optional for network type `vpn_gateway` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` * and `redundant_gre` connections. 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 1eb184929..edd1d87cb 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 @@ -332,9 +332,9 @@ 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 - * will assign an ASN. + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100, + * 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 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 773b82b2e..697321c6b 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 @@ -190,7 +190,8 @@ public Boolean global() { /** * Gets the greEnhancedRoutePropagation. * - * Allow GRE Enhanced Route Propagation on this gateway. + * Allow route propagation across all GREs connected to the same transit gateway. This affects connections on the + * gateway of type `redundant_gre`, `unbound_gre_tunnel` and `gre_tunnel`. * * @return the greEnhancedRoutePropagation */ 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 deleted file mode 100644 index 1d221146f..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPut.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * (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; - -/** - * A prefix filter update template. - */ -public class PrefixFilterPut extends GenericModel { - - /** - * Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. - */ - public interface Action { - /** permit. */ - String PERMIT = "permit"; - /** deny. */ - String DENY = "deny"; - } - - protected String action; - protected Long ge; - protected Long le; - protected String prefix; - - /** - * Builder. - */ - public static class Builder { - private String action; - private Long ge; - private Long le; - private String prefix; - - /** - * Instantiates a new Builder from an existing PrefixFilterPut instance. - * - * @param prefixFilterPut the instance to initialize the Builder with - */ - private Builder(PrefixFilterPut prefixFilterPut) { - this.action = prefixFilterPut.action; - this.ge = prefixFilterPut.ge; - this.le = prefixFilterPut.le; - this.prefix = prefixFilterPut.prefix; - } - - /** - * Instantiates a new builder. - */ - public Builder() { - } - - /** - * Instantiates a new builder with required properties. - * - * @param action the action - * @param prefix the prefix - */ - public Builder(String action, String prefix) { - this.action = action; - this.prefix = prefix; - } - - /** - * Builds a PrefixFilterPut. - * - * @return the new PrefixFilterPut instance - */ - public PrefixFilterPut build() { - return new PrefixFilterPut(this); - } - - /** - * Set the action. - * - * @param action the action - * @return the PrefixFilterPut builder - */ - public Builder action(String action) { - this.action = action; - return this; - } - - /** - * Set the ge. - * - * @param ge the ge - * @return the PrefixFilterPut builder - */ - public Builder ge(long ge) { - this.ge = ge; - return this; - } - - /** - * Set the le. - * - * @param le the le - * @return the PrefixFilterPut builder - */ - public Builder le(long le) { - this.le = le; - return this; - } - - /** - * Set the prefix. - * - * @param prefix the prefix - * @return the PrefixFilterPut builder - */ - public Builder prefix(String prefix) { - this.prefix = prefix; - return this; - } - } - - protected PrefixFilterPut() { } - - protected PrefixFilterPut(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.action, - "action cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.prefix, - "prefix cannot be null"); - action = builder.action; - ge = builder.ge; - le = builder.le; - prefix = builder.prefix; - } - - /** - * New builder. - * - * @return a PrefixFilterPut builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the action. - * - * Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. - * - * @return the action - */ - public String action() { - return 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. - * - * 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. - * - * @return the ge - */ - public Long ge() { - return 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. - * - * 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. - * - * @return the le - */ - public Long le() { - return 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 - * multiple routes with different prefix lengths, but will still only apply to prefixes contained in the address space - * defined by `prefix`. - * - * @return the prefix - */ - public String prefix() { - return 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 deleted file mode 100644 index ee27413fd..000000000 --- a/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptions.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * (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; -import java.util.ArrayList; -import java.util.List; - - -/** - * The replaceTransitGatewayConnectionPrefixFilter options. - */ -public class ReplaceTransitGatewayConnectionPrefixFilterOptions extends GenericModel { - - protected String transitGatewayId; - protected String id; - protected List prefixFilters; - - /** - * Builder. - */ - public static class Builder { - private String transitGatewayId; - private String id; - private List prefixFilters; - - /** - * Instantiates a new Builder from an existing ReplaceTransitGatewayConnectionPrefixFilterOptions instance. - * - * @param replaceTransitGatewayConnectionPrefixFilterOptions the instance to initialize the Builder with - */ - private Builder(ReplaceTransitGatewayConnectionPrefixFilterOptions replaceTransitGatewayConnectionPrefixFilterOptions) { - this.transitGatewayId = replaceTransitGatewayConnectionPrefixFilterOptions.transitGatewayId; - this.id = replaceTransitGatewayConnectionPrefixFilterOptions.id; - this.prefixFilters = replaceTransitGatewayConnectionPrefixFilterOptions.prefixFilters; - } - - /** - * Instantiates a new builder. - */ - public Builder() { - } - - /** - * Instantiates a new builder with required properties. - * - * @param transitGatewayId the transitGatewayId - * @param id the id - * @param prefixFilters the prefixFilters - */ - public Builder(String transitGatewayId, String id, List prefixFilters) { - this.transitGatewayId = transitGatewayId; - this.id = id; - this.prefixFilters = prefixFilters; - } - - /** - * Builds a ReplaceTransitGatewayConnectionPrefixFilterOptions. - * - * @return the new ReplaceTransitGatewayConnectionPrefixFilterOptions instance - */ - public ReplaceTransitGatewayConnectionPrefixFilterOptions build() { - return new ReplaceTransitGatewayConnectionPrefixFilterOptions(this); - } - - /** - * Adds a new element to prefixFilters. - * - * @param prefixFilters the new element to be added - * @return the ReplaceTransitGatewayConnectionPrefixFilterOptions builder - */ - public Builder addPrefixFilters(PrefixFilterPut prefixFilters) { - com.ibm.cloud.sdk.core.util.Validator.notNull(prefixFilters, - "prefixFilters cannot be null"); - if (this.prefixFilters == null) { - this.prefixFilters = new ArrayList(); - } - this.prefixFilters.add(prefixFilters); - return this; - } - - /** - * Set the transitGatewayId. - * - * @param transitGatewayId the transitGatewayId - * @return the ReplaceTransitGatewayConnectionPrefixFilterOptions builder - */ - public Builder transitGatewayId(String transitGatewayId) { - this.transitGatewayId = transitGatewayId; - return this; - } - - /** - * Set the id. - * - * @param id the id - * @return the ReplaceTransitGatewayConnectionPrefixFilterOptions builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Set the prefixFilters. - * Existing prefixFilters will be replaced. - * - * @param prefixFilters the prefixFilters - * @return the ReplaceTransitGatewayConnectionPrefixFilterOptions builder - */ - public Builder prefixFilters(List prefixFilters) { - this.prefixFilters = prefixFilters; - return this; - } - } - - protected ReplaceTransitGatewayConnectionPrefixFilterOptions() { } - - protected ReplaceTransitGatewayConnectionPrefixFilterOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.transitGatewayId, - "transitGatewayId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, - "id cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.prefixFilters, - "prefixFilters cannot be null"); - transitGatewayId = builder.transitGatewayId; - id = builder.id; - prefixFilters = builder.prefixFilters; - } - - /** - * New builder. - * - * @return a ReplaceTransitGatewayConnectionPrefixFilterOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the transitGatewayId. - * - * The Transit Gateway identifier. - * - * @return the transitGatewayId - */ - public String transitGatewayId() { - return transitGatewayId; - } - - /** - * Gets the id. - * - * The connection identifier. - * - * @return the id - */ - public String id() { - return id; - } - - /** - * Gets the prefixFilters. - * - * Array of prefix filters. - * - * @return the prefixFilters - */ - public List prefixFilters() { - return prefixFilters; - } -} - 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 6e26db018..6f6148127 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 @@ -13,11 +13,11 @@ 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; import java.util.Date; import java.util.List; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * Connection included in transit gateway. @@ -32,6 +32,8 @@ public interface BaseNetworkType { String CLASSIC = "classic"; /** vpc. */ String VPC = "vpc"; + /** vpn. */ + String VPN = "vpn"; } /** 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 2bd7add7a..1350009b5 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 @@ -121,7 +121,8 @@ public Boolean isGlobal() { /** * Gets the greEnhancedRoutePropagation. * - * Allow GRE Enhanced Route Propagation on this gateway. + * Allow route propagation across all GREs connected to the same transit gateway. This affects connections on the + * gateway of type `redundant_gre`, `unbound_gre_tunnel` and `gre_tunnel`. * * @return the greEnhancedRoutePropagation */ 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 ae50b97b2..84baaa2c0 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 @@ -35,6 +35,8 @@ public interface BaseNetworkType { String CLASSIC = "classic"; /** vpc. */ String VPC = "vpc"; + /** vpn. */ + String VPN = "vpn"; } /** @@ -429,7 +431,8 @@ public Date getUpdatedAt() { /** * Gets the zone. * - * Location of GRE tunnel. This field is required for network type `gre_tunnel` and `vpn_gateway` connections. + * Location of GRE tunnel. This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. + * This field is optional for network type `vpn_gateway` connections. * * @return the zone */ 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 index 6ab977c64..b435c7791 100644 --- 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 @@ -17,8 +17,6 @@ import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - /** * Details for a redundant GRE tunnel. @@ -33,6 +31,8 @@ public interface BaseNetworkType { String CLASSIC = "classic"; /** vpc. */ String VPC = "vpc"; + /** vpn. */ + String VPN = "vpn"; } /** @@ -203,9 +203,9 @@ public String getNetworkId() { /** * 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. + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100, + * 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 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/TransitGatewayTunnelTemplate.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitGatewayTunnelTemplate.java index c0357633d..87f1d5ffe 100644 --- 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 @@ -243,9 +243,9 @@ public String 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. + * Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100, + * 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 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/UpdateTransitGatewayOptions.java b/modules/transit-gateway-apis/src/main/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/UpdateTransitGatewayOptions.java index 3e6c1d2fc..8201b9e0d 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 @@ -160,7 +160,9 @@ public Boolean global() { /** * Gets the greEnhancedRoutePropagation. * - * Allow GRE Enhanced Route Propagation on this gateway. + * Allow route propagation across all GREs connected to the same transit gateway. This affects connections on the + * gateway of type `redundant_gre`, `unbound_gre_tunnel` and `gre_tunnel`. It takes a few minutes for the change to + * take effect. * * @return the greEnhancedRoutePropagation */ 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 3fc1b42d8..da7f2c7a2 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 @@ -52,8 +52,6 @@ import com.ibm.cloud.networking.transit_gateway_apis.v1.model.PaginationNextTGWConnection; 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.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.RouteReport; @@ -1499,68 +1497,6 @@ public void testCreateTransitGatewayConnectionPrefixFilterNoOptions() throws Thr transitGatewayApisService.createTransitGatewayConnectionPrefixFilter(null).execute(); } - // Test the replaceTransitGatewayConnectionPrefixFilter operation with a valid options model parameter - @Test - public void testReplaceTransitGatewayConnectionPrefixFilterWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"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\"}]}"; - String replaceTransitGatewayConnectionPrefixFilterPath = "/transit_gateways/testString/connections/testString/prefix_filters"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the PrefixFilterPut model - PrefixFilterPut prefixFilterPutModel = new PrefixFilterPut.Builder() - .action("permit") - .ge(Long.valueOf("0")) - .le(Long.valueOf("32")) - .prefix("192.168.100.0/24") - .build(); - - // Construct an instance of the ReplaceTransitGatewayConnectionPrefixFilterOptions model - ReplaceTransitGatewayConnectionPrefixFilterOptions replaceTransitGatewayConnectionPrefixFilterOptionsModel = new ReplaceTransitGatewayConnectionPrefixFilterOptions.Builder() - .transitGatewayId("testString") - .id("testString") - .prefixFilters(java.util.Arrays.asList(prefixFilterPutModel)) - .build(); - - // Invoke replaceTransitGatewayConnectionPrefixFilter() with a valid options model and verify the result - Response response = transitGatewayApisService.replaceTransitGatewayConnectionPrefixFilter(replaceTransitGatewayConnectionPrefixFilterOptionsModel).execute(); - assertNotNull(response); - PrefixFilterCollection responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, replaceTransitGatewayConnectionPrefixFilterPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the replaceTransitGatewayConnectionPrefixFilter operation with and without retries enabled - @Test - public void testReplaceTransitGatewayConnectionPrefixFilterWRetries() throws Throwable { - transitGatewayApisService.enableRetries(4, 30); - testReplaceTransitGatewayConnectionPrefixFilterWOptions(); - - transitGatewayApisService.disableRetries(); - testReplaceTransitGatewayConnectionPrefixFilterWOptions(); - } - - // Test the replaceTransitGatewayConnectionPrefixFilter operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testReplaceTransitGatewayConnectionPrefixFilterNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - transitGatewayApisService.replaceTransitGatewayConnectionPrefixFilter(null).execute(); - } - // Test the deleteTransitGatewayConnectionPrefixFilter operation with a valid options model parameter @Test public void testDeleteTransitGatewayConnectionPrefixFilterWOptions() throws Throwable { 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 deleted file mode 100644 index c468e9fc8..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/PrefixFilterPutTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (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.PrefixFilterPut; -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 PrefixFilterPut model. - */ -public class PrefixFilterPutTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testPrefixFilterPut() throws Throwable { - PrefixFilterPut prefixFilterPutModel = new PrefixFilterPut.Builder() - .action("permit") - .ge(Long.valueOf("0")) - .le(Long.valueOf("32")) - .prefix("192.168.100.0/24") - .build(); - assertEquals(prefixFilterPutModel.action(), "permit"); - assertEquals(prefixFilterPutModel.ge(), Long.valueOf("0")); - assertEquals(prefixFilterPutModel.le(), Long.valueOf("32")); - assertEquals(prefixFilterPutModel.prefix(), "192.168.100.0/24"); - - String json = TestUtilities.serialize(prefixFilterPutModel); - - PrefixFilterPut prefixFilterPutModelNew = TestUtilities.deserialize(json, PrefixFilterPut.class); - assertTrue(prefixFilterPutModelNew instanceof PrefixFilterPut); - assertEquals(prefixFilterPutModelNew.action(), "permit"); - assertEquals(prefixFilterPutModelNew.ge(), Long.valueOf("0")); - assertEquals(prefixFilterPutModelNew.le(), Long.valueOf("32")); - assertEquals(prefixFilterPutModelNew.prefix(), "192.168.100.0/24"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testPrefixFilterPutError() throws Throwable { - new PrefixFilterPut.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/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java deleted file mode 100644 index 243391c89..000000000 --- a/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/ReplaceTransitGatewayConnectionPrefixFilterOptionsTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * (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.PrefixFilterPut; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.ReplaceTransitGatewayConnectionPrefixFilterOptions; -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 ReplaceTransitGatewayConnectionPrefixFilterOptions model. - */ -public class ReplaceTransitGatewayConnectionPrefixFilterOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testReplaceTransitGatewayConnectionPrefixFilterOptions() throws Throwable { - PrefixFilterPut prefixFilterPutModel = new PrefixFilterPut.Builder() - .action("permit") - .ge(Long.valueOf("0")) - .le(Long.valueOf("32")) - .prefix("192.168.100.0/24") - .build(); - assertEquals(prefixFilterPutModel.action(), "permit"); - assertEquals(prefixFilterPutModel.ge(), Long.valueOf("0")); - assertEquals(prefixFilterPutModel.le(), Long.valueOf("32")); - assertEquals(prefixFilterPutModel.prefix(), "192.168.100.0/24"); - - ReplaceTransitGatewayConnectionPrefixFilterOptions replaceTransitGatewayConnectionPrefixFilterOptionsModel = new ReplaceTransitGatewayConnectionPrefixFilterOptions.Builder() - .transitGatewayId("testString") - .id("testString") - .prefixFilters(java.util.Arrays.asList(prefixFilterPutModel)) - .build(); - assertEquals(replaceTransitGatewayConnectionPrefixFilterOptionsModel.transitGatewayId(), "testString"); - assertEquals(replaceTransitGatewayConnectionPrefixFilterOptionsModel.id(), "testString"); - assertEquals(replaceTransitGatewayConnectionPrefixFilterOptionsModel.prefixFilters(), java.util.Arrays.asList(prefixFilterPutModel)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testReplaceTransitGatewayConnectionPrefixFilterOptionsError() throws Throwable { - new ReplaceTransitGatewayConnectionPrefixFilterOptions.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/TransitConnectionCollectionTest.java b/modules/transit-gateway-apis/src/test/java/com/ibm/cloud/networking/transit_gateway_apis/v1/model/TransitConnectionCollectionTest.java index b8ae47e8a..c9704cfe2 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 @@ -13,8 +13,17 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitConnectionCollection; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.cloud.sdk.core.util.DateUtils; +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.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.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 java.io.InputStream; import java.util.HashMap; import java.util.List; 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 5322519af..87721b2cf 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 @@ -13,8 +13,14 @@ package com.ibm.cloud.networking.transit_gateway_apis.v1.model; -import com.ibm.cloud.networking.transit_gateway_apis.v1.model.TransitConnection; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.cloud.sdk.core.util.DateUtils; +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.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 java.io.InputStream; import java.util.HashMap; import java.util.List;